Closed d4rken closed 1 year ago
I basically run a standard magisk installation. Beta 13.6, Magisk Hide, Systemless hosts. I disabled Force encryption and dm verify to run twrp.
Running magisk in core only mode solves the problem. I searched trough the magisk log and it mounts the apps under /system/priv-app/ from a dummy location to their 'real' location. But this method completely destroys the purpose of magisk and requires a reboot each time to change that setting.
I took a log for you to take a look at it. Here is the interesting part:
I( 3147: 3259) * Loading modules
I( 3147: 3259) Fdroid-Priv: constructing magic mount structure
D( 3147: 3259) bind_mount: /dev/magisk/dummy/system/priv-app -> /system/priv-app
D( 3147: 3259) bind_mount: /magisk/Fdroid-Priv/system/priv-app/Fdroid -> /system/priv-app/Fdroid
D( 3147: 3259) bind_mount: /dev/magisk/mirror/system/priv-app/AODService_v25 -> /system/priv-app/AODService_v25
D( 3147: 3259) bind_mount: /dev/magisk/mirror/system/priv-app/AccessControl_N -> /system/priv-app/AccessControl_N
D( 3147: 3259) bind_mount: /dev/magisk/mirror/system/priv-app/AppLock -> /system/priv-app/AppLock
I can't test it today but I think FDroid Priviliges Extension adds an Systemless app under /priv-app/ and so all apps get mounted from a mirror location. No idea what to do about it. Full logs attached with core only mode which disables all modules and solves that problem. magisk logs.zip
Edit: I could imagine that if I had a module installed that replaces an app under/system/app/ that magisk would fail to delete it, too. This would need further testing.
Just unmounting /system/priv-app/AppLock
doesn't help then right? It would just delete an empty dir and the files remain under /dev/magisk/mirror/system/priv-app/AppLock
? So for this to be useful we need mountpoint deletion and for SD Maids AppControl to understand "Magisk".
I have a very basic understanding of magisk. Generally I know that it is not magic but as far as I understand it you should be right. I am free for testing if you need it and maybe you ask @topjohnwu for advice that you not accidentally break something important.
As Magisk is open source we should be able to figure this out ourselves, let's not bother him until necessary. I fear this might be a bit lower on my TODO list though as it's quite specific support.
I did further testing. This only applies if you have a module installed that replaces apps under /system/priv-app/ or /system/app/. maybe you should change the first post to reflect that.
Got a link to the module?
Some Magisk modules mirror
/system
and replace apps in/system/app
with mounts. SD Maid does currently not delete mounts and would also not understand which files to delete as SD Maid is unware of what these Magisk modules did.Relevant modules:
also see https://github.com/d4rken/sdmaid-public/issues/1125#issuecomment-327487317
Deleting a system app with a mount
leads to
This would be required to delete system apps on some ROMs after fixing #1005 :
/dev/block/sda17 on /system/priv-app/FBInstaller_NS type ext4 (ro,seclabel,relatime,block_validity,delalloc,norecovery,barrier,user_xattr,errors=panic)
, but still blocks deleting mounts such as/system