ADB NOTE; adb.exe devices lists all connected devices, make sure to allow the computer (on the phone itself) otherwise the device state will say "unauthorized"!

FASTBOOT NOTE; Fastboot mode can be accessed without ADB by booting with [POWER] + [VOLUME DOWN]

Prep Unlock bootloader

Settings > About phone > Software info > Tap build number Back Developer options > - OEM unlocking - USB debugging

NOTE; You'll want to prep rooting with Magisk before actually performing the unlock!

Unlock bootloader

Prep Magisk rooting

  • Download latest Magisk apk and sideload id
  • Extract bootloader .img file from installed(!) OS release
  • adb push <bootloader.img> /sdcard/Download
  • Patch bootloader image with Magisk
  • adb pull /sdcard/Download/magisk_patched<>.img

Flash rooted bootloader

  • adb reboot bootloader
  • fastboot flash boot <magisk_patched<>.img>
  • fastboot reboot

UNROOT

  • adb flash boot original_bootloader.img

RE-LOCK

  • adb reboot bootloader
  • fastboot flashing lock

Over-the-air (OTA) UPDATE

Delta updates calculate partition checksums! Don't force anything regarding updates bruh, or you'll brick and require EDL

  • OTA update is probably a DELTA update, if it is you need to find the boot image of the NothingOS version that's running
  • Restore original boot.img
    • adb reboot bootloader
    • fastboot flash boot <boot_original.img>
    • fastboot reboot
  • Install OTA through Google Play Update
  • REBOOT !!
    • You have to reboot after the OTA is "installed" because the crucial installation steps happens after first reboot
    • The OTA mechanism will restore the original boot.img if you root before this step
  • Boot Magisk patched boot.img
    • adb reboot bootloader
    • fastboot boot <magisk_patched<>.img>
  • Open up Magisk app and perform direct install on top of the OTA original bootloader
    • Magisk > Install > Direct Install > Let's Go

Quicker method

  • Restore original boot images ** Open Magisk ** Press "Uninstall Magisk" ** Press "Restore boot images"
  • Execute OTA, wait for it to ask for a reboot
  • Reinstall Magisk ** Open Magisk ** Press "Install" ** Choose "Other partition slot (after OTA), DO NOT REBOOT THROUGH MAGISK
  • Reboot from OTA screen ** Go back to OTA success screen ** Press "Reboot"

Phone will reboot from the other partition slot (a->b or b->a). You'll see the bootlog first, then the update screen.
Just for good measure, root again with the direct install method and verify with another reboot.

  • Root boot image with direct install ** Open Magisk ** Press "Install" ** Choose "Direct Install" ** Wait for finish, press "Reboot"

ROOT MODULES

OOM pressure issue

NothingOS v1.5.3 has an issue with root, see topjohnwu/Magisk#6780.
According to topjohnwu/Magisk#6780 (comment), running resetprop persist.sys.mglru_enable false from a root shell will disable the new LRU system and prevent Out-of-memory (OOM) issues.

The change above does not survive reboot and requires a persistent solution, aka a module.
Download sources here https://github.com/LukeSkyD/NP1-MGLRU-FIX/, zip them, install them through Magisk.

BootloopSaver

Safety net fix

I haven't gotten bank apps to work because of "Play Store Attestation" which is a hardware backed verification service that supercedes "Safety Net API".
This thing basically means everyone unlocked/rooted/using a custom ROM is fucked (at the moment, very probably forever) if device attestation is required.

Hide existence of magisk and other device unlocking tools/features from apps

Requires

  • Zygote

Configuration

  • Install the Safetynet fix module
  • Add Banking apps to DenyList
    • I added Google play services to denylist too, but it automatically deselected after reboot
  • Enforce DenyList
  • Reboot
  • Profit

Note

You don't need complex hooking (LSPosed lib injection + Hide my Applist function overrides) for Payconiq! Banking apps don't care about developer mode! You might have to toggle on/off USB debugging (ADB)

Advanced Charging controller

Keep the configuration of Acc simple. Acca doesn't work properly, and the native acc config utilities do not work when the device is in battery saver.

Control the mechanism that handles charging the phone itself

The AccA app is sheit, use it for monitoring and nothing else.

[OPTIONAL]

Setup

  • Run the script acc-setup.sh in an elevated terminal
    • adb push '<acc-setup.sh>' /sdcard/Download
    • adb shell
      • su
      • sh /sdcard/Download/acc-setup.sh
    • adb reboot

Important bits

Acc controls both USB charging and Qi charging.

  • Not sure if the is kernel support (as of 2022-08-15) for "Battery Idle" mode, which bypasses the battery during charging, or not.
    • Not officially confirmed, but
    • The stats look kinda convincing at 0mA current.
  • Using switch battery/charge_control_limit 0 _ battery/charge_control_limit_max
  • Using forceOff
    • Required because heat management tools would turn on usb/wireless charging coil again

Termux

Terminal emulator. DON'T DOWNLOAD THE APP STORE VERSION

Dolby Atmos EQ

Don't need a Dolby mod, could use the Wavelet app just fine.

Systemless hosts

Don't really need it since it doesn't work on most apps (like Youtube)

Call recorder

Call recorder app is a payed option. Look out for in-built options..

Google camera

Yes, it's overwhelming for a beginner

Currently in use

  • GCAM LMC 8.4 R15 snapcam
  • LMC R14.xml (/sdcard//LMC8.4/LMC\ R14.xml)

AOSP Customizations

?? Untested