6

I'm wondering is it possible to install .apk file as system app directly (with root)? Without converting user app to system app.

0

2 Answers 2

4

You can simply copy the apk (its name not relevant) into /system/app or /system/priv-app, set the appropriate permissions (rw-r-r, root:root) and then do a reboot. That's it.

Works well on Android 6.0.1.

9
  • Can you delete the apk from /system/app folder after reboot, once it's installed?
    – red-o-alf
    Apr 5, 2019 at 0:38
  • The presence of an APK is necessary for the app to be functional, otherwise, after removal, the app won't run, although you would continue to have the app icon in your launcher until you reboot the device.
    – Firelord
    Apr 5, 2019 at 4:13
  • How exactly do you "simply copy the apk" ? And what if the app is already installed? Jul 16, 2019 at 20:04
  • 1
    Use a file manager app such as Solid Explorer to copy the Apk to the location and to set permissions. If the app is already installed move (not copy) its apk from /data/app directory to the location I mentioned in the answer. A reboot would fix things on its own. @androiddeveloper
    – Firelord
    Jul 17, 2019 at 5:02
  • 1
    I've now tried the "/system/app mover" app on Nexus 5 with Android 9 (custom rom of course) and BusyBox which it requires for some reason, and it converted an app to be a system app without any issues. Tried again on my Pixel 2 with Android Q, and it still showed an error that it can't do this "could not mount /system" . Odd Jul 21, 2019 at 22:58
2

Via ADB: (Copy apk to phone via usb/My computer first)

Example:

adb shell                                           (Get into shell to run beow commands)
su                                                  (Run as root)
mount -o rw,remount /system                         (Mount system read/write since default it read-only)
chmod 755 /system/priv-app/Messaging_SEP81          (Set permissions on folder)
chmod -R 644 /system/priv-app/Messaging_SEP81       (Set permissions on apk file)
ls -l /system/priv-app/Messaging_SEP81              (Check permissions - Should be: -rw-r--r-- 1 root root - not sure what 1 & 2 is)
ls -l /system/priv-app | grep "Messaging"           (Check permissions - Should be: drwxr-xr-x 2 root root)
reboot                                              (Reboot device)
1
  • What if after mount -o rw,remount /system , it shows /dev/block/sda43 is read-only ? Also, what's "Messaging_SEP81" ? How can I convert an existing app to be a system app? Jul 16, 2019 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .