1 year ago
#88816
Brooks
How to overcome Android ID check on app startup?
I have an android apk which on startup check for the device "android ID" to see if it matches with the value embedded in the dex (if I'm understanding the code correctly). See example below:
protected void onServiceConnected() {
super.onServiceConnected();
if (!Intrinsics.areEqual(Settings.Secure.getString(getContentResolver(), "android_id"), "c76462954894d143")) {
this.isSupportedDevice = false;
Toast.makeText((Context)this, "Not supported device!", 1).show();
return;
and also here:
protected void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle);
setContentView(2131427356);
if (!Intrinsics.areEqual(Settings.Secure.getString(getContentResolver(), "android_id"), "c76462954894d143")) {
Toast.makeText((Context)this, "Not supported device!", 1).show();
finish();
}
}
I'm attempting a simple modification to revise the android id "c76462954894d143" stored in the apk to match a new device android id to overcome the check on startup.
So far I have gone down the route of baksmali dex to smali, revised the two areas in which the android id is referenced, smali back to dex. Zipped the file back up. Signed using jarsign and then zipalign.
After installing the app on the new device with the matching android id, the app looks and functions as it did however fails the startup check.
Do you have any suggestions as to where I may be going wrong or what I should consider to overcome the issue.
Appreciate any help.
Thank you.
android
apk
dex
smali
android-identifiers
0 Answers
Your Answer