Created
May 2, 2020 13:53
-
-
Save Suzamax/9a4ca753d65b0b09f1769624ccd056e6 to your computer and use it in GitHub Desktop.
Nokia 8 Goodix Fingerprint functions disassembled and decompiled, and Xiaomi mod of this function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulonglong getFrameworkFingerID(int *param_1,int param_2) | |
{ | |
undefined8 uVar1; | |
ulonglong uVar2; | |
String16 aSStack224 [8]; | |
Parcel aPStack216 [104]; // In the mod it's 120 (+16) | |
longlong *local_70 [13]; // In the mod is 15 (+2) | |
longlong local_8; | |
local_8 = __stack_chk_guard; | |
if (gPmsBinder == (longlong *)0x0) { | |
FUN_0010ce4c(); | |
operator=((sp<android--IBinder> *)&gPmsBinder,(sp *)local_70); | |
if (local_70[0] != (longlong *)0x0) { | |
decStrong((void *)((longlong)local_70[0] + *(longlong *)(*local_70[0] + -0x18))); | |
} | |
} | |
if (gFingerPrintMSBinder == 0) { | |
uVar2 = 0xffffffff; | |
} | |
else { | |
__android_log_print(3,"FingerGoodix","[%-20s]Check finger print","getFrameworkFingerID"); | |
Parcel(aPStack216); | |
Parcel((Parcel *)local_70); | |
String16(aSStack224,"android.hardware.fingerprint.IFingerprintService"); | |
writeInterfaceToken((String16 *)aPStack216); | |
~String16(aSStack224); | |
writeInt32((int)aPStack216); | |
String16(aSStack224,"com.android.settings"); | |
writeString16((String16 *)aPStack216); | |
~String16(aSStack224); | |
(**(code **)(*gPmsBinder + 0x28))(gPmsBinder,7,aPStack216,local_70,0); | |
uVar1 = dataSize(); | |
__android_log_print(3,"FingerGoodix","[%-20s]getFrameworkFingerID reply size: %d", | |
"getFrameworkFingerID",uVar1); | |
uVar2 = readExceptionCode(); | |
uVar2 = uVar2 & 0xffffffff; | |
__android_log_print(3,"FingerGoodix","[%-20s]getFrameworkFingerID ret: %d", | |
"getFrameworkFingerID",uVar2); | |
if ((int)uVar2 != 0) { | |
readString16(); | |
~String16(aSStack224); | |
} | |
readInt32((int *)local_70); | |
__android_log_print(3,"FingerGoodix","[%-20s]final finger state: %d","getFrameworkFingerID", | |
uVar2); | |
~Parcel((Parcel *)local_70); | |
~Parcel(aPStack216); | |
} | |
if (local_8 != __stack_chk_guard) { | |
/* WARNING: Subroutine does not return */ | |
__stack_chk_fail(); | |
} | |
return uVar2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulonglong getFrameworkFingerID(int *param_1,int param_2) | |
{ | |
undefined8 uVar1; | |
ulonglong uVar2; | |
String16 aSStack256 [8]; | |
Parcel aPStack248 [120]; | |
longlong *local_80 [15]; | |
longlong local_8; | |
local_8 = __stack_chk_guard; | |
if (gPmsBinder == (longlong *)0x0) { | |
FUN_0010d140(&gPmsBinder,(ulonglong)(uint)param_2); | |
operator=((sp<android--IBinder> *)&gPmsBinder,(sp *)local_80); | |
if (local_80[0] != (longlong *)0x0) { | |
decStrong((void *)((longlong)local_80[0] + *(longlong *)(*local_80[0] + -0x18))); | |
} | |
} | |
if (gFingerPrintMSBinder == 0) { | |
uVar2 = 0xffffffff; | |
} | |
else { | |
__android_log_print(3,"FingerGoodix","Check finger print"); | |
Parcel(aPStack248); | |
Parcel((Parcel *)local_80); | |
String16(aSStack256,"android.hardware.fingerprint.IFingerprintService"); | |
writeInterfaceToken((String16 *)aPStack248); | |
~String16(aSStack256); | |
writeInt32((int)aPStack248); | |
String16(aSStack256,"com.android.settings"); | |
writeString16((String16 *)aPStack248); | |
~String16(aSStack256); | |
(**(code **)(*gPmsBinder + 0x28))(gPmsBinder,7,aPStack248,local_80,0); | |
uVar1 = dataSize(); | |
__android_log_print(3,"FingerGoodix","getFrameworkFingerID reply size: %d",uVar1); | |
uVar2 = readExceptionCode(); | |
uVar2 = uVar2 & 0xffffffff; | |
__android_log_print(3,"FingerGoodix","getFrameworkFingerID ret: %d",uVar2); | |
if ((int)uVar2 != 0) { | |
readString16(); | |
~String16(aSStack256); | |
} | |
readInt32((int *)local_80); | |
__android_log_print(3,"FingerGoodix","final finger state: %d",uVar2); | |
~Parcel((Parcel *)local_80); | |
~Parcel(aPStack248); | |
} | |
if (local_8 != __stack_chk_guard) { | |
/* WARNING: Subroutine does not return */ | |
__stack_chk_fail(); | |
} | |
return uVar2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment