New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstalling system apps fails if the system app's folder is a mountpoint #2273

Open
d4rken opened this Issue Jan 25, 2019 · 6 comments

Comments

Projects
None yet
1 participant
@d4rken
Copy link
Owner

d4rken commented Jan 25, 2019

SD Maid correctly deletes the dalvik and cache files, but when it tries to delete the APK file, it fails.
SD Maid tries to delete: /system/priv-app/Snap

but throws an error because that's not a normal folder, but a mountpoint:

W/SmartIO: eu.thedarken.sdm.tools.exceptions.IllegalDeletionAttempt: Illegal delete attempt on mountpoint:/system/priv-app/Snap
/dev/block/mmcblk0p24 on /system/priv-app/Snap type ext4 (ro,seclabel,relatime,discard,data=ordered)

The problems seems to be that SD Maid expects that /system is a mountpoint or that /system/priv-app is a mountpoint, but not that /system/priv-app/Snap is a mountpoint.

I didn't expect this, the mountpoint check is safety mechanism.

sdmaid_logfile_1548348679172.zip

@d4rken

This comment has been minimized.

Copy link
Owner Author

d4rken commented Jan 25, 2019

I can just add an exception from this protection but it's better if we first understand why these mounts exist...

@d4rken

This comment has been minimized.

Copy link
Owner Author

d4rken commented Jan 25, 2019

 1548348679177 I/Debug: F: VERSIONNAME:4.13.1; VERSIONCODE:41301
1548348679178 I/Debug: P: VERSIONNAME:4.3.5; VERSIONCODE:40305
1548348679179 D/Debug: Fingerprint: xiaomi/mido/mido:7.0/NRD90M/V9.6.1.0.NCFMIFD:user/release-keys
1548348679179 D/Debug: ro.build.version.codename=REL
1548348679179 D/Debug: ro.build.version.incremental=c78b72a3c6
1548348679179 D/Debug: ro.build.version.base_os=
1548348679179 D/Debug: ro.build.version.release=8.1.0
1548348679179 D/Debug: ro.build.display.id=lineage_mido-userdebug 8.1.0 OPM8.190105.002 c78b72a3c6 release-keys
1548348679180 D/Debug: ro.product.name=lineage_mido
1548348679180 D/Debug: ro.product.device=mido
1548348679180 D/Debug: ro.product.board=MSM8953
1548348679180 D/Debug: ro.product.manufacturer=Xiaomi
1548348679180 D/Debug: ro.product.brand=Xiaomi
1548348679180 D/Debug: ro.product.model=Redmi Note 4
1548348679181 D/Debug: ro.bootloader=unknown
@d4rken

This comment has been minimized.

Copy link
Owner Author

d4rken commented Jan 25, 2019

 1548348684648 D/RXS:Root:RootContext: SuBinary: SuBinary(type=MAGISKSU, path=/sbin/su, version=18.0, extra=null, raw=[18.0:MAGISKSU (topjohnwu)])
1548348684651 D/RXS:Root:RootContext: SuApp: SuApp(packageName=com.topjohnwu.magisk, versionName=6.1.0, versionCode=165, path=/data/app/com.topjohnwu.magisk-y9l6tVKr-245QNH-HRD6UA==/base.apk)
@d4rken

This comment has been minimized.

Copy link
Owner Author

d4rken commented Jan 25, 2019

1548348685442 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm pidof, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685442 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm cp, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685442 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm find, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685442 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm touch, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685443 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm mv, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685443 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm grep, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685444 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm du, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685444 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm kill, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685444 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm stat, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685444 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm test, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685445 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm rm, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685445 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm cat, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685446 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm ps, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685446 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm rmdir, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685446 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm mount, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL, outputType=OutputType.DefaultVariant())
1548348685447 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm chmod, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685447 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm chown, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685447 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm echo, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685448 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm mkdir, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
1548348685448 I/BinaryInstaller: Final applet: Applet(call=/data/user/0/eu.thedarken.sdm/files/toybox_sdm xargs, version=toybox 0.7.3-37-g04940678c81a, type=INTERNAL, compat=ALL)
@d4rken

This comment has been minimized.

Copy link
Owner Author

d4rken commented Feb 1, 2019

I found from what . This is because of the Magisk. If enable "Magisk Core Only Mode" I can delete applications via sdmaid
When modules are installed, they affect /system/app or system/priv-app. Sdmaid is not able to remove applications. What is surprising, I can delete myself apk through Mixplorer file manager

@d4rken

This comment has been minimized.

Copy link
Owner Author

d4rken commented Feb 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment