SystemAppMover: Doesn't work on Lineage OS 14.1 (Android 7.1.1)

When trying to move an app, there is an error: “could not remount /system” logcat: 01-05 21:35:55.982 23781 23781 W .systemappmover: type=1400 audit(0.0:149): avc: denied { read } for name="RootToolsMounts" dev="dm-0" ino=654083 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=0 (sorry - accidentally clicked enter on the original report with only the title)

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 3
  • Comments: 16

Most upvoted comments

The problem is RootTools library (https://github.com/Stericson/RootTools/blob/master/src/main/java/com/stericson/RootTools/internal/Remounter.java#L119) generates this command:

mount -o remount,rw /system

While the newest lineageOS needs this command:

mount -o rw,remount /system

I hope someone fill fix this since the problem is located

Yalp Store (available on f-droid) does it.

All you have to do is move the directory that contains your .apk to the /system/app or the /system/priv-app directory, then restart your device. So, for example, let’s say I have an app on my device. Its .apk is located in /data/app/com.foo.bar. So in a terminal with root permissions I would just do the following:

# mv /data/app/com.foo.app /system/app

Then I would restart my device. I believe it can be done in an adb shell as well.

If your file manager supports getting root permissions (Amaze is one), you can just move it with that.

One small caveat to making your apps system apps is that updates are not installed to the /system directory automatically. It’s still considered a system app, it’s just that the update .apk is stored in the /data/app directory (or wherever the standard installation directory for your device is). So, if you don’t want the update .apk taking up extra space on your device, you have to move it again, replacing the old .apk.

I don’t know anything about Android Q though.