APK加固(加壳)问题
兰卡威 2016-11-15 09:55:23 使用加壳的方式对apk进行加固,demo没有问题,但是demo中apk是没有逻辑代码,application中更是什么都没有的,所以没有实际意义。然后就用应用市场上下载的apk来加壳(反编译成功证明该apk为被加壳)当然了,我替换apk也替换了相关的一些代码,包名,资源,Manifest(不知道还需不需要什么)。替换apk后就会出现问题,多为空指针,问题都是出在启动源程序application时。
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.startAnimation(android.view.animation.Animation)' on a null object reference
at com.xxx.ActivityWelcome.createView(ActivityWelcome.java:77)
at com.xxx.ActivityWelcome.onCreate(ActivityWelcome.java:63)
at android.app.Activity.performCreate(Activity.java:6068)
由于加壳的apk都是网上下载的,所以也没有源代码,只有反编译后的代码。下面是报错地点的代码片段
private void createView()
{
this.ll_load = ((LinearLayout)findViewById(2131624309));
this.iv_load = ((ImageView)findViewById(2131624310));
this.tv_load = ((TextView)findViewById(2131624311));
this.tv_info = ((TextView)findViewById(2131624048));
this.animation = AnimationUtils.loadAnimation(this.mCont
this.iv_load.startAnimation(this.animation);
this.local_version = Util.getVersionName(this.mContext);
上面是其中一个错误日志,另外还有报findViewById的,等等。感觉问题应该是我漏掉了什么东西导致的.
加壳方式参考博客http://blog.csdn.net/jiangwei0910410003/article/details/48415225
加壳demo地址http://download.csdn.net/detail/jiangwei0910410003/9102741
望高手指点一二,谢谢!