0

I would like to modify some codes via apktool. However it crashes once I signed it and installed it.

  1. I have tried resigned it without using apktool. It works. So I am pretty sure that the app does not have signature detection mechanism.

  2. I have tried apktool d, apktool b without changing anything, signed and installed the APK. Then it crashes.

Is it a problem of Apktool or is the APK has some sort of anti-apktool mechanism?

Apktool version 2.5.0

Steps to Reproduce

-apktool d test.apk
-apktool b test

-apktool d test.apk
-apktool b --use-aapt2 test (to have the shorter and more explicite stacktrace)\

Below is the part of the Error logcat I obtained once I click the app to launch on my Android device.

#00 pc 00000000000705ac  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: 0328f365110c006f3b155558069c03b7)
#01 pc 00000000004cf170  /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const*)+2512) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#02 pc 000000000000c5b4  /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+608) (BuildId: 9b1ba30f299c594bb54939a36936205f)
#03 pc 0000000000382d64  /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1592) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#04 pc 00000000003b8cb0  /apex/com.android.runtime/lib64/libart.so (art::JNI::GetStaticMethodID(_JNIEnv*, _jclass*, char const*, char const*)+1432) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#05 pc 00000000001c16d0  /data/app/com.hagr.advasoft.touchretouch-BWFV9tiz-iUXQKDAneaj8w==/lib/arm64/libtouchretouch.so (BuildId: c3d2bc3520eed9e5895f09b8162552262408de94)
#07 pc 000000000001057c  /data/app/com.hagr.advasoft.touchretouch-BWFV9tiz-iUXQKDAneaj8w==/oat/arm64/base.odex (art_jni_trampoline+156)
#08 pc 0000000000144334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#09 pc 00000000001531a4  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#10 pc 00000000002eecdc  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#11 pc 00000000002e9fac  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+912) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#12 pc 00000000005c12d0  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtualQuick+596) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#13 pc 0000000000142594  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#14 pc 0000000000229480  /data/app/com.hagr.advasoft.touchretouch-BWFV9tiz-iUXQKDAneaj8w==/oat/arm64/base.vdex (com.onSurfaceChanged+64)
#15 pc 00000000005bc060  /apex/com.android.runtime/lib64/libart.so (MterpInvokeSuper+2312) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#16 pc 000000000013e894  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_super+20) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#17 pc 00000000002433b0  /data/app/com.hagr.advasoft.touchretouch-BWFV9tiz-iUXQKDAneaj8w==/oat/arm64/base.vdex (com.MainActivity.onSurfaceChanged)
#18 pc 00000000005bcbbc  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1752) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#19 pc 000000000013ea14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#20 pc 00000000002fc156  /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun+982)
#21 pc 00000000005bd758  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#22 pc 000000000013e914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#23 pc 00000000002fc7b8  /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.run+48)
#24 pc 00000000002bf918  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.4040658722762997890+240) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#25 pc 00000000005a6298  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#26 pc 000000000014d468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#27 pc 0000000000144334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#28 pc 00000000001531a4  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+252) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#29 pc 00000000004c6ce8  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#30 pc 00000000004c7d7c  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#31 pc 0000000000507d4c  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: 0fd07ccb37ce5d1da616af1c92975c60)
#32 pc 00000000000cf6f0  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 0328f365110c006f3b155558069c03b7)
#33 pc 00000000000720e8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 0328f365110c006f3b155558069c03b7)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.