yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] RavoxX:
When recompiling SystemUi.apk in step 1.3 I get this error :confused: It's stock SystemUI, so I didn't changed there anything

--------------------------------------------------------------------------
|17.03.2012 -- 13:45:22,09|
--------------------------------------------------------------------------
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\res\layout\status_bar.xml:15: error: Error: Resource is not public. (at 'textAppearance' with value '@android:style/TextAppearance.StatusBar.Ticker').
D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\res\layout\status_bar.xml:16: error: Error: Resource is not public. (at 'textAppearance' with value '@android:style/TextAppearance.StatusBar.Ticker').
D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\res\drawable\stat_sys_gps_acquiring_anim.xml:5: error: Error: Resource is not public. (at 'drawable' with value '@android:drawable/stat_sys_gps_on').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOKUME~1\Admin\LOKALE~1\Temp\APKTOOL897641969784881255.tmp, -I, C:\Dokumente und Einstellungen\Admin\apktool\framework\1.apk, -S, D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\res, -M, D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOKUME~1\Admin\LOKALE~1\Temp\APKTOOL897641969784881255.tmp, -I, C:\Dokumente und Einstellungen\Admin\apktool\framework\1.apk, -S, D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\res, -M, D:\Galaxy S Plus\apk_manager_4.9\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more

I use apk_manager 4.9

Thanks in advance!
[Android Software/Hacking General [Developers Only]] zcop:
My method here: need Jar apk file decompile and compiler

After made changes, i copy ../smali/com folder to

../Jar apk file decompile and compiler/classout( you have make a classout folder manual)

CRTL+SHIFT+Right click to Jar apk file decompile and compiler folder > Open command windows here

Drag and drop 2.bat in to CMD and you will see what make error( Position of error, kind of error). If you dont know how to fix post here

-----------------------------------------------------------------------------------------------------------------------------------------

And how to improve on drag th notifier. While dragging, if my finger move in a line then it gone but if my finger go up or down just a little then the notifier go back, not follow my finger anymore.

Must slide like this

not like this
[Android Software/Hacking General [Developers Only]] klin1344:
Hi, can somebody please help me with editing StatusBarService.smali? I'm still pretty new when it comes to smali and java and I have tried using the code for Samsung ROMs and your original one as well. It compiles ok, but when I push the framework.jar and SystemUI.apk to my Galaxy Player 4.0 it just fc's. I'm almost sure that the problem is with StatusBarService.smali. Attached is the original (unmodified) StatusBarService.smali, wondering could anyone who knows how to do this take a look at it and mod it for me? I would really appreciate it. :)

By the way the Galaxy Player 4.0 is almost identical to the galaxy s phones, even the partition layout is the same.

Thanks in advance!
[Android Software/Hacking General [Developers Only]] Shaaan:
Edit : Wrong post
[Android Software/Hacking General [Developers Only]] klin1344:
Ok I got systemui to compile, but I get fc's. Can anyone help me please?

attached is the logcat.

Thanks.
[Android Software/Hacking General [Developers Only]] Mirko ddd:
I had the same errors with apk manager, use smali baksmali for classes.dex in decompile and recompile, maybe u made nothing wrong ;)
[Android Software/Hacking General [Developers Only]] coccolino_dbro:
Don't know if OP or other modders are still checking this topic, but it doesn't hurt to give it a go with my problem, maybe someone could help...

After a couple of hours of reading, tweaking, testing etc. I have managed to make this work (kind of) on my Galaxy Gio... All code seems good, files compile without errors, swyping motion works but I'm getting statusbar FC at the end of the the motion. I'm guessing the problem lies in the framework, because I get no statusbar problems due to possible systemui bad edits.

I have found this post, http://xdaforums.com/showpost.php?p=22434815&postcount=43 that seems to be the same case, but the solution doesn't work for me, as I already have made the appropiate edit in the proxy file to match TRANSACTION_onNotificationError from the stub file.

I'm attaching here all relevant files, decompiled and edited; maybe someone could take a look if there's something I missed or did wrong.

