WIP modding of the last known Swype release with features such as:
- Larger UI scaling in portrait mode (from 80 - 120% to 100 - 140%)
- Pitch back "Material Dark" theme for AMOLED displays
- Slightly larger fonts
- Updated Emojis from Unicode
- .. Maybe more in the future
Huge thanks to modders over at 4PDA, most of the mods were done by diffing the untouched APK against existing mods by 4PDA folks
- Install APKtool & Android SDK
- Build unsigned APK using apktool:
apktool b swype_last -o Swype_blacked.apk- Zipalign Unsigned APK
- apksign the zipaligned apk.
4.1. (optional) Use android release keys platform.pk8 and platform.x509.pem
Script I use for steps 3 and 4 sign_apk.sh Swype-blacked.apk:
#!/bin/sh
BUILD_TOOLS=~/Android/Sdk/build-tools/31.0.0/
if [ -z "$1" ]; then
echo "usage: $0 your-app.apk"
exit 1
fi
OUT="$1"
OUT_ALIGNED="aligned-$OUT"
OUT_SIGNED="signed-$OUT"
# Debug mode
set -x
"$BUILD_TOOLS"/zipalign -p -v 4 "$OUT" "$OUT_ALIGNED"
# Verify
"$BUILD_TOOLS"/zipalign -vc 4 "$OUT_ALIGNED"
# Sign
"$BUILD_TOOLS"/apksigner sign --key platform.pk8 --cert platform.x509.pem --out "$OUT_SIGNED" "$OUT_ALIGNED"
#"$BUILD_TOOLS"/apksigner sign -ks ~/my-release-key.keystore --out "$OUT_SIGNED" "$OUT_ALIGNED"
# Cleanup
rm -fv "$OUT_ALIGNED"
echo == Done: $OUT_ALIGNEDgrep '; fully-qualified' emoji-test-5.0.txt | awk -F ';' '{print $1}' | sortCredit: 4PDA post
Enter adb shell as root / termux root shell
- Find the UID and GID of the swype app and note it down:
ls -al /data/data/com.nuance.swype.dtc - Extract all the files from the
com.nuance.swype.dtc_themes.txzrelease into the above path - Set the correct ownership:
chown $UID:$GID -hR /data/data/com.nuance.swype.dtc/files /data/data/com.nuance.swype.dtc/shared_prefs
- Open
/data/data/com.nuance.swype.dtc/shared_prefs/com.nuance.swype.dtc_preferences.xml - Insert all the lines of
Inventory.txtin this file before a line that looks like:<string name="downloaded.theme">current theme name</string> - Edit
current theme namewith the Name of the theme, ex.nuance.theme.sand - Edit
<string name="swype.theme">/data/user/0/com.nuance.swype.dtc/files/themes/name of the theme folder/name of the apk file.apk</string> - Kill and restart swype