lwc:programming:mobile:android:root

This is an old revision of the document!


Shuame is a Chinese app for Windows. It could be Root Genius is the English translation. How can we be sure this is safe, not malware, not stealing IMEA numbers?

  • How to Root every MTK China Phone takes you through making a recovery using stock ROM. Requires Preloader mode and a bunch of Windows apps. Walks you through generating a scatterfile.
Command Action
adb disable-veritydisable checking of block devices
adb shell “getprop ro.oem_unlock_supported”see if unlocking is supported
adb reboot-bootloaderboot into “fastboot mode”
adb rootget status of rooting

Some commands once in fastboot mode:

Command Action
fastboot oem device-info
fastboot oem unlockunlock the bootloader (2014 and lower)
fastboot flashing unlock_criticalunlock the bootloader (2015 and higher)
fastboot rebootleave fastboot mode

Giving an app root access

Apps need to be system apps to have root-type privs

For apps to have root access they need to be system apps. For KitKat the app needs to be in /system/priv-app with 644 permissions.

  • Example: cat /sdcard/SecureSetting.apk > /system/priv-app/SecureSetting.apk (cp works too)

To give emulator root:

  1. change to directory where emulator is located, probably something like: ~/.android/avd
  2. start the emulator yourself with an incantation similar to: ~/Android/Sdk/emulator/emulator -avd Nexus_4_API_19 -writable-system -selinux disabled -qemu -enable-kvm
  3. in emulator shell: mount -o rw,remount /system

not fully tested

    • when compressing the animation to a zip, make sure the zip is uncompressed (use the -0 flag)
  • Mount system RW: mount -o rw,remount /system
  • Mount system RO: mount -o ro,remount /system
  • lwc/programming/mobile/android/root.1638972564.txt.gz
  • Last modified: 2021/12/08 08:09
  • by John Harrison