yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] sssomnath474:
well i used cond_swno ..i have added this in my statusbar ofcourse with the help of hansip :good:

better u provide logcat
[Android Software/Hacking General [Developers Only]] Jay_SEAN:
how to fix that error sir? Thanks in advance :)
[Android Software/Hacking General [Developers Only]] Jay_SEAN:
http://d-h.st/IYEP How to fix this sir? Thanks! :)
[Android Software/Hacking General [Developers Only]] kirito9:
Framework.jar error

wondering if anyone can fix this error

EDIT: It's compiling now! :D:D
[Android Software/Hacking General [Developers Only]] 1sTkilleR:
I Can't find Meta-inf in my Original SystemUI :3

Help PLz
[Android Software/Hacking General [Developers Only]] 1sTkilleR:
I added it but when i swipe Notification , statusbar gets Fc

Framework.jar :-

http://sharesend.com/0848gmvt

And I have attached SystemUI

Please upload new files
[Android Software/Hacking General [Developers Only]] kirito9:
Thanks for this guide man :D :D i tried this before but did not get through because i didn't follow instructions properly. But now it's working :D :D
[Android Software/Hacking General [Developers Only]] RealWelder:
Help.

I know this is an old mod, but I am trying to implement this to Samsung Galaxy Proclaim. Any help would be much appreciated. I have attached the files. (already decompiled and zipped)
[Android Software/Hacking General [Developers Only]] hansip87:
The idea with this code

.line 235
:goto_4
const/4 v0, 0x1

goto/16 :goto_0

[B] .line 233
:cond_3
const/4 v0, 0x0

invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

goto :goto_4[/B]

is that when the logic is directed, for example to checkpoint :goto_4, it will read the code until goto/16 :goto_0, where it will be redirected again to goto_0 checkpoint. The code below it won't be processed. The same is happening to :cond_3, the code will be read below till goto :goto_4, and redirected to :goto_4 (which will go to goto_0 checkpoint after that).

So the conclusion is you can put the new line of code above .line 233 above, or you can put it below the last goto :goto_4. As long as it does not change the existing logic.

About the error, i don't know what's the cause. sometime it's caused of outdated Android SDK. Try to backup your work first, and try to decompile-recompile original framework.jar without any changes applied. If it's still has any error, it's caused by Android SDK not updated to the latest one. if it's flawless, then maybe there's some unclean code inside. try to recheck it again/cut the added code on the backup and apply it inside the newly decompiled smali.
[Android Software/Hacking General [Developers Only]] shoman94:
EDIT:

Looks like under line40 is said sswitch_data_0

needed to be changed to sswitch_data_13e which I failed to do and now it compile fine. I also changed the order of the .line numbers since the one in Your code matched line I had already in the smali. IDK if that matters but it compiled fine.

Now I need to hope for the best and push it and test it.

EDIT2:

Everything boots clean and works properly but FC's after swiping.....

I'll have to look at some logcats or something. Leaving for a while but will get back into it tonight when I get back.

SO close! I'm excited!
[Android Software/Hacking General [Developers Only]] hansip87:
Congratulations 4 u. ;) now the problem only resides on framework.jar on the proxy file. You must change the first parameter for the function (in code it's the second one. first one is the parcel object in smali semi OOP language) transact() method inside onNotificationClear() method to match the TRANSACT_onNotificationError static value inside the stub file.
[Android Software/Hacking General [Developers Only]] shoman94:
Thank you my friend..... I misread that the first time.

100% success! :D

I think you.... I've been wanting this for a while now.
[Android Software/Hacking General [Developers Only]] who MIKE D:
What did i do wrong if everything compiled properly, but after i install them my phone bootloops?
[Android Software/Hacking General [Developers Only]] hansip87:
You must copy systemui.apk's androidmanifest.xml.and meta-inf folder from original systemui.apk to modded one to make it valid.
[Android Software/Hacking General [Developers Only]] hansip87:
If you read the tut code, you'll notice that the code is inserted between inflate() and findviewbyid(). Try to implement between them. Which means in your code it can be inserted between line 665 and 673

And if it got fced, do you replace the metainf and androidmanifest from inside the original apk? You cannot use unsigned system apk or self signed one. You must embed the original signing file.
[Android Software/Hacking General [Developers Only]] ThunderStick:
Yeah copied over necessary files..

Here is what i get from the log cat...

11:38:07.768 Warning dalvikvm 1681 VFY: rejected Lcom/android/systemui/statusbar/StatusBarService;.makeNotificationView (Lcom/android/internal/statusbar/StatusBarNotification;Landroid/view/ViewGroup;)[Landroid/view/View;
11:38:07.768 Warning dalvikvm 1681 Verifier rejected class Lcom/android/systemui/statusbar/StatusBarService;
11:38:07.769 Warning dalvikvm 1681 Class init failed in newInstance call (Lcom/android/systemui/statusbar/StatusBarService;)
11:38:07.769 Error AndroidRuntime 1681 java.lang.VerifyError: com.android.systemui.statusbar.StatusBarService
11:38:26.880 Warning ActivityManager 1600 Timeout executing service: ServiceRecord{403cd568 com.android.systemui/.statusbar.StatusBarService}
11:38:27.429 Warning ActivityManager 1600 Scheduling restart of crashed service com.android.systemui/.statusbar.StatusBarService in 41190ms

---------- Post added at 11:50 AM ---------- Previous post was at 11:39 AM ----------

Here is what I have so far

Links below are files before editing and after

After Editing (Compiled Successfully):o

http://www.igottadroid.com/Roms/ThunderBolt/MIUI/SwipeNotifications/Files-Edited.zip

SystemUI decompiled and edited

http://www.igottadroid.com/Roms/ThunderBolt/MIUI/SwipeNotifications/SystemUI-Decompiledandedited.zip

Before - Editing (not decompiled)

http://www.igottadroid.com/Roms/ThunderBolt/MIUI/SwipeNotifications/Files-Unedited.zip
[Android Software/Hacking General [Developers Only]] Dunc001:
Thanks hansip for this brilliant tutorial and even more epic support :D Finally got the systemui to compile after using the alternative method of generating the IDs for the new xmls posted on page 4 by LeoMar - thanks. Anyway, all working now on HD2 TBD Sensation XE 3.5v :D
[Android Software/Hacking General [Developers Only]] one_love_420:
i get this error when trying to compile the systemui back up

classout\com\android\systemui\statusbar\LatestItemContainer$1.smali[0,0] 2130968
577 cannot fit into a short
classout\com\android\systemui\statusbar\LatestItemContainer$1.smali[133,4] misma
tched tree node: I_STATEMENT_FORMAT10t expecting I_CATCHES
classout\com\android\systemui\statusbar\LatestItemContainer$1.smali[0,0] mismatc
hed tree node: I_CATCHES expecting <UP>
[Android Software/Hacking General [Developers Only]] hansip87:
Do you make some changes inside that file? Is there already a latestitemcontainer before?
[Android Software/Hacking General [Developers Only]] one_love_420:
The only changes i made to the LatestItemContainer$1.smali were to add my public id's for the anim. And no there was not a latestitemcontainer before i added it. So i out of ideas to why it doesnt want to compile

Attached is my unedited SystemUI.apk
[Android Software/Hacking General [Developers Only]] hansip87:
Umm.. Try to look at line 133 (not notepad line count, but internal page line markings) and paste it here.
[Android Software/Hacking General [Developers Only]] one_love_420:
not exactly sure what you mean but there is not a .line 133 but the line count 133 in the LatestItemContainer$1 looks like this:

goto :goto_0
[Android Software/Hacking General [Developers Only]] hansip87:
seems that you're using HTC is that right? Maybe you can PM dunc001, he's on HTC Sensation XE and might share his modded one for you.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
ok, so I did all the modification, recompiled the two files pushed them to my phone and my notification bar is now gone...

any advice ?
[Android Software/Hacking General [Developers Only]] hansip87:
i think the logcat said that the LatestItemContainer.smali is not implemented correctly so when the check-cast is called after inflate command, the class is not found/error.
[Android Software/Hacking General [Developers Only]] hansip87:
That's because of SystemUI.apk got force closed. do you have any log for that? Logcat app will suffice.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
Give me a sec

---------- Post added at 11:55 PM ---------- Previous post was at 11:44 PM ----------

the logcat is humougous, anything special I should be looking for ?
[Android Software/Hacking General [Developers Only]] hansip87:
try to find log with keyword 'Exception' or 'StatusBar' or 'SystemUI'.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
I have found this: E/PackageManager( 143): Package com.android.systemui has no signatures that match those in shared user android.uid.system; ignoring!
[Android Software/Hacking General [Developers Only]] hansip87:
I see, that means you didn't apply the signature file from the original file. Try to delete META-INF folder and AndroidManifest.xml from modded SystemUI.apk, and replace it with the ones from unedited SystemUI.apk. It's because of unique signature from the vendor must be retained and can't be changed by APK Multi Tool.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
trying right away ! it works!

So if I swipe left the notification disappear but nothing if I swipe right, normal ?
[Android Software/Hacking General [Developers Only]] shoman94:
No.... works the same in both directions.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
it is making me crazy :) I need this working :)

I tried again, removed the old systemIU rebooted and reinstall the new and nothing... I'll continue tomorrow...
[Android Software/Hacking General [Developers Only]] shoman94:
Are you saying that it doesn't animate to the right at all? It is a funky swipe where you have to do it at the right speed and keep the finger on it the whole way for it to work. It would be nice if it swiped like you were throwing it to the side but it doesn't.

You almost got it...
[Android Software/Hacking General [Developers Only]] hansip87:
It should work both ways. well if it's not FCed then it's fine actually. Maybe not flinging because the movement is not straight enough.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
Do I have to full wipe my device or just replacing the files should do it ?

---------- Post added at 09:19 AM ---------- Previous post was at 08:45 AM ----------

even after full wipe, I can't have the swipe working... don't know why
[Android Software/Hacking General [Developers Only]] hansip87:
No full wipe needed. Maybe your anim file is duplicated, I mean left anim maybe has the same content with the right.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
Nop, the file are different... I don't get it...

If you have time to help here I my modified files...

www.osimood.com/download/tmp/framework.jar.rar

www.osimood.com/download/tmp/SystemUI.apk.rar
[Android Software/Hacking General [Developers Only]] shoman94:
It would be easiest if you posted the Smali/XML files being edited.... that way we don't have to decompile them ourselves. Just my opinion of course as others might not be as lazy as me. :D
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
no need to decompile, those rar contains all decompile output files
[Android Software/Hacking General [Developers Only]] shoman94:
Cool.....
[Android Software/Hacking General [Developers Only]] hansip87:
Try to use 0x7f0b0000 inside the LatestItemContainer$1.smali instead of 0x7f0b i don't know if it will work but worth a try.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
does not seem to make a difference
[Android Software/Hacking General [Developers Only]] hansip87:
Wait a minute, StatsBarService.smali you sent inside SystemUI.apk above does not have LatestItemContainer..? Do you have the edited one?
[Android Software/Hacking General [Developers Only]] shoman94:
I was just gonna say that. That file wasn't edited...

---------- Post added at 11:12 AM ---------- Previous post was at 11:10 AM ----------

I do have a question for you.... If I change the animation numbers..... from 100 to 75 will that change how far you have to go swiping it?

Sound logical anyways..... I should just try it I guess.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
Oh my.... it was too late yesterday..... I am trying and getting back to you

And I did not send you the correct version... I am still sleepy
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
I have something very weird, I take the original, do step 1.1 and 1.2 try to compile and I have an error: "Exception in thread main"... any idea?
[Android Software/Hacking General [Developers Only]] shoman94:
Well.... the smallest thing can cause that to not compile correctly.

Post the whole error... sometimes it leads you to the error.
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x010300a6
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferen
ceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
renceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca
larValue.java:43)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:4
0)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe
sourceParser.java:315)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati
cXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe
coder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD
ecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1
00)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file
: java.io.FileInputStream@34f07ec4
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)

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:174)
at brut.apktool.Main.main(Main.java:59)
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
I succeeded !! Thanks for your help, time and patience !!
[Android Software/Hacking General [Developers Only]] shoman94:
Very nice!
[Android Software/Hacking General [Developers Only]] CarpeNoctem:
Thanks man, especially for the tip, I would have lost a week on that
[Android Software/Hacking General [Developers Only]] one_love_420:
Thank you for this great write up, I finally got it with the help from Dunc001. I had to do the auto-generate id's tip to get the id's I needed for the anim.
[Android Software/Hacking General [Developers Only]] steal25:
Hey guys thats for the write up!! ive got the framework. compiled and the .smali in SystemUI thanks to the helpful tips throughout this thread. Im getting an error when building resources. The post above mine says something about auto generating codes for public id for the animations but i done't see that tip anywhere in the thread. can someone help me with this error and maybe if the auto genereate code tip could help, maybe some one can direct me there or repost it. heres the error

C:\Users\steele\Desktop\sywpe not>apktool b SystemUI
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\steele\AppData\Local\Temp\
APKTOOL8042547645629241132.tmp, -I, C:\Users\steele\apktool\framework\1.apk, -I,
C:\Users\steele\apktool\framework\2.apk, -S, C:\Users\steele\Desktop\sywpe not\
SystemUI\res, -M, C:\Users\steele\Desktop\sywpe not\SystemUI\AndroidManifest.xml
]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\steele\AppData\Local\Temp\APKTOOL8042547645629241132.tmp, -I, C:\Users\stee
le\apktool\framework\1.apk, -I, C:\Users\steele\apktool\framework\2.apk, -S, C:\
Users\steele\Desktop\sywpe not\SystemUI\res, -M, C:\Users\steele\Desktop\sywpe n
ot\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more

C:\Users\steele\Desktop\sywpe not>

Thanks for any help!!
[Android Software/Hacking General [Developers Only]] one_love_420:
Its in the first few pages. I will requote it for you:
[Android Software/Hacking General [Developers Only]] hansip87:
Nice, everybody's getting the mod now ;)
[Android Software/Hacking General [Developers Only]] shoman94:
Yep... great addition
[Android Software/Hacking General [Developers Only]] steal25:
Thanks Worked like a charm!!! and thank you to the OP for a great tutorial!!! This is a cool feature. :D
[Android Software/Hacking General [Developers Only]] subworx:
Hmmm... I can't get it to work (again) :/

After my first tries failed (compiled but FCed), I tried again today.

Can't get the APK to recompile though.

I changed everything according to OP and the HTC post, added META-INF and AndroidManifest.xml from original APK, and now get an error I did not have before.

Edit 2: it becomes more and more weird. now out of nowhere, when decompiling, apkmultitool asks for framework resources? /edit

I: Building resources...
F:\android\apkmultitool\projects\SystemUI.apk\AndroidManifest.xml:1: error: Error parsing XML: not well-formed (invalid token)
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\xxxxx\AppData\Local\Temp\APKTOOL847183855522147464.tmp, -I, C:\Users\xxxxx\apktool\framework\1.apk, -I, C:\Users\xxxxx\apktool\framework\2.apk, -S, F:\android\apkmultitool\projects\SystemUI.apk\res, -M, F:\android\apkmultitool\projects\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\xxxxx\AppData\Local\Temp\APKTOOL847183855522147464.tmp, -I, C:\Users\xxxxx\apktool\framework\1.apk, -I, C:\Users\xxxxx\apktool\framework\2.apk, -S, F:\android\apkmultitool\projects\SystemUI.apk\res, -M, F:\android\apkmultitool\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more

The AndroidManifest.xml from the decompiled SystemUI.apk is plain text, while the xml from original SystemUI.apk is a binary file, maybe this is why it does not work.

I can, for the love of G*d, not find out how to make it compile again.

Edit: haha when clicking the link, firefox also immediately cries about malformed xml, while the decompiled one shows the source %D /edit

Anyone care to help please?

Btw, hansip87, could you be so kind to update the OP with several things please?

- the missing <init> LeoMar75 pointed out

- your comment that one needs to copy the original META-INF and AndroidManifest.xml files

- LeoMar75's second comment regarding how to compile (yes, yes, remove stuff from keep folder)

This would be really great :)

I'll give it a few more tries before I give up for today.

With the last try, I got it to compile and boot, but SystemUI fc'ed instantly or, at the latest, after swiping.

Again, thanks for posting all this in here, to everyone :)

Kind regards,

Sub
[Android Software/Hacking General [Developers Only]] hansip87:
You have to replace the AndroidManifest.xml and META-INF after it gets compiled, inside original apk to modded apk.

Ok i'll edit the OP then, but some of the note i thought is too general, i mean one who has experience in APK Compiling and Decompiling should have known that.. but it does not hurt i guess..
[Android Software/Hacking General [Developers Only]] subworx:
Ahhhh that was my mistake. Thank you, will try immediately

You are, of course, right as this is generally directed at rom developers.

Taking the number of help requests in here, many end users try it though, and these could use a tiny little bit more guidance ;)

Again, thank you very much
[Android Software/Hacking General [Developers Only]] KaneOfMars:
So I manage to finally get systemUI to compile properly but having issues with trying to smali framework.jar

I get this error:

Smali working...

framework\com\android\internal\statusbar\IStatusBarService$Stub.smali[0,-1] misma

tched input '<EOF>' expecting END_METHOD_DIRECTIVE

any idea what that means?

I went back through the directions and started over, but still the same error?!?

Edit: nvm ... I feel like an idiot, was missing .end method at the end of the file :P

about to push files to phone now, crossing fingers :D

Edit#2: and....... fail :( status bar fc'd once I received a notification, I expected it not to work on the first try though

I'm trying this on an LG Revolution and there are bits of the code that are very different, will have to take another whack at it later :P
[Android Software/Hacking General [Developers Only]] shoman94:
Its the little things that always bite you.
[Android Software/Hacking General [Developers Only]] andybones:
can anyone help me with this HTC Rezound?

got then both to compile but no swiping :/
[Android Software/Hacking General [Developers Only]] hansip87:
Try to post the logcat here so we can help :-)
[Android Software/Hacking General [Developers Only]] hansip87:
Have you read the sample from dunc001? Or maybe he can help u with that since he uses htc desire too and I already helped him, so maybe you can consult him. :-)