WindySha/Xpatch

使用了华为推送服务的app闪退

zogodo opened this issue · 4 comments

我给一个使用了华为推送服务的apk重打包, 安装后打开直接闪退, 错误日志如下:
希望大佬看看是什么原因.

--------- beginning of main
11-03 15:25:56.256 V/installd( 1323): DexInv: --- END '/data/user/0/com.qiyi.video/app_qigsaw/12.7.5_ef5c4951bc5/QYAiHelper/1.0@1/QYAiHelper-master.apk' (success) ---
11-03 15:25:56.557 E/SDM     (  884): DRMCrtc::Perform: CRTC 109: Set mode 1080x2400x60x121425vid
11-03 15:25:56.560 E/SDM     (  884): DRMCrtc::Perform: CRTC 109: Set mode 1080x2400x60x121425vid
11-03 15:25:56.654 E/QuickstepAppTransitionManagerImpl( 3078): getActivityLaunchOptions   iconLoc=Rect(844, 1462 - 1012, 1630)
--------- beginning of system
11-03 15:25:56.665 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestateINITIALIZING
11-03 15:25:56.665 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateINITIALIZING
11-03 15:25:56.668 E/ANDR-PERF-JNI( 2503): com_qualcomm_qtiperformance_native_perf_io_prefetch_start
11-03 15:25:56.669 E/ANDR-PERF-LM(  887): MetaMeter: handleAsync() 164: AdaptLaunch Invalid Async
11-03 15:25:56.669 E/ANDR-PERF-LM(  887): MetaMeter: handleAsync() 164: AdaptLaunch Invalid Async
11-03 15:25:56.671 E/ANDR-IOP(  886): io prefetch is disabled
11-03 15:25:56.673 V/ActivityTaskManager( 2503): Starting new activity ActivityRecord{abef4e3 u0 com.huawei.ch18/.icon0 t21663} in new task Task{c7d9ee0 #21663 visible=true type=standard mode=fullscreen translucent=true A=10531:com.huawei.ch18 U=0 StackId=21663 sz=1}
11-03 15:25:56.676 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateRESUMED
11-03 15:25:56.677 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestatePAUSING
11-03 15:25:56.677 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestatePAUSING
11-03 15:25:56.687 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestatePAUSED
11-03 15:25:56.687 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestatePAUSED
11-03 15:25:56.688 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateRESUMED
11-03 15:25:56.708 E/com.huawei.ch18(23066): Not starting debugger since process cannot load the jdwp agent.
11-03 15:25:56.715 E/ANDR-PERF-LM(  887): MetaMeter: handleAsync() 164: AdaptLaunch Invalid Async
11-03 15:25:56.723 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateRESUMED
11-03 15:25:56.723 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestateRESUMED
11-03 15:25:56.726 V/LocationPolicy( 2503): writePolicyLocked()
11-03 15:25:56.740 E/AppBackListener( 4204): onTopAppChanged newApp=com.huawei.ch18,oldApp=com.miui.home,mPersistentApp=null,innerApp=false
11-03 15:25:56.744 V/WindowManager( 2503): Orientation start waiting for draw, mDrawState=DRAW_PENDING in Window{d18732f mode=1 rootTaskId=21663 u0 Splash Screen com.huawei.ch18}, surfaceController Surface(name=Splash Screen com.huawei.ch18)/@0xa2d9927
11-03 15:25:56.746 E/LoadedApk(23066): Unable to instantiate appComponentFactory
11-03 15:25:56.746 E/LoadedApk(23066): java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/base.apk"],nativeLibraryDirectories=[/data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/lib/arm, /data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/base.apk!/lib/armeabi-v7a, /system/lib, /system_ext/lib]]
11-03 15:25:56.746 E/LoadedApk(23066): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
11-03 15:25:56.746 E/LoadedApk(23066): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
11-03 15:25:56.746 E/LoadedApk(23066): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.LoadedApk.createAppFactory(LoadedApk.java:262)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:907)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.LoadedApk.getClassLoader(LoadedApk.java:960)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.LoadedApk.getResources(LoadedApk.java:1192)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.ContextImpl.createAppContext(ContextImpl.java:2671)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.ContextImpl.createAppContext(ContextImpl.java:2663)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6705)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.ActivityThread.access$1400(ActivityThread.java:246)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.os.Looper.loop(Looper.java:236)
11-03 15:25:56.746 E/LoadedApk(23066): 	at android.app.ActivityThread.main(ActivityThread.java:7879)
11-03 15:25:56.746 E/LoadedApk(23066): 	at java.lang.reflect.Method.invoke(Native Method)
11-03 15:25:56.746 E/LoadedApk(23066): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
11-03 15:25:56.746 E/LoadedApk(23066): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
11-03 15:25:56.788 E/LauncherAnimationRunner( 3078): onAnimationStart
11-03 15:25:56.788 E/LauncherAnimationRunner( 3078): onAnimationStart:   mode=1   taskId=2
11-03 15:25:56.788 E/LauncherAnimationRunner( 3078): onAnimationStart:   mode=0   taskId=21663
11-03 15:25:56.788 E/QuickstepAppTransitionManagerImpl( 3078): startIconLaunchAnimator:launcherClosing=true   iconLoc=Rect(844, 1462 - 1012, 1630)
11-03 15:25:56.789 E/QuickstepAppTransitionManagerImpl( 3078): startOpeningWindowAnimators:rotation0IconLoc=Rect(844, 1462 - 1012, 1630)
11-03 15:25:56.789 E/ClipAnimationHelper( 3078): updateSourceStack  mSourceInsets=Rect(0, 0 - 0, 0), mSourceStackBounds=Rect(0, 0 - 1080, 2400), mHomeStackBounds=Rect(0, 0 - 1080, 2400)
11-03 15:25:56.789 E/ClipAnimationHelper( 3078): updateTargetRect  mSourceRect=RectF(0.0, 0.0, 1080.0, 2400.0)   mTargetRect=RectF(0.0, 0.0, 1080.0, 2400.0)   mSourceWindowClipInsets=RectF(0.0, 0.0, 0.0, 0.0)   mHomeStackBounds=Rect(0, 0 - 1080, 2400)   targetRect=Rect(0, 0 - 1080, 2400)
11-03 15:25:56.790 E/QuickstepAppTransitionManagerImpl( 3078): startLauncherContentAnimator:isAppOpening=true
11-03 15:25:56.808 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.808 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.813 E/XposedModuleEntry(23066): File permission is not granted, can not control xposed module by file ->xposed_config/modules.list
11-03 15:25:56.906 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.906 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.908 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.908 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.910 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.910 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.912 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.912 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.914 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.914 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.918 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.918 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.941 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.941 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.943 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.944 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.946 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.946 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.951 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.951 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.954 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.954 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.956 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.956 E/PackageDexUsage( 2503): Unsupported context?
11-03 15:25:56.959 E/system_server( 2503): Invalid class loader spec: =UnsupportedClassLoaderContext=
11-03 15:25:56.959 E/PackageDexUsage( 2503): Unsupported context?
--------- beginning of crash
11-03 15:25:57.063 E/AndroidRuntime(23066): FATAL EXCEPTION: main
11-03 15:25:57.063 E/AndroidRuntime(23066): Process: com.huawei.ch18, PID: 23066
11-03 15:25:57.063 E/AndroidRuntime(23066): java.lang.RuntimeException: Unable to get provider com.huawei.hms.aaid.InitProvider: java.lang.ClassNotFoundException: Didn't find class "com.huawei.hms.aaid.InitProvider" on path: DexPathList[[zip file "/data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/base.apk"],nativeLibraryDirectories=[/data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/lib/arm, /data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/base.apk!/lib/armeabi-v7a, /system/lib, /system_ext/lib]]
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread.installProvider(ActivityThread.java:7466)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:6940)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at java.lang.reflect.Method.invoke(Native Method)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at com.swift.sandhook.SandHook.callOriginMethod(SandHook.java:186)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at com.swift.sandhook.SandHook.callOriginMethod(SandHook.java:164)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at com.swift.sandhook.xposedcompat.hookstub.HookStubManager.hookBridge(HookStubManager.java:299)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at com.swift.sandhook.xposedcompat.hookstub.MethodHookerStubs32.stub_hook_0(MethodHookerStubs32.java:380)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6835)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread.access$1400(ActivityThread.java:246)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.os.Handler.dispatchMessage(Handler.java:106)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.os.Looper.loop(Looper.java:236)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread.main(ActivityThread.java:7879)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at java.lang.reflect.Method.invoke(Native Method)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
11-03 15:25:57.063 E/AndroidRuntime(23066): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.huawei.hms.aaid.InitProvider" on path: DexPathList[[zip file "/data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/base.apk"],nativeLibraryDirectories=[/data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/lib/arm, /data/app/~~va1rKeiD23zhVg6z_aR3Jw==/com.huawei.ch18-OOIFbs3PNQYDJ1HzvYhmHA==/base.apk!/lib/armeabi-v7a, /system/lib, /system_ext/lib]]
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	at android.app.ActivityThread.installProvider(ActivityThread.java:7450)
11-03 15:25:57.063 E/AndroidRuntime(23066): 	... 15 more
11-03 15:25:57.085 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestatePAUSING
11-03 15:25:57.086 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestatePAUSING
11-03 15:25:57.113 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateDESTROYED
11-03 15:25:57.113 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestateDESTROYED
11-03 15:25:57.114 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateDESTROYED
11-03 15:25:57.115 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag truestateRESUMED
11-03 15:25:57.116 V/ActivityTaskManager( 2503): Calling mServicetracker.OnActivityStateChange with flag falsestateRESUMED
11-03 15:25:57.395 E/LauncherAnimationRunner( 3078): finish: mFinishRunnable.run
11-03 15:25:57.422 E/RotationHelper( 3078): setCurrentTransitionRequest: request=0
11-03 15:25:57.719 E/ANDR-PERF-LM(  887): VmRssMeter:: start() 400: Could not find pid, can not collect vmrss data
11-03 15:25:57.720 E/ANDR-PERF-LM(  887): VmRssMeter:: start() 400: Could not find pid, can not collect vmrss data
11-03 15:25:57.720 E/ANDR-PERF-LM(  887): AdaptiveLaunch: writeToDataBase() 63: Meter aborted or could not get meter data for this run

遇到同样的问题,老哥怎么解决的

作者大大好久不更新了,不知道是不是弃坑了

遇到同样的问题,老哥怎么解决的
已解决这个问题,我没有用这个库,只是有同样的错误Unable to get provider com.huawei.hms.aaid.InitProvider。
给遇到同样问题的兄弟一个思路:
我这边是混淆带来的错误,最新的华为推送sdk在混淆过后会生成两个一样路径名称的文件,打成release包之后,无法加载对应的dex文件,这个InitProvider正好在这个dex包里,就会报这个错误。
我这边是用010editor打开dex,找到目标错误文件,然后直接不混淆两个文件,就解决了。

遇到同样的问题,老哥怎么解决的
已解决这个问题,我没有用这个库,只是有同样的错误Unable to get provider com.huawei.hms.aaid.InitProvider。
给遇到同样问题的兄弟一个思路:
我这边是混淆带来的错误,最新的华为推送sdk在混淆过后会生成两个一样路径名称的文件,打成release包之后,无法加载对应的dex文件,这个InitProvider正好在这个dex包里,就会报这个错误。
我这边是用010editor打开dex,找到目标错误文件,然后直接不混淆两个文件,就解决了。

没理解你的意思,可以详细讲讲吗?