Android Studio动态调试smali

3.3.2版本的android studio支持直接分析或者调试apk,新建项目直接选择调试apk即可。如果实用的是旧版本地android studio可以参考这篇文章:

前面介绍了使用IDA动态调试smali,这种方法设置简单,不用重打包,用起来方便,但是如果变量类型设置错误则会马上退出调试,这是让人不爽的地方,而使用Android studio则不会。
0x01    工具
①Android Studio最新版。
②apktool尽量使用最新版的。
③ideasmali插件。下载地址https://github.com/JesusFreke/smali/wiki/smalidea
0x02     具体步骤
安装ideasmali插件,选择File->Settings->Plugins,安装之前下载的ideasmali插件。
Continue Reading

x86 emulation currently requires hardware acceleration!

很久没有编译安卓的东西,创建了模拟器却发现启动不聊了。网上搜索了一下发现文章真是不少,但是里面说的东西下载地址却不是那个了。并且我安装了sdk之后也没有找到haxm-windows的安装程序。网上搜索了一下发现现在是个开源项目了。https://github.com/intel/haxm

HAXM is a cross-platform hardware-assisted virtualization engine (hypervisor), widely used as an accelerator for Android Emulator and QEMU. It has always supported running on Windows and macOS, and has been ported to other host operating systems as well, such as Linux and NetBSD.

HAXM runs as a kernel-mode driver on the host operating system, and provides a KVM-like interface to user space, thereby enabling applications like QEMU to utilize the hardware virtualization capabilities built into modern Intel CPUs, namely Intel Virtualization Technology.

下载安装就ok了,如果没有开启vt首先要去bios里面开启vt。

 

Continue Reading

从com.alibaba.wxlib.exception.WXRuntimeException: should call prepareTargetKey first 说起

对于安卓的开发,我并没有太多的经验,并且很多的东西目前也没有深入的研究。最近在更新Findu的安卓版本的时候,出现了一个意外的错误。错误代码如下:

03-07 15:03:30.046 12215-12290/today.findu.findu.alibaba.openIMUI:watchdog E/AndroidRuntime: FATAL EXCEPTION: initFeedbackThread
  Process: today.findu.findu.alibaba.openIMUI:watchdog, PID: 12215
  com.alibaba.wxlib.exception.WXRuntimeException: should call prepareTargetKey first
      at com.alibaba.mobileim.utility.AccountInfoTools.initTargetAppKeys(AccountInfoTools.java:190)
      at com.alibaba.mobileim.FeedbackAPI.initFeedbackImpl(FeedbackAPI.java:108)
      at com.alibaba.mobileim.FeedbackAPI.access$000(FeedbackAPI.java:38)
      at com.alibaba.mobileim.FeedbackAPI$1.run(FeedbackAPI.java:97)
      at java.lang.Thread.run(Thread.java:761)

并且同时还有大量的其他的错误信息:

03-07 15:03:34.274 12215-12215/today.findu.findu.alibaba.openIMUI:watchdog E/security: [2014@taobao_h5_3.0.0][WLqJSW6PXu8DAOb+xk4MZjLO][] : ***********************************************************
  错误编码 = 10010
  错误消息 = 发生错误,消息为 null sec code 162, 请使用 LogCat 查看更多细节
  解决建议 = 请使用默认的 androiddebugkey 对当前开发应用签名或在应用初始化之前调用 AlibabaSDK.turnOnDebug(), 运行程序查看 logcat 输出以获取更多错误细节,并采取对应操作
  错误堆栈 = ErrorCode = 162
  com.alibaba.wireless.security.open.SecException
      at com.alibaba.wireless.security.open.initialize.c.a(Unknown Source)
      at com.alibaba.wireless.security.open.initialize.a.a(Unknown Source)
      at com.alibaba.wireless.security.open.initialize.b.b(Unknown Source)
      at com.alibaba.wireless.security.open.initialize.b.loadLibrarySync(Unknown Source)
      at com.alibaba.wireless.security.open.initialize.b.initialize(Unknown Source)
      at com.alibaba.sdk.android.security.impl.h.a(SourceFile:23)
      at com.alibaba.sdk.android.security.impl.SecurityGuardWrapper.init(SourceFile:61)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.alibaba.sdk.android.a.a.a.a(SourceFile:91)
      at com.alibaba.sdk.android.task.a.c(SourceFile:186)
      at com.alibaba.sdk.android.task.a.a(SourceFile:144)
      at com.alibaba.sdk.android.AlibabaSDK.a(SourceFile:135)
      at com.alibaba.sdk.android.AlibabaSDK.asyncInit(SourceFile:98)
      at cn.org.findu.finduUI.demo.DemoApplication.onCreate(DemoApplication.java:61)
      at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5403)
      at android.app.ActivityThread.-wrap2(ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:154)
      at android.app.ActivityThread.main(ActivityThread.java:6119)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Continue Reading