I have a System App that is capable of performing some system level tasks (Ex: remote reboot etc.). I want to try this out in the Android-Dev-Studio Emulator.
I have googled for it and this is what I've found so far:
Build the .apk
- adb remount
- adb push [MyApp.apk] /system/app/ (this is /system/priv-app in API Level 19+)
- adb shell chmod 644 /system/app/[MyApp.apk]
- adb reboot
I have done all of this. I've tried copying my apk to both folders "/system/app/" and "/system/priv-app/" folders. Regardless, when I reboot the emulator does not show anything and gets stuck.
According to this question reboot does not work for emulators which I also noticed to be correct, since the copied .apk file is lost upon restart.
What am I missing here?
I am compiling and building for SDKVersion - 21. So which folder should I copy my system app to? (/system/app/ or /system/priv-app)?
Also if reboot does not work for emulators, how do I get the app installed and running?
What's android version of your emulator?
The "/system/app/" and "/system/priv-app/" directory structure have been changed since Android L, you should use: