AndFix is a library that offer hot-fix for Android App.

Related tags

Hook android hotfix
Overview

AndFix

Download Build Status Software License

Gitter

AndFix is a solution to fix the bugs online instead of redistributing Android App. It is distributed as Android Library.

Andfix is an acronym for "Android hot-fix".

AndFix supports Android version from 2.3 to 7.0, both ARM and X86 architecture, both Dalvik and ART runtime, both 32bit and 64bit.

The compressed file format of AndFix's patch is .apatch. It is dispatched from your own server to client to fix your App's bugs.

Principle

The implementation principle of AndFix is method body's replacing,

image

Method replacing

AndFix judges the methods should be replaced by java custom annotation and replaces it by hooking it. AndFix has a native method art_replaceMethod in ART or dalvik_replaceMethod in Dalvik.

For more details, here.

Fix Process

image

Integration

How to get?

Directly add AndFix aar to your project as compile libraries.

For your maven dependency,

<dependency>
  	<groupId>com.alipay.euler</groupId>
  	<artifactId>andfix</artifactId>
  	<version>0.5.0</version>
  	<type>aar</type>
</dependency>

For your gradle dependency,

dependencies {
	compile 'com.alipay.euler:andfix:[email protected]'
}

How to use?

  1. Initialize PatchManager,
patchManager = new PatchManager(context);
patchManager.init(appversion);//current version
  1. Load patch,
patchManager.loadPatch();

You should load patch as early as possible, generally, in the initialization phase of your application(such as Application.onCreate()).

  1. Add patch,
patchManager.addPatch(path);//path of the patch file that was downloaded

When a new patch file has been downloaded, it will become effective immediately by addPatch.

Developer Tool

AndFix provides a patch-making tool called apkpatch.

How to get?

The apkpatch tool can be found here.

How to use?

  • Prepare two android packages, one is the online package, the other one is the package after you fix bugs by coding.

  • Generate .apatch file by providing the two package,

usage: apkpatch -f <new> -t <old> -o <output> -k <keystore> -p <***> -a <alias> -e <***>
 -a,--alias <alias>     keystore entry alias.
 -e,--epassword <***>   keystore entry password.
 -f,--from <loc>        new Apk file path.
 -k,--keystore <loc>    keystore path.
 -n,--name <name>       patch name.
 -o,--out <dir>         output dir.
 -p,--kpassword <***>   keystore password.
 -t,--to <loc>          old Apk file path.

Now you get the application savior, the patch file. Then you need to dispatch it to your client in some way, push or pull.

Sometimes, your team members may fix each other's bugs, and generate not only one .apatch. For this situation, you can merge .apatch files using this tool,

usage: apkpatch -m <apatch_path...> -o <output> -k <keystore> -p <***> -a <alias> -e <***>
 -a,--alias <alias>     keystore entry alias.
 -e,--epassword <***>   keystore entry password.
 -k,--keystore <loc>    keystore path.
 -m,--merge <loc...>    path of .apatch files.
 -n,--name <name>       patch name.
 -o,--out <dir>         output dir.
 -p,--kpassword <***>   keystore password.

Running sample

  1. Import samplesI/AndFixDemo to your IDE, append AndFixDemo dependencies with AndFix(library project or aar).
  2. Build project, save the package as 1.apk, and then install on device/emulator.
  3. Modify com.euler.test.A, references com.euler.test.Fix.
  4. Build project, save the package as 2.apk.
  5. Use apkpatch tool to make a patch.
  6. Rename the patch file to out.apatch, and then copy it to sdcard.
  7. Run 1.apk and view log.

Notice

ProGuard

If you enable ProGuard, you must save the mapping.txt, so your new version's build can use it with "-applymapping".

And it is necessary to keep classes as follow,

  • Native method

    com.alipay.euler.andfix.AndFix

  • Annotation

    com.alipay.euler.andfix.annotation.MethodReplace

To ensure that these classes can be found after running an obfuscation and static analysis tool like ProGuard, add the configuration below to your ProGuard configuration file.

-keep class * extends java.lang.annotation.Annotation
-keepclasseswithmembernames class * {
    native <methods>;
}

Self-Modifying Code

If you use it, such as Bangcle. To generate patch file, you'd better to use raw apk.

Security

The following is important but out of AndFix's range.

  • verify the signature of patch file
  • verify the fingerprint of optimize file

API Documentation

The libraries javadoc can be found here.

Contact

...

License

Apache License, Version 2.0

Copyright (c) 2015, alipay.com

