Android Phone ROM

  • boot into TWRP and wipe/format Data and wipe System and Cache
    • install ROM
    • install Magisk
  • reboot
  • in Magisk enable Systemless hosts
  • in Setting, Security, set Screen lock to PIN and enable Encryption, Enctyp phone (may not work later, so must be done now)
  • boot into TWRP
    • upload a MicroG installer configuration
    • install MicroG and its Google Sync adapters
    • install Migrate backup
  • reboot
  • enable Developer mode and USB debug (also adb shell su -c "setprop service.adb.tcp.port 5555 && stop adbd && start adbd"); SIM preferences (SMS and data); WiFi
  • enable MicroG permissions (adb shell su -c 'npem'), set MicroG NLP backends, check MicroG status, add Google Accounts
  • enable “Allow apps to find accounts” in Settings, Accounts, the account, Personal info & privacy
  • restore from the Migrate backup
  • reboot
  • enable sync, check all apps, finalize settings

Recovery Boot

  • Xiaomi: With the device powered off, hold “Volume Up” + “Power”. Keep holding both buttons until the “MI” logo appears on the screen, then release.
  • or fastboot boot twrp-*.img

Cleaning ROM

  • Now tap “Wipe”.
  • Now tap “Format Data” and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.
  • Return to the previous menu and tap “Advanced Wipe”, then select the “Cache” and “System” partitions and then “Swipe to Wipe”.

Install ROM

  • On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
  • On the host machine, sideload the package using: adb sideload filename.zip

Updating ROM (OTA)

  • install the OTA update
  • boot into recovery and install Magisk
  • enable MicroG permissions (adb shell su -c 'npem'), set MicroG NLP backends, check MicroG status, add Google Accounts
  • enable “Allow apps to find accounts” in Settings, Accounts, the account, Personal info & privacy
  • update and open Aurora Services and whitelist Aurora Shop
  • reboot
  • check apps, fix broken apps:
    • clean reinstall (remove and install): AliExpress, Google Photos, Pubtran, Google Calendar, Keybase, Klara, L-Speed, Zpevnik

Restoring from TWRP Backup (Removing Full-Disk Encryption)

  • Full-Disk Encryption cannot be removed without loose of data, the following procedure does not work:
    • TWRP: “Backup”, “data”
    • adb pull /data/media/0/TWRP/BACKUPS
    • TWRP: “Wipe”, “Format Data”, “yes”
    • adb push BACKUPS /data/media
    • TWRP: “Restore”, …, “Delete backup”, …, “Reboot”
    • does not work, as it tries to encrypt FS once again

ROM

Mido (Redmi Note 4X)

Land (Redmi 3S)

  • List Of All Best Custom ROM For Xiaomi Redmi 3S/Prime/3X
  • Arrow OS
    • pros: OTA and quite regular builds, Lawnchair as the default launcher, etc.
    • cons: disabled SELinux (and broken SafetyNet), full-disk encryption disable fingerprint unlock (FDE must be done ASAP, otherwise there is boot loop), sensors doze in L-Speed turn off backlight after wake-up when sensors are enabled (TODO: check if disabling sensors doze helps), no extra settings
  • Havoc OS
    • BUG @v3.5-20200529: MediaProvider does not provide android.intent.action.RINGTONE_PICKER so all activites selecting ring/alarm/etc. tones crash (e.g., Settings, Alarm, Caller, etc.) – workaround: use a custom Ringtone Picker, e.g., TonePicker (builds)
    • ROM Havoc-OS-v3.5-20200529-land-Official.zip, OpenGApps Pico, 2 SIMs, WiFi, Bluetooth, GPS; enabled L-Speed Battery Profile with Force Doze (except for enabled Motion Detection; Camera whitelisted) and GPU Battery Profile; moderate usage (however, more than in the case of AOSP Extended) – battery last 28 hours
    • cons: no OTA updates (and no automatic builds), Pixel Launcher (not much settings)
    • pros: enabled SafetyNet and SeLinux enforcing, good settings (adb wireless, etc.)
  • AOSP Extended
    • ROM AospExtended-v7.2-land-20200521-1755-OFFICIAL.zip, OpenGApps Pico, 2 SIMs, WiFi, Bluetooth, GPS; enabled L-Speed Battery Profile with Force Doze (except for enabled Motion Detection) and GPU Battery Profile; moderate usage (24 min Web browser, 16 min Tiny Tiny RSS, 1 hour Display; 33 % OS Android, 33 % System Android, 5 % display) – battery last 26 hours
    • cons: low security (ADB enabled by default without authentication)
  • Corvus
    • only some versions released, irregular (5.0 on 05-13, 5.5 on 05-30)
  • DerpFest
    • too big (~1.1 GB)
  • deprecated: LineageOS – land removed in 17.0 ???

Magisk

Google Apps

by Google

by MicroG

adb shell "cat >/data/media/0/.nanodroid-setup" <<END
nanodroid_microg=1
nanodroid_fdroid=0
nanodroid_apps=0
nanodroid_play=21
nanodroid_overlay=0
nanodroid_mapsv1=1
nanodroid_init="10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner"
nanodroid_gsync=1
nanodroid_swipe=0
nanodroid_forcesystem=0
nanodroid_nlpbackend=1111
nanodroid_bash=1
nanodroid_utils="findfs findmnt hexdump lessecho lesskey lsblk lscpu lsipc lslocks lsns ncal whereis"
END
  • MinMicroG
    • boot ROM at least once before the installation (after the Magisk); then install in TWRP: Standard Edition
  • microG Installer Revived as a Magisk module
    • does not include location provider services and Google Sync
  • enable Signature Spoofing and permissions by
    • adb shell su -c npem (for NanoDroid and MinMicroG) – in case of “Failure calling service package: Failed transaction (2147483646)” error, try again later as “su” and “npem”
    • or GsmCore – microG Setting, Self-Check, System grants signature spoofing permission
    • Play Store (Phonesky) – needs to enable signature spoofing by adb shell su -c "pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE"
  • issues: broken GMail (use Fair Email), etc.

SafetyNet

  • requires Enforced SELinux
    • disabled in ArrowOS, enabled in HavocOS
    • can be enabled on start by Magisk module MultiFunctionsPlus
    • it is not required, even for
      • Revolut (just reinstall in the case of any issues with a restored app from a backup)
      • Waze (remove all data and restart the app)
  • requires Certified Fingerprint
    • by Magisk modules: Busybox for Android NDK and MagiskHide Props Config
    • after reboot, run adb, su -, and props: Edit device fingerprint (1) > Pick a certified fingerprint (f) > Google (6) > Google Pixel 3a (20) > Android 10 (2) > Yes (y) > Reboot (y).

Apps

  • launcher: Lawnchair – Google Play releases (F-Droid releases are deprecated), update in ArrowOS (default version *.ci is old and buggy, e.g., in the two-columns dock)
  • repository: F-Droid – in Android 10 works even without F-Droid Privileged Extension
  • battery/power: LSpeed – custom profile with force doze, etc.
    • land: Battery, Doze optimization, Disable motion detection – breaks Camera application; to fix Enable motion detection and Whitelist doze for Camera
  • backup/restore: Migrate-GPE or Migrate Mercury
  • mail client:
    • FairEmail – open source, advanced, Google Play releases can use GMail account directly (without IMAP)
    • BlueMain – closed source, easy
    • install CA cert – Settings, Security, Encryption, Install (or download and run the crt file); add as an Application and VPN Certificate
  • ad-blocker: AdAway
    • enable Systemless hosts in Magisk settings
  • wallpaper: convert xc:black -strip png:- | adb shell "cat > /sdcard/Pictures/black.png"
  • banking: Revolut – reinstall in the case of broken app after restoring from a Migrate backup

Settings (in Czech)

  • Informace o telefonu
    • Nazev zarizeni: ?
    • Nouzove informace
      • Jmeno: email
      • Nouzove kontakty: ?
  • System
    • Jazyky a zadavani
      • Jazyk
        • Czech: ADD
        • English: DEL
    • Zaloha
      • Zalohovani mych dat: ON
    • Vice uzivatelu: OFF
    • Pro vyvojare
      • Ladeni pres USB: ON
      • Vychozi konfigurace USB: PTP
      • Doplnkova barva: RED
  • Sit a internet
    • Wi-Fi
      • Predvolby Wi-Fi
        • Oznamovat verejne site: OFF
    • Mobilni site
      • (cokoliv)
        • Predvolby SMS: ?
      • (data SIM)
        • Mobilni data: ON
        • Roaming: ON
        • Preferovany typ site: GLOBAL (posledni)
      • (call SIM)
        • Preferovany typ site: GLOBAL (posledni)
    • Hotspot a tethering
      • Wi-Fi hotspot
        • Nazev hotspotu: *_nomap
        • Heslo hotspotu: ?
  • Aplikace a oznameni
    • Oznameni
      • Nerusit
        • SMS, MMS a aplikace k psani zprav
          • Povolit zpravy: Pouze od oblibenych kontaktu
        • Vychozi doba trvani: Pokazde se zeptat
        • Plany
          • Spanek: ON
            • Pouzit plan: ON
            • Cas zahajeni: 23:00
  • Baterie
    • Kontrolka nabijeni baterie
      • Blikat pri nizkem stavu baterie: ON
    • Styl ikony baterie
      • Styl baterie: TEXT
  • Displej
    • Nocni rezim
      • Plan: Zapne se od soumraku do usvitu
      • Intenzita: 1/4
    • Adaptivni jas: ON
    • Automaticke otoceni obrazovky: ON
    • Tmavy motiv: ON
    • Styly tmaveho motivu: Pitch Black
    • Styly a tapety
      • Styl: vlastni
        • Vybrat barvu: RED
      • Tapeta
        • Povolit pristup
        • Moje fotky: convert xc:black -strip png:- | adb shell "cat > /sdcard/Pictures/black.png"
    • Polozky stavoveho radku
      • ALL
      • Hodiny: zobrazovat hodiny, minuty a sekundy
  • Zvuk
    • Hlasitost *: MAX
    • Vibrace u volani: ON
    • Vyzvaneci ton telefonu: Lollipop
    • Vychozi zvuk oznameni: Coconuts
    • Vychozi zvuk budiku: mus_bardlute_01.mp3
    • Tony ciselniku: OFF
    • Zvuky zamku obrazovky: OFF
    • Zvuky pri dotyku: OFF
  • Ochrana soukromi
    • Statistiky: OFF
  • Zabezpeceni
    • Zamek obrazovky: PIN
      • Obrazovka uzamceni: Zobrazit citlivy obsah jen behem odemknuti
    • Otisk prstu – nedostupne na zasifrovanem telefonu
    • Sifrovani a povereni
      • Sifrovat telefon
      • Instalace z karty SD: curl 'http://ca.vutbr.cz/pki/pub/cacert/cacert.crt' | adb shell "cat > /sdcard/Download/VUT.crt"
  • Ucty
    • (cokoliv)
      • Personal info & privacy
        • Allow apps to find accounts: ON
  • Pristupnost
    • Vypinac ukonci hovor: ON
  • Tlacitka
    • Menu napajeni: ?
    • Povolit rozsireny restart: ON

Telefon

…, Nastaveni

  • Moznosti zobrazeni
    • Setridit podle: Prijmeni
    • Format jmena: Nejprve prijmeni
  • Zvuky a vibrace
    • Vibrovat pri odpovedi: ON
    • Vibrovat pri dalsi hovoru: ON
    • Vibrovat pri zaveseni: ON

SMS a MMS

…, Nastaveni

  • SIM karta (call SIM)
    • Skupinove zpravy: Jednotlive SMS
    • Automaticke nacitani: OFF
    • Zpravy o doruceni SMS: ON
  • SIM karta (data SIM)
    • Skupinove zpravy: Jednotlive SMS
    • Automaticke nacitani pri roamingu: ON
    • Zpravy o doruceni SMS: ON

Fotoaparat

  • Detekce obliceje: ON
  • Odstraneni sumu: OFF
  • Automaticke HDR: ON

 Share!

 
comments powered by Disqus