Prerequisites:
-
a rooted Rockchip-based China tablet device running Android 6, patched to disable SystemUI
-
own-developed app which declares LAUNCHER category and is intended to take full conrol of the device
What am I trying to achieve:
install the app as a system app to avoid handling SDK 23+ permissions
What have I done so far:
- installed the app regularly via Android Studio
- moved the app to /system/priv-app:
(root)
ls /data/app/my.package.name-1 base.apk lib oat mount -o rw,remount /system mv /data/app/my.package.name-1 /system/priv-app/AppName ls -la /system/priv-app/AppName -rw-r--r-- system system 2464934 2017-12-08 11:32 base.apk drwxr-xr-x system system 2017-12-08 11:32 lib drwxrwx--x system install 2017-12-08 11:32 oat reboot
What is the problem?
It seems the system is not aware the app exists: it does not run on boot (which it perfectly does when installed as a regular app) and I am unable to launch it manually:
root@rk312x:/ # am start -n my.package.name/.ui.MainActivity Starting: Intent { cmp=my.package.name/.ui.MainActivity } Error type 3 Error: Activity class {my.package.name/my.package.name.ui.MainActivity} does not exist.
What am I missing?