Thanks!
[Android Software/Hacking General [Developers Only]] nerd99:
dude i tried this on my x10..

while compiling i didn't get any errors but after flashing it hangs on boot any help
[Android Software/Hacking General [Developers Only]] cowsquad:
Did you sign systemUI.apk?
[Android Software/Hacking General [Developers Only]] shoman94:
I haven't looked at it but if the error is after the swipe, the error is not in systemUI.

sent from my SHOstock'd i777 running tapatalk2......
[Android Software/Hacking General [Developers Only]] nerd99:
yes..,no success
[Android Software/Hacking General [Developers Only]] hansip87:
Yes, like shoman said, if the error is on the swipe and animation, then either the Stub or proxy file has wrong line in it. Could you please post the logcat here? Thanks
[Android Software/Hacking General [Developers Only]] hansip87:
Well, the animation actually only plays after you release your swiping motion. When you're still swiping it, the row only follow your motion. Then after you finish the fling, the animation is called. So please check again either StatusBarService.smali or LatestItemContainer.smali to match the anim id inside public.xml. :)
[Android Software/Hacking General [Developers Only]] coccolino_dbro:
Oh, I see... However, I have checked the files again and I have the correct resource ID in LatestItemContainer$1.smali (no mention in the guide of adding resource ID in StatusBarService.smali or LatestItemContainer.smali).

What about this? As LeoMar explains in this post, http://xdaforums.com/showpost.php?p=22355008&postcount=22, for Samsung, in StatusBarService.smali this

move-object/from16 [B]v2[/B], p1

invoke-direct {v0, v1, [B]v2[/B]}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V

should be changed to this

move-object/from16 [B]v7[/B], p1

invoke-direct {v0, v1, [B]v7[/B]}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V

because v2 register, already present, gets overwritten.

That's what I have done in the first place, but still getting FCs. I think because all registers from v1 to v13 are already present in makeNotificationView method. Don't know if it sounds stupid, but I have thought of adding a new register by doing this (changes in bold):

.method makeNotificationView(Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
.locals [B]14[/B]
.parameter
.parameter

.......

move-object/from16 [B]v14[/B], p1

invoke-direct {v0, v1, [B]v14[/B]}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V

but fails to compile, error "All register must fit in 4 bits".
[Android Software/Hacking General [Developers Only]] hansip87:
You should do what LeoMar said about decompile recompile the apk. It will add the anim file automatically and give your anim a new id. Than after that put the new id into latestitemcontainer.smali.

The second error you encountered, probably because the variable has been used before, so please check first.

I suggest you Better to start from your almost perfect modded file, decompile, remove the anim row data from public.xml, and recompile. After that, register the new anim id to latestitemcontainer.smali.
[Android Software/Hacking General [Developers Only]] maanz "L":
hello guys.. I seem to have errors, status bar went missing. like Mr. Delca85 is facing.. I cant tell what's the problem..:( well, I thought I post my logcat in here, and maybe if there's anyone who could help me.. https://dl-web.dropbox.com/get/2012-03-28-22-18-17.txt?w=e02541e8 thanks..
[Android Software/Hacking General [Developers Only]] varun.chitre15:
Nice guide!!

But its limited upto only 2.3+

How to deal with 2.2 for this mod?
[Android Software/Hacking General [Developers Only]] hansip87:
Well AFAIK, this one is applicable o with 2.2, because the SystemUI is still the same form and function. The one that is not applicable is ICS though, because it is already built in.
[Android Software/Hacking General [Developers Only]] varun.chitre15:
Nope but for ur info there is no SystemUI.apk for 2.2 :p
[Android Software/Hacking General [Developers Only]] hansip87:
Ou there isn't? :/ Oops sorry my bad :p
[Android Software/Hacking General [Developers Only]] robertips:
Lg devices?

can somebody help to port this to a lg p500?
[Android Software/Hacking General [Developers Only]] angel_boulevard:
i cant download Baksmali manager.it is banwit
[Android Software/Hacking General [Developers Only]] hansip87:
You could use baksmali.jar and smali.jar from here though

http://code.google.com/p/smali/

My box.com account is out of bandwidth every month.. :( I think i should remove some of m download from there to mediafire.
[Android Software/Hacking General [Developers Only]] frescoraja:
Just want to thank the OP for posting this, and i am just blown away by your willingness to help others... If only there were more modders/developers/programmers on XDA like you... It wouldn't have taken me so long to learn how to do the few things I've learned. I am going to try this mod tomorrow for the sgs2 hercules for t mobile, specifically using darkside warfare 2.5.1. Wish me luck, i hope i won't require more of the op's time and generosity.

Donations are in order, as soon as i get through my taxes i will try to figure something out for ya.
[Android Software/Hacking General [Developers Only]] hansip87:
Hope you're going to be successful while doing it ;)
[Android Software/Hacking General [Developers Only]] frescoraja:
thanks, i was pretty excited as i followed the entire thread and followed everyone's suggestions to a T, and got no compiling errors. alas, upon boot up i got a systemui force close, and my logcat tells me that i have "verifyerror" in process systemui statusbarservice ... but that is all it tells me.

i attached the smali classes i added to systemui.apk as well as the original statusbarservice.smali ..

the only other questions i had were regarding the framework.jar edits within the istatusbarservice$stub.smali class, regarding some of the numbers you used for the sswitches. but i can compile and boot with the edited framework.jar fine, the systemui crashes only after i push the edited systemui.apk.

please let me know if i can provide anything else to help troubleshoot.

thanks again i really appreciate it, as will a bunch of us over in the sgh-t989 forums!
[Android Software/Hacking General [Developers Only]] ImbaWind:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.j
ava:345)
at org.antlr.runtime.Parser.getSourceName(Parser.java:88)
at org.jf.smali.smaliParser.getErrorHeader(smaliParser.java:358)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecogniz
er.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)

at org.jf.smali.smaliParser.method_name(smaliParser.java:3832)
at org.jf.smali.smaliParser.fully_qualified_method(smaliParser.java:6625
)
at org.jf.smali.smaliParser.instruction(smaliParser.java:11381)
at org.jf.smali.smaliParser.statements_and_directives(smaliParser.java:1
841)
at org.jf.smali.smaliParser.method(smaliParser.java:1609)
at org.jf.smali.smaliParser.smali_file(smaliParser.java:595)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:71)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)

at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)

at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Press any key to continue . . .

hi sir, i get this msg when trying to compile the systemui.apk at step 1.3

:(

any idea? :confused:

Thanks for your reply :)
[Android Software/Hacking General [Developers Only]] Shaaan:
Its not that easy imbawind. I am trying it for over 2 months now. The code for ace differs a lot.

TeamCooper Developer

TheMyth Developer

www.teamcooper.net
[Android Software/Hacking General [Developers Only]] ImbaWind:
i try to compile the systemui.apk without any edit

it failed to compile too :(

one of the dev did it successfully, but it's for DDKQ8

if he can, i think we can too :rolleyes:
[Android Software/Hacking General [Developers Only]] Shaaan:
No one is successful yet. Creed did it for gfit. But the file he posted does not work.

I am still working on it. I can compile all files except statusbarservice.smali

TeamCooper Developer

TheMyth Developer

www.teamcooper.net
[Android Software/Hacking General [Developers Only]] ImbaWind:
so you failed to compile SystemUI.apk too ?

-go to sleep, have class tomorrow ;)
[Android Software/Hacking General [Developers Only]] Shaaan:
Yes.

TeamCooper Developer

TheMyth Developer

www.teamcooper.net
[Android Software/Hacking General [Developers Only]] frescoraja:
did you catch the missing "init" in statusbarservice.smali code? when i was trying to troubleshoot my issue and removed the init accidentally, i got a null pointer exception.

i think you will find the hint on page three
[Android Software/Hacking General [Developers Only]] hansip87:
From my latest experience, verifyError happens when you use some variable which was intended for any object with specific class. Let me give you some example:

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

.end local v4, Landroid/app/Notification

As you can read at the end of the line, the compiler tags the variable v4 as Notification object (it is just an annotation, but important nonetheless). This will create verifyError later when the apk is running, because v4 should be recognized as Notification object at the end, not an Integer when moved from v0 to v4. So you have to ensure every variable is safe to use by watching the annotation inside smali file.

If it crashes from the beginning of the phone boot. It is isolated as systemui.apk issue. If it crashes when you do a swipe, it is maybe because of the anim id is incorrect or the framework.jar can't find the correct switch case.
[Android Software/Hacking General [Developers Only]] hansip87:
For those who got compiling error, please follow LeoMar advice to do decompile->add resource file->recompile->decompile again. It will fix the public.xml id that will be required by smali file (and you need to edit the corresponding smali file too)
[Android Software/Hacking General [Developers Only]] ImbaWind:
U mean install framework file?

But how to install using apk multi tool?
[Android Software/Hacking General [Developers Only]] hansip87:
No, but do what I said earlier. Do a recompile to get automated id inside public.xml.
[Android Software/Hacking General [Developers Only]] Shaaan:
Let's not spam this thread imbawind. I can help you with all the files except statusbarservice. So you can pm me for help.

TeamCooper Developer

TheMyth Developer

www.teamcooper.net
[Android Software/Hacking General [Developers Only]] frescoraja:
my latest logcats..

i changed the cond_1 in statusbarservice.smali to cond_leo, as per leo's suggestions and also i put v7 instead of what was v2 in the original edit. now i get the error above. before i got a VerifyError, now this.

i am totally lost now. hope someone can offer some guidance

i tried changing some of the variables to ones that (i thought) weren't used, but i could not get it to compile. so i put them back to how they are in the original edit by leo

can anyone help me? the first line referenced in the error (624) is the line that contains the edits

.line 623
:cond_0
const-string v1, "layout_inflater"

invoke-virtual {p0, v1}, Lcom/android/systemui/statusbar/StatusBarService;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v1

check-cast v1, Landroid/view/LayoutInflater;

[B].line 624
const v3, 0x7f030008

invoke-virtual {v1, v3, p2, v11}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

move-result-object v9

check-cast v9, Lcom/android/systemui/statusbar/LatestItemContainer;

.local v9, row:Lcom/android/systemui/statusbar/LatestItemContainer;
move-object/from16 v0, v2

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

and-int/lit8 v4, v4, 0x2

if-nez v4, :cond_leo

move-object/from16 v0, v2

iget v0, v0, Landroid/app/Notification;->flags:I

move v4, v0

and-int/lit8 v4, v4, 0x20

if-nez v4, :cond_leo

new-instance v4, Lcom/android/systemui/statusbar/StatusBarService$7;

move-object v0, v4

move-object/from16 v1, p0

move-object/from16 v7, p1

invoke-direct {v0, v1, v7}, Lcom/android/systemui/statusbar/StatusBarService$7;-><init>(Lcom/android/systemui/statusbar/StatusBarService;Lcom/android/internal/statusbar/StatusBarNotification;)V

move-object/from16 v0, v9

move-object v1, v4

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/LatestItemContainer;->setOnSwipeCallback(Ljava/lang/Runnable;)V
[/B]
:cond_leo
const v1, 0x7f0a002d

invoke-virtual {v9, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

move-result-object v1

if it might help, here is a link to the entire statusbarservice.smali class, after edits.

download .txt , change extension to .smali if you need to

frescoraja

ps i am trying to implement this mod for the sgh-t989 (tmobile samsung galaxy s2 hercules) using Thederekjay's Darkside Digital Warfare 2.5.1 ROM
[Android Software/Hacking General [Developers Only]] erik07:
Didn't work on me. Though i just followed the tutorial, im not that familiar with how to read those parameters. Just tried if i can make it on my phone, i used a previously themed systemui.apk and also modified framework.jar. so i don't really know where it went wrong, i successfully decompiled and compiled both without errors like others here experienced. I was hoping you all with correct knowledge can assist me with this tutorial. Thanks. :)
[Android Software/Hacking General [Developers Only]] hansip87:
Well, with ClassCastException, please check this:

1. make sure that id 7f030008 refers to status_bar_latest_event.xml (check through public.xml id value)

2. make sure the status_bar_latest_event.xml outer xml tag has com.android.systemui.statusbar.LatestItemContainer as a tag name at the front tag and at the end tag.

FYI, this is how StatusBarService part of code that you've put it in bold sounds like:

1. v1 is prepped as LayoutInflater

2. v3 stores id value of 7f030008 (which should points to status_bar_latest_event.xml file inside public.xml)

3. v1 inflate method is called with v3 as first parameter, p2 (second parameter on makeNotificationView name which is ViewGroup), and v11 as boolean value,

4. store inflate result as v9 (Result = LatestItemContainer object as outer object called from xml, with all the children inside it)

5. check if the v9 outer class is indeed LatestItemContainer.

So as you can see, if the LatestItemContainer casting check does not match the xml file, it will throw ClassCastException.
[Android Software/Hacking General [Developers Only]] frescoraja:
thanks for your help HANSIP! you are the man.

everything is working , i feel kind of like an idiot that i didn't catch that .,. .. i know i edited the xml, but maybe i didn't save it.. ?

not sure but i really appreciate your guidance
[Android Software/Hacking General [Developers Only]] hansip87:
You're welcome ;)
[Android Software/Hacking General [Developers Only]] sasukekun67:
I used kind of your tutorial as well as some of your files to get what I wanted, and now it looks fine, although it's not perfectly implemented.

Anyway thanks for your great work!
[Android Software/Hacking General [Developers Only]] sasukekun67:
Is there a way to make it more responsive? It would be great!
[Android Software/Hacking General [Developers Only]] hansip87:
Edit anim files to have 50 % start coordinate instead of 100 %.
[Android Software/Hacking General [Developers Only]] nail16:
Could anyone please help me I can't recompile the framework.jar after modding it

I keep getting this error

I followed the Guide for modding the systemUI.apk and it successfully compiled without any error

But now i'm stuck at this :(

I've attached some files (including my original framework.jar file) please take a look
[Android Software/Hacking General [Developers Only]] hansip87:
Seems like you didn't do any cleanup. Please check sswitch_16a. It appears more than twice in the code so compiler can't decide to which it should go. And sswitch_24 directive is written only once so the compiler can't find where it should go if sswitch_24 is met.
[Android Software/Hacking General [Developers Only]] nail16:
Ok i figured it out, now it compiles :)

Thank you
[Android Software/Hacking General [Developers Only]] hansip87:
Look, you should use a find and replace program like Dreamweaver or Windows Grep to make it easier to you to debug this simple problem. But what the heck, this is your problem:

1. Watch line 674, 731, and 790. If i am a program, which at the line 790 tells me to go to sswitch_16a, where should i go? to line 674 or 731? Please fix this.

2. Watch line 787. Where should i go when i am being told to sswitch_124? again, please fix this by reading carefully all the bold line in the OP.
[Android Software/Hacking General [Developers Only]] nail16:
Should i also include preloaded-classes from the original framework in the moded framework ?
[Android Software/Hacking General [Developers Only]] hansip87:
Of course. Only replace the classes.dex.
[Android Software/Hacking General [Developers Only]] rayiskon:
nail did u manage to get it working??

i tried this a few weeks ago without any joy, our code is different,so if u miss 1 step it's not going to work :rolleyes:
[Android Software/Hacking General [Developers Only]] maanz "L":
hello guys... anyone with SGS2 willing to help me on my errors? I got no status bar after a reboot. here is the file if anyone could help me: http://www.mediafire.com/download.php?kbcf488yzkhppqr and http://www.mediafire.com/?oxf2h2hqhwxehhj thanks is advance...