Defy+ CM9 On-screen button

Does it work?

  • Yes

    Votes: 45 90.0%
  • No

    Votes: 5 10.0%

  • Total voters
    50

jassi32

Senior Member
Sep 24, 2011
371
190
0
INDIA
Yep, Its totally Awesome!
hey nice work , i want to make a request , for both defy and defy +

please make a flashable zip for nav.bar (which contains files to disable capacitive buttons )
and also a flashable zip for reverse , which will undo the things .....

thank you
 

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
hey nice work , i want to make a request , for both defy and defy +

please make a flashable zip for nav.bar (which contains files to disable capacitive buttons )
and also a flashable zip for reverse , which will undo the things .....

thank you
Epsylon3 DEFY CM9 2012-07-11
and also works on 2012-07-14,
since there's no chage on framework-res between them.

On-Screen button + Disable 4 Capacitive button: http://db.tt/eM3FGceq

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

thanks to original poster,
i'm just repacking it to flashable zip.

Sent from TapaTalk | MotoDEFY - Android Jelly Bean 4.1.1
 
Last edited:

jassi32

Senior Member
Sep 24, 2011
371
190
0
INDIA
Last edited:

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
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?
 

Nchls

Senior Member
Jan 17, 2012
215
58
0
Singapore
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?
It'll work with JB, but I haven't try it yet. I'll make it when quarx release a build with audio.
 

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
On-Screen Buttons - CM10

It'll work with JB, but I haven't try it yet. I'll make it when quarx release a build with audio.
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.. :)
 

Attachments

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
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.
-----------------------------------------------
 

Attachments

Last edited:

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
Yeah, i use the attach.

Maybe i need another stuff?
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...
 

pabloltg

Senior Member
Jan 23, 2012
267
203
0
Córdoba
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...
Yup, a try that way, but not lucky.

Recompile fail always.

SDK problems?
 

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
Yup, a try that way, but not lucky.

Recompile fail always.

SDK problems?
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.
 
  • Like
Reactions: pabloltg

pabloltg

Senior Member
Jan 23, 2012
267
203
0
Córdoba
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.
Not works..

:crying:

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


I cant re-build resources, that´s my problem.
 
Last edited:

marhensa

Senior Member
Dec 17, 2010
2,017
1,174
0
Bogor
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.
 
Last edited:
  • Like
Reactions: pabloltg

pabloltg

Senior Member
Jan 23, 2012
267
203
0
Córdoba
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.
The directory doesnt matter, i've tried others as well..
I found this.. http://forum.xda-developers.com/showpost.php?p=28762409&postcount=481


I'll see what I can do.

Thanks for your patience!
 
  • Like
Reactions: marhensa