3

I am needing a way to start up an apk I have put into my system/app on a rooted device from adb. (In the shell or out of shell are both fine)

.apk is pushed onto device using adb.

I have found the way to do this if installed normally but that is not what I need as this app needs to be in system/app for permission reasons.

Can someone please help or point me in the right direction thanks.

SatanEnglish
  • 1,346
  • 1
  • 13
  • 22
  • Why don't you try to use adb install xxx.apk? I don't know whether it works by only pushing the file to system/app. – faylon Jan 09 '13 at 03:38
  • It puts the installed app into data/app if we use adb install xxx.apk and I want it in system/app – SatanEnglish Jan 09 '13 at 20:33

2 Answers2

2

After pushing to system, be sure to set permisions, then reboot device and launch from adb like any other app.

on reboot the system app will be "installed"

pvyParts
  • 231
  • 1
  • 6
  • adb shell am start com.test.hellopushtest/com.test.hellopushtest.MainActivity does not work after reboot is there some other start method your thinking of? – SatanEnglish Jan 08 '13 at 00:53
  • yeah thats prety much right look here tho [At this post](http://stackoverflow.com/questions/4567904/how-to-start-an-application-using-android-adb-tools) you may have to only use com.test.hellopushtest/.MainActivity – pvyParts Jan 08 '13 at 01:08
  • Thanks for the help but this doesn't work already tried all sorts of combinations we no sucess – SatanEnglish Jan 08 '13 at 20:35
  • only the HelloPushTest.apk file can be found and there for the com.test.hellopushtest lines do not work and neither will HellPushTest.apk/com.test.hellopushtest.MainActivity ...ect – SatanEnglish Jan 08 '13 at 21:52
  • Have you set permisions on the file after pushing it to system/app `adb shell chmod 0644 /system/app/yourapp.apk` (need to reboot for it to take affecct) – pvyParts Jan 09 '13 at 03:23
  • 1
    yes it just won't let me call the start command on it. Its ok found a work around seems the BroadCastReciever still gets initialized on reboot of device so I can use this to get app running – SatanEnglish Jan 17 '13 at 20:16
1

Use the following command:

adb remount
adb push apkfilename /system/app
adb reboot

This will make that apk file as a system application.

alexandresaiz
  • 2,678
  • 7
  • 29
  • 40
stp
  • 11
  • 1