# [how to][TUT]softkey mod



## runandhide05 (Sep 20, 2011)

Hey guys,This is a small tut for all of you askng for itFirst off you will need to have apktool setup and working for decompiling ICS apks.Another tool you will want and will make life a lot easier is notepad++Im not going to go into detail about how to do that, there are plenty forums and thread the cover that.Once you get everything set follow these steps and you will be on your way to making what every you want .Because there are already so many different roms out there u already probably know what you cannot take a systemui.apk from say DroidTh3orys rom and install it on a stock 4.0.2 base. This is for a few reasons, first the systemui and the framework-res kinda go hand and hand, So say that droidtheory has notification toggles, and u flash a stock systemui that u added a search softkey, you will likely have a systemui force close on boot, the two apks depend on each other to work properly. That said you MUST use the framework-res.apk from the rom you will be working on.So pull the framework-res.apk and the systemui.apk from the rom you are wanting to modify and place them in your folder you have setup for apktoolType *apktool if framework-res.apk*This will install the framework and next*Apktool d SystemUI.apk*And this will decompile the systemuiOnce that is done it is a good idea to rebuild right away without changing anything to confirm that your apktool is working, you would rather know now that it is not working than after you edit stuff and have fail errors and send you on a ghost chase looking for bugs when it never worked in the first place.After we know that your apktool setup is working here are some places to start playing withThe common is the icons, changing icons is easy, do what u want with them, just keep in mind a few things.
Pngs have to be over a transparent backround
Do not change the size of the png, the portrait are 96x160 and 160x96 for landscape
After than comes the fun stuffFor adding buttons, there a few things that need to be added,Starting at /res/layout/navigation_bar.xmlHere is where you would add another icon to the nav bar. This is where u want to use notepad++If you read the line a few times it will start to make sense. From top to bottom on the first layout is left to right in portrait mode, then followed by the "lights out" , then landscape icons and their order, and again the "lights out"Keep in mind if you add another icon u will want to add another lights out dot so that when the softkeys time out you will have four dots for your four keys. Follow this process for both portrait and landscape.Il give an example for adding the search key seeing as how this is the most popularIn the navigation_bar.xml you will want to add this to start, add in both port and similar one to port only change the @* drawable/ic_sysbar_search to ic_sysbar_search_land*This will add the button to the bar, it's a good idea to add the invisible 0dip in between to get the spacing right if you are only going to have a total of four keys, because keep in mind there needs to be room for the menu to show up when an app calls for it.Next you need to add the values for the key u just added,So jump over the res/values and find the followingIn ids.xml you need to add the search id:*false*In the strings we need to add the @strings/accessibility_search that we added in the navigation_bar.xml:*Search*Now here is where it gets trickyWe need to public also, but by adding to public we need to tell it where to get the smali info from, so we need to do a few things now, first add the public code so jump to /res/value/public.xmlAnd add :Now the "*0x7f0e0095"* this is where it will be identified in the nav in the smali.So we need to add a .method in the correct smaliSo jump over to SystemUIsmalicomandroidsystemuistatusbarphone.NavigationBarView.smaliAnd add the .method public as follows, but one warning, you need to make sure that the number we are adding is not already taken, a simple search of the file will verify it does not already exist, if nothing pulls up add this:*.method public getSearchButton()Landroid/view/View;** .locals 2** .prologue** .line 73** iget-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mCurrentView:Landroid/view/View;** const v1, 0x7f0e0095** invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;** move-result-object v0** return-object v0**.end method*Last thing to do would be to create you actual icon for your search, remember you need two one port and one land and name ic_sysbar_search_land and ic_sysbar_search and these go in the drawable-xhdpi folder and your good to goNow, you are all done, you have just added a search key to your systemui.apk

and dont forget to check out my original thread here for over 55 different mods just for Axi0m plus links in op for 4.0.2 and 4.0.3 base roms too
http://rootzwiki.com/topic/12333-mod-axi0m-21-softkey-1-mods-55-and-counting/page__pid__337823__st__870#entry337823


----------



## runandhide05 (Sep 20, 2011)

Mine

Sent from my Galaxy Nexus using Tapatalk


----------



## runandhide05 (Sep 20, 2011)

Reserved

Sent from my Galaxy Nexus using Tapatalk


----------



## kklier (Nov 2, 2011)

I think it would be awesome to have a softkey set for the dialer. basically dedicated for phone calls. is this possible?

Sent from my Galaxy Nexus using Tapatalk


----------



## merkaba (Jun 10, 2011)

Thanks for writing this, it will be quite helpful.


----------



## runandhide05 (Sep 20, 2011)

kklier said:


> I think it would be awesome to have a softkey set for the dialer. basically dedicated for phone calls. is this possible?
> 
> With enough research any thing is possible...
> 
> Sent from my Galaxy Nexus using Tapatalk


Sent from my Galaxy Nexus using Tapatalk


----------



## btdk7 (Jun 25, 2011)

OK, I tried doing this, but I'm still running into a problem. When I copy the SystemUI.apk back into /system/app and reboot the phone, the navbar at the bottom completely disappears, and the wallpaper goes black. Just to make sure that I wasn't screwing something up, I decompiled SystemUI.apk, then immediately recompiled it without making any changes, and pushed it back to the phone. But I lost the navbar anyway, so it looks like something isn't comiling/decompiling properly. I'm using P3Droid's Tanquil Ice v5.1, and here is what I did to decompile / recompile:

1. Pull framework-res.apk from the phone
2. run "apktool if framework-res.apk"
3. run "apktool d SystemUI.apk"
4. after it decompiles, run "apktool b"
5. then push SystemUI.apk back to /system/app
6. chmod 644 /system/app/SystemUI.apk

And then I reboot the phone, but the navbar disappears. Am I doing something wrong?


----------



## runandhide05 (Sep 20, 2011)

dont push it back,
starting and stoppping systemui.apk while the phone is running will cause it to fc
u need to put it in a flashable zip

edit: also if you are not resigning the apk pushing it will not work either,


----------



## btdk7 (Jun 25, 2011)

runandhide05 said:


> dont push it back,
> starting and stoppping systemui.apk while the phone is running will cause it to fc
> u need to put it in a flashable zip
> 
> edit: also if you are not resigning the apk pushing it will not work either,


I was definitely not re-signing it, but I was pushing it in recovery mode, not normal mode, so that shouldn't have been a problem. To re-sign it, what signature should I use? Shouldn't it be the same as the rest of the ROM? And in that case how can I get that signature? Or can I just use testsign.jar?


----------



## jackstraw (Jun 10, 2011)

Runandhide05 great tutorial


----------



## runandhide05 (Sep 20, 2011)

btdk7 said:


> I was definitely not re-signing it, but I was pushing it in recovery mode, not normal mode, so that shouldn't have been a problem. To re-sign it, what signature should I use? Shouldn't it be the same as the rest of the ROM? And in that case how can I get that signature? Or can I just use testsign.jar?


I honestly would just put it in a zip, and not worry about signing it 
Sent from my Galaxy Nexus using Tapatalk


----------



## winner00 (Jun 6, 2011)

Nice tutorial but it is hard to read. Maybe you could reformat it to make it easier to read?


----------



## btdk7 (Jun 25, 2011)

runandhide05 said:


> I honestly would just put it in a zip, and not worry about signing it
> Sent from my Galaxy Nexus using Tapatalk


I'll try putting in a zip, byt why would it matter? all the zip does is load it int /system/app while in recovery, so how would that be different from me just manually rebooting into recovery, mounting /System, and pushing the file there?


----------



## runandhide05 (Sep 20, 2011)

btdk7 said:


> I'll try putting in a zip, byt why would it matter? all the zip does is load it int /system/app while in recovery, so how would that be different from me just manually rebooting into recovery, mounting /System, and pushing the file there?


I only say that because I had issues with doing that process with system apps in the past

Swyped from my GNEX


----------



## Snow02 (Jun 14, 2011)

btdk7 said:


> I'll try putting in a zip, byt why would it matter? all the zip does is load it int /system/app while in recovery, so how would that be different from me just manually rebooting into recovery, mounting /System, and pushing the file there?


Which one are you pushing? The one you just built? Uh uh. It doesn't have a signature (those files in the meta-inf folder). Therefore, it will not run. Just open the new one, pull out what you changed, overwrite those files in the original, and push that to your phone.

Make sense?


----------



## moosc (Jun 15, 2011)

Wow thats intense and seems to b alot work. How long does it uasualy take


----------



## runandhide05 (Sep 20, 2011)

Snow02 said:


> Which one are you pushing? The one you just built? Uh uh. It doesn't have a signature (those files in the meta-inf folder). Therefore, it will not run. Just open the new one, pull out what you changed, overwrite those files in the original, and push that to your phone.
> 
> Make sense?


 you cant do that if you are wanting to edit the smalis

ive made a few hundreds of these, if you just put it in a zip and flash it if you made it right, ei not chaning anything that would cause it to fc it will work

after you apktool b 
use win7 open archive delete the systemui out of this http://dl.dropbox.com/u/25886627/systemuis/zygot3_/zygot3__restore.zip
and drag and drop new systemui in this zip and flash away


----------



## altimax98 (Jul 14, 2011)

Great write up!

You can push the files over as well though


```
<br />
adb shell stop<br />
adb remount<br />
adb push SystemUI.apk /system/app/SystemUI,apk<br />
adb remount<br />
adb shell start<br />
** if the phone doesnt hot-reboot on its own<br />
adb reboot<br />
```


----------



## Berzerker (Sep 16, 2011)

So how about issues when decompiling/recompiling? As in an ICS-unsupported apktool? Any fixes for that?


----------



## runandhide05 (Sep 20, 2011)

Berzerker said:


> So how about issues when decompiling/recompiling? As in an ICS-unsupported apktool? Any fixes for that?


Update apktool and android sdk
Sent from my Galaxy Nexus using Tapatalk


----------



## Snow02 (Jun 14, 2011)

runandhide05 said:


> you cant do that if you are wanting to edit the smalis
> 
> ive made a few hundreds of these, if you just put it in a zip and flash it if you made it right, ei not chaning anything that would cause it to fc it will work
> 
> ...


Perhaps we go about this in different ways. My compiled apk ends up in the dist folder. That apk is not flashable. It doesn't contain the apk signature.

Does running apktool b, omitting the apk name, compile your changes straight into your original?


----------



## runandhide05 (Sep 20, 2011)

ok, i was saying that u can not use win7 to extract or open in archive to edit anything other than change pngs, which this tut is not about, its about adding keys, 
using apktool will unpack properly, from there make your changes, then apktool b ( read apktool website for apktool for beginers ( i think its labeled noobs but i not calling you one by no means))
when you apktool b two things happen two new folders are created in the systemui folder a build and a distro, inside the distro folder is now your new changed rebuilt apk. this apk is not signed! from here, the simply way that i KNOW WITHOUT A DOUBT works is to put it into a zip and flash it in recovery. if you want to try to abd push it thats ok, it may or may not work, if you have tried several times and it does not work... well stop and just flash the damn thing..lol


----------



## Fatsix (Dec 19, 2011)

You cannot just push to /system without mounting it and enabling r/w. You also need to check permissions on your apk. The signing part I'll have to take some else word for it.

Sent from my Galaxy Nexus using RootzWiki


----------



## Berzerker (Sep 16, 2011)

runandhide05 said:


> Update apktool and android sdk
> Sent from my Galaxy Nexus using Tapatalk


They are both fully updated.


----------



## Snow02 (Jun 14, 2011)

Berzerker said:


> They are both fully updated.


At this point we can (de)compile any ics apks with available tools. If you're having issues you're just not following the instructions.


----------



## altimax98 (Jul 14, 2011)

Snow02 said:


> At this point we can (de)compile any ics apks with available tools. If you're having issues you're just not following the instructions.


Hes not the only one with issues. Ive got a updated SDK and apktool, apk multi tool, and apk manager and even swapped the aapt files, and I can compile (de)compile any apk... except framework-res


----------



## runandhide05 (Sep 20, 2011)

Snow02 said:


> At this point we can (de)compile any ics apks with available tools. If you're having issues you're just not following the instructions.


i know u did not mean to sound like a butt hole, but i could not help but to LAUGH uncontrollably at that
email me at myname @ gmail if you are on windows those having problems de comp and re comp


----------



## Snow02 (Jun 14, 2011)

altimax98 said:


> Hes not the only one with issues. Ive got a updated SDK and apktool, apk multi tool, and apk manager and even swapped the aapt files, and I can compile (de)compile any apk... except framework-res


I posted the fix for framework-res in a couple different threads yesterday.


----------



## dm88 (Dec 22, 2011)

I wish I had seen this thread earlier before I spent a few hours looking at various SystemUI.apk's to figure out how to make everything work.
Anyway I had a question, when I am editing xml, for example res/drawable/stat_sys_battery.xml and there is a line such as @drawable/"file", does the file always refer to res/drawable-xhdpi?


----------



## runandhide05 (Sep 20, 2011)

dm88 said:


