[Wear OS Software and Hacking General] bernarbernuli:
Hello, I find it a very interesting project and would like to give visibility to the tutorial in this post, the script works well with current APKs although of course improvable, I encourage whoever has knowledge to develop a new update of the script.

There are apps installed on Wear OS (especially those that come from Android) that have a giant interface and do not adapt well to the small size of the watch screen, which prevents to reach certain options from the watch. The guide allows you to change the density of a given app without affecting the density of the rest of the apps on the watch, WearModder was developed by user @moneytoo. Unfortunately, the tool has not been updated for at least 2 years, however the WearModder source code is available here (in java) for those who have knowledge and want to improve it, also another developer has ported the tool to Python, also available from this other link.

Both the script and the steps to use it are simple, so anyone can try it with their favorite applications.

​

What does WearModder do?​

The WearModder tool is a small script that modifies the density of an APK to fit the size of the watch. The script automatically does the following:

Replaces all sizes (dip/sp in layouts, dimens, etc.).

Sets centered alignment of the bottom tab layout

Sets custom height for action bar (in ActionBarSize element)

Set horizontal margin for toolbar (home screen only)

Prerequisites:​

Download and install the Java 8 tool (JRE 1.8) from here.

Download APKTool from here (tool for decompiling APK files)

Download WearModder from here in java or from here in Python (tool to modify the density of APK files).

If you use WearModder for Python, download and install Python from here.

The Guide. How to change the density of an app or game on Wear OS​

Rename Apktool file you downloaded to "apktool.jar" (no version) and Wearmodder file you downloaded to "wearmodder.jar" (no version).

Place in the same folder apktool.jar file, Wearmodder.jar file and APK file you want to modify its density.

Now open a command line in that folder and enter the following to decompile APK file.

Java -jar apktool.jar d apk_name.apk

Once decompiled, enter the following to modify apk resources:

- With Java version: java -jar WearModder.jar apk_name/res
- With Python version: python ./wearmodder.py ./apk_name/res

According to the author of the guide additional manual adjustments must be made, however he does not give any guidelines nor has he developed this step, I suppose it is not always necessary.

Build APK file again. The modified APK file will be saved in "/apk_name/dist/" folder.

java -jar apktool.jar b apk_name

Enter the following commands to sign it. It will ask you for a new password and some other information.

keytool -genkey -v -keystore my-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-key.keystore apk_name/dist/apk_name.apk alias_name

​

Considerations:​

Make sure you have the environment variable set for Java so that Java can be run from any folder, the same for Python if you are going to use the Python version of WearModder. Here is a guide to add the environment variable for python and here for Java.

In step 3, 4, 6 and 7 replace in the command "apk_name" with the name of APK file to be modified.

In step 7 replace "my-key" and "alias_name" with the name of the password and alias storage you want.

If you have problems using WearModder in Java, you can use WearModder ported to Python. When I tested with Seven app (apk of the capture)), java version modified the APK but when I built the APK again something was wrong, with the Python version I modified and built with ApkTool the app perfectly.

Do not run WearModder more than once on the same file that you have already altered.