yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] fender90:
Hello!

I'm trying to make this work on the Galaxy Wonder (i8150).

I followed all your steps, the phone boots but there's no status bar.

I attached original SystemUI.apk and modified SystemUI.apk.

After putting lidroidsystemUI/smali in SystemUI/smali, these were the lines I modified:

.line 398
const v7, 0x7f030003

invoke-static {p1, v7, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

move-result-object v3

check-cast v3, Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;

.line 400
.local v3, qsv:Lcom/android/systemui/statusbar/quickpanel/QuickSettingsView;
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedView:Lcom/android/systemui/statusbar/ExpandedView;

invoke-virtual {v7, v3, v12}, Lcom/android/systemui/statusbar/ExpandedView;->addView(Landroid/view/View;I)V

and after I modified them they were:

.line 398
const v7, 0x3030003

invoke-static {p1, v7, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

move-result-object v3

check-cast v3, Lcom/lidroid/systemui/quickpanel/PowerWidget;

.line 400
.local v3, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v3}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V

I kept the line numbers as was suggested in some posts.

Thanks in advance, and keep up the great work! I wish my device had awesome developers as yours does :)
[Galaxy S II Android Development] :
Will take a look when I get back home.

Update

:

Try the attached SystemUI.apk. I did it in a hurry. So if it doesn't work, let me know. I'll take a look later. Backup first.

I had a look at your modified SystemUI.apk. You have removed 2 additional lines. Check the StatusbarService.smali file from the SystemUI that i have uploaded.
[Galaxy S II Android Development] fender90:
Nope, doesn't work. Force close com.android.systemui on reboot.

Thanks for the help, I'm trying to learn so sooner or later I'll be able to do things like this myself :)
[Galaxy S II Android Development] :
Ok. I'll take a look tonight.
[Galaxy S II Android Development] fender90:
Dude, I'm an idiot. It works. I made a really nooby mistake yesterday. You're amazing!

I'm gonna check what you did and learn. Thanks again!
[Galaxy S II Android Development] :
Good to know it worked.

Why did it not work in the first place? Did you resign SystemUI.apk or forget to include lidroid-res.apk?
[Galaxy S II Android Development] fender90:
Forgot to include lidroid-res.apk and QuickSettings.apk :D
[Galaxy S II Android Development] Prawesome:
Silesh? Could you help me with patching my systemui? I tried doing it on my own but there isnt any line constv7 at all.. :/ I have provided an unmodded system ui here..Phone is SGA...Could you please patch it for me? :)
[Galaxy S II Android Development] :
Attached. Dont sign the apk. Dont forget to include lidroid-res.apk ( /system/framework folder ) and QuickpanelSettings.apk ( /system/app folder )
[Galaxy S II Android Development] Prawesome:
Thanks a lot bro :)
[Galaxy S II Android Development] heriawan.fx:
Firstly, big thanks for Sir lidroid who shared very cool improvement for us :D

I'm newbie here, but I just wanna share Sir.

I always successfully sign apk system with no problem. :D

No need to sign all apk system, I do a trick like this :

After editing AndroidManifest.xml and compiling the apk,,,

sign SystemUI.apk with APK Manager so we will get signedSystemUI.apk, after it don't push to the phone.

But decompile that signedSystemUI.apk again, and then Compile it.

So we will get unsignedSignedSystemUI.apk, rename it to SystemUI.apk then push to your phone...

Just logic in mind ,

Hope this trick will work for all people.

if this usefull , you can quote and share at first page :D

Thanks Sir :D
[Galaxy S II Android Development] :
There is no newbie when it comes to sharing knowledge. Appreciated. May help others. The point is that you have to use the same key to sign all system apps.
[Galaxy S II Android Development] idi0t:
can it run on XXLPQ?
[Galaxy S II Android Development] :
Its already on LPQ. Check Wanamlite rom v9.3.
[Galaxy S II Android Development] ciscogee:
would this be possible on froyo? we dont have a systemui?
[Galaxy S II Android Development] danividalg:
Hi, two questions:

1.- Does anyone could "update" the tutorial or make another tutorial on how to make it on a clear stock LPQ rom?

2.- Wanamlite have 15 toggles, original in this thread is 14 toggles. Anyone know what is the 15th toggle?

Thanks and best regards :)
[Galaxy S II Android Development] :
1. No. You have to learn on your own. Decompile the SystemUI.apk from the stock rom and Wanams lite rom. Then diff the Phonestatusbar.smali file and find the changes.

2. Wifi hotspot.
[Galaxy S II Android Development] danividalg:
Hi,

Thanks for your quick reply :)

I have tried to compare both files but there are too much changes and I don't know if all of that changes or only some of them are because of the toggle bar or because of any other feature of the Wanams rom.

Furthermore, (please, sorry for my ignorance) I have seen in several places that wanams replace some lines like:

".registers 5

.prologue"

with line:

".locals 4"

and I don't know what to do with this lines.

And too, wanams remove all lines like ".line 2826" and I don't know if it's important or not.

Sorry, I'm trying to learn.

Please, help me and I promise to write a tutorial of how to deodex, modify and odex a clear stock LPQ 4.0.3 Galaxy S2 ROM

Thanks and best regards. :)
[Galaxy S II Android Development] Wildchld:
sileshnair

OK read through this whole thread and have everything working but keep getting fc's on the status bar.

E/AndroidRuntime( 283): FATAL EXCEPTION: main
E/AndroidRuntime( 283): java.lang.RuntimeException: Unable to create service com.android.systemui.statusbar.StatusBarService: java.lang.ClassCastException: com.android.systemui.statusbar.quickpanel.QuickSettingsView

If checked the edit several time and just can't find the errors. Could you take a look and let me know. I'm sure its something simple but eyes are blurry lol

also if I run the lidroid-res.apk I get parse error

Tried with and with out flashlight mod, without statusbar works and with I get errors above.

Thx!
[Galaxy S II Android Development] :
Which phone? Odexed from or deodexed? I need framework-res.apk as well.

Cannot do it today. Out of station. Tomorrow afternoon my time, which is 16 hours from now.
[Galaxy S II Android Development] Wildchld:
Thanks I have 16 hrs to see if I can figure it out myself

SGH-T679 deoxed v2.3.5

Originals attached
[Galaxy S II Android Development] :
Reached earlier than expected. Dont resign the apk. Dont forget to include lidroid-res.apk and QuickpanelSettings.apk.
[Galaxy S II Android Development] Wildchld:
Thanks

Well it booted fine no fc's but no status bar at all. Quick Panel settings app works. all I could find in the logcat was his

I/PackageManager( 247): /system/app/SystemUI.apk changed; collecting certs
D/dalvikvm( 247): GC_CONCURRENT freed 262K, 42% free 3834K/6535K, external 0K/0K, paused 2ms+2ms
W/PackageManager( 247): Signature mismatch for shared user : SharedUserSetting{40589218 android.uid.system/1000}
D/PackageManager( 247): scanPackage : /system/app/Superuser.apk
E/PackageManager( 247): Package com.android.systemui has no signatures that match those in shared user android.uid.system; ignoring!
[Galaxy S II Android Development] :
I don't know why it says signature mismatch. Did you resign the apk?
[Galaxy S II Android Development] Wildchld:
nope pushed it and the other 2 files thats it.
[Galaxy S II Android Development] :
Strange. No idea what's wrong. It says signature mismatch. But I haven't touched the signature files. Did you pull out the SystemUI.apk from the phone? Also any change to Androidmanifest.XML file in the SystemUI.apk that you uploaded?
[Galaxy S II Android Development] :
@wildchld

Attached.

Change is in StatusbarService.smali between lines 1045 and 1056.
[Galaxy S II Android Development] Wildchld:
lol just logged in to say thanks I just got it seems there was more than 1 app not signed correctly and how that happened I'll never know but resigning all the apps rebuilding in the kitchen and all is good its working YEA! Thanks again for the help but glad I figured it out thank god for logcats right! I'll take a look at the change for reference.

:D
[Galaxy S II Android Development] crt60:
I'm hoping someone on this thread could help me.

The 14 qp toggle was ported to the captivate, so then I added another toggle button, so now when I recompile it then flash and run it, I get an error in logcat that says-

android.content.res.Resources$NotFoundException: Resource ID #0x3030003

The systemui.apk cant seem to find the lidroid-res.apk. I even added the lidroid-res.apk into the apktool framework, but still a no go.

Any suggestions how I can add it to the bootclass path?

Thanks for any help.

EDIT: Guess I could just add the resources to systemui and be done with it.
[Galaxy S II Android Development] dead0:
hi silesh, i know that there is a 15-toggle mod for ics but will this 14toggle mod also work as i prefer the larger toggles? :)
[Galaxy S II Android Development] alex_5ruz:
hi mate, do you have the flashable version of the framework file that you can share for this toggle button? need to add the buttons for my wife's i9100G version.huhuhu..
[Galaxy S II Android Development] Blackwatch:
Has anyone been able to turn this in to and actual APK or theme that us noobies can install and set.....id buy a beer for it :)
[Galaxy S II Android Development] Canadoc:
I am not on Wanam lite but on a different ROM based on lpq which is deodexed. Where can I find the 15 toggle notification bar?
[Galaxy S II Android Development] :
Pull out SystemUI.apk and QuickpanelSettings.apk from /system/app folder of wanamlite rom. Also pull out lidroid-res.apk from /system/framework folder. Try pushing them to your rom. May work.
[Galaxy S II Android Development] :
How can the instructions be more clear than how it is mentioned already?
[Galaxy S II Android Development] :
You cannot edit lidroid-res.apk.
[Galaxy S II Android Development] :
Not sure as I have not tried.
[Galaxy S II Android Development] kedai:
Search the app and theme topic for systemui for LPQ lp7 etc
[Galaxy S II Android Development] crt60:
That is what I had to do to add the new toggle, to add the resources, so I could just add the resources to systemui instead and leave lidroid-res.apk alone, so it isn't systemui but lidroid-res.apk that has been affected.

Thanks for your input.
[Galaxy S II Android Development] Blackwatch:
Because people with my sort of luck never get anything right.........Im the sort of person who could brick and unbrickable phone
[Galaxy S II Android Development] :
Correct, becoz when you recompile lidroid-res.apk after making changes, it changes all the resource id's to stock. Li uses some form of modified apktool which preserves the resource id's in the same form that he has created.
[Galaxy S II Android Development] crt60:
Thanks 10 Char
[Galaxy S II Android Development] dsjoes:
is it possible to use this on stock 2.3.4 xwki4 odex. If so how do i do it :confused:

thanks
[Galaxy S II Android Development] :
SystemUI.apk and SystemUI.odex required.
[Galaxy S II Android Development] surya_mca:
Hey man..

here im attaching mine System files(both apk & odex)

please add toggles..
[Galaxy S II Android Development] :
GB or ICS? which firmware?
[Galaxy S II Android Development] surya_mca:
ICS.... Sir
[Galaxy S II Android Development] :
I haven't done it yet on ICS roms, so i don't know. Pull the SystemUI.apk out from Wanamlite rom. Push it into your /system/app folder and delete your SystemUI.odex file.

or download the zip file attached to this link. Just add the SystemUI.apk from wanamlite rom and flash it from recovery. It will delete the SystemUI.odex file automatically.
[Galaxy S II Android Development] dsjoes:
i have uploaded them

thanks
[Galaxy S II Android Development] :
You'll get them in a couple of hours. Not at home now.

Edit

: I forgot brother. I need all files from the framework folder as well.
[Galaxy S II Android Development] dsjoes:
ok i have uploaded all the files here the systemui.apk and .odex and the framework-res folder.

http://www.mediafire.com/?elmq6y9e0fv5sw8
[Galaxy S II Android Development] :
backup first before flashing in cwm recovery.
[Galaxy S II Android Development] dsjoes:
thankyou i have just flashed it and it is working perfectly :D
[Galaxy S II Android Development] danividalg:
Please Help, I'm trying to learn :)

Hi again,

I have been trying to apply the wanam toggle button statusbar to a stock LPQ without succsess.

As you suggest, I have decompiled wanam SystemUI.apk and tried to put in a stock LPQ. What I have done:

- Deodex stock LPQ SystemUI.apk into "out" directory with backsmali-1.3.2

- Decompile wanam SystemUI.apk into "outwanam" directory with apktool

- Copied "outwanam/smali/wanam directory" to "out/smali/wanam"

- Copied "outwanam/smali/com/android/wanam" directory to "out/smali/com/android/wanam"

- Copied "important" lines from file "outwanam\com\android\systemui\statusbar\phone\PhoneStatusBar.smali" to file "out\com\android\systemui\statusbar\phone\PhoneStatusBar.smali" (look at files attached)

- Created "classes.dex" file with smali-1.3.2

- Opened original stock "SystemUI.apk" with 7zip and copied file "classes.dex" in root directory

- Zipaligned the new SystemUI.apk

- Deleted on the phone the file "/system/app/SystemUI.odex"

- Copied to the phone the new zipaligned file "SystemUI.apk" to "/system/app/"

- Copied to the phone the file "QuickPanelSettings.apk" to "/system/app/"

- Copied to the phone the file "lidroid-res.apk" to "/system/framework/"

- Reboot into recovery

- Clear dalvik cache

- Reboot

- Then get a notification window with error "UI sistema se ha detenido" (I'm spanish), translated to english it is "UI system have been stopped". I can use the phone but I have no status bar.

I don't know how to see log errors, debug information or any other information that could help to know what's wrong, but I think that with some help I could fix it and I will promise to make a tutorial to make this mod to a stock LPQ rom.

Thanks in advance and best regards :)
[Galaxy S II Android Development] wanam:
You forgot to edit "SystemUI.apk\res\layout\tw_status_bar_expanded.xml", you have to add an id (exp_power_stat) too and check that it get a the same public id "0x7f0e00bc".

Use this ApkManager, it should help you.
[Galaxy S II Android Development] dsjoes:
i have tried editing my systemui.apk but every time i try to compile the file i get the following errors even when i decompile and then recompile without any changes. what do i need to do to fix it thanks. sorry i'm new to all this.

C:\Users\Joe\apktool\SystemUI\res\layout\status_bar.xml:15: error: Error: Res

ource is not public. (at 'textAppearance' with value '@android:style/TextAppeara

nce.StatusBar.Ticker').

C:\Users\Joe\apktool\SystemUI\res\layout\status_bar.xml:16: error: Error: Res

ource is not public. (at 'textAppearance' with value '@android:style/TextAppeara

nce.StatusBar.Ticker').

C:\Users\Joe\apktool\SystemUI\res\drawable\stat_sys_gps_acquiring_anim.xml:5:

error: Error: Resource is not public. (at 'drawable' with value '@android:drawa

ble/stat_sys_gps_on').
[Galaxy S II Android Development] :
Did you do extract framework resources with command

apktool if framework-res.apk

before decompiling SystemUI.apk?
[Galaxy S II Android Development] dsjoes:
never mind i got it working
[Galaxy S II Android Development] danividalg:
Hi,

Thanks for answer XD

Sorry for my ignorance :S

What you mean with "same public id" ?

Thanks and best regards :)
[Galaxy S II Android Development] M_J_Nazari:
i think the problem is value=0x01030305

it must be like this

value=0x1030305

maybe.

your apk has a problem if does not decompile correctly, or maybe wrong framework-res.apk .
[Galaxy S II Android Development] danividalg:
My SystemUI.apk is the original stock ICS from Samsung LPQ release of ICS 4.0.3

Attached are the original SystemUI.apk, SystemUI.odex and framework-res.apk

Perhaps should I do something more because of is a ICS version?

Thanks and best regards.
[Galaxy S II Android Development] ApriliaM3:
Text overlap on Quick Launch Toggles (Brightness, Lockscreen, Shutdown)

Apologies if this has been asked or answered before... I did search but found nothing.

Almost every recent ROM I've tried (ICS in Galaxy S2) has had a text overlap on 3 of the toggles.

Brightness, Lockscreen and Shutdown all have the last letter cut off and wrapped onto the next line.

It doesn't effect the operation of course but it doesn't look nice

Is this a hard thing to fix? I assume it must be because nobody seems to have fixed it :)
[Galaxy S II Android Development] wanam:
No i don't mean that and you don't have to sign SystemUI since you don't touch AndroidManifest.xml.

What i mean is that when you modifiy the file "PhoneStatusBar.smali", the bellow id (in red) must be the same in public.xml for the item "exp_power_stat" :

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;

[COLOR=Red][B] const v0, 0x7f0e00bc[/B][/COLOR]

invoke-virtual {v1, v0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;

move-result-object v0

check-cast v0, Lcom/android/wanam/systemui/StBar/PowerWidget;

iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/android/wanam/systemui/StBar/PowerWidget;
[Galaxy S II Android Development] LegendK95:
This is true only inside the code (classes.dex), what I'm trying to say is that aapt registers resources in the public.xml based on one thing, whether the apk is a framework or a regular apk. Framework public ids always start with 0x0...., but inside the code, to retrieve the resources it is used as 0x....

Now the problem here is with the framework-res.apk (because 0x01 is always framework-res.apk), and also may be caused due to the usage of an older version of apktool.

It is better that you do it alone, and for the sake of simplicity deodex SystemUI and when you finish modding it, odex it back.

Now The integration inside ICS is different from that from GB, I have done it since LP6 then LPB and then LPH, LP7, LPQ and LP2. The thing is that the code from LPH, LP7, LPQ and LP2 is Very similar (if not identical) to each other. So because of that, I may post a full tutorial if you want (and if others want too) on how to integrate lidroid's toggles into ICS. Of course if lidroid accepts.

Oh and I can help you, send me a pm and I'll guide you on how to integrate it to LPQ.

You are right. I have now rebuilt a new framework for the toggles, and can change the text (I removed it now, but can get it back easily), and maybe make it smaller. So it's not really that hard now ;), but the files used are different than the old files (which are the renamed files wanam uses now).
[Galaxy S II Android Development] Qnorsten:
A tutorial in how to implement this on lpq would be greatly aprisiated. This guide is the best way to learn. Much better then to just download a,mod that someone else made.
[Galaxy S II Android Development] danividalg:
I got it !!! XD

Thank you all, and special thanks to Wanam.

As I promise, and with Wanam permission, I will make the tutorial "How to add 15 toggle buttons statusbar from Wanam rom and then add circle battery from UOT Kitchen on a Stock ICS LPQ ROM"

Thanks again and best regards.

---------- Post added at 01:28 PM ---------- Previous post was at 01:25 PM ----------

Thanks :)

I have found the problem.

The problem was that I was trying to decompile an odexed SystemUI.apk and this seems not to work ok.

I have deodexed and then decompiled perfectly :)

As said in post before, I will make a tutorial with all the process.