> I wish I had seen this thread earlier before I spent a few hours looking at various SystemUI.apk's to figure out how to make everything work.
> Anyway I had a question, when I am editing xml, for example res/drawable/stat_sys_battery.xml and there is a line such as @drawable/"file", does the file always refer to res/drawable-xhdpi?


yes from the stat_sys_battery it is calling the png from res/drawable-xhpi

Sent from my Galaxy Nexus using Tapatalk


----------



## Berzerker (Sep 16, 2011)

Snow02 said:


> At this point we can (de)compile any ics apks with available tools. If you're having issues you're just not following the instructions.


Thank you for that useless comment. Might I direct you to http://code.google.com/p/android-apktool/issues/detail?id=277&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary


----------



## btdk7 (Jun 25, 2011)

OK, I tried just using an update zip, but still having the same issues. And since I tried doing it with an unmodified SystemUI.apk (only decompiled/recompiled), I ahve to think that there is something up with the way that apktool is doing its tihng. I made sure that I'm using the latest APKtool (1.4.3), and the latest aapt. Any other suggestions as to what may be causing the problem?


----------



## runandhide05 (Sep 20, 2011)

Tell me what rom u are one? Are u using the framework and UI from whatever rom u are on? Does it flash in cwr? are u deodexed ?

Swyped from my GNEX


----------



## btdk7 (Jun 25, 2011)

runandhide05 said:


> Tell me what rom u are one? Are u using the framework and UI from whatever rom u are on? Does it flash in cwr? are u deodexed ?
> 
> Swyped from my GNEX


I got it fixed (kind of) -- I'm running Trnquility Ice 5.1, and I was using the correct framework. But there must be a problem with my Win7 x64 machine because I loaded WinXP in VMWare, installed all the Android stuff, and used APKtool there, and it worked.

The only problem I'm still having is that after I added the search key, the menu key completely disappeared. I'm sure that I messed something up in the navbar xml, so I'll play around with it and see what happens.

Thanks for the help and the tutorial, runandhide05


----------



## btdk7 (Jun 25, 2011)

@runandhide05: I figured it out -- since all the buttons are in a Linerlayout, adding another one makes the menu button go off screen. I removed the blank 40dip view at the beginning of the layout, and then changed the widths of all the buttons to 70dip instead of 80dip, and noe everything worls perfectly. Also, you might want to update the tutorial a little bit - if you add the

```
systemui:keyCode="84"
```
 parameter to the new search button, it will make the system recognize it as such, and long-pressing it will launch the voice command (or any other app that registers for the search key long-press)


----------



## runandhide05 (Sep 20, 2011)

btdk7 said:


> @runandhide05: I figured it out -- since all the buttons are in a Linerlayout, adding another one makes the menu button go off screen. I removed the blank 40dip view at the beginning of the layout, and then changed the widths of all the buttons to 70dip instead of 80dip, and noe everything worls perfectly. Also, you might want to update the tutorial a little bit - if you add the
> 
> ```
> systemui:keyCode="84"
> ...


just adding the key event will not enable long press u also have to remove systemui:keyRepeat="false"
by removing systemui:keyRepeat="false" you now enable longpress, which u can also do with home ley


----------



## btdk7 (Jun 25, 2011)

runandhide05 said:


> just adding the key event will not enable long press u also have to remove systemui:keyRepeat="false"
> by removing systemui:keyRepeat="false" you now enable longpress, which u can also do with home ley


I copied the recent apps view to make my search key, so I didn't have the keyRepeat attribute, but that's good to know about it being on the home key. I also figured out how to make the menu key stay on permanently. In navigation_bar.xml, remove the android:visibility="invisible" attribute from the menu keys, and in the NavigationBarView.smali, remove all the content of the two setMenuVisibility methods. So that basically, the menu key will always stay on, and when the setMenuVisibility methods are called, they don't actually do anything. Here's what the 2 methods end up looking like:

```
.method public setMenuVisibility(Z)V<br />
	.locals 1<br />
	.parameter "show"<br />
	return-void<br />
.end method<br />
<br />
.method public setMenuVisibility(ZZ)V<br />
	.locals 2<br />
	.parameter "show"<br />
	.parameter "force"<br />
	return-void<br />
.end method<br />
```
Now, the only thing that's buggin me is that both the searc key and the menu key are staying on during the lockscreen. Is there any way to hide them, like the rest of the keys?


----------



## RMarkwald (Oct 19, 2011)

btdk7 said:


> Now, the only thing that's buggin me is that both the searc key and the menu key are staying on during the lockscreen. Is there any way to hide them, like the rest of the keys?


Yeah, the Search key staying lit bugs me. In that smali file, look at the method named: .method public setDisabledFlags(IZ)V

There's entries there for Recent, Home, Back buttons...do you think getSearchButton() entry needs to put added here to have it disappear when the lockscreen comes up?? I'm learning yet, but that's one thing I noticed looking at it, just don't know if that's right and if so, what needs to be added...


----------



## RMarkwald (Oct 19, 2011)

That appears to be where an edit would be needed. For grins I changed (in that above mentioned method) the getBackButton() to getSearchButton(), recompiled, and the Back button is lit all the time now on the lock screen, and Search disappears like the rest.


----------



## runandhide05 (Sep 20, 2011)

RMarkwald said:


> That appears to be where an edit would be needed. For grins I changed (in that above mentioned method) the getBackButton() to getSearchButton(), recompiled, and the Back button is lit all the time now on the lock screen, and Search disappears like the rest.


on my three key mods for back home and search i ended up just making "recent" call the keyevent code for search to keep it fome showing on lock screen, until i can get some time to read, build, try, reread edit, build try...and so on and so on until i can get it right


----------



## dgwood12 (Aug 15, 2011)

Could you add the long press options to the OP. I know you have been swamped with request so I was going to try to modify one of your long press files to remove the long press from home for recent and add the recent button back in. I've come quite accustomed to it and now cannot live without that dedicated button







. I do still want the long press search for voice commands though. Thank you!

Sent from my Galaxy Nexus


----------



## runandhide05 (Sep 20, 2011)

dgwood12 said:


> Could you add the long press options to the OP. I know you have been swamped with request so I was going to try to modify one of your long press files to remove the long press from home for recent and add the recent button back in. I've come quite accustomed to it and now cannot live without that dedicated button
> 
> 
> 
> ...


just go here
http://rootzwiki.com/topic/12333-mod-axi0m-22-softkey-1-mods-62-and-counting-123011/
find the one u want, 
then decomp add the line to search to make long press active and rebuild and there ya go


----------



## btdk7 (Jun 25, 2011)

RMarkwald said:


> That appears to be where an edit would be needed. For grins I changed (in that above mentioned method) the getBackButton() to getSearchButton(), recompiled, and the Back button is lit all the time now on the lock screen, and Search disappears like the rest.


Thanks for pointing me in the right direction - setDisabledFlags is exactly where the chenge needs to be made. I now have my permament menu and search buttons hidden on on the lockscreen. You just need to increase the number of local vars from 7 to 9 (or 8 if you don't have a permanent menu button), and tack on

```
<br />
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getSearchButton()Landroid/view/View;<br />
    move-result-object v7<br />
   <br />
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;<br />
    move-result-object v8<br />
```
right after

```
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;<br />
<br />
    move-result-object v6
```


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Thanks for pointing me in the right direction - setDisabledFlags is exactly where the chenge needs to be made. I now have my permament menu and search buttons hidden on on the lockscreen. You just need to increase the number of local vars from 7 to 9 (or 8 if you don't have a permanent menu button), and tack on
> 
> ```
> <br />
> ...


Would you mind posting your finished systemui.apk for reference when completed? Thank you!

Sent from my Galaxy Nexus


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> Would you mind posting your finished systemui.apk for reference when completed? Thank you!
> 
> Sent from my Galaxy Nexus


I tried to, but I can't see any way to attach a file to a post.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> I tried to, but I can't see any way to attach a file to a post.


You could always host the file on dropbox or somewhere else like multi upload and share link? I am pretty new at this stuff and understand a lot better when I can see an example to go off of


----------



## dgwood12 (Aug 15, 2011)

runandhide05 said:


> just go here
> http://rootzwiki.com...ounting-123011/
> find the one u want,
> then decomp add the line to search to make long press active and rebuild and there ya go


That was actually incredibly simple. Thanks a ton man!


----------



## runandhide05 (Sep 20, 2011)

btdk7 said:


> I tried to, but I can't see any way to attach a file to a post.


email it to me and il host it
[email protected]


----------



## hxdrummerxc (Jan 2, 2012)

Hello,

First off, Thank you for the tutorial....

Im having a bit of trouble getting the SystemUI.apk to decompile...

I followed a tutorial on how to set up apktools,
I also used the commands to install the framework apk into apktools....

But every time I try to decompile the SystemUI.apk it gives me an error...

Also, when I run the command "apktool if framework-res.apk" it gives me a bunch of invalid config flags, but at the end it still says "framework installed"

Here is a screen shot of the two commands.... First me running "apktool if framework-res.apk" to install the framework into apktools, and then the screen shot of me running "Apktool d SystemUI.apk" in which case it gives me the error that I keep receiving every time I try to decompile.

Can anyone tell me what I might be doing wrong here? Maybe its a bad framework-res file? I pulled it straight from my current rom.


----------



## runandhide05 (Sep 20, 2011)

hxdrummerxc said:


> Hello,
> 
> First off, Thank you for the tutorial....
> 
> ...


Are u on windows?
Swyped from my GNEX


----------



## bouchigo (Jun 9, 2011)

@runandhide05

Did you figure out how to hide the menu buttons from the lockscreen? I tried what @btdk7 suggested, but it's not working for me. I pm'd him, but he may be busy and hasn't replied yet.


----------



## RMarkwald (Oct 19, 2011)

btdk7 said:


> I tried to, but I can't see any way to attach a file to a post.


I am glad you got it, I'll test this with my SystemUI tomorrow, thanks for the update!

Sent from my Galaxy Nexus using RootzWiki


----------



## Berzerker (Sep 16, 2011)

runandhide05 said:


> Are u on windows?
> Swyped from my GNEX


You can't be serious. Did you even look at the post you quoted?


----------



## runandhide05 (Sep 20, 2011)

Berzerker said:


> You can't be serious. Did you even look at the post you quoted?


im sorry then i wont help u


----------



## Berzerker (Sep 16, 2011)

runandhide05 said:


> im sorry then i wont help u


I'm...not the one who needs help. I'm trying to fathom how you could have asked that question when he has Windows command prompts linked in the post...


----------



## runandhide05 (Sep 20, 2011)

cause im using a GD app reading thread and i did not look at the damn screenshot close enough, nor did he read the thread at all look at this quote i have files that work on both windows and linux, but shit if i continue to offer help and nobody reads the thread


runandhide05 said:


> i know u did not mean to sound like a butt hole, but i could not help but to LAUGH uncontrollably at that
> email me at myname @ gmail if you are on windows those having problems de comp and re comp


----------



## hxdrummerxc (Jan 2, 2012)

runandhide05 said:


> cause im using a GD app reading thread and i did not look at the damn screenshot close enough, nor did he read the thread at all look at this quote i have files that work on both windows and linux, but shit if i continue to offer help and nobody reads the thread


Im the one who posted and needes help. i really do appreciate all the help that you guys put forth here.

i am running on windows 7. im also dual booting in linux, but id rather do all of this in windows since i use photoshop for my image editing.

any help would be greatly appreciated, im kinda stuck and frustrated. can i use
a different roms framework-res and see if that fixes the issue?

im sorry if i missed an important post.... i am trying to read the forums from my phone right now.


----------



## Snow02 (Jun 14, 2011)

hxdrummerxc said:


> Im the one who posted and needes help. i really do appreciate all the help that you guys put forth here.
> 
> i am running on windows 7. im also dual booting in linux, but id rather do all of this in windows since i use photoshop for my image editing.
> 
> ...


You're either using an old aapt or apktool. Use these instead.
http://db.tt/1Cii8tGa


----------



## runandhide05 (Sep 20, 2011)

use what snow posted for windows, if you need linux hit me up
also dont use a different framework-res it will just casue problems


----------



## hxdrummerxc (Jan 2, 2012)

Awesome, thanks a lot guys.... that worked.

I was following an old guide for decompiling, and didn't even think to check if I was using an updated apktools.

Now time to mess around a little bit.


----------



## hxdrummerxc (Jan 2, 2012)

Ok,

for my first edit, I really didn't do much.

I just took a SystemUI.apk of one somebody already made with 4 icons, and I just changed the order of the icons... ( I didn't like the order, and plus its a good first edit)

But now I try to "Apktool b" and it keeps saying "Exception in thread main".

Am I missing something here on how to recompile these?

I already know how to add the edited systemUI.apk to a zip folder and flash it, because I have done that with a few mods that I did for changing the soft key icons. I just cant get the apk to recompile now.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Thanks for pointing me in the right direction - setDisabledFlags is exactly where the chenge needs to be made. I now have my permament menu and search buttons hidden on on the lockscreen. You just need to increase the number of local vars from 7 to 9 (or 8 if you don't have a permanent menu button), and tack on
> 
> ```
> <br />
> ...


I tried this and still have my search and menu buttons showing on lockscreen. Pretty sure I did it right. Would still love to take a look at your file to make sure I am doing it correctly. Could you possibly send it to RunandHide so he can host it? Thank you!


----------



## bouchigo (Jun 9, 2011)

dgwood12 said:


> I tried this and still have my search and menu buttons showing on lockscreen. Pretty sure I did it right. Would still love to take a look at your file to make sure I am doing it correctly. Could you possibly send it to RunandHide so he can host it? Thank you!


Sent from my Galaxy Nexus using RootzWikI

I tried it too and it didn't work for me either.

I pm'd him earlier in the day to see if he could upload it to mediafire, but he hasn't replied.....he must be busy today.

I did try what RMarkwald mentioned back in page 4 and that did work, but I'm not sure what btdk7 did, or maybe I'm misunderstanding something...


----------



## runandhide05 (Sep 20, 2011)

Coming soon a tut for adding 1% to battery!

Swyped from my GNEX


----------



## RMarkwald (Oct 19, 2011)

hxdrummerxc said:


> Ok,
> 
> for my first edit, I really didn't do much.
> 
> ...


Did you type in: apktool b SystemUI

You need to add the name of the output folder after the b, which would be SystemUI if that's what was decompiled.


----------



## bouchigo (Jun 9, 2011)

@RMarkwald

Have you been able to hide the menu icons successfully?


----------



## RMarkwald (Oct 19, 2011)

bouchigo said:


> @RMarkwald
> 
> Have you been able to hide the menu icons successfully?


I have not tried yet. I did remove the Recent Apps and switched it with Search with the help of runandhide05, I was WAY over thinking it. I didn't try what was suggested by btdk7 yet. I may be able to this afternoon just to see if it works.


----------



## runandhide05 (Sep 20, 2011)

RMarkwald said:


> I have not tried yet. I did remove the Recent Apps and switched it with Search with the help of runandhide05, I was WAY over thinking it. I didn't try what was suggested by btdk7 yet. I may be able to this afternoon just to see if it works.


In theory it should work, but I could not get it to, I think there r a few more lines to be added then just exactly what he had posted. But I'm a novice to java 
Swyped from my GNEX


----------



## RMarkwald (Oct 19, 2011)

runandhide05 said:


> In theory it should work, but I could not get it to, I think there r a few more lines to be added then just exactly what he had posted. But I'm a novice to java
> Swyped from my GNEX


I just tried it while @ lunch, FC's SystemUI. I think there is more that needs to be added there, but I could be wrong. I am very "green" to java too. I tried to increase my local vars to 8 since I don't have a permanent Menu key, so I'm not sure if that is it or not. I could try some different values there. Maybe btdk7 could shed some more light on this when he's got time.


----------



## bouchigo (Jun 9, 2011)

RMarkwald said:


> I just tried it while @ lunch, FC's SystemUI. I think there is more that needs to be added there, but I could be wrong. I am very "green" to java too. I tried to increase my local vars to 8 since I don't have a permanent Menu key, so I'm not sure if that is it or not. I could try some different values there. Maybe btdk7 could shed some more light on this when he's got time.


Yeah, I think there must be something more to add; hopefully btdk7 chimes in with his file, or a little more insight.


----------



## RMarkwald (Oct 19, 2011)

bouchigo said:


> Yeah, you can do that and hide one of the menu buttons at least. I did that too, and just use the long press on the home button for recent apps, but that menu button is still there.
> 
> Yeah, I think there must be something more to add; hopefully btdk7 chimes in with his file, or a little more insight.


Yeah, I did try a few things, but no luck. I think another line needs to be added, since you're moving something into other local variables (v7 or v8), I'm not sure however. For grins, I just added the search line after the line for the Home Button, and change the move-result-object v7 to match Home (v6), and Search then hid but Home stayed lit up, which makes me think there's something more that needs to be added. Currently I only have Back Home Search, and Menu shows up when entering an app, so you don't see it until then.

You're still having the Menu button show up always?


----------



## bouchigo (Jun 9, 2011)

RMarkwald said:


> Yeah, I did try a few things, but no luck. I think another line needs to be added, since you're moving something into other local variables (v7 or v8), I'm not sure however. For grins, I just added the search line after the line for the Home Button, and change the move-result-object v7 to match Home (v6), and Search then hid but Home stayed lit up, which makes me think there's something more that needs to be added. Currently I only have Back Home Search, and Menu shows up when entering an app, so you don't see it until then.
> 
> You're still having the Menu button show up always?


Yeah, my Menu button is always on. Like you (I believe this is what you said you did) I changed getRecentsButton () to getSearchButton to hide the search button. Now I just have to figure out how to hide the menu button.



*Side Note: *There is no need to delete the *systemui:keyRepeat="false"* line to make home or search function with long press, change to this: *systemui:keyRepeat="true"*. You probably already knew that, but I think I read somewhere earlier in the thread that said to delete that line. It just popped into my head all of a sudded......LOL


----------



## runandhide05 (Sep 20, 2011)

I have a few more ideas to play with once I get in front of my comp, if I come up with anything this will be the first thread to know

Swyped from my GNEX


----------



## RMarkwald (Oct 19, 2011)

bouchigo said:


> Yeah, my Menu button is always on. Like you (I believe this is what you said you did) I changed getRecentsButton () to getSearchButton to hide the search button. Now I just have to figure out how to hide the menu button.
> 
> *Side Note: *There is no need to delete the *systemui:keyRepeat="false"* line to make home or search function with long press, change to this: *systemui:keyRepeat="true"*. You probably already knew that, but I think I read somewhere earlier in the thread that said to delete that line. It just popped into my head all of a sudded......LOL


I did do that to test to see what it did. Check out my thread here: http://rootzwiki.com...-but-one-issue/

runandhide05 helped me out big time! I wanted the Recent Apps gone and replace it with the Search button. No matter what I did, I couldn't hide it. So I left the XML info there for Recent so it'd call it, but put in the info to call the Search icon (drawable) and keycode for Search. In the end here's the line I had:

<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_search" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:keyCode="84" systemui:glowBackground="@drawable/ic_sysbar_highlight" />

So effectively it removed the Recent icon and replaced it with Search, and when Search is pressed search comes up, and gets hidden on the lockscreen too. Attached is what I have currently.


----------



## bouchigo (Jun 9, 2011)

RMarkwald said:


> I did do that to test to see what it did. Check out my thread here: http://rootzwiki.com...-but-one-issue/
> 
> runandhide05 helped me out big time! I wanted the Recent Apps gone and replace it with the Search button. No matter what I did, I couldn't hide it. So I left the XML info there for Recent so it'd call it, but put in the info to call the Search icon (drawable) and keycode for Search. In the end here's the line I had:
> 
> ...


Yeah, that will do the trick. I did it a little bit differently, but the end result is the same. I'm thinking I may just go back to 3 buttons for now. I just prefer it with the four buttons in the order I have it as I got used to it with my Droid X.


----------



## RMarkwald (Oct 19, 2011)

bouchigo said:


> I have a few more ideas to play with once I get in front of my comp, if I come up with anything this will be the first thread to know
> 
> Swyped from my GNEX


Sweet!


----------



## runandhide05 (Sep 20, 2011)

RMarkwald said:


> I did too on my DInc, but on the Xoom I couldn't stand the Recent button, never used it! I use the Search more, so put it there instead. GNex that is. I haven't tried this out on the Xoom yet.
> 
> Sweet!


On Xoom just fyi I believe soft keys are in framework or at least the battery is 
Swyped from my GNEX


----------



## moosc (Jun 15, 2011)

is it possible to this mod on pics Xoom tablet

Sent from my Xoom using Xparent Cyan Tapatalk


----------



## runandhide05 (Sep 20, 2011)

moosc said:


> is it possible to this mod on pics Xoom tablet
> 
> Sent from my Xoom using Xparent Cyan Tapatalk


Your auto correct sucks. But if u are asking if this is possible on Xoom then the answer is yes
Swyped from my GNEX


----------



## dgwood12 (Aug 15, 2011)

RMarkwald said:


> I just tried it while @ lunch, FC's SystemUI. I think there is more that needs to be added there, but I could be wrong. I am very "green" to java too. I tried to increase my local vars to 8 since I don't have a permanent Menu key, so I'm not sure if that is it or not. I could try some different values there. Maybe btdk7 could shed some more light on this when he's got time.


 Same thing happened to me last night. I can live with the keys on the lock screen but it's just much sexier if they hide









Sent from my Galaxy Nexus


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> I tried this and still have my search and menu buttons showing on lockscreen. Pretty sure I did it right. Would still love to take a look at your file to make sure I am doing it correctly. Could you possibly send it to RunandHide so he can host it? Thank you!


Sorry, guys, I forgot to include 2 other lines in my original post. you have to add:

```
<br />
invoke-virtual {v7, v4}, Landroid/view/View;->setVisibility(I)V<br />
invoke-virtual {v8, v4}, Landroid/view/View;->setVisibility(I)V<br />
```
after:

```
<br />
:goto_5<br />
    invoke-virtual {v6, v4}, Landroid/view/View;->setVisibility(I)V<br />
```
That completes moving the 2 new vars that were added. I've been running it for a couple of days, and it works perfectly. I'll send the APK to runandhide05 so that he can post it.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Sorry, guys, I forgot to include 2 other lines in my original post. you have to add:
> 
> ```
> <br />
> ...


Thanks! I'll give this a shot tonight. Do I change .locals to 9?

Sent from my Galaxy Nexus


----------



## RMarkwald (Oct 19, 2011)

Thanks btdk7, way to come through bud! Trying this tomorrow for sure!

Sent from my Galaxy Nexus using RootzWiki


----------



## runandhide05 (Sep 20, 2011)

trying now
edit: build someone else is trying


----------



## bouchigo (Jun 9, 2011)

runandhide05 said:


> trying now
> edit: build someone else is trying


I would try it, but I'm not at home. Maybe later tonight if I get some time.

Sent from my Galaxy Nexus using RootzWiki


----------



## runandhide05 (Sep 20, 2011)

i think ive got it, booting now...again, once i confirm i have it il post the HOLE .method public to see excaclty where and how it goes in
ERRRRRRRRRR
come on man, go get a free drop box account and upload it or email it or something


----------



## hxdrummerxc (Jan 2, 2012)

RMarkwald said:


> Did you type in: apktool b SystemUI
> 
> You need to add the name of the output folder after the b, which would be SystemUI if that's what was decompiled.


Yea, I did. I tried both.

But i think I may have decompiled another file too and maybe confused it when I went to recompile. gonna re-try it again in a bit here.


----------



## runandhide05 (Sep 20, 2011)

ya these new lines do not work
here is a link to free drop box account upload to public folder then create public link and share, or pm me your email address and i will add you to my dropbox act
http://db.tt/rHkRhrtW


----------



## dgwood12 (Aug 15, 2011)

runandhide05 said:


> ya these new lines do not work
> here is a link to free drop box account upload to public folder then create public link and share, or pm me your email address and i will add you to my dropbox act
> http://db.tt/rHkRhrtW


Is systemui force closing with the lines?

Sent from my Galaxy Nexus


----------



## bouchigo (Jun 9, 2011)

runandhide05 said:


> ya these new lines do not work
> here is a link to free drop box account upload to public folder then create public link and share, or pm me your email address and i will add you to my dropbox act
> http://db.tt/rHkRhrtW


It partially worked for me. I was able to hide the search button, but not the menu button with the new lines. I'll have to check it more closely to see if I messed something up.

Maybe later tonight or just wait until tomorrow.

Sent from my Galaxy Nexus using RootzWiki


----------



## runandhide05 (Sep 20, 2011)

dgwood12 said:


> Is systemui force closing with the lines?
> 
> Sent from my Galaxy Nexus


yes for me

Swyped from my GNEX


----------



## bouchigo (Jun 9, 2011)

@runandhide05

You going to post that file that @btdk7 sent you? I am able to get the search button to hide with this method, but can't get the menu button to hide. I'd really like to take a look at that SystemUI.apk.

Thanks


----------



## btdk7 (Jun 25, 2011)

Guys, I'm not sure why these changes don't work for you. I'm using TranquilIce 5.1, so is it possible the the NavigationBarView.smali is somehow different there from whatever ROM you are using? I just posted the NavigationBarView.smali on pastebin so that you can check out the full code (http://pastebin.com/X75qcp7Z). The mods are on lines 801 - 815, 1017, 1091 - 1097, 1106 - 1108, and 1423 - 1434. Obviously, if you're on a different ROM, the lines won't match, but you could see what was done. Also, the public ID op your search button is probably different than mine, so insert yours instead of mine.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Guys, I'm not sure why these changes don't work for you. I'm using TranquilIce 5.1, so is it possible the the NavigationBarView.smali is somehow different there from whatever ROM you are using? I just posted the NavigationBarView.smali on pastebin so that you can check out the full code (http://pastebin.com/X75qcp7Z). The mods are on lines 801 - 815, 1017, 1091 - 1097, 1106 - 1108, and 1423 - 1434. Obviously, if you're on a different ROM, the lines won't match, but you could see what was done. Also, the public ID op your search button is probably different than mine, so insert yours instead of mine.


Trying this now. Will report back.

Edit: Success! Well, kind of. I can confirm this hid the search button but my right hand side menu is still showing on lock screen. Gonna see if I can tweak it. Any suggestions?


----------



## bouchigo (Jun 9, 2011)

dgwood12 said:


> Trying this now. Will report back


It is different in my case. The Menu button has it's own function, and I have to figure out how to insert the correct code to make it hide. That's why search worked, but Menu did not.


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> Trying this now. Will report back.
> 
> Edit: Success! Well, kind of. I can confirm this hid the search button but my right hand side menu is still showing on lock screen. Gonna see if I can tweak it. Any suggestions?


Since you have 2 menu buttons, and I only had 1, you have one left visible You have to add another local var and another 2 lines and more code for the v9 var in the 2 places that I mentioned before. Should be very easy to just replicate my existing additions for the search and menu keys.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Since you have 2 menu buttons, and I only had 1, you have one left visible You have to add another local var and another 2 lines and more code for the v9 var in the 2 places that I mentioned before. Should be very easy to just replicate my existing additions for the search and menu keys.


 Was actually just doing that. Was a stretch in the dark but glad to see I was going in the right direction. Flashing now.

Edit: Didnt work...is there an option to disable menu unlock? I think if that is disabled the menu button will go away on the lock screen by itself...


----------



## btdk7 (Jun 25, 2011)

Couldn't find it -- had to make it disappear with the rest of the buttons, and that was the only way to stop it from unlocking the screen. but I don't see any reason why your code additions wouldn't work, unless you did something wrong.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Couldn't find it -- had to make it disappear with the rest of the buttons, and that was the only way to stop it from unlocking the screen. but I don't see any reason why your code additions wouldn't work, unless you did something wrong.


Here is what I have...there are two menu buttons in there so in theory shouldnt both be gone?

.line 129
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;

move-result-object v6

invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getSearchButton()Landroid/view/View;

move-result-object v7

invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;

move-result-object v8

invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;

move-result-object v9

if-eqz v1, :cond_5

move v4, v5

:goto_5
invoke-virtual {v6, v4}, Landroid/view/View;->setVisibility(I)V

invoke-virtual {v7, v4}, Landroid/view/View;->setVisibility(I)V

invoke-virtual {v8, v4}, Landroid/view/View;->setVisibility(I)V

invoke-virtual {v9, v4}, Landroid/view/View;->setVisibility(I)V


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> Here is what I have...there are two menu buttons in there so in theory shouldnt both be gone?
> 
> invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
> 
> move-result-object v9


 that line you added has to call the method to get that custom button, not getMenuButton(). That's why it's not working.


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> that line you added has to call the method to get that custom button, not getMenuButton(). That's why it's not working.


 Right now I just have <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="30.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" /> twice on the navigation_bar.xml. Do you mean I have to assign a MenuRight and a MenuLeft to be able to differentiate between the two?


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> Right now I just have <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="30.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" /> twice on the navigation_bar.xml. Do you mean I have to assign a MenuRight and a MenuLeft to be able to differentiate between the two?


Yes, you can't have two views with the same ID. You'll need to make your seconds one different, and basically follow the exact same procedure as the search button, but give it

```
systemui:keyCode="82"
```


----------



## dgwood12 (Aug 15, 2011)

btdk7 said:


> Yes, you can't have two views with the same ID. You'll need to make your seconds one different, and basically follow the exact same procedure as the search button, but give it
> 
> ```
> systemui:keyCode="82"
> ```


 Both of my menu keys in the navigation_bar.xml already have keycode as 82. Do the @id's need to be different? ie: @id/menu and @id/menu2 ?


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> Both of my menu keys in the navigation_bar.xml already have keycode as 82. Do the @id's need to be different? ie: @id/menu and @id/menu2 ?


yes, and you'll need to create another id, public, and method in nvbar smali.


----------



## bouchigo (Jun 9, 2011)

Just out of curiosity, are you both on TranquilIce 5.1?

It's just not working for me. I'm starting to wonder if maybe something is off in my navigation_bar.xml???


----------



## dgwood12 (Aug 15, 2011)

I am on Axiom 2.3. Trying again btdk7, Ill let you know.


----------



## dgwood12 (Aug 15, 2011)

This right here guys is a thing of beauty....sexy as hell! Thank you SOOOOO much runandhide05 and btdk7!!!!


----------



## bouchigo (Jun 9, 2011)

dgwood12 said:


> This right here guys is a thing of beauty....sexy as hell! Thank you SOOOOO much runandhide05 and btdk7!!!!


I got mine too, finally! The whole time it was my navigation_bar.xml. I had a line reversed. Countless hours spent and such a simple little thing was the answer....LOL

Sent from my Galaxy Nexus using RootzWiki


----------



## dgwood12 (Aug 15, 2011)

bouchigo said:


> I got mine too, finally! The whole time it was my navigation_bar.xml. I had a line reversed. Countless hours spent and such a simple little thing was the answer....LOL
> 
> Sent from my Galaxy Nexus using RootzWiki


 Hahaha. I know...wish I wasnt soo OCD...oh well, at least now its done right. For anyone who wants to take a look at my systemui.apk here it is:
http://www.multiupload.com/DAQCCD9A48


----------



## dgwood12 (Aug 15, 2011)

Hmm, that systemui didnt like rotation...looks like I messed something else up in the process...haha!

Edit: This certainly is frustrating. Systemui crashes every time I rotate into landscape. Can't figure out why...anyone have any ideas? I am gonna hit the sack now but will be back in the morning. Will just have to turn off auto rotate for now I guess...


----------



## btdk7 (Jun 25, 2011)

dgwood12 said:


> Hmm, that systemui didnt like rotation...looks like I messed something else up in the process...haha!
> 
> Edit: This certainly is frustrating. Systemui crashes every time I rotate into landscape. Can't figure out why...anyone have any ideas? I am gonna hit the sack now but will be back in the morning. Will just have to turn off auto rotate for now I guess...


Actually, so did mine. I have rotation disabled, so I didn't even know that this was a problem. I'll need to check out what could be causing this tomorrow.


----------



## runandhide05 (Sep 20, 2011)

Here is the system us he sent me sorry so long fell asleep I haventlooked at it at all

http://db.tt/vaajZwhp
Swyped from my GNEX


----------



## bouchigo (Jun 9, 2011)

Is rotation causing yours to crash on home screen rotation or apps rotation? Mine is rotating fine and not crashing on both home screens and apps.


----------



## btdk7 (Jun 25, 2011)

bouchigo said:


> Is rotation causing yours to crash on home screen rotation or apps rotation? Mine is rotating fine and not crashing on both home screens and apps.


Actually, mine only crashed last night, but after the launcher (Nova v7) restarted, everything is working fine


----------



## dgwood12 (Aug 15, 2011)

bouchigo said:


> Is rotation causing yours to crash on home screen rotation or apps rotation? Mine is rotating fine and not crashing on both home screens and apps.


 Mind posting your systemui.apk? I want to compare it to see why mine force closes when rotating into landscape...thank you!

Sent from my Galaxy Nexus


----------



## bouchigo (Jun 9, 2011)

btdk7 said:


> Actually, mine only crashed last night, but after the launcher (Nova v7) restarted, everything is working fine


Cool. Thanks for the insight on hiding the buttons.

Sent from my Galaxy Nexus using RootzWiki


----------



## bouchigo (Jun 9, 2011)

dgwood12 said:


> Mind posting your systemui.apk? I want to compare it to see why mine force closes when rotating into landscape...thank you!
> 
> Sent from my Galaxy Nexus


Here you go: http://www.mediafire.com/?kbdsmtry77bifk4


----------



## dgwood12 (Aug 15, 2011)

bouchigo said:


> Here you go: http://www.mediafire.com/?kbdsmtry77bifk4


 I'll take a look at yours after work to try and figure out what I am doing wrong. Thank you!

Sent from my Galaxy Nexus


----------



## dgwood12 (Aug 15, 2011)

Ok, turns out I had some stuff wrong in my navigation bar xml in the landscape section. Got that all fixed up and rotation into landscape works like a charm now. Thank you everyone who has helped!!!


----------



## BottledHate (Jun 15, 2011)

the identifier "*0x7f0e0095" i already used in to rom i'm on (tranquilice).... I can't figure out how to use a different identifier. every one i chose is either used or invalid. I could use some help understanding whats going on here. TIA for helping a noob!!*

*edit: I have been able to decompile and recompile an unmodified systemui.apk and run it just fine. So i'm assuming my apktool is set up ok.*

larger than availible?

```
<br />
C:\apktool>apktool b systemui<br />
I: Checking whether sources has changed...<br />
I: Smaling...<br />
I: Checking whether resources has changed...<br />
I: Building resources...<br />
[u]C:\apktool\systemui\res\values\public.xml:118: error: Public entry identifier 0x<br />
7f020233 entry index is larger than available symbols (index 563, total symbols<br />
416).<br />
C:\apktool\systemui\res\values\public.xml:118: error: Public symbol drawable/ic_<br />
sysbar_search declared here is not defined.[/u]<br />
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce<br />
ption: could not exec command: [aapt, p, -F, C:\Users\Aaron\AppData\Local\Temp\A<br />
PKTOOL3561242950926785265.tmp, -I, C:\Users\Aaron\apktool\framework\1.apk, -S, C<br />
:\apktool\systemui\res, -M, C:\apktool\systemui\AndroidManifest.xml]<br />
		at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav<br />
a:193)<br />
		at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)<br />
		at brut.androlib.Androlib.buildResources(Androlib.java:248)<br />
		at brut.androlib.Androlib.build(Androlib.java:171)<br />
		at brut.androlib.Androlib.build(Androlib.java:154)<br />
		at brut.apktool.Main.cmdBuild(Main.java:182)<br />
		at brut.apktool.Main.main(Main.java:67)<br />
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U<br />
sers\Aaron\AppData\Local\Temp\APKTOOL3561242950926785265.tmp, -I, C:\Users\Aaron<br />
\apktool\framework\1.apk, -S, C:\apktool\systemui\res, -M, C:\apktool\systemui\A<br />
ndroidManifest.xml]<br />
		at brut.util.OS.exec(OS.java:83)<br />
		at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav<br />
a:191)<br />
		... 6 more<br />
```
multiple entries

```
<br />
C:\apktool>apktool b systemui<br />
I: Checking whether sources has changed...<br />
I: Smaling...<br />
I: Checking whether resources has changed...<br />
I: Building resources...<br />
[u]C:\apktool\systemui\res\values\public.xml:345: error: Multiple entry names decla<br />
red for public entry identifier 0x134 in type drawable (ic_sysbar_search vs stat<br />
_sys_data_connected_e).<br />
C:\apktool\systemui\res\values\public.xml:118: Originally defined here.<br />
C:\apktool\systemui\res\values\public.xml:345: error: Public symbol drawable/sta<br />
t_sys_data_connected_e declared here is not defined.[/u]<br />
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce<br />
ption: could not exec command: [aapt, p, -F, C:\Users\Aaron\AppData\Local\Temp\A<br />
PKTOOL6507590294491283765.tmp, -I, C:\Users\Aaron\apktool\framework\1.apk, -S, C<br />
:\apktool\systemui\res, -M, C:\apktool\systemui\AndroidManifest.xml]<br />
		at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav<br />
a:193)<br />
		at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)<br />
		at brut.androlib.Androlib.buildResources(Androlib.java:248)<br />
		at brut.androlib.Androlib.build(Androlib.java:171)<br />
		at brut.androlib.Androlib.build(Androlib.java:154)<br />
		at brut.apktool.Main.cmdBuild(Main.java:182)<br />
		at brut.apktool.Main.main(Main.java:67)<br />
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U<br />
sers\Aaron\AppData\Local\Temp\APKTOOL6507590294491283765.tmp, -I, C:\Users\Aaron<br />
\apktool\framework\1.apk, -S, C:\apktool\systemui\res, -M, C:\apktool\systemui\A<br />
ndroidManifest.xml]<br />
		at brut.util.OS.exec(OS.java:83)<br />
		at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav<br />
a:191)<br />
		... 6 more<br />
```


----------



## RMarkwald (Oct 19, 2011)

Look at the last entry in the XML file where you added it. For example, in Bugless Beast it ends with 90, so instead of using 0x....95 I used 91. You'll wanna change that in the smali file too.

Make sure you define search to, looks like you need to make sure you followed the instructions fully, and you added the Search icons to SystemUI too.

I didn't mean to come off like "hey didn't you read the instructions?!" sounding, my bad there. That wasn't my intention. With the instructions in one paragraph, it was easy to miss a few things. I did the first time around, and after re-reading it all I found my mistakes, and the above mentioned thing was it.

Hope that this helps to clarify things for you. If not, post back and ask!

Sent from my Galaxy Nexus using RootzWiki


----------



## ArrTooDeeToo (Dec 31, 2011)

I would love to see this cleaned up. I can't follow at all with it all jumbled together like it is.


----------

