yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] Nchls:
From 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

Extract it, there are 2 parts in it. One, the Enable. The other is for reverting.
[Defy Android Development] jassi32:
well link is not good ---Invalid Link

This link was not well formed.

EDIT- links from OP works

thanksss
[Defy Android Development] marhensa:
okay..

the value and location is same with Jellybean..

it's located on:

framework-res.apk\res\values

for: bools.xml

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

for: dimens.xml

<dimen name="navigation_bar_height">36.0dip</dimen>

<dimen name="navigation_bar_width">42.0dip</dimen>

i can decompile and edit,

but i failed to re-compile it again with the latest APKManager / APK Tool.

do those programs doesn't support JB yet?
[Defy Android Development] Nchls:
It'll work with JB, but I haven't try it yet. I'll make it when quarx release a build with audio.
[Defy Android Development] marhensa:
On-Screen Buttons - CM10

aah, i dont know why.. :confused:

i failed at re-compile..

but with this apktool version (on attachment),

i can decompile and re-compile.

not sure what version of it,

but it support ics and jb framework, both on decompile and recompile :good:

here we go..

Flashable update zip On-Screen Button

Quarx Nightly DEFY CM 10 Jelly Bean - 2012.07.14

and a flashable zip revert to original.

see attachment.. :)
[Defy Android Development] marhensa:
tutorial

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.

-----------------------------------------------
[Defy Android Development] Fight4Music:
Works great :)

Gesendet von meinem Defy+ mit CM9 Android 4.0.4 (:
[Defy Android Development] pabloltg:
Big thanks for your tut!

But..

Damn, I cant recompile.

Help please!:(
[Defy Android Development] marhensa:
did you use APKTool i attach earlier?

previously i'm using newest APKTool from the official web,

all 1.4.2, 1.4.3, or some idk 1.4.7 (?) i can't decompile..

but using that version on attachment, it should be no problem.

here's the ss:
[Defy Android Development] pabloltg:
Yeah, i use the attach.

Maybe i need another stuff?
[Defy Android Development] marhensa:
oh sorry, silly me..

i forgot to type correctly in tutorial..

it should be:

apktool b framework-edit-res

the red one, must be the folder you want to compile..

at first you decompile, it extracted into "framework-edit-res" folder

so when you want to repack it, it should be same folder as before then.. :angel:

sorry...
[Defy Android Development] pabloltg:
Yup, a try that way, but not lucky.

Recompile fail always.

SDK problems?
[Defy Android Development] marhensa:
have screenshot?

um.. FYI, i didn't install any SDK at all..

and it works..

um try to put APKTool folder somewhere else,

not in program files, maybe somewhere in D or E.

or maybe try to run command prompt in administrator mode,

if you have UAC enabled on control panel windows 7.
[Defy Android Development] pabloltg:
Not works..

:crying:

Check this http://img825.imageshack.us/img825/6466/errorlq.png

I cant re-build resources, that´s my problem.
[Defy Android Development] marhensa:
i don't know.. i never install specific language windows 7..

it seems on your windows explorer, it's located on "C:\Archivos de Programa\APKTool"

while in command prompt, it is "C:\Program Files\APKTool"

please try to extract APKTool somewhere else, instead of C, or Program Files.

just to make sure, because the error says: invalid resource directory name.
[Defy Android Development] pabloltg:
The directory doesnt matter, i've tried others as well..

I found this.. http://xdaforums.com/showpost.php?p=28762409&postcount=481

I'll see what I can do.

Thanks for your patience!
[Defy Android Development] marhensa:
no problem..

um, it's weird..

i didn't get that error..

okay good luck :good:

it's 5:30 am here,

i should get prepare for work.. :D
[Defy Android Development] pepcisko:
Marhensa... your guide works like a charm :) Thank you so much !!!
[Defy Android Development] marhensa:
glad it works.. :laugh:

you're welcome :highfive:

hope it gets on page one,

so everyone else could get onscreen button when they need it.. :)
[Defy Android Development] Nchls:
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.
[Defy Android Development] marhensa:
you're welcome, mate.. :highfive:

hope it helps.. :cowboy:
[Defy Android Development] jassi32:
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 ?
[Defy Android Development] marhensa:
i only have issues on multitasking button, which list of previous app will show about 1 sec after button pressed..

ram management problem maybe..

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] sebx_g1:
Please - mod for CM9 quarx 16/07 build DEFY is welcome :-)
[Defy Android Development] hadi447:
I have moto defy green lens .

which i should download?:confused:
[Defy Android Development] m11kkaa:
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 :)
[Defy Android Development] marhensa:
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
[Defy Android Development] bhadkenaresh841@gmail.com:
:confused:Can i use this on my s5360 ???

Sent from my GT-S5360
[Defy Android Development] marhensa:
the method is same..

just make your custom for your phone framework-res.apk

as long as it is CM9 / CM 10 / AOSP ICS / AOSP JB.

if you downloading and use framework from defy from 1st post for your phone, surely it wont work.

see my tutorial earlier i wrote..

or try the script m11kkaa create to do it the easy way.

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] m11kkaa:
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
[Defy Android Development] marhensa:
awesome, man..

plain awesome..

hope it works with live cd of ubuntu..

many thanks.. :)

your script should be promoted to XDA portal news.

promoting now..!! :D

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] hackergnome:
/sh "script" i think... havent used linux in a while...
[Defy Android Development] m11kkaa:
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):

qemu.hw.mainkeys=0

You can enable/disable the NavBar tempoary by executing the following commands in adb(this will raise a HotReboot):

setprop qemu.hw.mainkeys [B]0[/B]
killall system_server

0=enable

1=disable
[Defy Android Development] marhensa:
haha..

is it for another aosp rom in another device too?

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] m11kkaa:
Just try it. this is the sourcecode which checks if the navbar will be enabled:

// 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;
}

You can find this code in the file "frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java"

You still need to modify the framework if you want to change the height of the NavBar.
[Defy Android Development] marhensa:
default height is kinda big..

i prefer your script then.. :)

thank you.. :)

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] sebx_g1:
Yeah, quite big buttons it produce :what:

I'll try do change screen dpi a bit.

Wysyłane z mojego MB525 za pomocą Tapatalk 2
[Defy Android Development] marhensa:
OnScreen Button for Jelly Bean

Today's build (18 July 2012)

For DEFY MB525

Enable: http://db.tt/kKteps85

Revert to original: http://db.tt/CRImLPHb

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] marhensa:
here's the mod for CM10 Jelly Bean

ONLY FOR 21 July nightly, MB525.

Mods: http://db.tt/9san2o0S

Revert to original: http://db.tt/rfWAVDoM

i'm re sizing it so it would fit on defy without taking a much space..

only 5% of pixels height.. :)

don't forget to wiping cache and dalvik cache after applying zip.

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] AlexGraves:
Just found something, master ...

The size of the OSB bar during landscape mode is expanding ...

And the size of the 3 icons are slightly different in landscape mode, with the back arrow icon being the smallest among the three ...

Or maybe, the home icon and task manager(?) are enlarged ...
[Defy Android Development] marhensa:
yup, i noticed that..

not found the solution yet.. :)

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] AlexGraves:
okay then ... :D

i will just wait for any further information from you ... :D

is the size of those larger icons during landscape the original size of this OSB before you make it smaller?

if it is, it is still acceptable in my opinion ... :)
[Defy Android Development] marhensa:
there's two kinds of icon,

portrait and landscape.

when i tried to resize all of it,

the landscape layout gets blurry,

because it forced to fill normal size on landscape layout which i cannot change..

at least not yet found the solution.

just try to download again from the link above, I have updated it.

In that updated version, I am not resize the landscape icon, so it will not get stretched.

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] AlexGraves:
yes ... to the scene of the crime ... :D

-------------------------------------------------------

okay ... aesthetically better this way ... :)

at least all icons are in the same size in one bar ...
[Defy Android Development] marhensa:
haha scene of crime.. (TKP) :)

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] AlexGraves:
Just tested, and yes ... Your OSB mod doesn't work with 22.07 build.

So are you planning to rebuild your OSB mod daily following every Quarx release? :D

Sent from my MB525
[Defy Android Development] tausift0:
??

Does this work for Defy+ 21july build too..?
[Defy Android Development] Bendary:
How can I resize the buttons, its too small.
[Defy Android Development] marhensa:
here's the mod for QUARX CM10 Jelly Bean

ONLY FOR 22 July nightly, MB525.

Mods: http://db.tt/TYWBU7nv

Revert to original: http://db.tt/xc8Dfue7

AlexGraves,

hm.. i only make it when i download the nightlies.. :)

Defy+ build could have different framework, so.. it won't work properly.

But you guys could create for yourself if you want. ;)
[Defy Android Development] sa3e1:
Tried it on Quarx's 07.22 nightly, the on screen keys are working fine, but there are two bug I noticed:

1: can't unlock screen with slide unlock, only if I unlock directly to Google search

2: edge glow over scroll transformed into jelly beans :p
[Defy Android Development] marhensa:
man..

do not use different mods on different build.

almost every release of nightly, there's something changes on framework.

so if you apply outdated framework in newer system, there's a bug.

use the proper one,

I already created for 22 nightly.

don't forget to wiping cache and dalvik cache after applying zip.

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
[Defy Android Development] sa3e1:
EDIT: thanks marhensa for the quick update, I'll try the new one!
[Defy Android Development] AlexGraves:
Yes, it has been tested and confirmed working on 21.07 build defy+ JB.

I mean the OSB mod 21.07, someone tested it on 21.07 build Quarx Defy+ JB and worked ...

Sent from my MB525
[Defy Android Development] AlexGraves:
Thank you, master ... :D

So when is your tutorial thread for this be ready? :D

It's a bit uncomfortable to hassle you to rebuild this mod everytime Quarx release a nightly ... :p

Sent from my MB525
[Defy Android Development] m11kkaa:
He can use my script so it wouldn't be much work :P
[Defy Android Development] Bendary:
Cant we have an option or an app to to resize the buttons?? its super small and uncomfortable to use.
[Defy Android Development] marhensa:
yup.. you guys should try m11kkaa script..

it is the quickest way..

but you have to set up linux + java installed on it..

so windows guy, if you want it quick, at least install linux on your pc.. :)

if you are using m11kkaa script, it has an option to set the height of onscreen buttons.

but anyway..

as far as i know, if we just set the dimension height into something,

the icons inside SystemUI.apk\res\drawable-hdpi\ also needs to be resized

if it's not resized, the back button somehow is not shrinked down like two other buttons.

the equation of resizing is: your height on dimens.xml * 1.5

let's check the default one: go see dimens.xml

the default height is 48.0dip (i don't know what exactly is dip)

so the icon's on SystemUI.apk\res\drawable-hdpi\ height is 48 * 1.5 = 72 px

examples:

you want to resize it to 36.0dip

so icon's height is 36 * 1.5 = 54 px

you want to resize it to 28.0dip

so icon's height is 28 * 1.5 = 42 px

here the list of icon which need to be resized inside SystemUI.apk\res\drawable-hdpi\

- ic_sysbar_back.png

- ic_sysbar_back_ime.png

- ic_sysbar_home.png

- ic_sysbar_lights_out_dot_large.png

- ic_sysbar_lights_out_dot_small.png

- ic_sysbar_menu.png

- ic_sysbar_recent.png

after that, we could drag and drop resized icon to systemui.apk via winrar / 7zip at NORMAL compression.

or..

what do you think guys?

the last mods i give to you is 28.0dip

if it's too small, and not comfortable, what should i change it.

so it would be a basis for our defy.

if we agree, i'd make a template for it,

so you guys can make it for yourself..

i'll make youtube video of it.
[Defy Android Development] Bendary:
The size when in landscape is perfect, plz make portrait the same.
[Defy Android Development] marhensa:
the landscape size is the default one.. :angel:

48.0dip

if you just want to use default size, you don't have to flash anything..

you only simply need to edit build-prop in /system/build.prop

check m11kkaa post about it.

http://xdaforums.com/showpost.php?p=28916808&postcount=115
[Defy Android Development] AlexGraves:
+1

May we try first at least to see if the bigger size would be comfortable or not? :p

Thank you beforehand ...

Sent from my MB525
[Defy Android Development] Bendary:
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
[Defy Android Development] marhensa:
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.
[Defy Android Development] Bendary:
Thnx alot :)
[Defy Android Development] AlexGraves:
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
[Defy Android Development] Bendary:
worked perfectly but can I disable the capacitive buttons??

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

+1
[Defy Android Development] Nchls:
hey guys, I'm having my exams these days, so, I'm not able to make the mod now. Sorry. Hope you guys understand. :)
[Defy Android Development] Nchls:
Disable button is on op. Read it.
[Defy Android Development] marhensa:
Here the flashable zips..

DISABLING 4 Capacitive Buttons: http://db.tt/mW247D9R

ENABLING 4 Capacitive Buttons: http://db.tt/75A3UpEg

only for Motorola DEFY (DEFY+ included, i think)
[Defy Android Development] AlexGraves:
Okay ... The default size is okay.

Not taking too much space, and definitely more easier to press ... :D

I can live with this ... :D

Sent from my MB525
[Defy Android Development] marhensa:
yeah..!!

Finally i found the value in 28.0dip size.

Portrait and landscape layout now has the same height.

:laugh:

------------------------------------------------------------

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
[Defy Android Development] AlexGraves:
You are, right ... 28 is the perfect size ... :D

Sent from my MB525
[Defy Android Development] m11kkaa:
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
[Defy Android Development] marhensa:
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?
[Defy Android Development] m11kkaa:
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
[Defy Android Development] marhensa:
DONE.. AWESOME.. :D

[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?
[Defy Android Development] m11kkaa:
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