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

App crash on startup (32-bit instead of 64-bit) #67

Closed
Jimbolino opened this issue Apr 23, 2018 · 3 comments
Closed

App crash on startup (32-bit instead of 64-bit) #67

Jimbolino opened this issue Apr 23, 2018 · 3 comments

Comments

@Jimbolino
Copy link

Jimbolino commented Apr 23, 2018

$ adb shell getprop ro.product.cpu.abi
arm64-v8a

logcat output:

04-23 03:04:51.817 21559 21636 E AndroidRuntime: FATAL EXCEPTION: Thread-16
04-23 03:04:51.817 21559 21636 E AndroidRuntime: Process: com.stockon, PID: 21559
04-23 03:04:51.817 21559 21636 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.stockon/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at java.lang.Runtime.load0(Runtime.java:897)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at java.lang.System.load(System.java:1542)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:71)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:42)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:299)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:65)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:42)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:299)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:65)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:42)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:299)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:65)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:42)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:299)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:247)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:20)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:21)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.react.bridge.JSCJavaScriptExecutorFactory.create(JSCJavaScriptExecutorFactory.java:23)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:921)
04-23 03:04:51.817 21559 21636 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:762)

I've tried compiling it with --architecture armeabi, but that gives me a different logcat error:

04-23 04:18:23.959   970   970 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.stockon-1/base.apk"],nativeLibraryDirectories=[/data/app/com.stockon-1/lib/arm, /data/app/com.stockon-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libfrida-gadget.so"

any suggestions?

ps. I love this software, it totally worked for another app that I've tried, no errors, no glitches

@leonjza
Copy link
Member

leonjza commented Apr 23, 2018

Hey!

I feel a bit confused. Does this app work without it being patched with Frida? I ask because of the trace back showing that it could not load libgnustl_shared.so, which is not something we add during the patching process. I suspect something else (outside of Frida and Objection) might be up here but Ican't be too sure.

Patching with the wrong architecture would give you the error like you got in the second example as the gadget will be searched for in an architecture specific folder.

Thanks for the kind words :)

@Jimbolino
Copy link
Author

Yes, without patches the app works fine.
The apk came from the store:
https://play.google.com/store/apps/details?id=com.stockon

I'm not very familiar with android and the different hardware it runs on, but i suspect its possible to run a 32bit apk on 64bit hardware?
So maybe the original apk is a 32bit one, but after repackaging is marked as 64bit?

@leonjza leonjza added the apps label Jun 14, 2018
@leonjza
Copy link
Member

leonjza commented Jun 14, 2018

Just patched the latest one (skipping resources with the -D flag) and it seems to work ok.

@leonjza leonjza closed this as completed Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants