Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
brunojcm
Old
(Last edited by brunojcm; 3rd September 2012 at 04:31 PM.) Reason: adding version 6.1.A.2.45
#1  
Member - OP
Thanks Meter 127
Posts: 42
Join Date: Feb 2010
Location: Rio de Janeiro

 
DONATE TO ME
Cool [MOD] Enable Xperia S on-screen buttons (Stock ICS)

Hi, all!

It's my first mod and first thread on XDA, so forgive my mistakes.
I really don't like the Xperia S capacitive buttons. After ask a question about the matter on XDA, I decided to try to do it myself. And after a few hours eating some bits, I could finish my work:

Native ICS on-screen buttons on Xperia S!!!
(See screenshots attached)

Short story:

I started reading this post, that led me to this other post that led me to try to use a tool called apktool. Sadly, apktool seems a little buggy and I decided to modify the framework-res.apk without decompile and recompile it. How? Binary diff. I can't say it was easy, but after a few hours I could modify the apk. In the Long story, on the second post, I'll tell how.

Things you need:

1. Root your device (see this post to learn how to unlock and root)
2. adb installed (or a working recovery)

Things I don't need to say (but I will):

YOU are responsible for any damage this mod could cause in your phone. I did exactly what I described below and it worked for me, but only God can make sure it will work for you. I don't think it's a big deal since you can flash you ROM again in case of any problem.

How to backup:

If you really want to backup your original framework-res.apk, run it before installing:
Code:
brunojcm@brunojcm-desktop:~/Android/LT26i$ adb pull /system/framework/framework-res.apk framework-res.apk.bkp
And save the file framework-res.apk.bkp.
It's not very important because you can get this file from the ROM package or from here (link from optik19918).


How to install:

Install this mod is as simple as replace the file /system/framework/framework-res.apk by the modified framework-res.apk. Here follow some options to accomplish that:

Option 1 (via adb):

1. Choose a folder on your computer
2. Download framework-res.apk.

For firmware 6.1.A.0.452:
mediafire
my home (slow link)

For firmware 6.1.A.1.58:
my home (slow link)

For firmware 6.1.A.2.45:
my home (slow link)

3. Run the following steps (I did on Ubuntu Linux, but they are easily translatable to Windows):
Code:
brunojcm@brunojcm-desktop:~/Android/LT26i$ adb shell
shell@android:/ $ su
shell@android:/ # mount -o remount,rw /system
shell@android:/ # mkdir /system/tmp
shell@android:/ # ^D
shell@android:/ $ ^D
brunojcm@brunojcm-desktop:~/Android/LT26i$ adb push framework-res.apk /system/tmp/framework-res.apk
4765 KB/s (15874684 bytes in 3.253s)

brunojcm@brunojcm-desktop:~/Android/LT26i$ adb shell
shell@android:/ $ su
shell@android:/ $ mv /system/tmp/framework-res.apk /system/framework/framework-res.apk
shell@android:/ # ls -l /system/framework/framework-res.apk                    
-rw-rw-rw- shell    shell    15874684 2012-06-28 03:58 framework-res.apk
shell@android:/ # rmdir /system/tmp
shell@android:/ # mount -o remount,ro /system
shell@android:/ # ^D
shell@android:/ $ ^D
brunojcm@brunojcm-desktop:~/Android/LT26i$ adb reboot
4. Wait your phone to restart
5. Thanks me by clicking 'Thanks' button below
6. Say some bad words to the physical buttons!!!

Option 2 (via recovery):

1. Download the on-screen-buttons.zip
2. Reboot on recovery
3. Apply this zip
4. Restart the phone
5. Thanks me by clicking 'Thanks' button below (and also Soheil_rf for the zip version)
6. Say some bad words to the physical buttons!!!

Option 3 (via file manager):

1. Download the same file of option 1, step 2 (above)
2. Use your favorite file manager to copy the downloaded file to /system/framework/framework-res.apk
3. Restart the phone
4. Thanks me by clicking 'Thanks' button below
5. Say some bad words to the physical buttons!!!

How to uninstall:

Just repeat Option 1 or 3 above, but using the framework-res.apk.bkp you backed up or this one (link from optik19918).

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

Some points:

