guanchao / apk_auto_enforce Goto Github PK
View Code? Open in Web Editor NEWAPK一键自动化加固脚本
APK一键自动化加固脚本
现在多个dex的包 加固以后 会因为第二个dex没有加载 因为找不到相应的类 闪退
1.加固出现error
Traceback (most recent call last):
File "jiagu.py", line 271, in
main()
File "jiagu.py", line 223, in main
shutil.copyfile('Target/dist/Target.apk', 'Target.modified.apk')
File "C:\Python27\lib\shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'Target/dist/Target.apk'
2.有些应用可以成功加固,但是只能运行在安卓4.4上,高安卓版本闪退
请问作者该程序开发的时候是在什么系统上面的,是Windows吗,我在linux上运行总是出错。
文档地址打不开了
打开即奔溃,错误信息如下:
2021-01-20 14:49:19.265 2600-2600/cn.test.component.originalproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.test.component.originalproject, PID: 2600
java.lang.RuntimeException: Unable to instantiate application cn.test.component.hookjartest.HookJarApplication: java.lang.ClassNotFoundException: Didn't find class "cn.test.component.hookjartest.HookJarApplication" on path: DexPathList[[zip file "/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/lib/x86, /system/lib, /system/product/lib, /system/vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1226)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6431)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.ClassNotFoundException: Didn't find class "cn.test.component.hookjartest.HookJarApplication" on path: DexPathList[[zip file "/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk"],nativeLibraryDirectories=[/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/lib/x86, /system/lib, /system/product/lib, /system/vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
at android.app.Instrumentation.newApplication(Instrumentation.java:1155)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1218)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6431)
at android.app.ActivityThread.access$1300(ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Suppressed: java.io.IOException: Failed to open dex files from /data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk because: Failure to verify dex file '/data/app/cn.test.component.originalproject-NjuiEcEdctlZiJ0-ICUhKA==/base.apk': Bad checksum (ed074c76, expected 29894b7c)
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:365)
at dalvik.system.DexFile.(DexFile.java:107)
at dalvik.system.DexFile.(DexFile.java:80)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:444)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:403)
at dalvik.system.DexPathList.(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:126)
at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:101)
at dalvik.system.PathClassLoader.(PathClassLoader.java:74)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:851)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:950)
at android.app.LoadedApk.getResources(LoadedApk.java:1188)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2462)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2454)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6343)
加固后提示一个内部静态类无法加载,原始apk里面是有两个dex组成,这个错误是在自定义Application里面执行onCreate时候报错的,测试发现一个dex没有问题,但是两个时候,发现这个问题,但是项目中找不到那个类在第一个dex
如题
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.