Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hook on start error #2

Open
xyxdaily opened this issue Feb 15, 2024 · 3 comments
Open

hook on start error #2

xyxdaily opened this issue Feb 15, 2024 · 3 comments

Comments

@xyxdaily
Copy link

I want to hook the system class on start.
image

however, the app crashed.

@chancerly
Copy link
Owner

chancerly commented Feb 16, 2024

Could you provide the stack trace of the crash? And can the TestCase HookActivity work ok on your device?

@harshitshah4
Copy link

harshitshah4 commented Sep 3, 2024

This is happening even with me.
Crash logs:

09-03 12:08:27.503 E/AndroidRuntime(24335): java.lang.VerifyError: Verifier rejected class androidx.appcompat.app.WindowDecorActionBar: androidx.appcompat.view.ActionMode androidx.appcompat.app.WindowDecorActionBar.startActionMode(androidx.appcompat.view.ActionMode$Callback) failed to verify: androidx.appcompat.view.ActionMode androidx.appcompat.app.WindowDecorActionBar.startActionMode(androidx.appcompat.view.ActionMode$Callback): [0x2C] register v0 has type Precise Reference: androidx.appcompat.app.WindowDecorActionBar$ActionModeImpl but expected Reference: androidx.appcompat.view.ActionMode (declaration of 'androidx.appcompat.app.WindowDecorActionBar' appears in /data/app/~~TlLO9MbHKoqJWTnZNI1wYQ==/com.example.all_in_one-DqcQwgujRJ68tH3RxZIOZQ==/base.apk)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at androidx.appcompat.app.AppCompatDelegateImpl.initWindowDecorActionBar(AppCompatDelegateImpl.java:563)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at androidx.appcompat.app.AppCompatDelegateImpl.getSupportActionBar(AppCompatDelegateImpl.java:543)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at androidx.appcompat.app.AppCompatActivity.getSupportActionBar(AppCompatActivity.java:163)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at com.example.all_in_one.MainActivity.onCreate(MainActivity.java:60)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.Activity.performCreate(Activity.java:8290)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.Activity.performCreate(Activity.java:8269)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3657)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3813)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.os.Handler.dispatchMessage(Handler.java:106)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.os.Looper.loopOnce(Looper.java:201)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.os.Looper.loop(Looper.java:288)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at android.app.ActivityThread.main(ActivityThread.java:7898)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at java.lang.reflect.Method.invoke(Native Method)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
09-03 12:08:27.503 E/AndroidRuntime(24335): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
09-03 12:08:27.641 E/BcSmartspaceCard( 2599): No tap action can be set up
09-03 12:08:27.641 E/BcSmartspaceCard(18282): No tap action can be set up
09-03 12:08:27.997 E/WindowManager( 1509): setOnBackInvokedCallback(): No window state for package:com.android.systemui

Additionally this only happens if I set needHookSystemClass as true

@harshitshah4
Copy link

@chancerly let me know if you need any help in debugging this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants