Skip to content
Patch pebble's apk to support RTL languages
Branch: master
Clone or download
Pull request Compare This branch is 11 commits ahead, 1 commit behind flow3d:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apktool-files
input-apks
keystore
misc
.gitignore
README.md
auto_patcher.py
build-pg-app.sh
clean.sh
compile.sh
configure.sh
generate-apk.sh
unpack-pebble-app.sh
unpack-pg-app.sh

README.md

pebble-rtl

Patch pebble's apk to support RTL languages

How to contribute?

Currently I document the open issues here, if there'll be enough of them - we'll move to something more managed :)

Open Issues

RTL

  • Sentences beginning with RTL text are wrong (should be resolved by passing the default orientation to the Bidi class and resolving the crashes that will arise)
  • Line splitting by word separator (currently dumb)
  • Line splitting by actual character width (currently dumb)
  • Line splitting by font size (requires extra research)
  • Try to align text to the right by padding with spaces

Protocol

  • RTL canned responsed (currently they're LTR)

Pre-requirements

How to build RTL apk

$ git clone https://github.com/rosenpin/pebble-rtl

$ cd pebble-rtl

$ ./configure.sh

Edit playground-app/local.properties and change sdk.dir to your SDK directory

$ ./compile.sh

What to change?

Open the playground-app in Android Studio

  • To improve RTL logic, change TextReverser class
  • To improve the protocol parsing, change ModifierOutputStream

After changing the code:

  • run "build-pg-app.sh"
  • run "unpack-pg-app.sh"
  • run "unpack-pebble-app.sh"
  • run python2.7 auto_patcher.py (defaults are good, but check out --help)
  • run "generate-apk.sh"
  • your home baked apk is at output-apks/bla.apk, not sorry for the name :)

Other stuff

The patch is supposed to be automatic, but it was never tested :)
In this version - the file to patch is: com/getpebble/android/b/c/e.smali

You can’t perform that action at this time.