[Android Apps and Games] sfynx1:
i'm no expert, (noob here) but i got those errors when i did not install my framework before atempting to decompile.

---------- Post added at 08:57 PM ---------- Previous post was at 08:54 PM ----------

I'm no expert here, just attempting to help noobs like myself, this is based on Gary's op, and my experience throw the process, sometimes for devs it's easy to know what to do, and simple words ppl understand and do, but for noobs like me, lot of info missing hehehe, had to ask a lot of questions to get this working, and it was not hard at all, simple i'm a noob.

So here it goes, hope this helps.

1. Install app. (Do this first or you will get SystemUI FC).

2. Donwload apktool v1.5.2

3. Extract framework-res.apk and systemui.apk from your phone (framework is in system folder and systemui.apk was in system/priv-app)

Use apktool v1.5.2 or you may get recompile errors

4. Open command prompt inside apktool folder to make it easyer, also handy to place systemui.apk and framework-res.apk inside apktool folder.

5. Type: apktool if framework-res.apk

6. Then type: apktool d systemui.apk (this will create a folder with systemui.apk content)

7. Decompile SystemUI.apk and navigate to: res/layout/status_bar.xml (for some older samsung devices: tw_status_bar.xml)

8. Look for the line that contains:

Code:

Select Code

<android:id="@id/battery

If your line starts with:

Code:

Select Code

<com.android.systemui.BatteryMeterView

Change to the whole line to:

Code:

Select Code

<com.android.systemui.statusbar.policy.MinitBattery android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />

If your line starts with:

Code:

Select Code

<ImageView

Find:

Code:

Select Code

android:layout_width="wrap_content" and android:layout_height="wrap_content"

And change to:

Code:

Select Code

android:layout_width="0.0dip" and android:layout_height="0.0dip"

then directly under this line add:

Code:

Select Code

<com.android.systemui.statusbar.policy.MinitBattery android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />

9. Download the mod smali files and place them in smali/com/android/systemui/statusbar/policy folder.

10. Recompile and set permissions.

to recompyle type: apktool b systemui (i dont know how to set up permissions at this time)

11. After recompiling you get a new folder inside systemui folder called dist, inside you'll find the compiled app with the changes you made (new apk)

12. After that open up old systemui.apk and new systemui.apk and copie meta-inf folder and androidmanifest.Xml from old apk to new one.

13. Transfer systemui.apk to your phone, and place it in system.

14. Rename SystenUI.apk to SystemUI.apk.bak just in case.

15. Set permissions on new apk to match the ones on the old one (the one u just renamed)

16. Rename new apk from systemui.apk to SystemUI.apk.

17. Reboot

Ps. no i dont know how to insert that code to look all pretty like gary, just copied from OP and this is what i get lol