Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to convert app to system app ?

Tags:

android

shell

How do install a *.apk from adb command line?

First I tried to cp the *.apk from /sdcard/backups/apps to /system/app (after rw mounting the file system of course)

I did successfully move it to /system/app but the *apk was not "installed"

I used this code :-

** adb shell

su

mount -o rw,remount /system

adb shell

su

cd /sdcard

mv com.ogp.gpstoggler-1.apk /system/priv-app

finally after I write

chown 644 /system/priv-app/com.ogp.gpstoggler-1.apk

and press enter the result is


Unable to open /system/priv-app/com.ogp.gpstoggler-1.apk: No such file or direc tory***

how to fix this ? thank you ?

like image 723
Getaw Dejen Avatar asked Oct 20 '22 05:10

Getaw Dejen


1 Answers

  1. Instead of using "mv" use "cp" to copy it to system/priv-app folder.
  2. Ensure it is in the priv-app folder using "ls"
  3. use chmod 777 to give it privileges
  4. Ensure it has the correct privileges using "ls -l"
  5. use "adb reboot" to have the system install the application.

    Edit

One thing I forgot to note - if you go into the system/priv-app folder and you see that all the other APK's are in their own folders, you might also have to create a folder for your apk.

  1. mkdir system/priv-app/app_name
  2. cp app_name.apk system/priv-app/app_name
  3. cd system/priv-app/app_name
  4. chmod 777 system/priv-app/app_name/app_name.apk
  5. adb reboot
like image 135
Nefariis Avatar answered Nov 01 '22 07:11

Nefariis