Defy+ CM9 On-screen button

Does it work?

  • Yes

    Votes: 45 90.0%
  • No

    Votes: 5 10.0%

  • Total voters
    50
Search This thread

Bendary

Senior Member
Jan 11, 2010
226
19

marhensa

Senior Member
Dec 17, 2010
2,019
1,175
Bogor
i want the default but what exactly should I modify in build.prop?? the link u gave me is about enabling navigation bar or something

navigation bar = is the real name of "onscreen button" :)

just go back to default (flash REVERT zip)

then add this line in build.prop
qemu.hw.mainkeys=0

in the next nightly, just add that line to activate onscreen button.
no need flashing any zip.

i create zip only for custom size of navigation bar button.
 
  • Like
Reactions: AlexGraves

Bendary

Senior Member
Jan 11, 2010
226
19
navigation bar = is the real name of "onscreen button" :)

just go back to default (flash REVERT zip)

then add this line in build.prop
qemu.hw.mainkeys=0

in the next nightly, just add that line to activate onscreen button.
no need flashing any zip.

i create zip only for custom size of navigation bar button.

Thnx alot :)
 

AlexGraves

Senior Member
Feb 20, 2012
206
79
-6.152345, 106.835542
navigation bar = is the real name of "onscreen button" :)

just go back to default (flash REVERT zip)

then add this line in build.prop
qemu.hw.mainkeys=0

in the next nightly, just add that line to activate onscreen button.
no need flashing any zip.

i create zip only for custom size of navigation bar button.

Seriously? That's it?
Just by adding one single command in the build.prop? :eek:

I'll give it a try right away, master ... :D

Wait a minute, how about the disabling of the 4 capacitive buttons?

Sent from my MB525
 

Bendary

Senior Member
Jan 11, 2010
226
19
navigation bar = is the real name of "onscreen button" :)

just go back to default (flash REVERT zip)

then add this line in build.prop
qemu.hw.mainkeys=0

in the next nightly, just add that line to activate onscreen button.
no need flashing any zip.

i create zip only for custom size of navigation bar button.
worked perfectly but can I disable the capacitive buttons??

---------- Post added at 04:12 PM ---------- Previous post was at 04:11 PM ----------

Seriously? That's it?
Just by adding one single command in the build.prop? :eek:

I'll give it a try right away, master ... :D

Wait a minute, how about the disabling of the 4 capacitive buttons?

Sent from my MB525

+1
 

Nchls

Senior Member
Jan 17, 2012
221
62
Singapore
ASUS ROG Phone 5
Seriously? That's it?
Just by adding one single command in the build.prop? :eek:

I'll give it a try right away, master ... :D

Wait a minute, how about the disabling of the 4 capacitive buttons?

Sent from my MB525

worked perfectly but can I disable the capacitive buttons??

---------- Post added at 04:12 PM ---------- Previous post was at 04:11 PM ----------



+1

Disable button is on op. Read it.
 
  • Like
Reactions: AlexGraves

marhensa

Senior Member
Dec 17, 2010
2,019
1,175
Bogor

marhensa

Senior Member
Dec 17, 2010
2,019
1,175
Bogor
yeah..!!

Finally i found the value in 28.0dip size.
Portrait and landscape layout now has the same height.
:laugh:

6ywI500e45fbe7a90.jpg


x7Wk500e604a199f7.jpg


------------------------------------------------------------
BOOLS.XML on /system/framework/framework-res.apk/res/values/

<bool name="config_showNavigationBar">true</bool>

-------------------------------------------------------------
DIMENS.XML on /system/framework/framework-res.apk/res/values/

<dimen name="navigation_bar_height">28.0dip</dimen>
<dimen name="navigation_bar_height_landscape">28.0dip</dimen>
<dimen name="navigation_bar_width">28.0dip</dimen>


------------------------------------------------------------
ICONS RESIZING on /system/app/SystemUi.apk/res/drawable-hdpi

-Portrait Icons-
ic_sysbar_*****.png | height: 42
ic_sysbar_highlight.png | height: 57

-Landscape Icons-
ic_sysbar_*****_land.png | width: 42
ic_sysbar_highlight_land.png | width: 57

ps: icons for 28.0dip is on attachment if you like doing for yourself.

------------------------------------------------------------
DOWNLOAD MODS | Quarx | CM10 Jelly Bean | MB525 Build | ONLY FOR Nightly 2012 July 23.

OnScreen-Button: http://db.tt/HQ9aMhaO <-- edit new fixed.
Revert to Original: http://db.tt/0e3Eau6e
 

Attachments

  • Icons_28dip_SystemUi_res_drawableHDPI.rar
    42.6 KB · Views: 12
Last edited:

AlexGraves

Senior Member
Feb 20, 2012
206
79
-6.152345, 106.835542
Finally i found the value in 28.0dip size.
Portrait and landscape layout now has the same height.
:laugh:

6ywI500e45fbe7a90.jpg


agMg500e45fc38daf.jpg


------------------------------------------------------------
BOOLS.XML on /system/framework/framework-res.apk/res/values/

<bool name="config_showNavigationBar">true</bool>

-------------------------------------------------------------
DIMENS.XML on /system/framework/framework-res.apk/res/values/

<dimen name="navigation_bar_height">28.0dip</dimen>
<dimen name="navigation_bar_height_landscape">28.0dip</dimen>
<dimen name="navigation_bar_width">24.5dip</dimen>


------------------------------------------------------------
ICONS RESIZING on /system/app/SystemUi.apk/res/drawable-hdpi

-Portrait Icons-
ic_sysbar_*****.png | height: 42
ic_sysbar_highlight.png | height: 57

-Landscape Icons-
ic_sysbar_*****_land.png | width: 42
ic_sysbar_highlight_land.png | width: 57

------------------------------------------------------------
DOWNLOAD MODS | Quarx | CM10 Jelly Bean | MB525 Build | ONLY FOR Nightly 2012 July 23.

OnScreen-Button: http://db.tt/5r1YbKoQ
Revert to Original: http://db.tt/0e3Eau6e

You are, right ... 28 is the perfect size ... :D

Sent from my MB525
 

m11kkaa

Recognized Dev / Inactive Recognized Contributor
Jan 20, 2011
1,259
2,147
I rewrote my Tool to python-language so it now should work in windows and mac.
And I added options to change height in landscape and width.
https://github.com/M1cha/android_navbarenabler

usage: patch-framework.py [-h] [-d] [-w WIDTH] [-s HEIGHT] [-sl HEIGHT_LANDSCAPE] framework frameworkNew

enable/disable NavigationBar and change their size.

positional arguments:
framework
frameworkNew

optional arguments:
-h, --help show this help message and exit
-d Disable NavigationBar instead of enabling
-w WIDTH Set NavigationBar-width to WIDTH
-s HEIGHT Set NavigationBar-height to HEIGHT
-sl HEIGHT_LANDSCAPE Set NavigationBar-height to HEIGHT_LANDSCAPE
 
Last edited:

marhensa

Senior Member
Dec 17, 2010
2,019
1,175
Bogor
I rewrote my Tool to python-language so it now should work in windows and mac.
And I added options to change height in landscape and width.
https://github.com/M1cha/android_navbar_enabler

pure awesome from you, m11kk44.. :D
:good: goodjob..

maybe you should create new thread for it,
maybe in this devs section or theme and apps.
since it could be used for many devices.. :good:

your script needs to be in the news..
it would helps saving much time.

also systemui.apk needs to be edited right?
or not, on your method?
 

m11kkaa

Recognized Dev / Inactive Recognized Contributor
Jan 20, 2011
1,259
2,147
If you want to modify the icons, you need to edit systemui.apk, too.
But I can automate this process. BUT: How can I successfully de/re-compile SystemUI? With the apktool used for framework-res.apk I get an error while decompiling resources.

PS: If it could be helpful for multiple devices this should be in general-forums not in defy-forums. I'll make a thread soon.
Edit: Here's the new thread: http://xdaforums.com/showthread.php?p=29246427#post29246427
 
Last edited:
  • Like
Reactions: marhensa

marhensa

Senior Member
Dec 17, 2010
2,019
1,175
Bogor
ghF3500e999c6d3e5.jpg

DONE.. AWESOME.. :D
Code:
[FONT="Courier New"]patch-framework.py -w ??.?dip -s ??.?dip -sl ??.?dip framework-res.apk framework-res_edit.apk[/FONT]

if you facing error decompile and recompile SystemUI.apk
use this aapt.exe and apktool.jar (attachment)
i can decompile and recompile apk sucessfuly.. :)

BUT, as long as it's not code editing,
icon replacing is simply just put replace the icon into zip
we don't have to decompile and recompile.. :)

and um... small problem here,
inside new patched framework apk, you forgot to rename the files and folder?
it's:
framework-extractedassets
framework-extractedmeta-inf
framework-extractedres
resources.arsc
framework-extractedandroidmanifest.xml

it should be: assets, meta-inf, res, resources.arsc, androidmanifest.xml right?
 

Attachments

  • aapt_apktool.zip
    2.7 MB · Views: 7
Last edited:
  • Like
Reactions: AlexGraves

m11kkaa

Recognized Dev / Inactive Recognized Contributor
Jan 20, 2011
1,259
2,147
and um... small problem here,
inside new patched framework apk, you forgot to rename the files and folder?
it's:
framework-extractedassets
framework-extractedmeta-inf
framework-extractedres
resources.arsc
framework-extractedandroidmanifest.xml

it should be: assets, meta-inf, res, resources.arsc, androidmanifest.xml right?

Yes, but for me it works.
And: if the names would be wrong like you said you couldn't boot your system after patching. Did it boot? If not maybe there is an problem with windows-pathnames
 
  • Like
Reactions: marhensa

marhensa

Senior Member
Dec 17, 2010
2,019
1,175
Bogor
Yes, but for me it works.
And: if the names would be wrong like you said you couldn't boot your system after patching. Did it boot? If not maybe there is an problem with windows-pathnames

here on windows, using phyton 2.7 (phyton 2.7 which packed from ArcGIS, a mapping software)
GzAI500ea10d78f8c.png


i didn't try to push it yet,
i lost my cable, maybe my friend borrow it.
i'll inform you later.
thank you very much.
 

m11kkaa

Recognized Dev / Inactive Recognized Contributor
Jan 20, 2011
1,259
2,147
Okay that shouldn't boot.
I'll try my script on windows to fix this.
 
  • Like
Reactions: marhensa

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Hey guys, I finally managed to get it to work! I've done the editting of the framework-res.apk and finally got the on-screen button to work! :D


    After you downloaded the file, unzip it and use adb and push it into your system/framework.res

    Or:
    Unzip it and put it into the flashable zip, system/framework. Then flash it via CMW.


    NOTE: To disable the capacitive buttons, download the four file from the link and copy paste it into your system/usr/keylayout.
    *remember to back up the 4 original files before replacing it!
    Credit to " adamo3957 " for telling me this!
    http://www.mediafire.com/?jzcpylhc0996xa4
    http://www.mediafire.com/?iuuinn9t0m1vrww
    http://www.mediafire.com/?2uw2z7oubw9it2l
    http://www.mediafire.com/?7aivvw3acd25rl7

    Sorry I had to upload to mediafire, because my PC is not working..

    Alternate Link: http://db.tt/h8Bd1nIZ

    -----------------------------------------------
    Make sure you have JRE installed on your system
    Download and install JRE first
    * Download JRE 64 bit for 64 bit system *

    - Get your original framework-res.apk file from /system/framework/framework-res.apk
    - Use adb pull, or just simply take it from inside ROM's zip

    - Download the attachment, or this link (APKTool) (use this APKTool, some APKTools version cannot re-compile)
    - Extract APKTool.zip
    - In Windows Explorer, press hold Shift and right click APKTool folder
    - Choose "Open command window here"
    - In command prompt window, type:
    apktool d framework-res.apk framework-res-edit
    - APK is now decompiled, so now you can edit something, like changing the images or editing XMLs.
    - Decompiled APK is on folder "framework-res-edit"
    - Go to folder \framework-res-edit\res\values
    - There's two file should be edited, bools.xml and dimens.xml

    - For bools.xml, find this line, and change it to true, then save.
    <bool name="config_showNavigationBar">true</bool>

    - For dimens.xml, find this line, and change it to 36 (36 of height, so won't take much space), save.
    <dimen name="navigation_bar_height">36.0dip</dimen>

    - Back to the command prompt and then type:
    apktool b framework-res-edit
    - Just wait, it would take a minutes.. and now APK is re-compiled

    if anything goes right, it should be like this screenshot:


    ps:
    on decompile and re-compile command i'm using "framework-edit-res" as an example of folder name,
    you could use another folder name, it's your choice.

    IMPORTANT..!!
    In this case (editing a framework),
    just DO NOT USE a recompiled APK on \framework-res-edit\dist
    Use manual method, instead.
    Because "resources.arsc" file inside the framework APK should not be compressed at all,
    otherwise, you'll get bootloop.
    resources.arsc should ONLY be "stored" on archive file, not "compressed".
    So, here we go..

    - Rename the ORIGINAL framework-res.apk to framework-res.zip
    - OPEN it with 7zip or WinRAR, just let the window stay opened
    - Go to folder \framework-res-edit\build\apk then delete AndroidManifest.xml file
    - Drag "res" folder into 7zip / WinRAR window, so the res folder is now updated
    - Drag resources.arsc file into 7zip / WinRAR window, BUT set the compression as "STORE" only
    - Now all the files on original framework-res should be updated with the edited one
    - Rename framework-res.zip to framework-res.apk.

    - You are good to go, use that new framework in your system.
    - Use adb push or create update zip to put it on your rom, your choice.. :)
    - Make sure wipe cache + wipe dalvik cache after that.
    -----------------------------------------------


    *Awesome tutorial from marhensa


    Updates:
    Added: Flashable Zip for those who don't know how to use ADB
    Added: (090712 Quarx Defy+/ GB kernel build) On Screen Button
    Added: (100712 Quarx Defy+/ GB kernel build) On Screen Button
    Added: (110712 Epsylon Defy/ Froyo kernel build) On Screen Button

    ;)

    DEFY+

    Some Requests:
    -Enable + Revert ( Epsylon 11072012 Defy Build):
    https://www.dropbox.com/s/ix0f5nhk71y7s5b/(Multi) Epsylon 11072012 Defy Build.rar

    -Enable + Revert ( Quarx 10072012 Defy+ Build):
    https://www.dropbox.com/s/no864wps6s5zpyn/(Multi) Quarx 10072012 Defy+ Build.rar

    *Download according to your model! Don't download the wrong ones, as I have added a Epsylon DEFY Build (11072012)!
    5
    Why would you waste screen estate when you have physical buttons?

    Sent from my MB525 using xda premium
    3
    Currently, there is no option to resize it but I asked him inside a commit-comment
    3
    yeah..!!

    Finally i found the value in 28.0dip size.
    Portrait and landscape layout now has the same height.
    :laugh:

    6ywI500e45fbe7a90.jpg


    x7Wk500e604a199f7.jpg


    ------------------------------------------------------------
    BOOLS.XML on /system/framework/framework-res.apk/res/values/

    <bool name="config_showNavigationBar">true</bool>

    -------------------------------------------------------------
    DIMENS.XML on /system/framework/framework-res.apk/res/values/

    <dimen name="navigation_bar_height">28.0dip</dimen>
    <dimen name="navigation_bar_height_landscape">28.0dip</dimen>
    <dimen name="navigation_bar_width">28.0dip</dimen>


    ------------------------------------------------------------
    ICONS RESIZING on /system/app/SystemUi.apk/res/drawable-hdpi

    -Portrait Icons-
    ic_sysbar_*****.png | height: 42
    ic_sysbar_highlight.png | height: 57

    -Landscape Icons-
    ic_sysbar_*****_land.png | width: 42
    ic_sysbar_highlight_land.png | width: 57

    ps: icons for 28.0dip is on attachment if you like doing for yourself.

    ------------------------------------------------------------
    DOWNLOAD MODS | Quarx | CM10 Jelly Bean | MB525 Build | ONLY FOR Nightly 2012 July 23.

    OnScreen-Button: http://db.tt/HQ9aMhaO <-- edit new fixed.
    Revert to Original: http://db.tt/0e3Eau6e
    3
    Hey guys. We don't longer need to modify the framework to enable the Navigationbar - there is another way :)

    Just add the following line to the file /system/build.prop(or change it's value if its already exists):
    Code:
    qemu.hw.mainkeys=0

    You can enable/disable the NavBar tempoary by executing the following commands in adb(this will raise a HotReboot):
    Code:
    setprop qemu.hw.mainkeys [B]0[/B]
    killall system_server

    0=enable
    1=disable