[Motorola Droid Bionic] theproj:
So I have found a few japanese/chinese sites that explain how to edit services.jar for phones like the atrix and milestone to get 1% battery increments. Considering my noob status it may require other things to be modified (kernal? which we cant) but my attempts fail and have to keep flashing back to stock. Hopefully someone out there can explain or work on this if possible. Here is a translation of one of the sites I found:

Tutorial] yourself to achieve 1% of the power to modify services.jar display

Posts by wzhizhou editor at 2011-9-23 08:25

The first mobile phone needs root, tutorial please refer to the respective mobile forums, if even this did not do that, you still do hands-on.

Now divided into two types, first is the only root of your machine, and did not brush off others deodex the Brush Pack, which is original to the official system, it is looked down

Official only for the root system and require the system deodex. Purpose is to talk about services.jar for deodex. This is necessary, or 1% of the electricity could not handle.

Note that the following actions may cause the phone not start, so please exercise caution ahead of the backup, in addition to the problem scold me, I'm just sharing my experience, responsible for any of your operations, only you own your own responsibility. I ATT machine, brush the 2.3.4, then brush the Hong Kong version of fastboot boot, system, webtop, and then root. The following operations are successful in my phone, and the starting point is two-wipe after.

Need to use the system deodex xUltimate, this software Niua Soso can easily download.

Unzip the downloaded xUltimate speak to the root directory of the folder, open the phone's debug mode (you do not know? Sweat - you still do not dry)

Run main.exe, there are interface

First select option 2 after a wait for completion of Option 3 will last a long time in this operation, according to some online tutorials, the steps to delete a file, but I have not met, the search is completed, please continue to choose their own 4 point xUltimate Then after use about xUltimate directory "done_frame" and "done_app" gave the copy to the SD card's root directory; in this process has been connected to the computer and the phone open debug mode, then switch the usb storage mode, to adjusted to none. Still keep the phone and pc connection, and debugging mode turned on. Bring up the command line, win7 and the best vista as administrator open a command line then need to use adb tool at your own search using the command line, cd into the directory where the adb tool, and then proceed as follows

> Adb shell

> Su (light before running the command phone into the desktop, run the command will appear so you root authorization information, consent, if you have run, then there will not be prompted. To obtain root privileges , the prompt will be> changed #, please pay attention to distinguish)

# Stop

# Mount-o rw, remount-t ext3 / dev/block/mmcblk1p21 / system

# Cp / sdcard / done_app / * / system / app /

# Cp / sdcard / done_frame / * / system / framework /

# Rm / system / app / *. odex

# Rm / system / framework / *. odex

# Mount-o ro, remount-t ext3 / dev/block/mmcblk1p21 / system

# Reboot

Copy code

Your phone has deodex, you will feel a lot of speed to be cool, and edit documents such as services.jar also facilitate a lot of time. (In the penultimate line of input devices may be prompted to after a busy kind of information, all right, and enter reboot reboot directly on the line. A long time the first reboot is normal.) After deodex on your cell phone after the show with a 1% charge of the basic conditions, followed by the services.jar changes. Next you need to download smali-1.2.8.jar, baksmali-1.2.8.jar, the dex file assembly and disassembly, note the machine you need to install jdk find xUltimate directory done_frame folder, copy services.jar just download the two files to the folder where, note the directory name if you do not have Chinese system installed winrar, winrar need to be configured as follows

Click the first option, then click the Compression creates a default configuration stored in the compression of a conversion, then make sure you can use winrar to open services.jar, will find a classes.dex file, which is what we want to modify the Dongdong

Extract the files to this directory services.jar to open a command line, run the following command java-jar baksmali-1.2.8.jar classes.dex-oclasses will find a directory of extra classes directory first instead of closing the command line, one will also be used in classes \ com \ android \ server directory has a BatteryService.smali file, we will modify it first to find. field private mBatteryLevel: I

Note: The following code is not my work, is a Japanese cow broke in the blog

# Instance fields

. Field private mAcOnline: Z

. Field private mBatteryHealth: I

. Field private mBatteryLevel: I

Copy code

Then add a line below

. Field private mBatteryLevel1Step: I

Copy code

Then search iget v3, p0, Lcom / android / server / BatteryService; -> mBatteryLevel: I will be the original

iget v3, p0, Lcom / android / server / BatteryService; -> mBatteryLevel: I

invoke-virtual {v1, v2, v3}, Landroid / content / Intent; -> putExtra (Ljava / lang / String; I) Landroid / content / Intent;

Copy code

Replaced

iget v3, p0, Lcom / android / server / BatteryService; -> mBatteryLevel: I

invoke-direct {p0}, Lcom / android / server / BatteryService; -> getBatteryLevel1Step () V

iget v3, p0, Lcom / android / server / BatteryService; -> mBatteryLevel1Step: I

invoke-virtual {v1, v2, v3}, Landroid / content / Intent; -> putExtra (Ljava / lang / String; I) Landroid / content / Intent;

Copy code

Then to the end of the file add the following section

. Method private getBatteryLevel1Step () V

. Locals 8

. Prologue

. Line 30

const / 4 v4, 0x0

. Line 32

. Local v4, reader: Ljava / io / FileReader;

: Try_start_0

new-instance v5, Ljava / io / FileReader;

const-string v6, "/ sys / class / power_supply / battery / charge_counter"

invoke-direct {v5, v6}, Ljava / io / FileReader; -> <init> (Ljava / lang / String;) V

: Try_end_0

. Catch Ljava / io / IOException; {: try_start_0 ..: try_end_0}: catch_1

. End local v4 # reader: Ljava / io / FileReader;

. Local v5, reader: Ljava / io / FileReader;

move-object v4, v5

. Line 35

. End local v5 # reader: Ljava / io / FileReader;

. Restart local v4 # reader: Ljava / io / FileReader;

: Goto_0

const/16 v6, 0x14

: Try_start_1

new-array v1, v6, [C

. Line 36

. Local v1, buf: [C

invoke-virtual {v4, v1}, Ljava / io / FileReader; -> read ([C) I

move-result v3

. Line 37

. Local v3, read: I

invoke-virtual {v4}, Ljava / io / FileReader; -> close () V

. Line 38

new-instance v0, Ljava / lang / String;

const / 4 v6, 0x0

invoke-direct {v0, v1, v6, v3}, Ljava / lang / String; -> <init> ([CII) V

. Line 39

. Local v0, batteryLevelsysfs: Ljava / lang / String;

const-string v6, "\ n"

const-string v7, ""

invoke-virtual {v0, v6, v7}, Ljava / lang / String; -> replace (Ljava / lang / CharSequence; Ljava / lang / CharSequence;) Ljava / lang / String;

move-result-object v0

. Line 40

invoke-static {v0}, Ljava / lang / Integer; -> parseInt (Ljava / lang / String;) I

move-result v2

. Line 41

. Local v2, mBatteryLevel1Step: I

const/16 v6, 0x64

if-lt v2, v6,: cond_0

. Line 42

const/16 v2, 0x64

. Line 45

: Cond_0

# Sget-object v6, Ljava / lang / System; -> out: Ljava / io / PrintStream;

# Invoke-virtual {v6, v2}, Ljava / io / PrintStream; -> println (I) V

iput v2, p0, Lcom / android / server / BatteryService; -> mBatteryLevel1Step: I

: Try_end_1

. Catch Ljava / lang / Exception; {: try_start_1 ..: try_end_1}: catch_0

. Line 52

. End local v0 # batteryLevelsysfs: Ljava / lang / String;

. End local v1 # buf: [C

. End local v2 # mBatteryLevel1Step: I

. End local v3 # read: I

: Goto_1

return-void

. Line 48

: Catch_0

move-exception v6

goto: goto_1

. Line 33

: Catch_1

move-exception v6

goto: goto_0

. End method

Copy code

Then just save the open command line to the next steps

java-Xmx512M-jar smali-1.2.8.jar classes-o new-classes.dex

Copy code

Then it will appear in the directory of a new-classes.dex file, rename it to classes.dex use winrar to open services.jar, speaking directly in the directory classes.dex in drag to winrar

Replace the original classes.dex, and then copy the modified services.jar adb tool to open the directory where the command line, cd command into the directory where to run the following command adb

> Adb push services.jar / sdcard /

> Adb shell

> Su

# Mount-o rw, remount-t ext3 / dev/block/mmcblk1p21 / system

# Cp / sdcard / services.jar / system / framework /

# Chmod 644 / system / framework / services.jar

# Reboot

Copy code

This time there will be some time after restart black screen, it does not matter, slowly waiting, if all goes well, this time into the system settings, battery management, battery light will show the remaining 1% of the change, no longer is 10%.