adb logcat -s "storm"
V/storm (17772): g_JavaVM:414cef00
V/storm (17772): LoadDex optFile path:/data/data/com.example.stormhookdemo/hoo
k.dat
V/storm (17772): classLoaders size:1
V/storm (17772): original Element size:1
V/storm (17772): ClassMethodHook[Can't find class:com/storm/hook/main in bootc
lassloader
V/storm (17772): loadClass com/storm/hook/main successful clazz:0x1d600059
D/storm (17772): Inject dex entry is called
D/storm (17772): After addNativeLibraryDirectory pathLoader is:dalvik.system.P
athClassLoader[DexPathList[[zip file "/data/app/com.example.stormhookdemo-1.apk"
, dex file "dalvik.system.DexFile@425e31c0"],nativeLibraryDirectories=[/data/loc
al/tmp, /data/app-lib/com.example.stormhookdemo-1, /vendor/lib, /system/lib]]]
D/storm (17772): [+]find original method (getMacAddress_hook)
D/storm (17772): [+]find original method (test_public_hook)
D/storm (17772): [+]find original method (currentTimeMillis)
D/storm (17772): [+]find original method (test_private)
D/storm (17772): [+]find original method (test_privatestatic)
D/storm (17772): Inject dex hook success
I/storm (17772): *-*-*-*-*-*-*- End -*-*-*-*-*-*-*-*-*-*
测试button事件的log输出
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
adb logcat -s "storm","hook"
D/hook (19001): getMacAddress is hooked :)
D/storm (19001): Wifi mac :c4:43:8f:f7:d1:03
D/hook (19001): test_public is hooked
D/storm (19001): test_public is called
D/hook (19001): test_private is hooked
D/storm (19001): test_private is called
D/storm (19001): test_private return:10
D/hook (19001): currentTimeMillis is much better in seconds :)
D/storm (19001): small Currentime:5885303
D/hook (19001): test_private is hooked
D/storm (19001): test_private is called
D/storm (19001): test_private return:10
D/hook (19001): test_privatestatic is hooked
D/storm (19001): test_privatestatic is called