brevent / genuine

285 stars 56 forks source link

pm.getApplicationInfo null on Samsung A13 #10

Open pulsarrush opened 1 year ago

pulsarrush commented 1 year ago

https://github.com/brevent/genuine/blob/master/src/main/jni/pm.c#L676

You can test on Samsung's remote test lab: https://developer.samsung.com/remotetestlab/devices/101/galaxy-mobile

liudongmiao commented 1 year ago

Sorry, but I cannot use the remote test lab.

liudongmiao commented 1 year ago

Could you check the output of pm path xxx?

liudongmiao commented 1 year ago

I use Samsung A13 from https://developer.samsung.com/remotetestlab/devices/101/galaxy-mobile with Brevent 4.2.18.3 (https://jianyv.com/br/), and check Android 12 and Android 13, it works.

pulsarrush commented 1 year ago

I'm still seeing this issue from users. I will retest on samsung test lab soon.

liudongmiao commented 1 year ago

I use all A13 devices on remote test lab, there is null only once, and i cannot reproduce.

However, retry 3 times for pm path: https://github.com/brevent/genuine/commit/1f18032

I even make a pm path solution, however, give it up.

liudongmiao commented 1 year ago

define CHECK_HOOK or just comment it out.

liudongmiao commented 1 year ago

As I cannot reproduce, so is there any update? @pulsarrush

xDragonZ commented 1 year ago

@liudongmiao Did a simple test, seems like it's working now. To test the crash, I think we need to compile an apk with armv7 only, don't include armv8 binary in it and run on android 13

liudongmiao commented 1 year ago

@xDragonZ Cloud you show the log?

it should show a log like '%d: %s', with %d is count, %s is the apk path.

xDragonZ commented 1 year ago

我没有三星A13所以我用了不同的方式测试,不确定是否是同一个bug

Commit: 9c4395a82f23cd65e4a0cb4cccb87cbb113c026c (with "getApplicationInfo" log)

armeabi-v7a only binary on arm64-v8a Samsung (Android SDK 28) OK

getApplicationInfo: 0x717ffc54
getApplicationInfo(com.x.x, 0, 0): 0x115
applicationInfo: ApplicationInfo{7b076f8 com.x.x}
...
path: /data/app/com.x.x-Q8uv39Jvhvp9ZNcHEnhOIg==/base.apk

armeabi-v7a only binary on arm64-v8a Samsung (Android SDK 33) Error

getApplicationInfo: 0x709fc468
getApplicationInfo(com.x.x, 0, 0): 0x0
applicationInfo: (null)
cannot find com.x.x

arm64-v8a only binary on arm64-v8a Samsung (Android SDK 33) OK

getApplicationInfo: 0x7110a830
getApplicationInfo(com.x.x, 0, 0): 0x239
applicationInfo: ApplicationInfo{e02a357 com.x.x}
...
path: /data/app/~~N3FlkQjwgyVFUQZf3DCNrQ==/com.x.x-CYh0UvPpiWQjIjkuqZ4osQ==/base.apk

Commit: 31d23b7b41114134ec2eba6162eeca7c4b663014

armeabi-v7a only binary on arm64-v8a Samsung (Android SDK 28) OK

getApplicationInfo: 0x717ffc54
getApplicationInfo(com.x.x, 0, 0): 0x119
applicationInfo: ApplicationInfo{5ab8e28 com.x.x}
...
path: /data/app/com.x.x-7YAYhfk31mUu3ZqiP32Ujg==/base.apk
0: /data/app/com.x.x-7YAYhfk31mUu3ZqiP32Ujg==/base.apk

armeabi-v7a only binary on arm64-v8a Samsung (Android SDK 33) OK

getApplicationInfo: 0x709fc468
getApplicationInfo(com.x.x, 0, 0): 0x229
applicationInfo: ApplicationInfo{4530d6a com.x.x}
....
path: /data/app/~~l2fNV0bN-i_UAQ25uqsRpg==/com.x.x-i6Y-eA7NEE3L4N2uqYvN6A==/base.apk
0: /data/app/~~l2fNV0bN-i_UAQ25uqsRpg==/com.x.x-i6Y-eA7NEE3L4N2uqYvN6A==/base.apk

arm64-v8a only binary on arm64-v8a Samsung (Android SDK 33) OK

getApplicationInfo: 0x7110a830
getApplicationInfo(com.x.x, 0, 0): 0x239
applicationInfo: ApplicationInfo{501a51a com.x.x}
...
path: /data/app/~~LwDzE6ULkmOLhZlEtfvsZQ==/com.x.x-u8jDCL0Pc0ySCH8duwFY8Q==/base.apk
0: /data/app/~~LwDzE6ULkmOLhZlEtfvsZQ==/com.x.x-u8jDCL0Pc0ySCH8duwFY8Q==/base.apk
liudongmiao commented 1 year ago

@xDragonZ Then it seems be fixed. However, I'm waiting for feedback from users.

liudongmiao commented 1 year ago

@xDragonZ Then, you can try again with latest codes, it will try 3 times. If it doesn't, you can try more times, for every times, it will show "%d, %s".