Where app drops sdk version info 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
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 &gt;= 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.