1. The file is really smaller than the original, and it must be caused by the linux archive app when I copied the patched 'resources.arsc' to the original apk. It worked for me up to now, but I will try to figure out why it happened.
2. I will explain how I patched the 'resources.arsc' and changed the boolean value in the first reply of the thread. It was a pain in the ass, but worth sharing (edit: explained here: http://forum.xda-developers.com/show....php?t=1823223).
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2012-06-28-05-19-29.png
Views:	25316
Size:	170.1 KB
ID:	1161608   Click image for larger version

Name:	Screenshot_2012-06-28-05-19-37.png
Views:	22624
Size:	161.9 KB
ID:	1161609  
The Following 75 Users Say Thank You to brunojcm For This Useful Post: [ Click to Expand ]
 
brunojcm
Old
(Last edited by brunojcm; 9th August 2012 at 06:26 AM.) Reason: posting the thread explaining how I did the mod
#2  
Member - OP
Thanks Meter 127
Posts: 42
Join Date: Feb 2010
Location: Rio de Janeiro

 
DONATE TO ME
Angry Long story

Reserved to tell the long story about the patch, If I have time.

EDIT:

And finally had some time! But it was to big for a single answer, I created a new thread:

http://forum.xda-developers.com/show...php?p=29979582

Hope you like it!
The Following User Says Thank You to brunojcm For This Useful Post: [ Click to Expand ]
 
WebMuth
Old
#3  
Member
Thanks Meter 9
Posts: 30
Join Date: Jan 2012
Thanks a lot! Can u make a flashable zip since now we have recovery in kernel!

Sent from my LT26i using xda premium
 
brunojcm
Old
#4  
Member - OP
Thanks Meter 127
Posts: 42
Join Date: Feb 2010
Location: Rio de Janeiro

 
DONATE TO ME
Quote:
Originally Posted by WebMuth View Post
Thanks a lot! Can u make a flashable zip since now we have recovery in kernel!
Sent from my LT26i using xda premium
I don't know how to do it yet, but I can learn. :P

Let's test it on more devices before, and then we can do it.
The Following User Says Thank You to brunojcm For This Useful Post: [ Click to Expand ]
 
optik19918
Old
#5  
optik19918's Avatar
Senior Member
Thanks Meter 195
Posts: 274
Join Date: Jan 2012
Location: rome
Thanks!
but man pls upload it to mediafire or something like that! is to slow 50 minutes to download
 
Soheil_rf
Old
#6  
Soheil_rf's Avatar
Senior Member
Thanks Meter 655
Posts: 338
Join Date: Jul 2009
Location: Tehran
Thumbs up Great Work

I make it Flashable on-screen-buttons.zip



@ brunojcm :also I can make smaller buttons if you tell us how to patch resources
Thanks brunojcm
The Following 11 Users Say Thank You to Soheil_rf For This Useful Post: [ Click to Expand ]
 
slyevo
Old
(Last edited by slyevo; 28th June 2012 at 12:11 PM.)
#7  
Senior Member
Thanks Meter 16
Posts: 209
Join Date: Jul 2010
Wow this app is amazing, Awesome work guys....
I now only have to press once to go back or home, BUT there is one little problem. The last botton on the right is not assigned to open the settings menu like the original one. Is this fixable?
thx though grate work!!!!
Also could you make the black border slightly slimmer...
 
WebMuth
Old
(Last edited by WebMuth; 28th June 2012 at 12:26 PM.)
#8  
Member
Thanks Meter 9
Posts: 30
Join Date: Jan 2012
Quote:
Originally Posted by slyevo View Post
Wow this app is amazing, Awesome work guys....
I now only have to press once to go back or home, BUT there is one little problem. The last botton on the right is not assigned to open the settings menu like the original one. Is this fixable?
thx though grate work!!!!
Also could you make the black border slightly slimmer...
That button is for the task manager if you noticed is not needed the other button becose in apps that require that button now there is a new button with 3 dots that is the settings button

Oh and this thread is not ment for development section, but for themes and apps

Sent from my LT26i using xda premium
The Following User Says Thank You to WebMuth For This Useful Post: [ Click to Expand ]
 
slyevo
Old
#9  
Senior Member
Thanks Meter 16
Posts: 209
Join Date: Jul 2010
Quote:
Originally Posted by WebMuth View Post
That button is for the task manager if you noticed is not needed the other button becose in apps that require that button now there is a new button with 3 dots that is the settings button

Sent from my LT26i using xda premium
I have just figured that out, A bit late i know. Your mod is amazing i hit the correct button every time now!
 
zbuh
Old
(Last edited by zbuh; 28th June 2012 at 02:23 PM.)
#10  
Member
Thanks Meter 2
Posts: 45
Join Date: Mar 2008
Nice!
I've updated my xperia S to ICS. but i didnt find a topic about rooting it...
could you please point me to that topic? thanks

I'm going to unlock BL today just because this hack!


Portugal!

 
Post Reply+
Tags
buttons, enable, ics, screen, xperia
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...