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

Monkey April 2024 #2

Closed
baltpeter opened this issue Apr 26, 2024 · 7 comments
Closed

Monkey April 2024 #2

baltpeter opened this issue Apr 26, 2024 · 7 comments
Assignees

Comments

@baltpeter
Copy link
Member

Since it's been almost a year since our last collection (#1), I think it's time to do another run to get a sense of whether there've been any significant changes since then (especially new endpoints).

The goal is once again to gather as many requests to many different endpoints as possible, so I'll do another monkey test run.

@baltpeter baltpeter self-assigned this Apr 26, 2024
@baltpeter
Copy link
Member Author

To get this done quickly, I'll only do Android for now and reuse the existing code from #1.

@baltpeter
Copy link
Member Author

baltpeter commented Apr 26, 2024

google/googleplay didn't end up working for me this time, so I used apkeep, cf.: tweaselORG/meta#46 (comment)

@baltpeter
Copy link
Member Author

Oh no. None of the apps I downloaded using apkeep seem to want to start. I've tested both an Android 11 x86_64 emulator and Android 13 arm64 physical device. They either crash immediately after launching or show an error like this:

image

@baltpeter
Copy link
Member Author

I thought that maybe the fact that I was using -o device=px_7a was the problem, since I'm not actually trying to run the apps on a Pixel 7a. But that doesn't seem to be the case, either.

Both apkeep (https://github.com/EFForg/rs-google-play/blob/31342793e3aab28e9c24ef00372e350e406884e1/gpapi/device.properties) and the Android emulator support Pixel 3a, so I tried that. Same problem.

@baltpeter
Copy link
Member Author

Logcat says:

04-26 13:33:40.381  7746  7746 E egram.messenger: No implementation found for void org.telegram.tgnet.ConnectionsManager.native_setJava(boolean) (tried Java_org_telegram_tgnet_ConnectionsManager_native_1setJava and Java_org_telegram_tgnet_ConnectionsManager_native_1setJava__Z)
04-26 13:33:40.381  7746  7746 D AndroidRuntime: Shutting down VM
04-26 13:33:40.382  7746  7746 E AndroidRuntime: FATAL EXCEPTION: main
04-26 13:33:40.382  7746  7746 E AndroidRuntime: Process: org.telegram.messenger, PID: 7746
04-26 13:33:40.382  7746  7746 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.telegram.messenger.ApplicationLoaderImpl: java.lang.RuntimeException: can't load native libraries arm64-v8a lookup folder arm64-v8a
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6776)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2129)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7884)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: Caused by: java.lang.RuntimeException: can't load native libraries arm64-v8a lookup folder arm64-v8a
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at org.telegram.messenger.ApplicationLoader.onCreate(ApplicationLoader.java:283)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1277)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6771)
04-26 13:33:40.382  7746  7746 E AndroidRuntime: 	... 9 more
04-26 13:33:40.389  1749  7787 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
04-26 13:33:40.389  1749  2112 W ActivityTaskManager:   Force finishing activity org.telegram.messenger/.DefaultIcon
04-26 13:33:40.404  1749  1943 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
04-26 13:33:40.405  7746  7746 I Process : Sending signal. PID: 7746 SIG: 9
04-26 13:33:40.481  1749  3117 I ActivityManager: Process org.telegram.messenger (pid 7746) has died: fg  TOP 
04-26 13:33:40.484   787   787 I Zygote  : Process 7746 exited due to signal 9 (Killed)
04-26 13:33:40.487  1749  1945 I libprocessgroup: Successfully killed process cgroup uid 10185 pid 7746 in 5ms
04-26 13:33:40.489  3219  3219 I A       : onResume
04-26 13:33:40.501  1749  7363 D CoreBackPreview: Window{148c6fc u0 Splash Screen org.telegram.messenger EXITING}: Setting back callback null

Was the app downloaded for the wrong architecture?

@baltpeter
Copy link
Member Author

If I'm seeing this correctly, the APK doesn't include any native code at all. o.o

❯ aapt dump badging org.telegram.messenger.apk | grep native-code

Whereas, if I download the same APK from APKMirror, there are native binaries:

❯ aapt dump badging org.telegram.messenger_10.12.0-47101_minAPI19\(armeabi-v7a\)\(nodpi\)_apkmirror.com.apk | grep native-code
native-code: 'armeabi-v7a'

@baltpeter
Copy link
Member Author

Oh wow, looks like I misinterpreted the documentation for the split_apk option:

split_apk: when set to 1 or true, attempts to download a split APK

I thought that meant that it would merge the splits into a single APK when the option is not provided (like google/googleplay does, for example). But, no. Looks like it just downloads the main APKs and completely ignores the splits in that case.

If I download the app with splits and install that, it works fine.

❯ apkeep -d google-play -o device=px_3a,locale=en_DE,include_additional_files=1,split_apk=1 -a org.telegram.messenger .
❯ ls org.telegram.messenger
org.telegram.messenger.apk                   org.telegram.messenger.config.en.apk
org.telegram.messenger.config.arm64_v8a.apk  org.telegram.messenger.config.xxhdpi.apk
❯ adb install-multiple org.telegram.messenger/*.apk
Success

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

1 participant