# SystemUI.apk and APKTool help!



## Dafryinpan (Dec 20, 2011)

I hope an expert out there can help me out. I am on a quest to try and make my status bar, and nav bar transparent. However, I am having trouble compiling by SystemUI.apk. I can successfully get it to decompile using apktool; with the following command;

apktool d systemui.apk

Then I proceed to make my edits; but then when I am all done, I attempt to compile up the changes by using the following command;

apktool b systemui

Everything seems to compile correctly; however, my new SystemUI.apk is two times smaller than the original. Original was 1.68m new one is only 865k? I then signed the new apk; but it barely gets any bigger. I then try to load the new APK on my phone, and I lose all status and nav bars.

What am i doing wrong? Please help I am going crazy. I feel like I am just missing one small thing, and for the life of me i cannot figure it out.

I apologize in advance for beings such a noob. But we all have to start somewhere.


----------



## RMarkwald (Oct 19, 2011)

Try deleting the android manifest out of your new apk after recompiling, then extract the android manifest and META-INF folder from the original apk, and put them in your newly built one (using 7zip of course!). You WON'T need to sign it then.

I've seen the size thing happen too, don't worry there. The issue with size would be if you just decompiled classes.dex and the sizes were different, then that would be cause for concern.

You don't get any errors recompiling correct?

Sent from my Galaxy Nexus using RootzWiki


----------



## Dafryinpan (Dec 20, 2011)

RMarkwald said:


> Try deleting the android manifest out of your new apk after recompiling, then extract the android manifest and META-INF folder from the original apk, and put them in your newly built one (using 7zip of course!). You WON'T need to sign it then.
> 
> I've seen the size thing happen too, don't worry there. The issue with size would be if you just decompiled classes.dex and the sizes were different, then that would be cause for concern.
> 
> ...


I dont get any errors when compiling...its just that when I stick the systemui.apk back on my phone, I lose status and nav bars. Let me try your method see if that does it.


----------



## Dafryinpan (Dec 20, 2011)

Dafryinpan said:


> I dont get any errors when compiling...its just that when I stick the systemui.apk back on my phone, I lose status and nav bars. Let me try your method see if that does it.


Didnt work; after adding the manifest, and the meta-inf...I still have a small systemui.apk.....I dont know what I am doing wrong here....


----------



## RMarkwald (Oct 19, 2011)

Dafryinpan said:


> Didnt work; after adding the manifest, and the meta-inf...I still have a small systemui.apk.....I dont know what I am doing wrong here....


Where are you getting the edit information from to do the transparency?

I don't think it's the size that's the issue here...

Sent from my Galaxy Nexus using RootzWiki


----------



## Dafryinpan (Dec 20, 2011)

RMarkwald said:


> Where are you getting the edit information from to do the transparency?
> 
> I don't think it's the size that's the issue here...
> 
> Sent from my Galaxy Nexus using RootzWiki


You could be right; I am using links from here....http://rootzwiki.com/topic/15099-mod-transparent-status-bar-navigation........Do you know anything about how to do this? And want to help me out? I feel like I[m following the directions; but just not working.......


----------



## RMarkwald (Oct 19, 2011)

Dafryinpan said:


> You could be right; I am using links from here....http://rootzwiki.com/topic/15099-mod-transparent-status-bar-navigation........Do you know anything about how to do this? And want to help me out? I feel like I[m following the directions; but just not working.......


I'd be happy to help bud, let me look at that link.

Sent from my Galaxy Nexus using RootzWiki


----------



## Dafryinpan (Dec 20, 2011)

RMarkwald said:


> I'd be happy to help bud, let me look at that link.
> 
> Sent from my Galaxy Nexus using RootzWiki


 Pm me if you want; we can chat through other means


----------



## RMarkwald (Oct 19, 2011)

Dafryinpan said:


> Pm me if you want; we can chat through other means


DM sent with info.


----------



## sparkyman (Jun 6, 2011)

can some one help my systemui wont decompile correctly so i can see all the values. keep getting java errors and resources errors and only shows like two things in values


----------



## alatedseraph (Jan 23, 2012)

Yea if ppl wouldnt go to private messaging otheres could find the answers they are looking for instead of hitting dead in topics all the time that dont help!


----------



## RMarkwald (Oct 19, 2011)

sparkyman said:


> Yea if ppl wouldnt go to private messaging otheres could find the answers they are looking for instead of hitting dead in topics all the time that dont help!


We were on GTalk, and you would've had to read through about 10 pages of this thread. There's plenty of resources out there, or if you're having a specific issue just ask. We ended up getting it figured out, as using other means to figure out the issue went way faster than clogging up a forum with post after post.

After about 45 minutes to an hour of asking questions back and forth, I decompiled and made the edits which worked. The OP already had a working apktool and updated aapt.exe from the latest SDK. I'm not sure why it didn't work for him, but I know he's since decompiled/compiled apks without issue since. The poster posting before has a completely different issue, unrelated to the OP's.

He should have started a new post, as it would get lost otherwise.


----------



## DroidVicious (Jul 12, 2011)

I did notice he was signing and using the new apk that was created, the best bet should have been taking the original SystemUI.apk and whatever edits he made in whichever directory he should have just used the new ones and overwrite the originals in with out touching the AndroidManifest.xml.. Example being when you run apktool d SystemUI.apk he/she would go in to whatever directory "res" "smali" make edit's to whatever needs to be modified then run the command apktool b SystemUI.apk.. Now 2 folders will be created "build" and "dist".. I never touch "dist" where the new apk is created.. I copy the original apk and go to "build" then "apk" and inside "apk" there will be "classes.dex" (this would be the smali edits re-dexed) if it pertains to whatever you are doing then also "resources.arsc" some xml stuff and "res" (this should be xml's and images in the form of png's) as well as "AndroidManifest.xml".. So I would paste the original apk in that directory and then mount it (not extracting it, but mounting it, in Linux you can simply do this by double clicking it) I would then drag the "res" folder if I made xml and png edits, and then drag the "classes.dex" file or "resources.arsc" if I made other xml edits and smali edits and drop them in to the original apk to overwrite the old ones in there... I never use the new AndroidManifest.xml because I have had issues where it causes a device to not boot... I then unmount or "X" out of the window where I dragged and dropped my edits and then just copy that apk back to my build and/or adb push back to the phone... I to experience the same issue with decompiling and recompiling an apk where lets say it is framework-res.apk starting 5.2mb in size and when I'm done and even if I added to the apk and not took anything away, recompiled the apk size has been like 4.6mb in size lol... But this has never posed to be an issue for me.... Well I know this is long for a forum post but I hope this can shed some light on some new and up and coming themers and developers.... I'm still pretty new in the dev scene but if there is any assistance I can provide to anyone wanting to learn, I am always available and willing to help anyone learn, as I learn from a lot of you!!! Hope this helped someone!!!


----------



## DroidVicious (Jul 12, 2011)

Also whenever making edits to an apk, I like to take the framework-res.apk from that same build that I'm making edits to apk's and I decompile the framework-res by doing this "apktool d framework-res.apk out" then immediately after I run "apktool if framework-res.apk" and that will install the frameworks to home with the proper resources to the apk's that I'm making edits to.. This has helped me out here and there when decompiling and recompiling where I have run in to issues where it would error out and flag resources and or values... Could be just me, but it is a habit I got myself in to and has narrowed down some stuff for me and saved me a good deal of time.... I also am using the current aapt, and I'm NOT using the newest apktool which is 1.4.3.. I have been in contact with Ryszard "brut.alll" the creator of apktool and have worked with him directly on GTalk and through emails debugging some stuff, and it seems the newest version of apktool for me does not like to play nicely with Android 4.0 ICS.. I'm using a 1.4.2 version that was compiled from source, and if anyone would like this please let me know, I have it sitting in my dropbox and I will gladly share it with whomever may need or want it.. I would post it here but I don't like posting links in forum replies, especially if it is not my OP, I don't want it to be taken as spamming etc... Alright, now I'm done... I'm here if anyone needs me!!!


----------



## artvandelay440 (Feb 27, 2012)

DroidVicious said:


> Also whenever making edits to an apk, I like to take the framework-res.apk from that same build that I'm making edits to apk's and I decompile the framework-res by doing this "apktool d framework-res.apk out" then immediately after I run "apktool if framework-res.apk" and that will install the frameworks to home with the proper resources to the apk's that I'm making edits to.. This has helped me out here and there when decompiling and recompiling where I have run in to issues where it would error out and flag resources and or values... Could be just me, but it is a habit I got myself in to and has narrowed down some stuff for me and saved me a good deal of time.... I also am using the current aapt, and I'm NOT using the newest apktool which is 1.4.3.. I have been in contact with Ryszard "brut.alll" the creator of apktool and have worked with him directly on GTalk and through emails debugging some stuff, and it seems the newest version of apktool for me does not like to play nicely with Android 4.0 ICS.. I'm using a 1.4.2 version that was compiled from source, and if anyone would like this please let me know, I have it sitting in my dropbox and I will gladly share it with whomever may need or want it.. I would post it here but I don't like posting links in forum replies, especially if it is not my OP, I don't want it to be taken as spamming etc... Alright, now I'm done... I'm here if anyone needs me!!!


I seriously can't thank you enough for this. I've been theming for a long time now, and the last hurdle i had was systemui and framework- they always bootlooped. This works flawlessly- thank you so much for taking the time to help!!!


----------

