sdmaid icon indicating copy to clipboard operation
sdmaid copied to clipboard

Failed mount applet test on rooted Google `coral` device

Open d4rken opened this issue 3 years ago • 6 comments

google/coral/coral:11/RQ3A.210905.001/7511028:user/release-keys

Fallbacks don't work, but the initial mount applet check could basically work, but we use a test command that doesn't seem to work on this device.

coral seems to be an Android dev board? :thinking:

D/RXS:RxShell:Session: writeLine(line=/system/bin/toybox mount -o ro,remount '/', flush=false)
D/RXS:RxShell:Session: writeLine(line=echo c0ec8d31-0db3-4021-8edd-5f7caddfc9fb $?, flush=false)
D/RXS:RxShell:Session: writeLine(line=echo c0ec8d31-0db3-4021-8edd-5f7caddfc9fb >&2, flush=true)
V/RXS:Harvester:Error: mount: '/dev/root'->'/': Invalid argument
V/RXS:Harvester:Output: c0ec8d31-0db3-4021-8edd-5f7caddfc9fb 1

sdmaid_logfile_1632037500141.txt

Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so test, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so find, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so pidof, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so mv, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so cat, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so cp, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so chmod, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so rm, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so mkdir, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so ps, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so chown, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so touch, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so rmdir, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so grep, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so xargs, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so echo, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so kill, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so stat, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so du, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=ALL)
Final applet: Applet(call=/data/app/~~zo7Jt2YvNFOoqbFmHsrFBQ==/eu.thedarken.sdm-PofJ_E1q9SVBAFtIltlYAw==/lib/arm64/libtoybox.so mount, version=toybox 0.7.3-38-g984cb380a303, type=INTERNAL, compat=USER, outputType=OutputType.DefaultVariant())

d4rken avatar Oct 02 '21 03:10 d4rken

Screenshot_20211002-113050002 sir,i use magisk 21.3 to get su

a1623382 avatar Oct 02 '21 03:10 a1623382

Root works, SD Maid fails to find a working mount applet that can be used with root. Though I suspect that there is one, SD Maids test for it is just not OK for this ROM. :thinking:

d4rken avatar Oct 02 '21 03:10 d4rken

Is it because the file system of the system partition of my device uses erofs?

a1623382 avatar Oct 02 '21 03:10 a1623382

coral seems to be an Android dev board? thinking

coral is the codename of Pixel 4 XL and spoofing build fp is only meant to pass SafetyNet.

This device is OnePlus 7 Pro, running an unofficial LineageOS build. FYI it uses a SAR (aka. system-as-root) partition layout and EROFS as the filesystem of system, vendor and odm, which is read-only and could only be remounted to overlayfs.

alk3pInjection avatar Oct 02 '21 03:10 alk3pInjection

On Android 10+, SD Maid runs this:

        private fun testRootOnAndroid10(directCall: String, rootSession: RxCmdShell.Session): Boolean {
            // https://github.com/d4rken/sdmaid-public/issues/2903
            return Cmd.builder("$directCall -o ro,remount '/'")
                    .execute(rootSession)
                    .exitCode == Cmd.ExitCode.OK
        }

This device is OnePlus 7 Pro, running an unofficial LineageOS build. FYI it uses a SAR (aka. system-as-root) partition layout and EROFS as the filesystem of /system, /vendor, /odm, which is read-only and could only be remounted to overlayfs.

I'm not very deep into the current root setups, but supporting this should be straight-forward if we can find a reliable way to detect this setup. So what could SD Maid look for to then execute a different mount test (and what should SD Maid run to check if mount works)?

d4rken avatar Oct 02 '21 03:10 d4rken

Well this is interesting.

We tested the remount operation on MIX 4 (EROFS but dynamic partitioning) and OnePlus 7 Pro with stock ROM (SAR but ext4), and it has turned out that both worked fine. So this issue could be caused by an edge case (SAR + EROFS) ~~or something wrong with the EROFS port. I'll look into it then.~~ [1]

[1]: Poco F2 Pro with the same EROFS port works fine.

alk3pInjection avatar Oct 02 '21 04:10 alk3pInjection