getInterfaceFromBinder() broken when built with build tools 31.0.0
zhanghai opened this issue · 0 comments
zhanghai commented
getInterfaceFromBinder()
assumes that the field DESCRIPTOR
exists on IServiceName$Stub
, however in the Java file generated by aidl
in build tools 31.0.0
that field has moved to the outer class IServiceName
.
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)
See also zhanghai/MaterialFiles#546.