d4rken-org / sdmaid

SD Maid is an Android app that helps you manage files and apps.
https://play.google.com/store/apps/details?id=eu.thedarken.sdm
1.52k stars 750 forks source link

Binary setup crashes instead of gracefully failing #1474

Closed d4rken closed 6 years ago

d4rken commented 6 years ago
java.lang.RuntimeException: java.io.IOException: Error running exec(). Command: [su] Working Directory: null Environment: [VIBE_PIPE_PATH=/dev/pipes, ANDROID_ROOT=/system, KNOX_STORAGE=/data/knox/ext_sdcard, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, MC_AUTH_TOKEN_PATH=/efs, LD_PRELOAD=/vendor/lib/libNimsWrap.so, EMULATED_STORAGE_TARGET=/storage/emulated, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/emulated/legacy, ANDROID_SOCKET_zygote=9, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/sec_edm.jar:/system/framework/timakeystore.jar:/system/framework/twframework.jar:/system/framework/commonimsinterface.jar:/system/framework/imsmanager.jar:/system/framework/com.broadcom.bt.jar:/system/framework/seccamera.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/secmediarecorder.jar:/system/framework/secocsp.jar:/system/framework/secEmailBC.jar:/system/framework/qcmediaplayer.jar:/system/framework/oem-services.jar:/system/framework/org.codeaurora.Performance.jar, ANDROID_PROPERTY_WORKSPACE=8,0, SECONDARY_STORAGE=/storage/extSdCard, ANDROID_STORAGE=/storage]
        at io.reactivex.e.j.f.a(ExceptionHelper.java:45)
        at io.reactivex.e.d.f.b(BlockingMultiObserver.java:91)
        at io.reactivex.t.b(Single.java:2214)
        at eu.darken.a.a.a$a.b(Cmd.java:305)
        at eu.thedarken.sdm.tools.binaries.core.a.c.a(InjectSystemModule.java:121)
        at eu.thedarken.sdm.tools.binaries.core.a.c.a(InjectSystemModule.java:82)
        at eu.thedarken.sdm.tools.binaries.core.g.a(BinaryInstaller.java:108)
        at eu.thedarken.sdm.SDMContext.c(SDMContext.java:152)
        at eu.thedarken.sdm.SDMContext.a(SDMContext.java:269)
        at eu.thedarken.sdm.tools.c.a(BaseConditions.java:2259)
        at eu.thedarken.sdm.ar.run(Unknown:1142)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at eu.thedarken.sdm.am.run(Unknown:1051)
        at java.lang.Thread.run(Thread.java:841)
Caused by: java.io.IOException: Error running exec(). Command: [su] Working Directory: null Environment: [VIBE_PIPE_PATH=/dev/pipes, ANDROID_ROOT=/system, KNOX_STORAGE=/data/knox/ext_sdcard, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, MC_AUTH_TOKEN_PATH=/efs, LD_PRELOAD=/vendor/lib/libNimsWrap.so, EMULATED_STORAGE_TARGET=/storage/emulated, ANDROID_BOOTLOGO=1, LD_LIBRARY_PATH=/vendor/lib:/system/lib, EXTERNAL_STORAGE=/storage/emulated/legacy, ANDROID_SOCKET_zygote=9, ANDROID_DATA=/data, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/webviewchromium.jar:/system/framework/sec_edm.jar:/system/framework/timakeystore.jar:/system/framework/twframework.jar:/system/framework/commonimsinterface.jar:/system/framework/imsmanager.jar:/system/framework/com.broadcom.bt.jar:/system/framework/seccamera.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/secmediarecorder.jar:/system/framework/secocsp.jar:/system/framework/secEmailBC.jar:/system/framework/qcmediaplayer.jar:/system/framework/oem-services.jar:/system/framework/org.codeaurora.Performance.jar, ANDROID_PROPERTY_WORKSPACE=8,0, SECONDARY_STORAGE=/storage/extSdCard, ANDROID_STORAGE=/storage]
        at java.lang.ProcessManager.exec(ProcessManager.java:211)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
        at eu.darken.a.c.a.a(DefaultProcessFactory.java:9)
        at eu.darken.a.c.i.a(Unknown:1035)
        at io.reactivex.e.e.c.d.b(ObservableCreate.java:40)
        at io.reactivex.n.a(Observable.java:10955)
        at io.reactivex.e.e.c.e.b(ObservableDoFinally.java:45)
        at io.reactivex.n.a(Observable.java:10955)
        at eu.darken.a.c.h$1.a(RxProcess.java:60)
        at io.reactivex.e.e.d.b.b(SingleCreate.java:39)
        at io.reactivex.t.a(Single.java:2779)
        at io.reactivex.e.e.d.l$a.run(SingleSubscribeOn.java:89)
        at io.reactivex.s$a.run(Scheduler.java:452)
        at io.reactivex.e.g.k.run(ScheduledRunnable.java:61)
        at io.reactivex.e.g.k.call(ScheduledRunnable.java:52)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:841)
Caused by: java.io.IOException: Permission denied
        at java.lang.ProcessManager.exec(ProcessManager.java:-2)
        at java.lang.ProcessManager.exec(ProcessManager.java:209)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
        at eu.darken.a.c.a.a(DefaultProcessFactory.java:9)
        at eu.darken.a.c.i.a(Unknown:1035)
        at io.reactivex.e.e.c.d.b(ObservableCreate.java:40)
        at io.reactivex.n.a(Observable.java:10955)
        at io.reactivex.e.e.c.e.b(ObservableDoFinally.java:45)
        at io.reactivex.n.a(Observable.java:10955)
        at eu.darken.a.c.h$1.a(RxProcess.java:60)
        at io.reactivex.e.e.d.b.b(SingleCreate.java:39)
        at io.reactivex.t.a(Single.java:2779)
        at io.reactivex.e.e.d.l$a.run(SingleSubscribeOn.java:89)
        at io.reactivex.s$a.run(Scheduler.java:452)
        at io.reactivex.e.g.k.run(ScheduledRunnable.java:61)
        at io.reactivex.e.g.k.call(ScheduledRunnable.java:52)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:841)
d4rken commented 6 years ago

Happens both with and without root?

rootState
Root(state=DENIED)
selinuxState
SELinux(state=ENFORCING)
rootState
Root(state=ROOTED)

selinuxState
SELinux(state=PERMISSIVE)

subinaryRaw
2.82:SUPERSU
d4rken commented 6 years ago

Hm seems like two issues: