[HOWTO] enable on-screen buttons in ICS rom

Search This thread

evilisto

Senior Member
Nov 26, 2010
486
2,318
rQhZZ.jpg



sorry for my poor english..:eek: i write this guide by request.

this is pretty simple thing..


1. decompile framework-res.apk
- you need apktool.jar 1.4.3 version to decompile ics apk.
download 1.4.3 : http://code.google.com/p/android-apktool/downloads/list
download 1.4.2 : http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.4.2.tar.bz2&can=1&q=
(if you have problems with 1.4.3, use 1.4.2 instead)

2. open /res/values/bools.xml with a text editor

3. find "config_showNavigationBar" and set to true

3UCB9.png



4. to turn off capacitive buttons backlight, maybe you need to edit arrays.xml
- it does not work on my nexus s but seem to be working well on some other devices..

NwUBu.png


-----------------------------------------------------------------------------
* 5 [WVGA devices only] it would be better to slightly resize navigation bar height to avoid keyboard overlapping problem (see this post).
(or you have to lower lcd density but that cause app compatibility issues)
: open dimens.xml and find the line "navigation_bar_height".

mTIah.png


and you need one more step to compensate buttons sizes.

download : http://www.mediafire.com/?758mnayrlt3dee4
this zip include 4 png files. add those files to SystemUI.apk (/res/drawable-hdpi/) using 7-zip or other program. (replace original PNGs to these files).
-----------------------------------------------------------------------------

6. recompile
- you need new aapt.exe from latest platform-tools.
download : http://www.mediafire.com/?0q52u6v8vdkpq1i

7. done :D


*if you don't know how to modify apk file, read this post first.
-
 

Attachments

  • howto-ics-buttons_01.jpg
    howto-ics-buttons_01.jpg
    34.7 KB · Views: 25,182
  • howto-ics-buttons_02.jpg
    howto-ics-buttons_02.jpg
    30.1 KB · Views: 24,863
  • howto-ics-buttons_03.png
    howto-ics-buttons_03.png
    16.3 KB · Views: 19,772
Last edited:

ciscogee

Senior Member
Aug 13, 2011
891
192
Wa State
How would I disable the onscrwen keys in twlauncher 4. 5? Cause we already configured the ics keys to be our softkeus?

Sent from my SCH-I400 using xda premium
 

evilisto

Senior Member
Nov 26, 2010
486
2,318

sixfearstheseven

Senior Member
Mar 24, 2011
200
44
Southgate
I'm not having any trouble with decompiling, but after making the necessary changes to bools and array, I can not get it to recompile.

What am I doing wrong here?

to decompile....

Code:
apktool d framework-res.apk

....make the changes, then...

Code:
apktool b framework-res

and i get this:

Code:
c:\apktool>apktool b framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
        at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
        at brut.androlib.Androlib.build(Androlib.java:159)
        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.directory.PathNotExist: apktool.yml
        at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
        at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
        ... 4 more

c:\apktool>

Any help would be much appreciated.

EDIT -

Just noticed that I typed....

Code:
apktool b framework-res.apk

...instead of...
Code:
apktool b framework-res

When I tried it without the .apk, I get this....
Code:
c:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\apktool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/layout-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-h720dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\apktool\framework-res\res/values-w360dp
invalid resource directory name: c:\apktool\framework-res\res/values-w480dp
invalid resource directory name: c:\apktool\framework-res\res/values-w500dp
invalid resource directory name: c:\apktool\framework-res\res/values-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\BRANDO~1.AMY\AppData\Local
\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\apktool\framework-res\res, -M,
c:\apktool\framework-res\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\BRANDO~1.AMY\AppData\Local\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\
apktool\framework-res\res, -M, c:\apktool\framework-res\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more
 
Last edited:

GazaIan

Senior Member
Dec 27, 2010
1,570
404
Your basement
twitter.com
I'm not having any trouble with decompiling, but after making the necessary changes to bools and array, I can not get it to recompile.

What am I doing wrong here?

to decompile....

Code:
apktool d framework-res.apk

....make the changes, then...

Code:
apktool b framework-res

and i get this:

Code:
c:\apktool>apktool b framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
        at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
        at brut.androlib.Androlib.build(Androlib.java:159)
        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.directory.PathNotExist: apktool.yml
        at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
        at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
        ... 4 more

c:\apktool>

Any help would be much appreciated.

EDIT -

Just noticed that I typed....

Code:
apktool b framework-res.apk

...instead of...
Code:
apktool b framework-res

When I tried it without the .apk, I get this....
Code:
c:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\apktool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/layout-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-h720dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\apktool\framework-res\res/values-w360dp
invalid resource directory name: c:\apktool\framework-res\res/values-w480dp
invalid resource directory name: c:\apktool\framework-res\res/values-w500dp
invalid resource directory name: c:\apktool\framework-res\res/values-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\BRANDO~1.AMY\AppData\Local
\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\apktool\framework-res\res, -M,
c:\apktool\framework-res\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\BRANDO~1.AMY\AppData\Local\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\
apktool\framework-res\res, -M, c:\apktool\framework-res\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more
Same here, getting the same error when recompiling it -_- 3 people have told me it's because aapt isn't the ICS version but I updated it 3 times and even asked someone to upload and I get that same error.
 

sixfearstheseven

Senior Member
Mar 24, 2011
200
44
Southgate
Same here, getting the same error when recompiling it -_- 3 people have told me it's because aapt isn't the ICS version but I updated it 3 times and even asked someone to upload and I get that same error.

Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.

I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.

Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.

Sent from my Incredible using xda premium
 

GazaIan

Senior Member
Dec 27, 2010
1,570
404
Your basement
twitter.com
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.

I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.

Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.

Sent from my Incredible using xda premium
You can always copy it over and set permissions (although it usually crashes before you can), or put it in an update.zip. The update.zip method is my favorite.
 

sixfearstheseven

Senior Member
Mar 24, 2011
200
44
Southgate
You can always copy it over and set permissions (although it usually crashes before you can), or put it in an update.zip. The update.zip method is my favorite.

How does that work? Sorry, I'm pretty new to all of this. Do I just zip up the framework apk, name it update.zip, then flash it in CWM? Or is there more to it?

If it's that easy, that would be awesome, if only I could get the apk to compile.

I'm so frustrated with this that I'm about willing to offer a donation to someone who could do it for me, although it would be much more satisfying if I could get it done on my own. Maybe I could give a donation to someone who could successfully walk me through it. The offers out there of anyone wants to take it.


Sent from my Incredible using xda premium
 

evilisto

Senior Member
Nov 26, 2010
486
2,318
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.

I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.

Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.

Sent from my Incredible using xda premium


try again with this aapt...:) : http://www.mediafire.com/?0q52u6v8vdkpq1i
 
  • Like
Reactions: MacCarron

sixfearstheseven

Senior Member
Mar 24, 2011
200
44
Southgate

Were you able to get it to work with that?

I found a work around two days ago. I took the customized XML files and put them in a Metamorph zip file. I ran it and it successfully changed framework-res.apk but the navigation buttons still wouldn't show. Now, I don't know much about this, so I'm not sure if doing it that way should have worked, but if it should have, it didn't, which would mean the instructions in the first post are incomplete.

I'm doing this on my Incredible, so maybe the ROM I'm using is missing something else. I have no idea. I've tried it on three different ICS ROMs and it didn't work on any of them.

When I get a chance, I'll try it with the new aapt.


Sent from my ADR6300 using xda premium
 

sixfearstheseven

Senior Member
Mar 24, 2011
200
44
Southgate
Thanks for that new aapt, it works. It recompiled everything, but the file size is 4mb smaller than the original framework-res.apk. I get nothing but bootloops now. I also compiled with APK Multi Tool which also worked, but with the same results - bootloops.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 113
    rQhZZ.jpg



    sorry for my poor english..:eek: i write this guide by request.

    this is pretty simple thing..


    1. decompile framework-res.apk
    - you need apktool.jar 1.4.3 version to decompile ics apk.
    download 1.4.3 : http://code.google.com/p/android-apktool/downloads/list
    download 1.4.2 : http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.4.2.tar.bz2&can=1&q=
    (if you have problems with 1.4.3, use 1.4.2 instead)

    2. open /res/values/bools.xml with a text editor

    3. find "config_showNavigationBar" and set to true

    3UCB9.png



    4. to turn off capacitive buttons backlight, maybe you need to edit arrays.xml
    - it does not work on my nexus s but seem to be working well on some other devices..

    NwUBu.png


    -----------------------------------------------------------------------------
    * 5 [WVGA devices only] it would be better to slightly resize navigation bar height to avoid keyboard overlapping problem (see this post).
    (or you have to lower lcd density but that cause app compatibility issues)
    : open dimens.xml and find the line "navigation_bar_height".

    mTIah.png


    and you need one more step to compensate buttons sizes.

    download : http://www.mediafire.com/?758mnayrlt3dee4
    this zip include 4 png files. add those files to SystemUI.apk (/res/drawable-hdpi/) using 7-zip or other program. (replace original PNGs to these files).
    -----------------------------------------------------------------------------

    6. recompile
    - you need new aapt.exe from latest platform-tools.
    download : http://www.mediafire.com/?0q52u6v8vdkpq1i

    7. done :D


    *if you don't know how to modify apk file, read this post first.
    -
    5
    Where did you get apktool 1.4.2?

    here it is : http://www.multiupload.com/YWJHOSZ7GJ

    you can find it here :)


    How would I disable the onscrwen keys in twlauncher 4. 5? Cause we already configured the ics keys to be our softkeus?

    Sent from my SCH-I400 using xda premium

    sorry but you'd better ask your rom dev to do it..
    3
    The colors are only off because I used Droid Explorer to take the screenshots. The colors are normal (blue) on my phone screen.

    ---------- Post added at 11:38 PM ---------- Previous post was at 11:06 PM ----------

    These are the steps I took to get the on screen buttons. Please note that this seems to cause SIGNIFICANT ISSUES on the ROM I used, see my earlier post and screenshots. Please pick a different ROM than the one I used and report back to let us know if you have the same issues.

    1. Pick your ROM. I used Evervolv's Preview 5. You can get it from @PreludeDrew's twitter:
    [Dinc] Preview5 - http://goo.gl/NFUXA *** Gapps - http://goo.gl/rtKI0 *** improved stability & various fixes/improvements #Evervolv #ICS

    2. Download the ROM.

    3. Download APK Multitool kit:
    http://apkmultitool.com/ > Downloads > Download Alpha2
    Unzip and place the "Apk_Multi-Tool" folder on your desktop.

    4. Open the ROM .zip file with 7-zip or WinRAR. Navigate to system/framework and copy the "frameworks-res.apk" file to the "Apk_Multi-Tool/place-apk-here-for-modding" folder.

    5. Launch APK Multi toolkit by double clicking on "script.bat" in the APK MultiTool
    folder. Do NOT run as administrator. It will launch and say "Press any key to continue...". Do so.

    6. You'll be at the main menu. Type in "9" and hit Enter to decompile the .apk you placed in the "place-apk-here-for-modding" folder. You'll see it decompile.

    7. Your decompiled apk contents will be in the "\Apk_Multi-Tool\projects\framework-res.apk" folder. Keep APK Multi Tool open.

    8. Edit and save your changes to the xml files in the "Apk_Multi-Tool\projects\framework-res.apk\res\values" folder as instructed in the OP. You can edit by just right-clicking on the xml file and selecting "Edit". It will open up in Notepad.

    9. Go back to the APK Multi Tool. It should still be on the main page. Type in "11" and hit Enter to compile your edited "framework-res.apk" project. You will be asked if this is a system apk, type in "y" and hit enter. You will be asked a second question. Type in "y" and hit enter. You will see a lot of text scroll through. It will stop and you will be prompted to "press any key to continue..." DO NOT DO ANYTHING YET. Go to the "Apk_Multi-Tool\keep" folder and delete "resources.arsc". Now go back to the APK MultiTool and hit any key. It will finish compiling. You should now have an "unsignedframework-res.apk" file in the Apk_Multi-Tool\place-apk-here-for-modding\" folder. Move this file out and rename it "framework-res.apk".

    10. You can now push this to your phone using ADB. What I did was use WinRAR (or you can use 7-zip) to open up the ROM .zip file, delete the original frameworks file, and replace it with this new one. Flash the ROM as usual.

    ---------- Post added at 11:59 PM ---------- Previous post was at 11:38 PM ----------

    I repeated the decompilation and recompilation again.

    This time, I did not flash a modified ROM. Instead, I took my current regular Preview 5 installation (working perfectly, mind you) and replaced the framework file via ADB in Recovery. Same issue. So it's definitely the changes to the framework file that causes this. Odd.
    3
    Could you try reuploading the file if you still have it? I was so excited to come home and try it, but I'm finding that every time I try to download it, the file is only 55KB. Also do you mind explaining what methods you are doing for recompiling. I like receiving help, but I still would like to learn how to do it myself correctly in the future. Thanks in advance.

    I cant re-upload it, it was on my computer at work, however, as my laptop is on, I've done the mod again... :) This time it is in the .rar so your download might be better... It is attached...

    I have done it exactly as the OP states, in fact, I found it before reading this thread :)

    I use the apktool 1.4.2 modified for ICS (plurals error) (modified by somelese, I found it on XDA) that I have attached..

    My post above states all about apktool and where to find it..
    mattmanwrx said:
    check out the apktool google projects page where it states about the framework files installation - Failing that, post in the apktool thread

    I also wrote a small guide in Private Messaging to someon on here about how to do a soft key mod...

    mattmanwrx said:
    Hi,

    Please read about apktool here - http://code.google.com/p/android-apktool/ - It should help you with decompiling and compiling, however, I'll still tryo to give instructions below...

    firstly, I change directory to where apktool is - so I open command prompt (on windows 7 btw) and

    cd desktop/apktool/apktool2

    Which takes me to the folder called apktool2 (I have the newest apktool, but apktool2 is an edit of apktool 1.4.2 to work with ICS roms).
    if your framework is already installed, then please skip this bit, however, if you need to install framework, please do so. To install the framework, extract the framework from the rom (usually only needed when there are changes to android, i.e. 4.0.3 I used for all builds, then changed to 4.0.4 when that came out).. to install the framework, type
    Code:
    apktool if framework-res.apk

    You can have many different frameworks installed, I have for my Asus Transformer TF101, Evervolv's frameworks for Sandvolds rom, plus others where people have requested me to try the mods for them...

    to decompile -
    Code:
    apktool d SystemUI.apk
    to compile -
    Code:
    apktool b SystemUI

    Once decompiled, go to the bools.xml and change the false value to true for the navigation bar... (If you wanted to do other mods, please see below)

    Close the bools.xml and open up dimens.xml - I then change the navigation bar to half, so the 48 is 24 and the 42 is 21 (I think, these are off the top of my head)..

    You may not have to do the dimentions, but I did for the rom I was usin for my desire...

    hope this helps you... ;)
    2
    That is what I needed to know. I've been searching Google and XDA for the steps to do this, but it's been kind of murky. I'll try it after I get off of work; I'm trying to get the on-screen buttons for OMX at the moment.

    I was going to change the build.prop, but if it's causing these issues, I'll change the nav_bar_height instead.

    Also, is it necessary to turn off the capacitive buttons backlight? Does this affect anything?

    Thanks again for your help!

    No, you don't have to turn the backlights off if you don't want to.

    For those of you that want the CM9 Launcher, the link is below. I'm only going to leave it up until nebkat's server is back online with the updated launcher. This one will allow you to remove the search bar and use the extra space. Replace old launcher2 in system/app/ with Root Browser and remember to set the permissions before rebooting. I highly suggest using Root Browser. ES File Explorer has issues with not wanting to delete files from system/apparently/ even with root access enabled and system mounted as R/W

    INSTALL ADW OR LAUNCHER PRO BEFORE DELETING. Just in case something happens, you have a home screen to go back to

    https://www.box.net/shared/9nx7yjo77injb45dxy5y



    Sent from my GT-P7510 using xda premium