Comments
  • 是不是不支持方法级别的bug fix,经过测试感觉是class级别的

    是不是不支持方法级别的bug fix,经过测试感觉是class级别的

    • 我按照demo做了测试,只是在demo中A.java类某个方法中加了一行log,报以下错误 A.java中有私有的O.java对象
    09-15 15:41:41.419: E/AndroidRuntime(16526): FATAL EXCEPTION: main
    09-15 15:41:41.419: E/AndroidRuntime(16526): Process: com.euler.andfix, PID: 16526
    09-15 15:41:41.419: E/AndroidRuntime(16526): java.lang.IllegalAccessError: Field 'com.euler.test.A_CF.o' is inaccessible to class 'com.euler.test.A_CF' (declaration of 'com.euler.test.A_CF' appears in /data/data/com.euler.andfix/files/apatch/out.apatch)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at com.euler.test.A_CF.<clinit>(A.java:32)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at com.euler.andfix.MainActivity.onCreate(MainActivity.java:40)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.Activity.performCreate(Activity.java:5990)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.ActivityThread.access$800(ActivityThread.java:151)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.os.Handler.dispatchMessage(Handler.java:102)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.os.Looper.loop(Looper.java:135)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at android.app.ActivityThread.main(ActivityThread.java:5254)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at java.lang.reflect.Method.invoke(Native Method)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at java.lang.reflect.Method.invoke(Method.java:372)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
    09-15 15:41:41.419: E/AndroidRuntime(16526):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
    
    • 如果将整个A.java文件替换掉就没有问题
    opened by gcoder-io 36
  • 一直出现IncompatibleClassChangeError,不只为何,麻烦看下

    一直出现IncompatibleClassChangeError,不只为何,麻烦看下

    java.lang.IncompatibleClassChangeError: The method 'void com.henanjianye.soon.communityo2o.fragment.bg_CF.a()' was expected to be of type direct but instead was found to be of type virtual (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar) at com.henanjianye.soon.communityo2o.fragment.bg.initView(Fragment03.java:118) at com.henanjianye.soon.communityo2o.fragment.a.onViewCreated(BaseFragment.java:107) at android.support.v4.app.x.a(FragmentManager.java:1045)

    opened by mabeijianxi 26
  • 是不是不支持fix同一个方法两次?

    是不是不支持fix同一个方法两次?

    就是两个Patch文件修改同一个方法的情况下 会失败

    我尝试了一下 会报一大堆jni日志,然后App就挂掉了

    A/art: art/runtime/thread_list.cc:173] Thread suspend timeout
    A/art: art/runtime/thread_list.cc:173] mutator lock level=46 owner=18446744073709551615 state=1 num_pending_writers=0 num_pending_readers=0 
    A/art: art/runtime/thread_list.cc:173] DALVIK THREADS (17):
    A/art: art/runtime/thread_list.cc:173] "main" prio=5 tid=1 Runnable
    A/art: art/runtime/thread_list.cc:173]   | group="main" sCount=1 dsCount=0 obj=0x738c1000 self=0xf4c27800
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8590 nice=0 cgrp=default sched=0/0 handle=0xf7223bec
    A/art: art/runtime/thread_list.cc:173]   | state=R schedstat=( 30142988157 201828990 1581 ) utm=3007 stm=7 core=4 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xff095000-0xff097000 stackSize=8MB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes= "mutator lock"(shared held)
    A/art: art/runtime/thread_list.cc:173] Not able to dump stack of thread that isn't suspended
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 6" prio=5 tid=2 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xef03f400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8601 nice=0 cgrp=default sched=0/0 handle=0xf4d22800
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 634634 2370834 5 ) utm=0 stm=0 core=0 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3f40000-0xf3f42000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 2" prio=5 tid=3 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xf4c27c00
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8597 nice=0 cgrp=default sched=0/0 handle=0xf4d25a00
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 724688 4343072 5 ) utm=0 stm=0 core=2 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf4340000-0xf4342000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 5" prio=5 tid=4 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xef040400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8600 nice=0 cgrp=default sched=0/0 handle=0xf4d22580
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 362395 4976667 5 ) utm=0 stm=0 core=1 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf4040000-0xf4042000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 4" prio=5 tid=5 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xf4c28c00
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8599 nice=0 cgrp=default sched=0/0 handle=0xf4d22300
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 304271 5118385 5 ) utm=0 stm=0 core=2 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf4140000-0xf4142000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 3" prio=5 tid=6 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xef041400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8598 nice=0 cgrp=default sched=0/0 handle=0xf4d22080
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 415208 5180209 5 ) utm=0 stm=0 core=1 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf4240000-0xf4242000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 1" prio=5 tid=7 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xf4c34000
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8596 nice=0 cgrp=default sched=0/0 handle=0xf4d25780
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 828125 4883540 5 ) utm=0 stm=0 core=3 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf4440000-0xf4442000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Heap thread pool worker thread 0" prio=5 tid=8 Native (still starting up)
    A/art: art/runtime/thread_list.cc:173]   | group="" sCount=1 dsCount=0 obj=0x0 self=0xef042400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8594 nice=0 cgrp=default sched=0/0 handle=0xf4d25280
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 1075886 6604740 8 ) utm=0 stm=0 core=0 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf4540000-0xf4542000 stackSize=1020KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00231f8f  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+50)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00231f35  /system/lib/libart.so (art::ThreadPoolWorker::Run()+52)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00232771  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+52)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Signal Catcher" daemon prio=5 tid=9 WaitingInMainSignalCatcherLoop
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=1 dsCount=0 obj=0x12c370a0 self=0xf4c35000
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8603 nice=0 cgrp=default sched=0/0 handle=0xf4d22a80
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 728542 20729 2 ) utm=0 stm=0 core=1 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3e42000-0xf3e44000 stackSize=1012KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: do_sigtimedwait+0xd8/0x1ac
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_rt_sigtimedwait+0x94/0xd8
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 0003847c  /system/lib/libc.so (__rt_sigtimedwait+12)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 0001591d  /system/lib/libc.so (sigwait+24)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 0021b6ab  /system/lib/libart.so (art::SignalCatcher::WaitForSignal(art::Thread*, art::SignalSet&)+66)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 0021d1ad  /system/lib/libart.so (art::SignalCatcher::Run(void*)+196)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 0001417f  /system/lib/libc.so (__pthread_start(void*)+30)
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 000120c7  /system/lib/libc.so (__start_thread+6)
    A/art: art/runtime/thread_list.cc:173]   (no managed stack frames)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "JDWP" daemon prio=5 tid=10 Suspended
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=0 dsCount=0 obj=0x12c3a0a0 self=0xef043400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8604 nice=0 cgrp=default sched=0/0 handle=0xf4d25c80
    A/art: art/runtime/thread_list.cc:173]   | state=R schedstat=( 131961459 3680105 44 ) utm=6 stm=7 core=2 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3d44000-0xf3d46000 stackSize=1012KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 0000485c  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 00003005  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00243911  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> 
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 00227cb9  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 00230da1  /system/lib/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits
    A/art: art/runtime/thread_list.cc:173]   native: #05 pc 00231297  /system/lib/libart.so (art::UnsafeLogFatalForThreadSuspendAllTimeout()+206)
    A/art: art/runtime/thread_list.cc:173]   native: #06 pc 002315ef  /system/lib/libart.so (art::ThreadList::SuspendAll()+750)
    A/art: art/runtime/thread_list.cc:173]   native: #07 pc 0014e0cd  /system/lib/libart.so (art::gc::space::RosAllocSpace::InspectAllRosAlloc(void (*)(void*, void*, unsign
    A/art: art/runtime/thread_list.cc:173]   native: #08 pc 0014e639  /system/lib/libart.so (art::gc::space::RosAllocSpace::GetObjectsAllocated()+24)
    A/art: art/runtime/thread_list.cc:173]   native: #09 pc 0012f9ad  /system/lib/libart.so (art::gc::Heap::GetObjectsAllocated() const+20)
    A/art: art/runtime/thread_list.cc:173]   native: #10 pc 000eb871  /system/lib/libart.so (art::Dbg::DdmSendHeapInfo(art::Dbg::HpifWhen)+852)
    A/art: art/runtime/thread_list.cc:173]   native: #11 pc 000ebc0b  /system/lib/libart.so (art::Dbg::DdmHandleHpifChunk(art::Dbg::HpifWhen)+94)
    A/art: art/runtime/thread_list.cc:173]   native: #12 pc 0001a5e9  /data/dalvik-cache/arm/[email protected]@boot.oat (Java_org_apache_harmony_dalvik_ddmc_DdmVmInternal_he
    A/art: art/runtime/thread_list.cc:173]   at org.apache.harmony.dalvik.ddmc.DdmVmInternal.heapInfoNotify!(Native method)
    A/art: art/runtime/thread_list.cc:173]   at android.ddm.DdmHandleHeap.handleHPIF(DdmHandleHeap.java:118)
    A/art: art/runtime/thread_list.cc:173]   at android.ddm.DdmHandleHeap.handleChunk(DdmHandleHeap.java:85)
    A/art: art/runtime/thread_list.cc:173]   at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "ReferenceQueueDaemon" daemon prio=5 tid=11 Waiting
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=1 dsCount=0 obj=0x12c51700 self=0xf4c36000
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8605 nice=0 cgrp=default sched=0/0 handle=0xf4d25f00
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 3234482 448906 31 ) utm=0 stm=0 core=0 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3c3c000-0xf3c3e000 stackSize=1036KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Object.wait!(Native method)
    A/art: art/runtime/thread_list.cc:173]   - waiting on <0x3c6640e2> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:134)
    A/art: art/runtime/thread_list.cc:173]   - locked <0x3c6640e2> (a java.lang.Class<java.lang.ref.ReferenceQueue>)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.run(Thread.java:818)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "GCDaemon" daemon prio=5 tid=12 Waiting
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=1 dsCount=0 obj=0x12c51880 self=0xf4f23400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8609 nice=0 cgrp=default sched=0/0 handle=0xf4d26900
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 35867922 3755000 30 ) utm=3 stm=0 core=1 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3828000-0xf382a000 stackSize=1036KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Object.wait!(Native method)
    A/art: art/runtime/thread_list.cc:173]   - waiting on <0x301aac73> (a java.lang.Daemons$GCDaemon)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$GCDaemon.run(Daemons.java:344)
    A/art: art/runtime/thread_list.cc:173]   - locked <0x301aac73> (a java.lang.Daemons$GCDaemon)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.run(Thread.java:818)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "HeapTrimmerDaemon" daemon prio=5 tid=13 Native
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=1 dsCount=0 obj=0x12c51820 self=0xf4c36c00
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8608 nice=0 cgrp=default sched=0/0 handle=0xf4d26680
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 783439 628073 8 ) utm=0 stm=0 core=2 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf392c000-0xf392e000 stackSize=1036KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   kernel: __switch_to+0x70/0x7c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait_queue_me+0xd4/0x12c
    A/art: art/runtime/thread_list.cc:173]   kernel: futex_wait+0xdc/0x1e4
    A/art: art/runtime/thread_list.cc:173]   kernel: do_futex+0xc8/0x8d0
    A/art: art/runtime/thread_list.cc:173]   kernel: compat_SyS_futex+0xd0/0x14c
    A/art: art/runtime/thread_list.cc:173]   kernel: cpu_switch_to+0x48/0x4c
    A/art: art/runtime/thread_list.cc:173]   native: #00 pc 00010400  /system/lib/libc.so (syscall+28)
    A/art: art/runtime/thread_list.cc:173]   native: #01 pc 000a8dbf  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+82)
    A/art: art/runtime/thread_list.cc:173]   native: #02 pc 00141c07  /system/lib/libart.so (art::gc::Heap::Trim()+3910)
    A/art: art/runtime/thread_list.cc:173]   native: #03 pc 001420e3  /system/lib/libart.so (art::gc::Heap::DoPendingTransitionOrTrim()+762)
    A/art: art/runtime/thread_list.cc:173]   native: #04 pc 000003df  /data/dalvik-cache/arm/[email protected][email protected] (Java_dalvik_system_VMRuntime_trimHeap__+82)
    A/art: art/runtime/thread_list.cc:173]   at dalvik.system.VMRuntime.trimHeap(Native method)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$HeapTrimmerDaemon.run(Daemons.java:313)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.run(Thread.java:818)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "FinalizerDaemon" daemon prio=5 tid=14 Waiting
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=1 dsCount=0 obj=0x12c51760 self=0xf4c36400
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8606 nice=0 cgrp=default sched=0/0 handle=0xf4d26180
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 10531883 7035207 62 ) utm=0 stm=1 core=1 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3b34000-0xf3b36000 stackSize=1036KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Object.wait!(Native method)
    A/art: art/runtime/thread_list.cc:173]   - waiting on <0x2fd8a730> (a java.lang.ref.ReferenceQueue)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Object.wait(Object.java:422)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:101)
    A/art: art/runtime/thread_list.cc:173]   - locked <0x2fd8a730> (a java.lang.ref.ReferenceQueue)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:72)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:174)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.run(Thread.java:818)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "FinalizerWatchdogDaemon" daemon prio=5 tid=15 Sleeping
    A/art: art/runtime/thread_list.cc:173]   | group="system" sCount=1 dsCount=0 obj=0x12c517c0 self=0xf4c36800
    A/art: art/runtime/thread_list.cc:173]   | sysTid=8607 nice=0 cgrp=default sched=0/0 handle=0xf4d26400
    A/art: art/runtime/thread_list.cc:173]   | state=S schedstat=( 512710 4413073 8 ) utm=0 stm=0 core=1 HZ=100
    A/art: art/runtime/thread_list.cc:173]   | stack=0xf3a30000-0xf3a32000 stackSize=1036KB
    A/art: art/runtime/thread_list.cc:173]   | held mutexes=
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.sleep!(Native method)
    A/art: art/runtime/thread_list.cc:173]   - sleeping on <0x214fffa9> (a java.lang.Object)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.sleep(Thread.java:1031)
    A/art: art/runtime/thread_list.cc:173]   - locked <0x214fffa9> (a java.lang.Object)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.sleep(Thread.java:985)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor(Daemons.java:258)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization(Daemons.java:269)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:217)
    A/art: art/runtime/thread_list.cc:173]   at java.lang.Thread.run(Thread.java:818)
    A/art: art/runtime/thread_list.cc:173] 
    A/art: art/runtime/thread_list.cc:173] "Binder_1" prio=5 tid=16 Native
    A/art: art/runtime/thread_list.cc:173]   | group="main" sCount=1 dsCount=0 obj=0x12c490a0 self=0xef044400
    A/art: art/runtime/mirror/art_method-inl.h:382] Check failed: entry_point != GetQuickToInterpreterBridge() 
    A/art: art/runtime/runtime.cc:289] Runtime aborting --- recursively, so no thread-specific detail!
    A/art: art/runtime/runtime.cc:289] 
    A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 8604 (JDWP)
    
    opened by AlanCheen 24
  • java.util.zip.ZipException: File too short to be a zip file: 0

    java.util.zip.ZipException: File too short to be a zip file: 0

    When I was run 1.apk, throw this error, but the app not crash, It seem run success. and The repalce patch was also right. So this error has any problem?

    09-16 05:07:05.607: E/PatchManager(20395): addPatch
    09-16 05:07:05.607: E/PatchManager(20395): java.util.zip.ZipException: File too short to be a zip file: 0
    09-16 05:07:05.607: E/PatchManager(20395):  at java.util.zip.ZipFile.readCentralDir(ZipFile.java:376)
    09-16 05:07:05.607: E/PatchManager(20395):  at java.util.zip.ZipFile.<init>(ZipFile.java:163)
    09-16 05:07:05.607: E/PatchManager(20395):  at java.util.jar.JarFile.<init>(JarFile.java:199)
    09-16 05:07:05.607: E/PatchManager(20395):  at java.util.jar.JarFile.<init>(JarFile.java:182)
    09-16 05:07:05.607: E/PatchManager(20395):  at java.util.jar.JarFile.<init>(JarFile.java:168)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.alipay.euler.andfix.patch.Patch.init(Patch.java:75)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.alipay.euler.andfix.patch.Patch.<init>(Patch.java:67)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.alipay.euler.andfix.patch.PatchManager.addPatch(PatchManager.java:125)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.alipay.euler.andfix.patch.PatchManager.initPatchs(PatchManager.java:111)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.alipay.euler.andfix.patch.PatchManager.init(PatchManager.java:104)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.euler.andfix.MainApplication.onCreate(MainApplication.java:48)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.app.ActivityThread.access$1500(ActivityThread.java:151)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.os.Handler.dispatchMessage(Handler.java:102)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.os.Looper.loop(Looper.java:135)
    09-16 05:07:05.607: E/PatchManager(20395):  at android.app.ActivityThread.main(ActivityThread.java:5254)
    09-16 05:07:05.607: E/PatchManager(20395):  at java.lang.reflect.Method.invoke(Native Method)
    09-16 05:07:05.607: E/PatchManager(20395):  at java.lang.reflect.Method.invoke(Method.java:372)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
    09-16 05:07:05.607: E/PatchManager(20395):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    09-16 05:07:05.607: D/euler(20395): inited.
    09-16 05:07:05.609: D/euler(20395): apatch loaded.
    09-16 05:07:05.634: D/SecurityChecker(20395): mDebuggable = true
    09-16 05:07:05.768: D/AndFix(20395): modify com.euler.andfix.MainActivity.TAG flag:
    09-16 05:07:05.768: D/AndFix(20395): setFieldFlag_m: 1 
    09-16 05:07:05.768: D/AndFix(20395): replace_m: -1290452868 , -1290452868
    09-16 05:07:05.768: D/AndFix(20395): modify com.euler.andfix.MainActivity_CF.TAG flag:
    09-16 05:07:05.768: D/AndFix(20395): setFieldFlag_m: 1 
    09-16 05:07:05.768: D/euler(20395): apatch:/storage/emulated/0/out.apatch added.
    09-16 05:07:05.792: D/qq(20395): good
    09-16 05:07:05.792: I/euler(20395): fix succes
    09-16 05:07:05.792: E/euler(20395): b
    09-16 05:07:05.792: E/euler(20395): s1
    09-16 05:07:05.792: E/euler(20395): 11==a
    09-16 05:07:05.792: I/euler(20395): fix success
    09-16 05:07:05.792: I/euler(20395): fix
    09-16 05:07:05.792: E/euler(20395): 0
    09-16 05:07:05.794: E/euler(20395): 10
    
    opened by MrFuFuFu 13
  • 发现对art虚拟机的支持会出现anr错误,不知道该如何解决呀

    发现对art虚拟机的支持会出现anr错误,不知道该如何解决呀

    ----- pid 5536 at 2016-02-22 15:12:49 -----
    Cmd line: com.sankuai.meituan
    ABI: arm
    Build type: optimized
    Zygote loaded classes=3603 post zygote classes=3214
    Intern table: 40539 strong; 1358 weak
    JNI: CheckJNI is off; globals=941 (plus 34 weak)
    Libraries: /data/app/com.sankuai.meituan-1/lib/arm/libandfix.so /data/app/com.sankuai.meituan-1/lib/arm/libmtguard.so /system/app/webview/lib/arm/libwebviewchromium.so /system/lib/libandroid.so /system/lib/libaudioeffect_jni.so /system/lib/libcompiler_rt.so /system/lib/libjavacrypto.so /system/lib/libjnigraphics.so /system/lib/libmedia_jni.so /system/lib/librs_jni.so /system/lib/libsoundpool.so /system/lib/libsuda-phoneloc-jni.so /system/lib/libsudautils.so /system/lib/libwebviewchromium_loader.so /system/lib/libwebviewchromium_plat_support.so libjavacore.so (16)
    Heap: 25% free, 27MB/37MB; 278090 objects
    Dumping cumulative Gc timings
    Total number of allocations 1436260
    Total bytes allocated 86MB
    Free memory 9MB
    Free memory until GC 9MB
    Free memory until OOME 228MB
    Total memory 37MB
    Max memory 256MB
    Total mutator paused time: 0
    Total time waiting for GC to complete: 5.316ms
    
    DALVIK THREADS (69):
    "main" prio=5 tid=1 Waiting
      | group="main" sCount=1 dsCount=0 obj=0x739fc000 self=0xb73476e0
      | sysTid=5536 nice=-6 cgrp=default sched=0/0 handle=0xb6f35bec
      | state=S schedstat=( 0 0 0 ) utm=295 stm=51 core=2 HZ=100
      | stack=0xbe1f7000-0xbe1f9000 stackSize=8MB
      | held mutexes=
      at com.sankuai.meituan.city.CityListFragment.a(CityListFragment.java:35335)
      - waiting on <0x2beb292f> (a java.lang.Class<com.sankuai.meituan.city.CityListFragment_CF>)
      at com.sankuai.android.spawn.base.ModelItemListFragment.onLoadFinished(ModelItemListFragment.java:31)
      at android.support.v4.app.bh.b(LoaderManager.java:476)
      at android.support.v4.app.bh.a(LoaderManager.java:444)
      at android.support.v4.content.t.deliverResult(Loader.java:126)
      at com.sankuai.android.spawn.task.b.deliverResult(AbstractModelLoader.java:59)
      at com.sankuai.meituan.base.j.deliverResult(TwoStageRequestLoader.java:46)
      at android.support.v4.content.b.dispatchOnLoadComplete(AsyncTaskLoader.java:249)
      at android.support.v4.content.c.onPostExecute(AsyncTaskLoader.java:77)
      at android.support.v4.content.ae.finish(ModernAsyncTask.java:466)
      at android.support.v4.content.ae.access$400(ModernAsyncTask.java:48)
      at android.support.v4.content.ak.handleMessage(ModernAsyncTask.java:483)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:135)
      at android.app.ActivityThread.main(ActivityThread.java:5294)
      at java.lang.reflect.Method.invoke!(Native method)
      at java.lang.reflect.Method.invoke(Method.java:372)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
    
    "Heap thread pool worker thread 0" prio=5 tid=2 Native (still starting up)
      | group="" sCount=1 dsCount=0 obj=0x0 self=0xb74f1448
      | sysTid=5542 nice=0 cgrp=default sched=0/0 handle=0xb734d968
      | state=S schedstat=( 0 0 0 ) utm=1 stm=0 core=0 HZ=100
      | stack=0xb4aab000-0xb4aad000 stackSize=1020KB
      | held mutexes=
      kernel: futex_wait_queue_me+0xf4/0x16c
      kernel: futex_wait+0x170/0x238
      kernel: do_futex+0xfc/0x9ec
      kernel: sys_futex+0x80/0x160
      kernel: __sys_trace_return+0x0/0x24
      native: #00 pc 0000fb58  /system/lib/libc.so (syscall+28)
      native: #01 pc 000a95c3  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+98)
      native: #02 pc 0024310d  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+64)
      native: #03 pc 002430a7  /system/lib/libart.so (art::ThreadPoolWorker::Run()+62)
      native: #04 pc 00243995  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+60)
      native: #05 pc 0001385b  /system/lib/libc.so (__pthread_start(void*)+30)
      native: #06 pc 00011783  /system/lib/libc.so (__start_thread+6)
      (no managed stack frames)
    
    "Heap thread pool worker thread 2" prio=5 tid=3 Native (still starting up)
      | group="" sCount=1 dsCount=0 obj=0x0 self=0xb7458568
      | sysTid=5544 nice=0 cgrp=default sched=0/0 handle=0xb734c8e0
      | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
      | stack=0xb48a7000-0xb48a9000 stackSize=1020KB
      | held mutexes=
      kernel: futex_wait_queue_me+0xf4/0x16c
      kernel: futex_wait+0x170/0x238
      kernel: do_futex+0xfc/0x9ec
      kernel: sys_futex+0x80/0x160
      kernel: __sys_trace_return+0x0/0x24
      native: #00 pc 0000fb58  /system/lib/libc.so (syscall+28)
      native: #01 pc 000a95c3  /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+98)
      native: #02 pc 0024310d  /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+64)
      native: #03 pc 002430a7  /system/lib/libart.so (art::ThreadPoolWorker::Run()+62)
      native: #04 pc 00243995  /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+60)
      native: #05 pc 0001385b  /system/lib/libc.so (__pthread_start(void*)+30)
      native: #06 pc 00011783  /system/lib/libc.so (__start_thread+6)
      (no managed stack frames)
    
    opened by mivanzhang 8
  • How to generate apatch

    How to generate apatch

    Can anyone please show a working example to generate apatch file in windows.

    It is giving me this error

    C:\Users\Hamza Mirza\AndroidStudioProjects\apkpatch>apkpatch -f 2.apk -t 1.apk - a mykey -e mykey -p mykey -k C:\Users\Hamza Mirza\AndroidStudioProject s\apkpatch Exception in thread "main" java.lang.IllegalArgumentException: does not exist at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1637) at com.euler.patch.Build.(Build.java:50) at com.euler.patch.ApkPatch.(ApkPatch.java:40) at com.euler.patch.Main.main(Main.java:95)

    C:\Users\Hamza Mirza\AndroidStudioProjects\apkpatch>

    opened by hmz17 7
  • java.lang.IllegalAccessError: interface not accessible

    java.lang.IllegalAccessError: interface not accessible

    java.lang.IllegalAccessError: interface not accessible at dalvik.system.DexFile.defineClassNative(Native Method) at dalvik.system.DexFile.defineClass(DexFile.java:222) at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:215) at dalvik.system.DexFile.loadClass(DexFile.java:204) at com.alipay.euler.andfix.AndFixManager.fix(AndFixManager.java:169) at com.alipay.euler.andfix.patch.PatchManager.loadPatch(PatchManager.java:203) at com.wecook.common.modules.hotfix.HotFixTools.setup(HotFixTools.java:40) at com.wecook.common.modules.ModuleManager.registerAllModules(ModuleManager.java:104) at com.wecook.common.app.BaseApp.onCreate(BaseApp.java:40) at cn.wecook.app.WecookApp.onCreate(WecookApp.java:38) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4574) at android.app.ActivityThread.access$1500(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1400) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5332) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645) at dalvik.system.NativeStart.main(Native Method)

    opened by kevinet 6
  • 基类的方法被修改后,其子类 override 该函数失效

    基类的方法被修改后,其子类 override 该函数失效

    我仅仅修改了基类 BaseWebActivity.onResume() 方法,打了个补丁包。 出现的问题是它的子类 MyWebActivity.onResume() 未被正确调用。

    这是报出的 log: ( incorrectly overridden ??? )

    W/art: Before Android 4.1, method void com.xxx.xxx.MyWebActivity.onResume() would have incorrectly overridden the package-private method in com.xxx.xxx.BaseWebActivity_CF

    4.4是正常的,在若干 5.0,5.1,6.0 机器上出现该问题(包括Moto X Pro, Nexus 5,华为,sony等)

    opened by fashare2015 5
  • 提示说找不到so文件

    提示说找不到so文件

    androidstudio环境下

    之前写了demo只用gradle加载jar包,是没有问题的 现在移到项目上就报这个错误,我在jniLibs文件夹下面放了so文件,然后移除gradle依赖,添加libs包,还是不行。

    跪求解决方法!!

    具体错误: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.kpsns.hebeiykp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.kpsns.hebeiykp-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libandfix.so"

    opened by wzsxlh 5
  • NullPointerException at com.euler.patch.build.PatchBuilder.<init>(PatchBuilder.java:5)

    NullPointerException at com.euler.patch.build.PatchBuilder.(PatchBuilder.java:5)

    正在尝试使用这个工具,刚更新到了 解决 #20 的版本。

    但是 apkpatch.sh输出如下:

    add modified Method:V onCreate(Landroid/os/Bundle;) in Class:Lcom/_马赛克_*/activity/MainTabActivity; java.lang.NullPointerException at com.euler.patch.build.PatchBuilder.(PatchBuilder.java:5) at com.euler.patch.Build.build(Build.java:74) at com.euler.patch.ApkPatch.doPatch(ApkPatch.java:72) at com.euler.patch.Main.main(Main.java:97) java.lang.NullPointerException at com.euler.patch.build.PatchBuilder.writeMeta(PatchBuilder.java:33) at com.euler.patch.Build.build(Build.java:76) at com.euler.patch.ApkPatch.doPatch(ApkPatch.java:72) at com.euler.patch.Main.main(Main.java:97) java.lang.NullPointerException at com.euler.patch.build.PatchBuilder.sealPatch(PatchBuilder.java:43) at com.euler.patch.Build.build(Build.java:77) at com.euler.patch.ApkPatch.doPatch(ApkPatch.java:72) at com.euler.patch.Main.main(Main.java:97)

    希望能有价值~

    opened by JuanbingTeam 5
  • 把A方法中的getI()方法copy到Fix中生成apatch,MainActivity中调用new Fix().getI();应用patch崩溃

    把A方法中的getI()方法copy到Fix中生成apatch,MainActivity中调用new Fix().getI();应用patch崩溃

    E AndroidRuntime: FATAL EXCEPTION: main E AndroidRuntime: Process: com.euler.andfix, PID: 6964 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method getI()I in class Lcom/euler/test/Fix_CF; or its super classes (declaration of 'com.euler.test.Fix_CF' appears in /data/user/0/com.euler.andfix/files/apatch/out.apatch) E AndroidRuntime: at com.euler.andfix.MainActivity_CF.onCreate(MainActivity.java:45) E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237) E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) E AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java) E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417) E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) I Process : Sending signal. PID: 6964 SIG: 9 I ActivityManager: Process com.euler.andfix (pid 6964) has died

    opened by jbg168 5
  • fixed apk , fixed method returned string not working fine

    fixed apk , fixed method returned string not working fine

    `public class App extends Application {

    private static final String TAG = "test";
    
    private static final String APATCH_PATH = "/out.apatch";
    /**
     * patch manager
     */
    private PatchManager mPatchManager;
    
    @Override
    public void onCreate() {
        super.onCreate();
        // initialize
        mPatchManager = new PatchManager(this);
        mPatchManager.init("1.0");
        Log.d(TAG, "inited.");
    
        // load patch
        mPatchManager.loadPatch();
        Log.d(TAG, "apatch loaded.");
    
        // add patch at runtime
        try {
            // .apatch file path
            String patchFileString = Environment.getExternalStorageDirectory()
                    .getAbsolutePath()+"/Download" + APATCH_PATH;
            mPatchManager.addPatch(patchFileString);
            Log.d(TAG, "apatch:" + patchFileString + " added.");
        } catch (Exception e) {
            Log.e(TAG, "", e);
            Toast.makeText(getApplicationContext(),"catch : "+e.getMessage(),Toast.LENGTH_LONG).show();
        }
    
    }
    

    } `

    `class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        main_txt.text = sayGoodBye()
        Toast.makeText(this,sayGoodBye(),Toast.LENGTH_SHORT).show()
    }
    
    fun sayGoodBye():String{
        return "hello"
    }
    

    } `

    after replacing sayGoodbye function return string with goodbye string and generate apatch file with below command : bash apkpatch.sh -f app2.apk -t app1.apk -o . -k test.jks -p 123 -a test -e 123 and copy apatch to sdcard/download dirctory the output is : Screenshot_1583495083

    opened by miladev95 3
  • Why this repo not Updated

    Why this repo not Updated

    I think this is an awesome project and why it not updated I saw last support 4 years ago and only supports Android version from 2.3 to 7.0 how for android above 7.0 it will not support?

    opened by errysuprayogi 1
  • AndFix logo proposal

    AndFix logo proposal

    Hello, I am a graphic designer. I contribute to open source softwares by designing logos. Do you want me to design a logo for AndFix?. I will wait for feedback. Have a nice day!

    opened by hawk28 0
Owner
Alibaba
Alibaba Open Source
Alibaba
Fix for HotSpot deep stack problem

Fix for HotSpot deep stack problem Java HotSpot C2 compiler has a problem with deeply recursive functions. For a discussion of the problem see https:/

Roman Elizarov 3 Oct 23, 2021
A hotfix library for Android platform, and not just this...

中文版 wiki (deprecated) changelog Amigo Service Platform (Amigo backend service is no longer supported) Amigo is a hotfix library which can fix everythi

eleme 1.4k Sep 12, 2022
Nuwa, pure java implementation, can hotfix your android application.

Nuwa Nuwa is a goddess in ancient Chinese mythology best known for repairing the pillar of heaven. With this Nuwa project,you can also have the repair

Jason Ross 3k Sep 25, 2022
dexposed enable 'god' mode for single android application.

What is it? Dexposed is a powerful yet non-invasive runtime AOP (Aspect-oriented Programming) framework for Android app development, based on the work

Alibaba 4.4k Sep 27, 2022
xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.

(English Documents Available) C#下Lua编程支持 xLua为Unity、 .Net、 Mono等C#环境增加Lua脚本编程的能力,借助xLua,这些Lua代码可以方便的和C#相互调用。 xLua的突破 xLua在功能、性能、易用性都有不少突破,这几方面分别最具代表性的

Tencent 7.9k Oct 1, 2022
Kafka-hot-and-cold-retries - Demo project for elaborating how hot and cold retries can be applied in Kafka

Apache Kafka® - Hot and Cold Retries A demo project for elaborating how hot and

Berat CANKAR 11 Jun 10, 2022
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.

Tinker Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstalling apk. Getting started Add t

Tencent 16.6k Oct 1, 2022
AboutLibraries is a library to offer some information of libraries.

AboutLibraries .. allows you to easily create an used open source libraries fragment/activity within your app. All the library information is automati

Mike Penz 3.1k Sep 24, 2022
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

AutoscaleEditText AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size. Latest Version How to use

Txus Ballesteros 355 Sep 25, 2022
Kai Liao 2.2k Sep 17, 2022
Reproducible sample with Fix for Memory Leak in RecyclerView Adapter

Memory Leak RecyclerView Adapter Reproducible Sample with Fix Video Instructions: https://www.youtube.com/c/awesomedevnotes Code Only the relevant and

Awesome Dev Notes | Android Dev Notes YouTube 7 Jun 7, 2022
Fix for HotSpot deep stack problem

Fix for HotSpot deep stack problem Java HotSpot C2 compiler has a problem with deeply recursive functions. For a discussion of the problem see https:/

Roman Elizarov 3 Oct 23, 2021
A solution to fix obfuscated Java services after ProGuard has run

ProGuard Service Mapper This is a service mapper for the ProGuard Java bytecode

Marvin 1 Jan 10, 2022
MIUINativeNotifyIcon - Fix the native notification bar icon function abandoned by the MIUI development team

MIUI 原生通知图标 Fix the native notification bar icon function abandoned by the MIUI

Fankesyooni 155 Sep 23, 2022
ImmutablePendingIntent provides mutability safe methods and quick fix

ImmutablePendingIntent Overview ImmutablePendingIntent provides methods that create immutability-safe PendingIntent lint to make an error when using m

wada811 4 Mar 25, 2022
🔥The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

??The Android Startup library provides a straightforward, performant way to initialize components at the application startup. Both library developers and app developers can use Android Startup to streamline startup sequences and explicitly set the order of initialization.

Rouse 1.2k Sep 29, 2022
Library to change Android launcher App Icon and App Name programmatically !

AppIconNameChanger Change Android App launcher Icon and App Name programmatically ! Download Demo APK from HERE Kindly use the following links to use

Prabhakar Thota 583 Aug 10, 2022
AndroidRate is a library to help you promote your Android app by prompting users to rate the app after using it for a few days.

AndroidRate AndroidRate is a library to help you promote your Android app by prompting users to rate the app after using it for a few days. Project ba

 Vorlonsoft LLC 128 Sep 2, 2022
Viacheslav Veselov 0 Jul 8, 2022
RecyclerView extension library which provides advanced features. (ex. Google's Inbox app like swiping, Play Music app like drag and drop sorting)

Advanced RecyclerView This RecyclerView extension library provides Google's Inbox app like swiping, Play Music app like drag-and-drop sorting and expa

Haruki Hasegawa 5.2k Oct 2, 2022