lwc:programming:mobile:android:root

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lwc:programming:mobile:android:root [2021/12/07 21:04] John Harrisonlwc:programming:mobile:android:root [2022/01/03 12:21] (current) – [Tips and Tricks] John Harrison
Line 44: Line 44:
   * [[https://stackoverflow.com/questions/17222535/create-system-application|How to make your app a system app on a rooted device]]   * [[https://stackoverflow.com/questions/17222535/create-system-application|How to make your app a system app on a rooted device]]
   * [[https://titanwolf.org/Network/Articles/Article?AID=08b12461-41e9-4fa2-9fe9-e40a604cfb53|root run bash-like commands etc.]]   * [[https://titanwolf.org/Network/Articles/Article?AID=08b12461-41e9-4fa2-9fe9-e40a604cfb53|root run bash-like commands etc.]]
 +  * [[https://medium.com/android-news/system-app-in-android-f003d418b4cc|tutorial on Medium on how to make system apps]]
  
 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. 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)   * Example: ''cat /sdcard/SecureSetting.apk > /system/priv-app/SecureSetting.apk'' (cp works too)
 +
 +==== Emulator ====
 +To give emulator root:
 +  - change to directory where emulator is located, probably something like: ''~/.android/avd''
 +  - 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''
 +  - in emulator shell: ''mount -o rw,remount /system''
 +//not fully tested//
  
 ==== Tips and Tricks ==== ==== Tips and Tricks ====
   * [[https://android.googlesource.com/platform/frameworks/base/+/master/cmds/bootanimation/FORMAT.md|change boot animation]]   * [[https://android.googlesource.com/platform/frameworks/base/+/master/cmds/bootanimation/FORMAT.md|change boot animation]]
     * when compressing the animation to a zip, make sure the zip is uncompressed (use the ''-0'' flag)     * when compressing the animation to a zip, make sure the zip is uncompressed (use the ''-0'' flag)
 +  * for script to run on boot add/create ''/system/etc/install-recovery.sh''
   * Mount system RW: ''mount -o rw,remount /system''   * Mount system RW: ''mount -o rw,remount /system''
   * Mount system RO: ''mount -o ro,remount /system''   * Mount system RO: ''mount -o ro,remount /system''
  
  • lwc/programming/mobile/android/root.1638932683.txt.gz
  • Last modified: 2021/12/07 21:04
  • by John Harrison