2

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?

Community
  • 1
  • 1
Shabirmean
  • 2,341
  • 4
  • 21
  • 34

1 Answers1

0

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:

adb push MyApp.apk /system/priv-app/MyApp/
Swing
  • 858
  • 1
  • 8
  • 21