A framework for hook java methods.

Overview

Legend


logo

Projects are out of date, plese move to:

Whale Hook

What is Legend?

Legend is a Hook framework for Android Development, it allows you to Hook Java methods without ROOT. Even more exciting is that it supports both Dalvik and Art environment!

https://github.com/asLody/legend

1. What is the good

  • Programming more efficient
  • Dynamic debugging
  • HotFix and needn't reboot app
  • Fast dump Dex File in the shell
  • Software security penetration
  • Do some exciting things...

2. How to use

Example 1: Annotation type Hook

@Hook("android.widget.Toast::show")
public static void Toast_show(Toast thiz) {
  thiz.setText("XXXXXXXXX");
  //Call the origin method
  HookManager.getDefault().callSuper(thiz);
}

Example 2: Interception of startActivity

@Hook("android.app.Activity::[email protected]")
public static void Activity_startActivity(Activity thiz, Intent intent) {
  if (!ALLOW_LAUNCH_ACTIVITY) {
    Toast.makeText(thiz, "I am sorry to turn your Activity down :)", Toast.LENGTH_SHORT).show();
  } else {
    HookManager.getDefault().callSuper(thiz, intent);
  }
}

Notice:

  • Write the following code down in where you want to your hooks enable.
HookManager.getDefault().applyHooks(YourClass.class);
  • You can also hook a method without annotation.
HookManager.getDefault().hookMethod(originMethod, hookMethod);

3. Compatibility

  • Dalvik & Android 4.2
  • Dalvik & Android 4.3
  • Art & Android 5.0
  • Art & Android 5.0.1
  • Art & Android 5.1
  • Art & Android 6.0
  • Art & Android 6.0.1
  • aliyunOS VM

4. Showcase

https://github.com/dodola/RocooFix

5. Help improve Legend

if (Country.China == your.country) {
  QQGroup.join(530497973);
} else {
  webView.loadUrl("https://github.com/asLody/legend/issues");
}

6. Author

Lody

Comments
  • hook不到TextView的setText方法

    hook不到TextView的setText方法

    老铁求救啊 我hook了 TextView的setText方法 由于他会自动调用public的这个方法 public final void setText(CharSequence text) { setText(text, mBufferType); } 我hook这个方法 public void setText(CharSequence text, BufferType type) { setText(text, type, true, 0);

        if (mCharWrapper != null) {
            mCharWrapper.mChars = null;
        }
    }
    

    但是没有作用 求教 @Hook("android.widget.TextView::[email protected]") public static void TextView_setText(TextView view, CharSequence text , TextView.BufferType type) {

        Log.v(TAG,"this is text" );
        text = "sss";
        HookManager.getDefault().callSuper(view,text,type);
    }
    
    opened by CharlesCT 0
  • Runtime Error : Failed to find Dex offset for PC offset(LG G2 Android 5.0.1)

    Runtime Error : Failed to find Dex offset for PC offset(LG G2 Android 5.0.1)

    01-15 12:16:57.902 15445-15445/? I/art: Late-enabling -Xcheck:jni 01-15 12:16:58.007 15445-15445/com.legend.demo I/InstantRun: Instant Run Runtime started. Android package is com.legend.demo, real application class is com.legend.demo.App. 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd72ec 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd7308 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd72e8 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd72dc 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da20 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da24 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da00 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da08 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da0c 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da18 01-15 12:16:58.111 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da38 01-15 12:16:58.112 15445-15445/com.legend.demo D/#######: Malloc memory, size : 144 01-15 12:16:58.112 15445-15445/com.legend.demo D/#######: Write Memory to 0xffffffffb50d8000 01-15 12:16:58.112 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081da40 01-15 12:16:58.113 15445-15445/com.legend.demo D/Legend-Log: [+++] Activity_startActivity have hooked. 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd78bc 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd78d8 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd78b8 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dd78ac 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebbe8 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebbec 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebbc8 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebbd0 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebbd4 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebbe0 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebc00 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Malloc memory, size : 144 01-15 12:16:58.126 15445-15445/com.legend.demo D/#######: Write Memory to 0xffffffffb3522000 01-15 12:16:58.127 15445-15445/com.legend.demo D/#######: Write Memory to 0x704ebc08 01-15 12:16:58.127 15445-15445/com.legend.demo D/Legend-Log: [+++] Application_onCreate have hooked. 01-15 12:16:58.142 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda47c 01-15 12:16:58.142 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda498 01-15 12:16:58.142 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda478 01-15 12:16:58.142 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda46c 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f860 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f864 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f840 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f848 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f84c 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f858 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f878 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Malloc memory, size : 144 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0xffffffffb34dd000 01-15 12:16:58.143 15445-15445/com.legend.demo D/#######: Write Memory to 0x7081f880 01-15 12:16:58.143 15445-15445/com.legend.demo D/Legend-Log: [+++] TelephonyManager_getSimSerialNumber have hooked. 01-15 12:16:58.153 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda4cc 01-15 12:16:58.153 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda4e8 01-15 12:16:58.153 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda4c8 01-15 12:16:58.153 15445-15445/com.legend.demo D/#######: Write Memory to 0x75dda4bc 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778150 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778154 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778130 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778138 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x7077813c 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778148 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778168 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Malloc memory, size : 144 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0xffffffffb34ad000 01-15 12:16:58.154 15445-15445/com.legend.demo D/#######: Write Memory to 0x70778170 01-15 12:16:58.154 15445-15445/com.legend.demo D/Legend-Log: [+++] Toast_show have hooked. 01-15 12:16:58.158 15445-15445/com.legend.demo A/art: art/runtime/mirror/art_method.cc:199] Failed to find Dex offset for PC offset 0xc06b6056(PC 0x73b79577, entry_point=0xb34c3521) in void com.legend.demo.App.Application_onCreate(android.app.Application) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] Runtime aborting... 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] Aborting thread: 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] "main" prio=5 tid=1 Runnable 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | group="" sCount=0 dsCount=0 obj=0x750ef068 self=0xb4827800 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | sysTid=15445 nice=0 cgrp=apps sched=0/0 handle=0xb6fdfec8 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | state=R schedstat=( 0 0 0 ) utm=10 stm=4 core=2 HZ=100 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | stack=0xbe338000-0xbe33a000 stackSize=8MB 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | held mutexes= "abort lock" "mutator lock"(shared held) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #00 pc 000045b4 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #01 pc 00002e1d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #02 pc 00252d6d /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*)+84) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #03 pc 00236aeb /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&) const+162) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #04 pc 00226615 /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits >&, art::Thread*)+32) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #05 pc 0022687f /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&)+354) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #06 pc 00226a77 /system/lib/libart.so (art::Runtime::Abort()+82) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #07 pc 000a6bb9 /system/lib/libart.so (art::LogMessage::~LogMessage()+1360) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #08 pc 001e3e65 /system/lib/libart.so (art::mirror::ArtMethod::ToDexPc(unsigned int, bool)+1064) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #09 pc 00295831 /system/lib/libart.so (artQuickResolutionTrampoline+1152) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #10 pc 000a269b /system/lib/libart.so (art_quick_resolution_trampoline+10) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #11 pc 000e80fc /dev/ashmem/dalvik-main space (deleted) (???) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at com.legend.demo.App.Application_onCreate(App.java:-1) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.LoadedApk.makeApplication(LoadedApk.java:585) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4584) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread.access$1500(ActivityThread.java:149) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.os.Handler.dispatchMessage(Handler.java:102) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.os.Looper.loop(Looper.java:135) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread.main(ActivityThread.java:5290) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at java.lang.reflect.Method.invoke!(Native method) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at java.lang.reflect.Method.invoke(Method.java:372) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] Dumping all threads without appropriate locks held: thread list lock 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] All threads: 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] DALVIK THREADS (13): 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] "main" prio=5 tid=1 Runnable 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | group="" sCount=0 dsCount=0 obj=0x750ef068 self=0xb4827800 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | sysTid=15445 nice=0 cgrp=apps sched=0/0 handle=0xb6fdfec8 01-15 12:16:58.350 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | state=R schedstat=( 0 0 0 ) utm=12 stm=5 core=2 HZ=100 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | stack=0xbe338000-0xbe33a000 stackSize=8MB 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | held mutexes= "abort lock" "mutator lock"(shared held) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #00 pc 000045b4 /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #01 pc 00002e1d /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #02 pc 00252d6d /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, char const*, art::mirror::ArtMethod*)+84) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #03 pc 00236aeb /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&) const+162) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #04 pc 0023f9dd /system/lib/libart.so (art::ThreadList::DumpLocked(std::__1::basic_ostream<char, std::__1::char_traits >&)+120) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #05 pc 0022682d /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&)+272) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #06 pc 00226a77 /system/lib/libart.so (art::Runtime::Abort()+82) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #07 pc 000a6bb9 /system/lib/libart.so (art::LogMessage::~LogMessage()+1360) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #08 pc 001e3e65 /system/lib/libart.so (art::mirror::ArtMethod::ToDexPc(unsigned int, bool)+1064) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #09 pc 00295831 /system/lib/libart.so (artQuickResolutionTrampoline+1152) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #10 pc 000a269b /system/lib/libart.so (art_quick_resolution_trampoline+10) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #11 pc 000e80fc /dev/ashmem/dalvik-main space (deleted) (???) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at com.legend.demo.App.Application_onCreate(App.java:-1) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.LoadedApk.makeApplication(LoadedApk.java:585) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4584) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread.access$1500(ActivityThread.java:149) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.os.Handler.dispatchMessage(Handler.java:102) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.os.Looper.loop(Looper.java:135) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at android.app.ActivityThread.main(ActivityThread.java:5290) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at java.lang.reflect.Method.invoke!(Native method) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at java.lang.reflect.Method.invoke(Method.java:372) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] "Heap thread pool worker thread 0" prio=5 tid=2 Native (still starting up) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | group="" sCount=0 dsCount=0 obj=0x0 self=0xaf433400 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | sysTid=15451 nice=0 cgrp=apps sched=0/0 handle=0xb4904580 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | stack=0xb417f000-0xb4181000 stackSize=1020KB 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | held mutexes= 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #00 pc 000101ec /system/lib/libc.so (syscall+28) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #01 pc 000a98f3 /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+98) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #02 pc 00240c85 /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+64) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #03 pc 00240c1f /system/lib/libart.so (art::ThreadPoolWorker::Run()+62) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #04 pc 0024150d /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+60) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #05 pc 0001397b /system/lib/libc.so (__pthread_start(void*)+30) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #06 pc 0001196b /system/lib/libc.so (__start_thread+6) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] (no managed stack frames) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] "Heap thread pool worker thread 2" prio=5 tid=3 Native (still starting up) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | group="" sCount=0 dsCount=0 obj=0x0 self=0xa999ac00 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | sysTid=15453 nice=0 cgrp=apps sched=0/0 handle=0xb4904080 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | stack=0xb3f7d000-0xb3f7f000 stackSize=1020KB 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | held mutexes= 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #00 pc 000101ec /system/lib/libc.so (syscall+28) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #01 pc 000a98f3 /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+98) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #02 pc 00240c85 /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+64) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #03 pc 00240c1f /system/lib/libart.so (art::ThreadPoolWorker::Run()+62) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #04 pc 0024150d /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+60) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #05 pc 0001397b /system/lib/libc.so (__pthread_start(void*)+30) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #06 pc 0001196b /system/lib/libc.so (__start_thread+6) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] (no managed stack frames) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] "Heap thread pool worker thread 1" prio=5 tid=4 Native (still starting up) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | group="" sCount=0 dsCount=0 obj=0x0 self=0xaf434400 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | sysTid=15452 nice=0 cgrp=apps sched=0/0 handle=0xb4904800 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | state=S schedstat=( 0 0 0 ) utm=0 stm=0 core=2 HZ=100 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | stack=0xb407f000-0xb4081000 stackSize=1020KB 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] | held mutexes= 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #00 pc 000101ec /system/lib/libc.so (syscall+28) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #01 pc 000a98f3 /system/lib/libart.so (art::ConditionVariable::Wait(art::Thread*)+98) 01-15 12:16:58.352 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #02 pc 00240c85 /system/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+64) 01-15 12:16:58.353 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #03 pc 00240c1f /system/lib/libart.so (art::ThreadPoolWorker::Run()+62) 01-15 12:16:58.353 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #04 pc 0024150d /system/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+60) 01-15 12:16:58.353 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #05 pc 0001397b /system/lib/libc.so (__pthread_start(void*)+30) 01-15 12:16:58.353 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] native: #06 pc 0001196b /system/lib/libc.so (__start_thread+6) 01-15 12:16:58.353 15445-15445/com.legend.demo A/art: art/runtime/runtime.cc:284] (no managed stack frames)

    opened by Hyun-June-Choi 0
  • android 7.0 is not support

    android 7.0 is not support

    09-17 14:11:56.843 6231-6231/com.dodola.rocoosample.runtimefix W/System.err: java.lang.SecurityException: Can not make a java.lang.reflect.Method constructor accessible 09-17 14:11:56.843 6231-6231/com.dodola.rocoosample.runtimefix W/System.err: at java.lang.reflect.AccessibleObject.setAccessible0(AccessibleObject.java:133) 09-17 14:11:56.844 6231-6231/com.dodola.rocoosample.runtimefix W/System.err: at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:89) 09-17 14:11:56.844 6231-6231/com.dodola.rocoosample.runtimefix W/System.err: at com.lody.legend.art.ArtMethod.backup(ArtMethod.java:109) 09-17 14:11:56.844 6231-6231/com.dodola.rocoosample.runtimefix W/System.err: at com.lody.legend.HookManager.hookMethodArt(HookManager.java:202) 09-17 14:11:56.844 6231-6231/com.dodola.rocoosample.runtimefix W/System.err: at com.lody.legend.HookManager.hookMethod(HookManager.java:137)

    opened by linghu88 2
  • demo crash when `show a toast` if switch to launcher an other app

    demo crash when `show a toast` if switch to launcher an other app

    test case:

    1. launcher legend demo app
    2. return to home & luacher an other app (eg: calcualtor)
    3. return to legend demo & click show a toast button

    crash logcat:

    --------- beginning of crash
    04-02 16:56:27.181 18323 18323 F libc    : Fatal signal 11 (SIGSEGV), code 2, fault addr 0x12c0e084 in tid 18323 (com.legend.demo)
    04-02 16:56:27.193   202   749 D audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
    04-02 16:56:27.282   199   199 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    04-02 16:56:27.282   199   199 F DEBUG   : Build fingerprint: 'Android/aosp_hammerhead/hammerhead:6.0/MRA58K/potato03232147:userdebug/test-keys'
    04-02 16:56:27.282   199   199 F DEBUG   : Revision: '0'
    04-02 16:56:27.282   199   199 F DEBUG   : ABI: 'arm'
    04-02 16:56:27.282   199   199 F DEBUG   : pid: 18323, tid: 18323, name: com.legend.demo  >>> com.legend.demo <<<
    04-02 16:56:27.282   199   199 F DEBUG   : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x12c0e084
    04-02 16:56:27.302   199   199 F DEBUG   :     r0 b5985000  r1 ffffffff  r2 00000001  r3 00000001
    04-02 16:56:27.303   199   199 F DEBUG   :     r4 be8fd0ec  r5 b5985000  r6 be8fd124  r7 be8fd008
    04-02 16:56:27.303   199   199 F DEBUG   :     r8 b6d31ec0  r9 be8fd120  sl 12c0e000  fp 00000000
    04-02 16:56:27.303   199   199 F DEBUG   :     ip b4b3b085  sp be8fd000  lr b4b84db9  pc b4b84dc2  cpsr 00070030
    04-02 16:56:27.311   199   199 F DEBUG   : 
    04-02 16:56:27.311   199   199 F DEBUG   : backtrace:
    04-02 16:56:27.311   199   199 F DEBUG   :     #00 pc 0032ddc2  /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+97)
    04-02 16:56:27.311   199   199 F DEBUG   :     #01 pc 002e40a5  /system/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobject*)+32)
    04-02 16:56:27.311   199   199 F DEBUG   :     #02 pc 71ef0e39  /data/dalvik-cache/arm/system@[email protected] (offset 0x1eb5000)
    04-02 16:56:27.693   199   199 F DEBUG   : 
    04-02 16:56:27.693   199   199 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_09
    04-02 16:56:27.693   199   199 E DEBUG   : AM write failed: Broken pipe
    
    opened by zzhouj 0
  • 运行小米5sPlus就crash,android系统6.0.1

    运行小米5sPlus就crash,android系统6.0.1

    java.lang.VerifyError: Verifier rejected class com.legend.demo.MainActivity$4 due to bad method void com.legend.demo.MainActivity$4.onClick(android.view.View) (declaration of 'com.legend.demo.MainActivity$4' appears in /data/app/com.legend.demo-1/split_lib_slice_1_apk.apk) at com.legend.demo.MainActivity.onCreate(MainActivity.java:60) at android.app.Activity.performCreate(Activity.java:6323) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2411) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2518) at android.app.ActivityThread.access$1000(ActivityThread.java:153) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1382) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:5544) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)

    opened by linghu88 1
  • 5.1奔溃了 手机虚拟机都有

    5.1奔溃了 手机虚拟机都有

    11-16 17:09:47.787 1003-1003/com.ct.plat.android.ZhiFuSecurity A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x20 in tid 1003 (d.ZhiFuSecurity) 11-16 17:09:47.902 79-79/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 11-16 17:09:47.902 79-79/? I/DEBUG: Build fingerprint: 'Meizu/Meizu/PRO 6 Plus:5.1.1/KTU84P/eng.se.infra.20170110.154925:userdebug/release-keys' 11-16 17:09:47.902 79-79/? I/DEBUG: Revision: '0' 11-16 17:09:47.902 79-79/? I/DEBUG: ABI: 'x86' 11-16 17:09:47.902 79-79/? I/DEBUG: pid: 1003, tid: 1003, name: d.ZhiFuSecurity >>> com.ct.plat.android.ZhiFuSecurity <<< 11-16 17:09:47.902 79-79/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20 11-16 17:09:47.965 79-79/? I/DEBUG: eax 00000000 ebx b3bfcaa4 ecx 6fae6d3c edx 0000ed64 11-16 17:09:47.966 79-79/? I/DEBUG: esi 6fae6d20 edi 6fae6d20 11-16 17:09:47.966 79-79/? I/DEBUG: xcs 00000073 xds 0000007b xes 0000007b xfs 00000007 xss 0000007b 11-16 17:09:47.966 79-79/? I/DEBUG: eip b3a03c4e ebp bff30968 esp bff30920 flags 00210246 11-16 17:09:47.966 79-79/? I/DEBUG: backtrace: 11-16 17:09:47.966 79-79/? I/DEBUG: #00 pc 00316c4e /system/lib/libart.so (art::mirror::Class::FindDeclaredVirtualMethod(art::StringPiece const&, art::Signature const&)+142) 11-16 17:09:47.966 79-79/? I/DEBUG: #01 pc 00316f3e /system/lib/libart.so (art::mirror::Class::FindVirtualMethod(art::StringPiece const&, art::Signature const&)+46) 11-16 17:09:47.966 79-79/? I/DEBUG: #02 pc 003d9c4d /system/lib/libart.so (art::verifier::MethodVerifier::ResolveMethodAndCheckAccess(unsigned int, art::verifier::MethodType)+397) 11-16 17:09:47.966 79-79/? I/DEBUG: #03 pc 003da40e /system/lib/libart.so (art::verifier::MethodVerifier::VerifyInvocationArgs(art::Instruction const*, art::verifier::MethodType, bool, bool)+94) 11-16 17:09:47.966 79-79/? I/DEBUG: #04 pc 003dcbf1 /system/lib/libart.so (art::verifier::MethodVerifier::CodeFlowVerifyInstruction(unsigned int*)+6289) 11-16 17:09:47.966 79-79/? I/DEBUG: #05 pc 003e0567 /system/lib/libart.so (art::verifier::MethodVerifier::CodeFlowVerifyMethod()+151) 11-16 17:09:47.966 79-79/? I/DEBUG: #06 pc 003e0ada /system/lib/libart.so (art::verifier::MethodVerifier::VerifyCodeFlow()+970) 11-16 17:09:47.966 79-79/? I/DEBUG: #07 pc 003e0d0f /system/lib/libart.so (art::verifier::MethodVerifier::Verify()+191) 11-16 17:09:47.966 79-79/? I/DEBUG: #08 pc 003e144e /system/lib/libart.so (art::verifier::MethodVerifier::VerifyMethod(unsigned int, art::DexFile const*, art::Handleart::mirror::DexCache, art::Handleart::mirror::ClassLoader, art::DexFile::ClassDef const*, art::DexFile::CodeItem const*, art::mirror::ArtMethod*, unsigned int, bool, bool)+270) 11-16 17:09:47.966 79-79/? I/DEBUG: #09 pc 003e1e72 /system/lib/libart.so (art::verifier::MethodVerifier::VerifyClass(art::DexFile const*, art::Handleart::mirror::DexCache, art::Handleart::mirror::ClassLoader, art::DexFile::ClassDef const*, bool, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >)+1058) 11-16 17:09:47.966 79-79/? I/DEBUG: #10 pc 003e2748 /system/lib/libart.so (art::verifier::MethodVerifier::VerifyClass(art::mirror::Class, bool, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >*)+328) 11-16 17:09:47.966 79-79/? I/DEBUG: #11 pc 00147927 /system/lib/libart.so (art::ClassLinker::VerifyClass(art::Handleart::mirror::Class)+1159) 11-16 17:09:47.966 79-79/? I/DEBUG: #12 pc 001499b6 /system/lib/libart.so (art::ClassLinker::InitializeClass(art::Handleart::mirror::Class, bool, bool)+294) 11-16 17:09:47.966 79-79/? I/DEBUG: #13 pc 0014ac4c /system/lib/libart.so (art::ClassLinker::EnsureInitialized(art::Handleart::mirror::Class, bool, bool)+108) 11-16 17:09:47.966 79-79/? I/DEBUG: #14 pc 003460df /system/lib/libart.so 11-16 17:09:47.966 79-79/? I/DEBUG: #15 pc 00021eab /data/dalvik-cache/x86/system@[email protected]

                                    [ 11-16 17:09:48.043   265:  966 D/         ]
                                    HostConnection::get() New Host Connection established 0xb602d2e0, tid 966
    

    11-16 17:09:48.115 79-79/? I/DEBUG: Tombstone written to: /data/tombstones/tombstone_07

    opened by CharlesCT 0
Owner
Lody
Just a boy
Lody
Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Codename One - Cross Platform Native Apps with Java or Kotlin Codename One is a mobile first cross platform environment for Java and Kotlin developers

Codename One 1.4k Dec 23, 2022
A small, yet full-featured framework that allows building View-based Android applications

Conductor A small, yet full-featured framework that allows building View-based Android applications. Conductor provides a light-weight wrapper around

BlueLine Labs 3.9k Jan 6, 2023
UltimateAndroid is a rapid development framework for developing your apps

UltimateAndroid Version:0.10.2 UltimateAndroid is a rapid development framework for developing apps Master branch: Dev branch: V0.7.0 Ui Demo screensh

MarshalChen 2.1k Dec 26, 2022
LiteOrm is a fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line of code efficiently.

#LiteOrm:Android高性能数据库框架 A fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line

马天宇 1.5k Nov 19, 2022
Rosie is an Android framework to create applications following the principles of Clean Architecture.

Rosie The only way to make the deadline—the only way to go fast—is to keep the code as clean as possible at all times. — Robert C. Martin in Clean Cod

Karumi 1.8k Dec 28, 2022
A data-binding Presentation Model(MVVM) framework for the Android platform.

PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED. As personal time contraints, I am currently unable to keep up. Please use official android da

RoboBinding open source 1.3k Dec 9, 2022
A full-featured framework that allows building android applications following the principles of Clean Architecture.

EasyMVP A powerful, and very simple MVP library with annotation processing and bytecode weaving. EasyMVP eliminates the boilerplate code for dealing w

null 1.3k Nov 19, 2022
Android Plugin Framework

Android Plugin Framework This project is pre-mature and may be changed very frequently. Introduction Android Plugin Framework (APF) aims to providing

Umeng Limited 322 Nov 17, 2022
MVVM framework for Android

RoboMVVM - MVVM Framework For Android RoboMVVM is an open source library that facilitates the use of the MVVM pattern in Android apps. The MVVM patter

Debdatta Basu 55 Nov 24, 2020
kotlin-core - A full framework for making Android apps. Based on Anko and Kotson.

kotlin-core This package is not Android-specific, and can be used across platforms. However, for a good example of use in Android, take a look at kotl

Lightning Kite 36 Oct 3, 2022
🔥 Android component-based routing framework

README-CN Latest version module krouter-core krouter-compiler krouter-annotation krouter-plugin version Features 支持通过路由获取intent 支持方法注解,通过路由调用方法 支持给fra

Jiaming Gu 6 Jun 24, 2022
VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.

VasSonic: A Lightweight And High-performance Hybrid Framework VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS

Tencent 11.6k Dec 30, 2022
🔪 AOP development framework implemented through *Annotation + ASM + Gradle Transform API* for Android🤖

?? AOP development framework implemented through *Annotation + ASM + Gradle Transform API* for Android??

Pumpkin 325 Nov 22, 2022
A modern framework for full stack web apps in Kotlin

Kobweb is an opinionated Kotlin framework for creating websites and web apps, built on top of Web Compose and inspired by Next.js and Chakra UI.

Varabyte 425 Jan 8, 2023
droidparts 6.7 0.0 L5 Java DI, ORM, JSON, ...

DroidParts a carefully crafted Android framework that includes: DI - injection of Views, Fragments, Services, etc. ORM - efficient persistence utilizi

DroidParts 779 Dec 21, 2022
Don't write a ViewPager Adapter! Hook up your ViewPager to your data model using Android Data Binding Framework. With Kotlin support!

Don't write a ViewPager Adapter! Hook up your ViewPager to your data model using Android Data Binding Framework. Show some ❤️ ?? Sweet and short libra

Rakshak R.Hegde 180 Nov 18, 2022
[Xposed]Hook For MIUI Launcher

[Xposed]Hook For MIUI Launcher

YuKongA 22 Dec 12, 2022
Hook for Miui Home

MiuiHome Hook for MIUI Launcher - Xposed 如何使用 激活模块后重启一次系统桌面,再打开桌面设置,点击模块设置选项即可弹出弹窗. 模块设置不在本应用界面!!请在MIUI桌面设置中打开Dialog来设置. 前世今生 原仓库:YuKongA/MiuiHome 新仓库

null 329 Jan 4, 2023
xposed安卓虚拟摄像头 android virtual camera on xposed hook

android_virtual_cam xposed安卓虚拟摄像头 感谢https://github.com/wangwei1237/CameraHook 提供的HOOK思路!! 求有无极的大佬,希望帮忙测试一下此模块虚拟框架下是否可用,测试后希望在issue中反馈一下,谢谢!!! 具体的使用方法(

null 645 Jan 1, 2023
A tool translate a apk file to stantard android project include so hook api and il2cpp c++ scaffolding when apk is a unity il2cpp game. Write code on a apk file elegantly.

FakerAndroid (FakerAndroid.jar or FakerAndroid-AS) A tool translate a apk file to stantard android project include so hook api and il2cpp c++ scaffold

null 231 Dec 29, 2022