Android OS Forum banner
21 - 40 of 122 Posts
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
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?
 
Discussion starter · #22 ·
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
 
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
 
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
Image
 
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
 
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.
 
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?
 
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
 
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?
 
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
 
@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
Code:
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)
 
Discussion starter · #36 ·
@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
Code:
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)
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
 
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:
Code:
.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?
 
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...
 
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.
 
Discussion starter · #40 ·
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
 
21 - 40 of 122 Posts