Skip to content
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

Root is broken on v1.3.0 #546

Closed
zhanghai opened this issue Aug 8, 2021 · 3 comments
Closed

Root is broken on v1.3.0 #546

zhanghai opened this issue Aug 8, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@zhanghai
Copy link
Owner

zhanghai commented Aug 8, 2021

2021-08-08 06:05:30.012 6073-9039/me.zhanghai.android.files D/libsuperuser: [libsuperuser][C][SU+] #app_process=/data/data/me.zhanghai.android.files/cache/.app_process64_c3c07060-8afc-4f2a-84d7-6f73891985ff
2021-08-08 06:05:30.012 6073-9039/me.zhanghai.android.files D/libsuperuser: [libsuperuser][C][SU+] toybox cp /system/bin/app_process64 /data/data/me.zhanghai.android.files/cache/.app_process64_c3c07060-8afc-4f2a-84d7-6f73891985ff >/dev/null 2>/dev/null
2021-08-08 06:05:30.012 6073-9039/me.zhanghai.android.files D/libsuperuser: [libsuperuser][C][SU+] toybox chmod 0766 /data/data/me.zhanghai.android.files/cache/.app_process64_c3c07060-8afc-4f2a-84d7-6f73891985ff >/dev/null 2>/dev/null
2021-08-08 06:05:30.013 6073-9039/me.zhanghai.android.files D/libsuperuser: [libsuperuser][C][SU+] restorecon /data/data/me.zhanghai.android.files/cache/.app_process64_c3c07060-8afc-4f2a-84d7-6f73891985ff >/dev/null 2>/dev/null
2021-08-08 06:05:30.013 6073-9039/me.zhanghai.android.files D/libsuperuser: [libsuperuser][C][SU+] NO_ADDR_COMPAT_LAYOUT_FIXUP=1 ANDROID_ROOT=/system LD_LIBRARY_PATH=/system/lib64:/system/lib64/vndk-28:/system/lib64/extractors:/system/lib64/vndk-sp-28:/system/lib64/egl:/system/lib64/drm:/system/lib64/hw:/vendor/lib64:/vendor/lib64/mediadrm:/vendor/lib64/mediacas:/vendor/lib64/soundfx:/vendor/lib64/egl:/vendor/lib64/hw:/data/data/me.zhanghai.android.files/cache:/librootjava CLASSPATH=/data/app/me.zhanghai.android.files-VmJG6hcZaTfgIXOqo5Ja_g==/base.apk /data/data/me.zhanghai.android.files/cache/.app_process64_c3c07060-8afc-4f2a-84d7-6f73891985ff -Xcompiler-option --debuggable -XjdwpProvider:internal -XjdwpOptions:transport=dt_android_adb,suspend=n,server=y /system/bin --nice-name=me.zhanghai.android.files:root me.zhanghai.android.files.provider.root.LibRootJavaFileServiceLauncher /data/app/me.zhanghai.android.files-VmJG6hcZaTfgIXOqo5Ja_g==/lib/arm64/libsyscalls.so /data/app/me.zhanghai.android.files-VmJG6hcZaTfgIXOqo5Ja_g==/lib/arm64/libselinux-jni.so
2021-08-08 06:05:30.013 6073-9039/me.zhanghai.android.files D/libsuperuser: [libsuperuser][C][SU+] toybox rm /data/data/me.zhanghai.android.files/cache/.app_process64_c3c07060-8afc-4f2a-84d7-6f73891985ff >/dev/null 2>/dev/null
2021-08-08 06:05:30.167 902-1045/? E/libc: Access denied finding property "sys.thermal.para"
2021-08-08 06:05:30.297 9044-9044/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    
    
    --------- beginning of crash
2021-08-08 06:05:30.409 9046-9046/? A/linker: CANNOT LINK EXECUTABLE "/system/bin/dex2oat": "/system/lib64/libart-compiler.so" is 64-bit instead of 32-bit
2021-08-08 06:05:30.411 6073-6414/me.zhanghai.android.files D/libsuperuser: [libsuperuser][O][SU*] CANNOT LINK EXECUTABLE "/system/bin/dex2oat": "/system/lib64/libart-compiler.so" is 64-bit instead of 32-bit
2021-08-08 06:05:30.420 9044-9044/? W/me.zhanghai.android.files:root: Failed execv(/system/bin/dex2oat --debuggable --instruction-set=arm64 --instruction-set-features=a53 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --debuggable --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=generic --instruction-set-features=default --dex-file=/data/app/me.zhanghai.android.files-VmJG6hcZaTfgIXOqo5Ja_g==/base.apk --output-vdex-fd=10 --oat-fd=11 --oat-location=/data/app/me.zhanghai.android.files-VmJG6hcZaTfgIXOqo5Ja_g==/oat/arm64/base.odex --compiler-filter=quicken --class-loader-context=PCL[]) because non-0 exit status
2021-08-08 06:05:31.518 9044-9044/? D/AndroidRuntime: Calling main entry me.zhanghai.android.files.provider.root.LibRootJavaFileServiceLauncher
2021-08-08 06:05:31.521 9044-9044/? I/LibRootJavaFileServiceLauncher: Loading native libraries
2021-08-08 06:05:31.525 9044-9044/? I/LibRootJavaFileServiceLauncher: Installing file system providers
2021-08-08 06:05:31.547 9044-9044/? I/LibRootJavaFileServiceLauncher: Sending Binder

It is strange that the linker failed but the root process actually went on and even started sending the binder.

@zhanghai zhanghai added the bug Something isn't working label Aug 8, 2021
@zhanghai zhanghai self-assigned this Aug 8, 2021
@zhanghai
Copy link
Owner Author

zhanghai commented Aug 8, 2021

Javadoc for Rootjava says:

Note: you may see complaints from dex2oat in logcat during development on 64-bit devices. This
 * happens because we patch LD_LIBRARY_PATH for 64-bit libraries, and dex2oat is a 32-bit
 * executable. When a release APK is installed however, dex2oat is called at install time and
 * the odex should be successfully generated, preventing this error from occurring when you
 * launch the Java code as root. When this error is logged, we are likely running in JIT mode,
 * which may be significantly slower.<br>

So this might not be the root cause.

@zhanghai
Copy link
Owner Author

zhanghai commented Aug 8, 2021

Actual root cause:

2021-08-08 06:52:15.863 14126-14518/me.zhanghai.android.files D/librootjava: [EXCEPTION] NoSuchFieldException: No field DESCRIPTOR in class Lme/zhanghai/android/files/provider/remote/IRemoteFileService$Stub; (declaration of 'me.zhanghai.android.files.provider.remote.IRemoteFileService$Stub' appears in /data/app/me.zhanghai.android.files-6Bir_-HtGdJLZbio_yZFdA==/base.apk!classes4.dex)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err: java.lang.NoSuchFieldException: No field DESCRIPTOR in class Lme/zhanghai/android/files/provider/remote/IRemoteFileService$Stub; (declaration of 'me.zhanghai.android.files.provider.remote.IRemoteFileService$Stub' appears in /data/app/me.zhanghai.android.files-6Bir_-HtGdJLZbio_yZFdA==/base.apk!classes4.dex)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at java.lang.Class.getDeclaredField(Native Method)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at eu.chainfire.librootjava.Reflection$InterfaceRetriever.getInterfaceFromBinder(Reflection.java:276)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at eu.chainfire.librootjava.RootIPCReceiver.getInterfaceFromBinder(RootIPCReceiver.java:260)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at eu.chainfire.librootjava.RootIPCReceiver.access$700(RootIPCReceiver.java:45)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at eu.chainfire.librootjava.RootIPCReceiver$2.onReceive(RootIPCReceiver.java:137)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0(LoadedApk.java:1424)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at android.os.Handler.handleCallback(Handler.java:873)
2021-08-08 06:52:15.864 14126-14518/me.zhanghai.android.files W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:99)
2021-08-08 06:52:15.865 14126-14518/me.zhanghai.android.files W/System.err:     at android.os.Looper.loop(Looper.java:193)
2021-08-08 06:52:15.865 14126-14518/me.zhanghai.android.files W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:65)

IRemoteFileService.Stub.DESCRIPTOR has moved to IRemoteFileService.DESCRIPTOR and this become broken.

@zhanghai
Copy link
Owner Author

zhanghai commented Aug 8, 2021

See also Chainfire/librootjava#24 .

Will downgrade build tools for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant