[Asus Transformer TF700] gcrutchr:
This is a mod for the TF700T to add 1% battery indicators for both the tablet and dock.

This posting is for developers, not newbies who usually do not know what they are doing.

First things first: I am a retired software engineer (and approaching retirement age). I do not have much time for support of this mod as I spend most of my time teaching English in Thailand and I develop ROMs for the SGS3. With that said, you are free to use this however you wish. BUT, please give me credit for the work. A link back to this page would be great. AND, I cannot guaratee it will will for everyone. Use at your own risk.

I will try to answer questions as soon as I can. Hopefully, some of the better developers can jump in and help with questions. If I do not answer a question right away, it is because I am busy with school.

This is probably not one of the better how-to-do-it posts, but it is the best I can do at this time.

What you will need:

1. Winmerge - you can get it here: Winmerge

This is a great app for making changes to newer ROMs without having to manually find all your previous changes. It is a pretty much cut 'n paste layout as you can see where the changes are and just copy them into the new source file. It uses a split window format for comparing previous and new source files. I usually view the original modded file in the right window and the new file I want to mod in the left window. Differences will be highlighted. Just marked the changes and copy them from the right window to the left window. Don't forget to save the file before exiting.

2. The attached zip file which contains the battery icons for both the dock and tablet and the modified xml files. The icons were created using BatteryIconCreator_V9.0 which you can find on the web. Makes creating icons easy plus you can merge 2 icons into 1. The zip file contains xml files for JellyBean v10.4.4.20 ROMs. It should work on previous versions as I started working on this with v10.4.4.16.

3. apktool150.jar - from here: http://miui.connortumbleson.com/other/apktool/apktool_1.5.0.jar

4. aapt.exe - from here: http://miui.connortumbleson.com/other/apktool/aapt/win/aapt.exe

For items 3 and 4, I have included them for Windows only. You should already know how to use apktool already and where these files go.

IF your ARE NOT on Windows O/S, go to this link to get the correct aapt file: APKTOOL

You MUST HAVE both of the files (3 & 4). Very important.

There are no install zips attached to this post. I am just too lazy to make them.

This is mostly for developers of TF700T Roms.

The files we will be modding:

framework-res.apk

SystemUI.apk

Transformer.apk

First thing to do is to decompile all 3 files:

java -jar apktool150.jar d <source.apk> <folder>

where <source.apk> is one of the above 3 files and <folder> is where you want them decompiled to.

Example: java -jar apktool150.jar d SystemUI.apk systemui

First the tablet battery mod:

SYSTEMUI.APK

Tablet icons

1. Copy the tablet battery icons to: /res/drawable-sw720dp-hdpi

2. Copy stat_sys_battery.xml AND stat_sys_battery_charge.xml to /res/drawable

3. Add the following to the end of /res/values-sw600dp/styles.xml:

<style name="StatusBarBatteryNotificationText2">

<item name="android:textSize">1.0dip</item>

<item name="android:textColor">#00999999</item>

</style>

4. Change /res/layout/status_bar_quick_settings_title.xml

(change both dock and battery) below is the modified script change (partial script).

<TextView android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="1.0dip" android:layout_marginTop="-4.0dip" android:src="@drawable/ic_notification_open" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" android:layout_below="@id/battery" android:layout_centerHorizontal="true" style="@style/StatusBarBatteryNotificationText2" />

FRAMEWORK_RES.APK

Dock-icons

1. Copy the dock battery icons to /res/drawable-hdpi

2. Copy stat_sys_dock_battery.xml AND stat_sys_dock_battery_charge.xml to /res/drawable

TRANSFORMER.APK

1. Change res/layout/status_bar_docking.xml:below is the modified script change (partial script).

<ImageView android:layout_gravity="center_vertical" android:src="@drawable/asus_ep_kb_battery_dock" android:layout_width="32.0dip" android:layout_height="32.0dip" android:scaleType="centerInside" />

<TextView android:layout_gravity="right|center" android:id="@id/battery_level" android:paddingRight="12.0dip" android:layout_width="56.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_toRightOf="@drawable/asus_ep_kb_battery_dock" android:layout_alignBaseline="@drawable/asus_ep_kb_battery_dock" style="@style/StatusBarNotificationText" />

2. Add asus_ep_kb_battery_dock.png to /res/drawable-hdpi/

After you have done all of that, you need to compile them:

BUT FIRST: SystemUI.apk will not be decompiled correctly -> res/values/public.xml

We need to change some things or it will not compile.

Open /res/values/public.xml and go all the way to the end.

Change the last 2 entries to look like the following (the decompile hex value ordering in out of sequence):

<public type="menu" name="notification_popup_menu" id="0x7f0f0000" />

<public type="menu" name="recent_popup_menu" id="0x7f0f0001" />

Save the file and exit.

Now we can compile all the files.

java -jar apktool150.jar b <source folder>

where <source folder> is where you decompile the apk to.

Example: java -jar apktool150.jar b systemui

the apk file will be in the dist subfolder under systemui

After all 3 files have been compiled, you need to copy the META-INF folder and the AndroidManifest.xml from the original apk to the newly built apk. You need to do this for each of the 3 files.

The TF700T does not like the resources.arsc entry compressed. So...we have to extract the contents from SystemUI.apk and Transformer.apk. Create a new apk (using store only) no compression. You can use 7zip for this.

After you have done this for the SystemUI.apk and Transformer.apk files, zipalign all 3 files and install them in their proper folders on your tablet. I have included a zip align program in the attached zip file. Put the 3 files in the align folder and run the zip-app.bat program.

I have tried to make this easy, especially if you use WinMerge. It's as easy as copy 'n paste.

All files, including the modded source files (except Winmerge) are included in the attached zip file.

ZIPFILE: TF700T 1% Battery Mod