Myanmar font installer for Huawei G730-U00 which have a problem with simple zawgyi font embedded apps. If you want a prebuilt, it is recommended to download it from here. For more details about what this app for and what it actually does, take a look at here and here.
You'll need support v7. You can git clone it from this repository or get it using gradle/maven.
- $ mkdir /path/to/src/
- $ cd /path/to/src/
- $ git clone git://github.com/TAD-Dev-Team/G730_Myanmar_Font_Installer
Make sure the SDK Platform for API 19 is installed, through the Android SDK Manager. Install NDK Revision 9b from here.
In Eclipse, import appcompat_v7 and TADG730MMFI. In your Package Explorer, right click on TADG730MMFI project -> Properties -> Android -> Add -> appcompat_v7. Now you're good to go with eclipse.
Make sure you have the android-ndk downloaded with the tool "ndk-build" in your path.
- $ cd /path/to/src/
- $ cd TADG730MMFI
- $ ndk-build
The restore binary will built into TADG730MMFI/libs/armeabi/restore.
- Pull all files from system/framework directory of your device.
- Decompile framework.odex.
- Edit "createFromAssets" method located in android/graphics/Typeface.smali. Codes to be editted are shown below.
- SMALI the decompiled folder of framework.odex in a classes.dex file and pack it into framework.jar to make it deodexed.
- Push it to somewhere on your device and odex it. (sign it only while installation)
- Now, this modded framework.odex will return only typeface of /system/framework/Roboto-Regular.ttf to Typface.createFromAssets(AssetManager mgr, String path) used in application. So that, fonts from assets of any custom font embedded apps will not take effect anymore.
- [HOW TO][Windows] Manually Deodex and Odex back. This method also works on Linux and OS X.
- [GUIDE/TOOL] Make a new odex file (1by1_ReOdexer batch file).
- [HOW-TO] Decompile ICS and above apk and jar files MANUALLY.
Orginal "createFromAssets" method
.method public static createFromAsset(Landroid/content/res/AssetManager;Ljava/lang/String;)Landroid/graphics/Typeface;
.registers 4
.param p0, "mgr" # Landroid/content/res/AssetManager;
.param p1, "path" # Ljava/lang/String;
.prologue
.line 164
new-instance v0, Landroid/graphics/Typeface;
invoke-static {p0, p1}, Landroid/graphics/Typeface;->nativeCreateFromAsset(Landroid/content/res/AssetManager;Ljava/lang/String;)I
move-result v1
invoke-direct {v0, v1}, Landroid/graphics/Typeface;-><init>(I)V
return-object v0
.end method
Modded "createFromAssets" method
.method public static createFromAsset(Landroid/content/res/AssetManager;Ljava/lang/String;)Landroid/graphics/Typeface;
.registers 4
.param p0, "mgr" # Landroid/content/res/AssetManager;
.param p1, "path" # Ljava/lang/String;
.prologue
.line 164
new-instance v0, Landroid/graphics/Typeface;
const-string p1, "Patched By Aung Thiha"
const-string p0, "/system/fonts/Roboto-Regular.ttf"
invoke-static {p0}, Landroid/graphics/Typeface;->nativeCreateFromFile(Ljava/lang/String;)I
move-result v1
invoke-direct {v0, v1}, Landroid/graphics/Typeface;-><init>(I)V
return-object v0
.end method