0

Long story short i used appcloner to spoof android SDK version to lower to get messenger chat heads as they were on android 10 and lower. I copied the installed app, so now i got .apk with all that info and when i install it from that file it still works. App must dropped info about android SDK into it's files, but i cannot find where. Does anyone could help me with that?

My goal is to inject this file into original messenger apk so that i could update this app from official messenger .apk

1
  • Hi, it seems you're accidentally creating a new account. Please refer to how to merge your accounts so that you can regain ownership of the question and post comments on any post under your question. Thanks.
    – Andrew T.
    Commented Apr 6, 2021 at 12:45

1 Answer 1

1

If an app behaves differently on a higher or lower Android version, then it uses code like that (before the app has been compiled):

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M){
    // do something on Android 6+
} else {
    // do something on Android before version 6
}

Such code structures will be present in multiple classes of the app. If you want to forge the Android version in the original app you have to decompile the APK using apktool modify every occurrence of such a structure e.g. by replacing the access to android.os.Build.VERSION.SDK_INT which queries the device's Android ADK version and replace it by a constant like 29 for Android 10 and the rebuild the APK using apktool, zipalign and sign (apksigner) it and then you are ready to install the app.

Unfortunately apktool does only generate Smali code and not Java code, which makes the whole task much more difficult as Smali is very low level and not easy to read.

There may be existing programs/apps that already do such modifications in an automated way, unfortunately I don't know or use such apps.

2
  • Thing is that I managed to fool app thinking that it runs on Android 10, and copying whole installed app to another device works as well, so this info should be somewhere in files that it runs on Android 10. The goal is to copy this file and inject it into stock messenger app
    – Kamkol
    Commented Apr 6, 2021 at 12:36
  • @Kamkol You wrote you used appcloner (whatever that is you forgot to provide a link in your question) for that. If the app does not actually clone the app but just runs the app in a different context it is possible to forge the runtime information in memory. As I wrote the info of the current Android version is not in the app but in the process itself at run-time.
    – Robert
    Commented Apr 6, 2021 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .