glad it works.. :laugh:Marhensa... your guide works like a charmThank you so much !!!
you're welcome :highfive:
hope it gets on page one,
so everyone else could get onscreen button when they need it..
glad it works.. :laugh:Marhensa... your guide works like a charmThank you so much !!!
Good job dude! Really good tutorial you've got here! : ) Thanks, and added to op. Its useful to me too, as I'm having my major exam this year.Nchls,
i made a step-by-step tutorial to create this mod..
So everyone in here could make it for themself,
and make your job easier, to not to create every builds requested
If you want, you could quote this to the 1st post.
-----------------------------------------------
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.
-----------------------------------------------
you're welcome, mate.. :highfive:Good job dude! Really good tutorial you've got here! : ) Thanks, and added to op. Its useful to me too, as I'm having my major exam this year.

i only have issues on multitasking button, which list of previous app will show about 1 sec after button pressed..thanks it works ,
i got a problem , when i set nav bar to 4 , the extreme right works sometimes , like i had to tap 2-3 times , unto the symbol only , else it doesn't work ,
is it normal ?
I have moto defy green lens .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!
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
*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)!
okay, thank you so much..I have created an shell-script which automates the process of patching framework-res.apk. Please don't ask for an windows-version.
Source/Download: https://github.com/M1cha/android_onscreenbutton_enabler
Usage: ./patch-framework.sh framework-res.apk [navigation_bar_height]
I've tested this successfully with latest CM10-build(normal defy).
BTW: In CM10 longpressing the HomeButton at the NavBar has a new function![]()
the method is same..Can i use this on my s5360 ???
Sent from my GT-S5360
Just download the package and extract it: https://github.com/M1cha/android_onscreenbutton_enabler/zipball/masterokay, thank you so much..
i will install ubuntu on virtual system for it.
but, how to load / run the script? sorry dumb question.
i'm no linux guy..
Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
awesome, man..Just download the package and extract it: https://github.com/M1cha/android_onscreenbutton_enabler/zipball/master
Then open an terminal(CTRL+ALT+T).
then navigate to the extraction-directory inside the terminal(command "cd", read a shell tutorial).
The last step is easy:
./patch-framework.sh framework-res.apk [navigation_bar_height]
for example:
./patch-framework.sh framework-res.apk 36.0dip
/sh "script" i think... havent used linux in a while...okay, thank you so much..
i will install ubuntu on virtual system for it.
but, how to load / run the script? sorry dumb question.
i'm no linux guy..
Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
qemu.hw.mainkeys=0
setprop qemu.hw.mainkeys [B]0[/B]
killall system_server
haha..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):
You can enable/disable the NavBar tempoary by executing the following commands in adb(this will raise a HotReboot):Code:qemu.hw.mainkeys=0
0=enableCode:setprop qemu.hw.mainkeys [B]0[/B] killall system_server
1=disable
// SystemUI (status bar) layout policy
int shortSizeDp = shortSize
* DisplayMetrics.DENSITY_DEFAULT
/ DisplayMetrics.DENSITY_DEVICE;
if (shortSizeDp < 600) {
// 0-599dp: "phone" UI with a separate status & navigation bar
mHasSystemNavBar = false;
mNavigationBarCanMove = true;
} else if (shortSizeDp < 720) {
// 600-719dp: "phone" UI with modifications for larger screens
mHasSystemNavBar = false;
mNavigationBarCanMove = false;
} else {
// 720dp: "tablet" UI with a single combined status & navigation bar
mHasSystemNavBar = true;
mNavigationBarCanMove = false;
}
if (!mHasSystemNavBar) {
mHasNavigationBar = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_showNavigationBar);
// Allow a system property to override this. Used by the emulator.
// See also hasNavigationBar().
String navBarOverride = SystemProperties.get("qemu.hw.mainkeys");
if (! "".equals(navBarOverride)) {
if (navBarOverride.equals("1")) mHasNavigationBar = false;
else if (navBarOverride.equals("0")) mHasNavigationBar = true;
}
} else {
mHasNavigationBar = false;
}