Thanks and best regards.
[Galaxy S II Android Development] ApriliaM3:
So... is this something that someone with no experience what-so-ever could fix? :D
[Galaxy S II Android Development] LegendK95:
Umm :P well rebuilding a new framework isn't that easy really. Not that it can't be done tho.
[Galaxy S II Android Development] shoman94:
Has anyone had any luck putting this into an ICS systemUI? And I'm not talking about totally revamping the systemUI like the wanam mod.
[Galaxy S II Android Development] slaman:
There is a mod called JKay deluxe, which has a "Secure Mode"... this essentially disables the lock screen (similar to lidroid's No Lock toggle)

The key difference is that the JKay version overrides other device administrator's security policies... meaning my company that forces a password on my device, I could override this by simply toggling off Secure Mode.

Any idea how we can make lidroid's No Lock toggle do that?
[Galaxy S II Android Development] LegendK95:
Yes :), it has been the case for quite many version now of ICS, anyway I'll be writing a tutorial on how to do it for ICS in the upcoming days ;)
[Galaxy S II Android Development] fender90:
Hey siles, I'm attaching a new SystemUI.apk and framework-res.apk, since Samsung updated them and the 14 toggles aren't working anymore (obviously).

Can you please do your magic again?

Thanks in advance dude!

EDIT: Nevermind, I managed to do it myself :P
[Galaxy S II Android Development] Eudemony:
[FIX] 15 Toggle Display Wrapping

There are 2 different solutions to this. As they say, "there's more than 1 way to skin a cat!"

1. Change to a smaller text size for the toggles

2. Change the amount of widgets displayed in the scrollable bar in Portrait mode (everything is displayed correctly in landscape mode)

The second solution is what I have used. Detail are as follows:

Currently it is set to show 6 widgets up top .. i.e. Auto Sync, Screen Timeout .. etc and in landscape 8 widgets.

You need to change the values in 2 integer files (as one is for when the screen is locked and the other all other times)

First file located within lidroid-res.apk\res\values-hdpi\integers.xml

Value to change is in red

<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="quickpanel_scroll_threshold_port">[COLOR="Red"][B]5[/B][/COLOR]</integer>
<integer name="quickpanel_scroll_threshold_land">8</integer>
</resources>

Second file within lidroid-res.apk\res\values\integers.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="config_rotaryOuterRadiusDIP">390</integer>
<integer name="config_rotaryStrokeWidthDIP">83</integer>
<integer name="config_rotaryMarginBottomDIP">60</integer>
<integer name="config_lenseTimeLabelOffsetDIP">0</integer>
<integer name="config_ringThresholdDIP">160</integer>
<integer name="config_ringBaselineBottomDIP">150</integer>
<integer name="config_ringCenterOffsetDIP">30</integer>
<integer name="config_ringSecIconSizeDIP">40</integer>
<integer name="config_ringSecBaselineOffsetDIP">30</integer>
<integer name="config_ringSecCenterOffsetDIP">30</integer>
<integer name="quickpanel_scroll_threshold_port">[COLOR="red"][B]5[/B][/COLOR]</integer>
<integer name="quickpanel_scroll_threshold_land">8</integer>
</resources>

now you will have 5 toggles instead of 6 displayed and all text wraps nicely :)

Screenshots attached
[Galaxy S II Android Development] termagazis:
hello guys.is there a way to make it work for huawei U8800pro?
[Galaxy S II Android Development] yoderk:
I'm curios as to how you made the changes and got the lidroid-res.apk to work. Every time I try this I just hang at the boot screen.
[Galaxy S II Android Development] wanam:
Just follow this.
[Galaxy S II Android Development] rajaspidey:
i recompiled everything as said in first post by switcching between ICS apk tool & original apktool by wanam !!

Do i want to sign the apk files before placing it in my system :D

gonna give it a try without singning with signapk :D
[Galaxy S II Android Development] mattcfk:
i try to follow as close as possible to your instruction. but at the end, i get no black/blank wallpaper with no status bar... :confused: