If you get a new phone and want to install an app that works on your previous phone but the Play Store won't allow it, there might be a work-around.
As you upgrade your Android operating system apps that you already have installed will usually stay installed. Apps which have been abandoned and not upgraded often still work on the new Android versions. Even if the app's manifest doesn't officially declare the new Android API versions as being supported they often can continue to work. As new Android versions get released eventually they won't allow apps which target older Android API versions to be installed. However, these apps can often still work.
One fix for this is to repack the app to claim that it supports a newer Android API version. Even if it doesn't. This of course runs the risk that the app's internal code doesn't actually support a newer API version. But often if an app still works after an OS upgrade then it would work if you perform this strategy.
See Instructions for details about how to perform this process.
Thanks to ohmi_II on Reddit for detailing some of these steps.
- Find the app by listing packages:
Find the package name, note this for the next step.platform-tools/adb shell pm list packages
You can also find the package name by going to the play store and getting a share link, the package name with be in the URL. - Then find the path of the APK by running:
Note the output path for the next step (Note: Theplatform-tools/adb shell pm path <PKG>
package:
part of the path should not be included in the next step) - Then download the APK:
platform-tools/adb pull <DEVICE PATH> <OUT DIR>
- Unpack it by running:
java -jar ./apktool_2.5.0.jar d <APK> -o <OUT DIR>
- Edit the
<OUT DIR>/AndroidManifest.xml
- Inside the
manifest
tag add auses-sdk
element:<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="23" android:maxSdkVersion="23" />
- Modify the
platformBuildVersionCode
attribute of themanifest
tag
- Inside the
- Run:
./build.sh -i <OUT DIR> -o <NEW_APK>
- Install:
platform-tools/adb install <NEW_APK>