2019/09/05
Tall screens have become the de facto norm for more recent Android devices. Unfortunately, not all apps have been updated to support a tall aspect ratio. This results in letterboxing or a black bar at the bottom of the screen in the unsupported app. In this post we will go over the process required to update the app so it will scale properly on tall screens.
Prerequisites
This tutorial was written for Windows computers. It should be possible to do this on macOS or Linux, given you find an application to decompile, recompile and sign Android apps.
- Android Development Kit (ADK) or another application to decompile Android apps (paid with 7-day trial)
- the app's APK file: if you want to edit a Play Store app, you can use APKCombo's APK downloader to download the file directly from the Play Store servers
The process
Open ADK and create a new project (File > New > Project).
A dialog box will pop up. Choose 'Android app' from the templates column. Give the project a name. Locate the binary (APK file) by clicking the three dots. You can change the directory where the project will be saved. Then, press 'Create'.
ADK will start decompiling the Android application. This process is finished when the progress bar in the status bar turns grey again.
From the project viewer (left sidebar), double click AndroidManifest.xml
. This will open the file in the program's editor.
Pay close attention to the Properties pane in the bottom right corner of the ADK window. If the MaxSDK value is equal to 25 or higher, you can continue with the tutorial. Should the value be higher, you will need to edit the individual activities of the app. This process is beyond the scope of this tutorial.
Bring up the find dialog using CTRL ^ F or Edit > Find. Enter the search value android.max_aspect
.
If a search result was returned for your application, change the 'android:value' attribute for the line to 2.1
.
If a search result wasn't returned for your application, add the following line to the manifest.
<meta-data android:name="android.max_aspect" android:value="2.1" />
I chose to add the line right below existing meta-data elements to make sure I adhered to the XML structure of the file.
Save the manifest file by clicking the red floppy icon in the toolbar or using CTRL ^ S.
Now, build the application by clicking Build > Build Project. This will recompile your app and sign it with test keys. This build process is finished when the progress bar in the status bar turns grey again.
Now, the only thing left to do is to transfer the app back to your device. You can do this by selecting 'Install & Run' from the combobox in the toolbar, or by transferring the app.package.name_sign.apk
file from the Build directory of your project to your device. 'Install & Run' requires USB debugging to be enabled on your device. Make sure to uninstall the original application first. The modded application has different keys which will cause a signature mismatch if the original app isn't uninstalled first.
Like that, the bottom bar is gone. It's free screen real estate.
Sources
- https://android-developers.googleblog.com/2017/12/tuning-your-apps-and-games-for-long.html
- https://forum.xda-developers.com/android/software-hacking/ide-adk-android-reverse-engineering-t3803044
- https://stackoverflow.com/questions/43179314/where-does-android-max-aspect-meta-make-difference
- https://community.spotify.com/t5/Ongoing-Issues/Application-do-not-use-full-screen-for-Xiaomi-A2-lite-phone/idc-p/4594440/highlight/true#M78425