[How-To] FIX various compile errors with common Sense 4.0 files -Update apktool 1.4.9 - HTC One S

This guide assumes you already know how to use apktool and / or apkmanager. If you don`t, there are plenty of guides already on XDA.
Latest Sense 4.0 and apktool are not great friends. The 3 most important files framework-res.apk, com.htc.resources.apk and systemui.apk all create fatal errors, when using latest apktool 1.43 version. Apktool`s error log is always a big help to solve compile issues, but you need a bit of compile and coding experience to finally solve these. After I stumbled about many people having Sense 4.0 compile issues, I decided to post this guide. Hopefully this will encourage more guys to add mods to One S, after they might have hit a wall before.
Credits:
brut for his awesome apktool
daneshm for original apkmanager
Known issues: ATM com.htc.resources fix does not work with One X
1. Framework-res.apk
a) Since ICS apktool creates multiple plurals errors, but you can easily fix these by using a custom version of apktool. Now updated incl. latest smali baksmali properties for ICS (thx fernando)
Custom ICS apktool version - http://minus.com/mIA3OFkYq/19
b) if you get tag errors like these
anims.xml:3: error: Found tag anim where item is expected
layouts.xml:3: error: Found tag layout where item is expected
raws.xml:3: error: Found tag raw where item is expected
Replace all tags in layouts.xml in values folder with:
<item type="layout" at the front and </item> at the end
Replace all tags in anims.xml in values folder with:
<item type="anim" at the front and </item> at the end
Replace all tags in raw.xml in values folder with:
<item type="raw" at the front and </item> at the end
2. Systemui.apk
When trying to decompile systemui, you will get bad magic value errors. Solution is to decompile without classes, as long as you don`t need to edit smali code. Even if you need to do that, you can still decompile classes.dex separately with smali baksmali.
a) Use -s switch when decompiling to copy classes.dex instead of decompiling it
java -jar apktool.jar d -s systemui.apk systemui-decoded
b) If you are using apkmanager, you can just export classes.dex, then delete classes inside the apk. Then decompile, edit, compile and add classes.dex back when ready.
EDIT: with updated apktool version systemui now compiles fine incl. classes.dex
3. com.htc.resources.apk
Here you get nice layouts tag errors and public entry issues. Again there`s an easy fix for that.
a) Replace all tags in layouts.xml in values folder with:
<item type="layout" at the front and </item> at the end
PHP:
<resources>
<item type="layout" name="htc_list_item_imageicon_text">@layout/zzzz_htc_list_item_imageicon_text</item>
<item type="layout" name="pin_keyboard">@layout/zzzz_pin_keyboard</item>
<item type="layout" name="zero_dummy_layout">@layout/alert_dialog</item>
<item type="layout" name="htc_list_item_2text_2stamp">@layout/zzzz_htc_list_item_2text_2stamp</item>
<item type="layout" name="htc_list_item_2text_bright">@layout/zzzz_htc_list_item_2text_bright</item>
<item type="layout" name="htc_list_item_image_2text_image_bright">@layout/zzzz_htc_list_item_image_2text_image_bright</item>
<item type="layout" name="htc_list_item_imageicon_2text_2stamp">@layout/zzzz_htc_list_item_imageicon_2text_2stamp</item>
<item type="layout" name="htc_list_item_separator">@layout/zzzz_htc_list_item_separator</item>
<item type="layout" name="htc_list_item_dlna_1">false</item>
</resources>
b) Delete entry "zero_dummy_dimen" in public.xml - it will be created correctly again during compile
In case you still have issues, here is my apkmanager build environment, that works fine with all these fixes.
http://minus.com/mIA3OFkYq/20
Hex editing solution for latest com.htc - thx to tbonanno231 - http://forum.xda-developers.com/showpost.php?p=32222697&postcount=112
Latest apktool version 1.4.9 from ibotpeaches
Big thx to ibotpeaches for the tremendous follow up on apktool
Fixes plural errors
Fixes item tag errors
Fixes bad magic value errors
Adds ICS smali properties (compared to latest official version from brutall)
Fixes unknown folder issues (only with patched aapt.exe)
Download apktool 1.4.9:
http://sdrv.ms/T0LpzK
Download patched aapt.exe
http://sdrv.ms/Mfrkaa
c) Workaround for One X ROM´s
Since many of you guys might only be in need to decompile all the .9`s in com.htc.resources, there is a workaround that allows you to compile these.
Decompile with:
1. java -jar apktool.jar d --keep-broken-res com.htc.resources.apk com.htc.resources-decoded
This ignores all errors and decompiles the apk incl. all patched pngs.
2. Make your changes and copy the changed png`s in any given decompiled apk (I use calendarprovider.apk for this task, very slim apk, compiles fast...) and compile them

Updated with new custom apktool version, that includes latest smali baksmali properties to properly decompile ICS Java code.

Updated with new section b), that explains how to fix tag errors with latest 1.78 framework-res.apk

After trying this method.....it compiles framework-res 100% with absolutely NO issues. Thanks a million!!! I'm pretty sure everything else works....
Now I guess I'll try and work and see if I can find out how integrated in the framework WiFi calling is in the T-Mobile One S build in hopes we can get it working on any One S ROM, US or EU based....
Any ideas would help! lol

You can PM chrisch1974 from Virtuous team, he is already working on this. Maybe your combined efforts help.

Updated apkmanager with latest apktool version that includes ICS smali properties

he_stheone64 said:
Updated apkmanager with latest apktool version that includes ICS smali properties
Click to expand...
Click to collapse
Would be amazing integrate this tutorial with mine on vts!
Inviato dal mio HTC Sensation XE con Tapatalk 2

no problem old DHD buddy, just go ahead.

Really appreciate this man! Exactly what I've been waiting for. The apktool.jar seems to be working fine, but the apk manager build environment won't compile .apks correctly for me. Is it supposed to be working straight out of the box?
Edit: Has anyone successfully edited colors.xml in Camera.apk without breaking the video recording function? Seems to be impossible for me.
Edit 2: Has anyone successfully edited colors.xml in Contacts.apk without breaking it?

I tried HTCContacts and resources like colors and styles are fine, it did not break anything on the phone.

First of all great work.
But i have a little problem.
When i decompile the systemUi its works well but when a compilate it, after i made a few changes, it simple dont change anyting. The final system is the same that de original...
Can you help me?
Thanks

he_stheone64 said:
no problem old DHD buddy, just go ahead.
Click to expand...
Click to collapse
Yeah now I'm on Sensation, ASAP I'll send you a pm
Inviato dal mio HTC Sensation XE con Tapatalk 2

MatZ69 said:
First of all great work.
But i have a little problem.
When i decompile the systemUi its works well but when a compilate it, after i made a few changes, it simple dont change anyting. The final system is the same that de original...
Can you help me?
Thanks
Click to expand...
Click to collapse
Have you spelled the name of your compiled apk correctly? Once I had like four systemuis in there, with variations of capital/ non-capital letters you can check via adb:
adb shell
Cd system/app
Ls
Then you can use rm commands to remove the apks there and push your modded one
Sent from my HTC One S using XDA

Double post

Habarug said:
Have you spelled the name of your compiled apk correctly? Once I had like four systemuis in there, with variations of capital/ non-capital letters you can check via adb:
adb shell
Cd system/app
Ls
Then you can use rm commands to remove the apks there and push your modded one
Sent from my HTC One S using XDA
Click to expand...
Click to collapse
Yh you are right. Now have another problrm. Im trying to compile te settings but i need the dependencies of framework
Bu whe do decompile whit dependencies it simple dont accept it. I cant figure what its wrong. Thanks
Sent from my GT-S5660 using XDA

Did you install proper framework with apktool if command or with 10 in apkmanager?

he_stheone64 said:
Did you install proper framework with apktool if command or with 10 in apkmanager?
Click to expand...
Click to collapse
Yh but it says: "Sorry that is not a dependencie apk"...
and i did with apktool the "if" command...
Dont know :/

did you try dragging in the htc.resources.apk from your rom in the first step of option 10. in apk manager?

Sorry but i'm using a samsung :S

Then you need to do the same with twframework.

Related

styles.xml

I have created a custom styles.xml I got from decompiling framework-res in CM6rc3, but am unable to recompile it. Apktool is unable to do this, from what I've heard. Anyone here able to do it? I'd appreciate any help.
xvenom89 said:
I have created a custom styles.xml I got from decompiling framework-res in CM6rc3, but am unable to recompile it. Apktool is unable to do this, from what I've heard. Anyone here able to do it? I'd appreciate any help.
Click to expand...
Click to collapse
Yeah sure I do!
-deleted post-
you may end up having to hex edit the file, using the decompiled version as a guide. unless there is some way to compile it separately from the entire apk
this is what had i do to modify progress_horizontal.xml to change the progress bar color
EDIT: or from what ive seen, start with a non-themed framework-res.apk, or one that has been properly recompiled, make sure to decompile it and recompile when you are done
invisiblek said:
you may end up having to hex edit the file, using the decompiled version as a guide. unless there is some way to compile it separately from the entire apk
this is what had i do to modify progress_horizontal.xml to change the progress bar color
EDIT: or from what ive seen, start with a non-themed framework-res.apk, or one that has been properly recompiled, make sure to decompile it and recompile when you are done
Click to expand...
Click to collapse
You see, the ONLY way to access this xml IS to decompile, as it's hidden in /res/values/styles.xml, which is invisible until you decompile the apk. Hex editing isn't necessary, as it is decompiled into plain english. I already edited it- I just need someone to compile the two for me, since apktool gives me errors.
xvenom89 said:
You see, the ONLY way to access this xml IS to decompile, as it's hidden in /res/values/styles.xml, which is invisible until you decompile the apk. Hex editing isn't necessary, as it is decompiled into plain english. I already edited it- I just need someone to compile the two for me, since apktool gives me errors.
Click to expand...
Click to collapse
which is why you need to hex edit it, because you cannot compile it when you get errors like that.
one thing you could try, is to decompile the ORIGINAL framework-res.apk from the rom you are running, replace the styles.xml with yours, then recompile it. after it is recompiled, grab the compiled styles.xml out of it and put it into the framework-res that you are building
a modified framework-res cant be decompiled unless it was properly recompiled to begin with. which most themers do not do, or probably dont know about
just a thought, may or may not work. but you are kinda stuck with this because i dont think its possible to just compile one or two files out of the apk, i think its all or nothing
invisiblek said:
which is why you need to hex edit it, because you cannot compile it when you get errors like that.
one thing you could try, is to decompile the ORIGINAL framework-res.apk from the rom you are running, replace the styles.xml with yours, then recompile it. after it is recompiled, grab the compiled styles.xml out of it and put it into the framework-res that you are building
a modified framework-res cant be decompiled unless it was properly recompiled to begin with. which most themers do not do, or probably dont know about
just a thought, may or may not work. but you are kinda stuck with this because i dont think its possible to just compile one or two files out of the apk, i think its all or nothing
Click to expand...
Click to collapse
I wasn't saying to compile one file from the apk- that's why I posted the entire thing, so you can decompile it, add my modified styles.xml to /res/values/ and then recompile.
Anyway, Thanks for the tip about recompiling an improperly compiled, themed apk. I'll test it on the original one shipped with rc3 and report back.
dam im looking to compile my styles.xml too, any tips?
SiL3nTKiLL said:
dam im looking to compile my styles.xml too, any tips?
Click to expand...
Click to collapse
doesn't anyone read a thread before posting anymore? especially one that is less than one page long?
</rant>
invisiblek said:
doesn't anyone read a thread before posting anymore? especially one that is less than one page long?
</rant>
Click to expand...
Click to collapse
Unnecessary rant. He probably just phrased it wrong; like me, he wanted to add a customized styles.xml into framework-res by means of compiling.
invisiblek said:
...decompile the ORIGINAL framework-res.apk from the rom you are running, replace the styles.xml with yours, then recompile it. after it is recompiled, grab the compiled styles.xml out of it and put it into the framework-res that you are building
a modified framework-res cant be decompiled unless it was properly recompiled to begin with. which most themers do not do, or probably dont know about
Click to expand...
Click to collapse
i can verify my theory here, it worked fine with progress_horizontal.xml, which means it should work with any xml

[HOW-TO] Decompile ICS and above apk and jar files MANUALLY

With the number of ICS ROMs that are popping out, I imagine the majority of people are spending their time on ICS rather than Gingerbread or Froyo. With that in mind, here's a little guide on how to decompile ICS .apk and .jar files (such as the troublesome SystemUI.apk) with ease so that you can mod them to your heart's content. I assume this method will work for other versions of Android as well. Just so we understand each other, this just helps you decompile the classes.dex. If you want to decompile an entire app or jar file there are other guides for that.
NOTE: We will NOT be using ApkTool, Apk Manager, or StudioAndroid to do this. Mainly because I have had trouble in the past using those applications to decompile certain files. So, here is an ALL MANUAL way.
What you need:
Deodexed .apk/.jar file
smali.jar
baksmali.jar
7zip or Betterzip (whether you are on Mac, Linux, or Windows)
terminal/cmd (depending on what you're running)
You can get the smali.jar and baksmali.jar files from here: http://code.google.com/p/smali/downloads/list
Download these files:
Code:
baksmali-1.3.3.jar
smali-1.3.3.jar
and rename them to:
Code:
baksmali.jar
smali.jar
Now that you have both files, place them somewhere you'll remember (like a folder on your Desktop). For the purposes of this guide, my files will be in .../Desktop/ICS
Ready? Okay, here we go.​
Open up your desired ICS .apk or .jar file with 7zip or Betterzip and extract the classes.dex and move it into the directory where you have baksmali.jar and smali.jar (For example, I move the classes.dex file to .../Desktop/ICS)
Open up terminal or cmd
cd to your directory
Example:
Code:
cd .../Desktop/ICS
Type the following:
Code:
java -jar baksmali.jar -o classout/ classes.dex
This will decompile the classes.dex file and create a folder inside .../Desktop/ICS called classout where all of your smali files will be located.
Go into the classout folder and make your smali edits
Compile your classout folder into new-classes.dex by typing this into terminal:
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
Rename new-classes.dex to classes.dex
Take your newly compiled classes.dex and put it into your ICS .apk or .jar using 7zip or Betterzip
Profit
Have fun :highfive:
Nice to have a write up on this in the Inc forums instead of having to hunt it down all the time. I've found it best to use smali and baksmali too, the apk aps were just too flaky for me.
kzoodroid said:
Nice to have a write up on this in the Inc forums instead of having to hunt it down all the time. I've found it best to use smali and baksmali too, the apk aps were just too flaky for me.
Click to expand...
Click to collapse
Yeah I've had similar experiences as well. This method was the only one that worked flawlessly for me. Hopefully it works for you and everyone else who needs to modify ICS files.
I've used it in GB to do some of the modifications to the status bar, like hide the clock. Took the better part of a day googling to actually find a write up on how to use baksmali and smali as I couldn't get apkTool or apkManager to decompile or compile classes.dex properly. Now I know where to find the instructions when I need them again.
thank you for this nice write up. It did really help me
Man you are just awesome for posting this, I have been googling how to decompile and recompile .apk's and .jar's for a couple of days and nothing has worked. This worked great the first time around and was very simple to follow. I just hope that once I am done making my editsI do not have any troubles re compiling the .jar I am working with lol.
You know it is so ironic that I found your guide here on XDA. It seems like everytime i want to learn how to do something like this I can google all day without much success on finding something that works. But when I do find something that works around 90% to 95% of the time it is here on XDA. You have got to love XDA...
T-Macgnolia said:
Man you are just awesome for posting this, I have been googling how to decompile and recompile .apk's and .jar's for a couple of days and nothing has worked. This worked great the first time around and was very simple to follow. I just hope that once I am done making my editsI do not have any troubles re compiling the .jar I am working with lol.
You know it is so ironic that I found your guide here on XDA. It seems like everytime i want to learn how to do something like this I can google all day without much success on finding something that works. But when I do find something that works around 90% to 95% of the time it is here on XDA. You have got to love XDA...
Click to expand...
Click to collapse
Yeah XDA does seem to be the go-to place for everything lol. Glad to know it worked for you
Note that you still need apktool in order to decompile/recompile XMLs and PNGs in apk files.
kong said:
Note that you still need apktool in order to decompile/recompile XMLs and PNGs in apk files.
Click to expand...
Click to collapse
Are there no other standalone command line tools for those tasks?
SifJar said:
Are there no other standalone command line tools for those tasks?
Click to expand...
Click to collapse
I would like to know that as well...
Wow, thank you very much. I'm going to have fun with this.
Sent from my Desire HD using xda premium
Thanks for the tutorial, I have successfully extracted the classes.dex but i cant seem to find where to add this code:http://forum.xda-developers.com/showpost.php?p=16485374&postcount=15 in the NotificationManagerService.smali file. I have even opened up a file that supposedly has the patch in it but could not locate it. A point in the right direction would be appreciated.
Great tutorial awesome work
Sent from my Galaxy Nexus using Tapatalk 2
i wan to edit samsungcamera.apk...
i can not find classes.dex inside this apk....
only got META_INF,res,AndroidManifes.xml and resources.arsc....
Have you decompiled it first?
Sent from my Galaxy Nexus using Tapatalk 2
Hey I made some changes in the AssetManager.smali and now I can't recompile. Getting this error Error: Unable to access jarfile smali.jar
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Cannot find file or directory "classout/"
at org.jf.smali.main.main(main.java:184)
didi1985 said:
i wan to edit samsungcamera.apk...
i can not find classes.dex inside this apk....
only got META_INF,res,AndroidManifes.xml and resources.arsc....
Click to expand...
Click to collapse
Is your rom deodexed?
Sent from my PantechP9070 using xda premium
Great guide easy to understand.
Thank you.
Reply To Thread
This is one of the best tutorial... Keep it up bro!
Help me, i can't edit .smali, because i don't understand smali,.
have any help?
like convet to java or any langgue ?

How to decrease the number of home screens of jellybean stock launcher?

Hey guys, I need some assistance of those who know please. I decompiled the launcher2.apk of eos Xoom ROM and made changes to
res/layout-port/launcher.xml
And to
res/layout-land/launcher.xml
By deleting some lines related to launcher screens. By default they come 5, I made them 3.
<include android:id="@id/cell1" layout="@layout/workspace_screen" />
<include android:id="@id/cell2" layout="@layout/workspace_screen" />
<include android:id="@id/cell3" layout="@layout/workspace_screen" />
<include android:id="@id/cell4" layout="@layout/workspace_screen" />
<include android:id="@id/cell5" layout="@layout/workspace_screen" />
I also made launcher:defaultScreen="1" to set the default screen to be the middle one.
I compiled the apk and replaced the original one with the same permission , however' the launcher remains with 5 screens...
Can anyone please point out how to get around this?
The way I compiled is using apktool manager and deleted resources.arcs from the keep folder !!! Does this need to be signed even if it is a system apk?
As soon as this works, I thought to provide a mod for xoomers...
Sent from my MZ601 using Tapatalk 2
Guys... no one?!!
Come on.... someone must have an answer here.
I decompiled the modded launcher and found the changes I made are gone and back to 5 screens !!
Sent from my MZ601 using Tapatalk 2
Have you tried adding workspaces? I for one would like 7 instead of 5.
Off topic: are there any launchers that work like compiz fusion under ubuntu?
Sent from my SGH-I717R using xda premium
Eun-Hjzjined said:
Have you tried adding workspaces? I for one would like 7 instead of 5.
Off topic: are there any launchers that work like compiz fusion under ubuntu?
Sent from my SGH-I717R using xda premium
Click to expand...
Click to collapse
The problem is that I am trying to make the changes I do persistent . However, whenever I compile the apk, it goes back to 5 screens. If I can manage removing screens, I will be able to add more. All I need is a little help of guideness if someone knows, plz step in...
Sent from my MZ601 using Tapatalk 2
wesamothman said:
The problem is that I am trying to make the changes I do persistent . However, whenever I compile the apk, it goes back to 5 screens. If I can manage removing screens, I will be able to add more. All I need is a little help of guideness if someone knows, plz step in...
Sent from my MZ601 using Tapatalk 2
Click to expand...
Click to collapse
ok you have it right, however i can 99.99% guarantee you that your problem is with apkmanager
becasue there is no why that once you make the changes that the changes will "revert" back to that what is was previously
use good old fashion cmd or terminal ( if on linux) or even simpler build it from the source,
however if you insist on using apktool use these ( which are moddified for ICS/JB) https://dl.dropbox.com/u/25886627/apktoo_8.15.12.zip
only follow these steps to the "T"
put the zip anywhere, open cmd ( command promt)
and CD to C:\were\extracted\zip\is\
and then take the framework-res.apk and the Launcher2.apk
and place both in the same folder you extraacted zip to
now in cmd type
apktool if framework-res.apk
followed by
apktool d Launcher2.apk
now this will decompile the apk to :\were\extracted\zip\is\Launcher2\
make changes
back in cmd type
apktool b Launcher2
now navigate to :\were\extracted\zip\is\Launcher2\build\apk\
copy the original Launcher2.apk from :\were\extracted\zip\is\ to :\were\extracted\zip\is\Launcher2\build\apk\
OPEN not extract the apk with 7zip ( or any archive manager) and now click and highlight from the :\were\extracted\zip\is\Launcher2\build\apk\ the res folder the classes.dex file and the resouces.arsc and drag them into the root of the Launcher2.apk that is open in 7zip
now that is the ready file to be sent to device
about signing...
system apps you dont sign becasue you dont have the authers signing tools, so if you try to simple sideload it an error of mismatching keys will prevent the app from installing
becasue we are flashing it ( or adb push) signing is not needed.
now i have not looked at the launcher as far as the amoutn of home screens ( done some customization for my own use on the n7) but what you have said you did should without a doubt work
runandhide05 said:
ok you have it right, however i can 99.99% guarantee you that your problem is with apkmanager
becasue there is no why that once you make the changes that the changes will "revert" back to that what is was previously
use good old fashion cmd or terminal ( if on linux) or even simpler build it from the source,
however if you insist on using apktool use these ( which are moddified for ICS/JB) https://dl.dropbox.com/u/25886627/apktoo_8.15.12.zip
only follow these steps to the "T"
put the zip anywhere, open cmd ( command promt)
and CD to C:\were\extracted\zip\is\
and then take the framework-res.apk and the Launcher2.apk
and place both in the same folder you extraacted zip to
now in cmd type
apktool if framework-res.apk
followed by
apktool d Launcher2.apk
now this will decompile the apk to :\were\extracted\zip\is\Launcher2\
make changes
back in cmd type
apktool b Launcher2
now navigate to :\were\extracted\zip\is\Launcher2\build\apk\
copy the original Launcher2.apk from :\were\extracted\zip\is\ to :\were\extracted\zip\is\Launcher2\build\apk\
OPEN not extract the apk with 7zip ( or any archive manager) and now click and highlight from the :\were\extracted\zip\is\Launcher2\build\apk\ the res folder the classes.dex file and the resouces.arsc and drag them into the root of the Launcher2.apk that is open in 7zip
now that is the ready file to be sent to device
about signing...
system apps you dont sign becasue you dont have the authers signing tools, so if you try to simple sideload it an error of mismatching keys will prevent the app from installing
becasue we are flashing it ( or adb push) signing is not needed.
now i have not looked at the launcher as far as the amoutn of home screens ( done some customization for my own use on the n7) but what you have said you did should without a doubt work
Click to expand...
Click to collapse
Thx a million times. I will do as said
Sent from my MZ601 using Tapatalk 2
Hi runandhide05. First allow me to send you a bigggggg thank you for your apktool. It really was apktool problem.
I did as you suggested, still, didn't work from the first time (modified to 3 screens) although the changes were persistent this time. so, in addition to the above files, i had to modify the following as well:
workspace.xml in layout-sw720dp
and public.xml in res/values in which I had to delete
<public type="id" name="cell4" id="hex val xxxxx" />
<public type="id" name="cell5" id="hex val xxxxx" />
So, now I tested with these changes and I got 3 screens
I will try to do 1 screen, and 7 screens.
Thanks again. you are truly appreciated.
EDIT: 1 Screen is successful too. I will try 7 soon.
EDIT: 7 Screens is successful too
I will try to write a flashable zips for them and post them as mods ...
wesamothman said:
Hi runandhide05. First allow me to send you a bigggggg thank you for your apktool. It really was apktool problem.
I did as you suggested, still, didn't work from the first time (modified to 3 screens) although the changes were persistent this time. so, in addition to the above files, i had to modify the following as well:
workspace.xml in layout-sw720dp
and public.xml in res/values in which I had to delete
<public type="id" name="cell4" id="hex val xxxxx" />
<public type="id" name="cell5" id="hex val xxxxx" />
So, now I tested with these changes and I got 3 screens
I will try to do 1 screen, and 7 screens.
Thanks again. you are truly appreciated.
Click to expand...
Click to collapse
ah, sorry completely forgot about the public XML. glad u got it
Sent from my Galaxy Nexus using Tapatalk 2
runandhide05 said:
ah, sorry completely forgot about the public XML. glad u got it
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Dear runandhide, your brilliant advises/expertise is what helped me getting these mods in place. Thx again trillion times and I shall never forget that. I will finalize the flashable zips as mods in dev forum for xoomers of team eos jellybean interest.
Sent from my MZ601 using Tapatalk 2
Awesome work. Pm me when you have 7 screens cwm.zip
EOS3 N132 @ MZ604 [XDA HD]
Stock ICS @ SGH-i717R [XDA Premium]
Eun-Hjzjined said:
Awesome work. Pm me when you have 7 screens cwm.zip
EOS3 N132 @ MZ604 [XDA HD]
Stock ICS @ SGH-i717R [XDA Premium]
Click to expand...
Click to collapse
It will available today on DEV Forum. 1 screen, 3 screens, 5 screens (default) and 7 screens.
Keep an eye on the dev section.
Here is the link for the mods. 1,3,5,7,9 screens mods added.
http://forum.xda-developers.com/showthread.php?p=30306937
Sent from my MZ601 using Tapatalk 2

[MOD]TF700T Battery % Mod

This is a mod for the TF700T to add 1% battery indicators for both the tablet and dock.
This posting is for developers, not newbies who usually do not know what they are doing.
First things first: I am a retired software engineer (and approaching retirement age). I do not have much time for support of this mod as I spend most of my time teaching English in Thailand and I develop ROMs for the SGS3. With that said, you are free to use this however you wish. BUT, please give me credit for the work. A link back to this page would be great. AND, I cannot guaratee it will will for everyone. Use at your own risk.
I will try to answer questions as soon as I can. Hopefully, some of the better developers can jump in and help with questions. If I do not answer a question right away, it is because I am busy with school.
This is probably not one of the better how-to-do-it posts, but it is the best I can do at this time.
What you will need:
1. Winmerge - you can get it here: Winmerge
This is a great app for making changes to newer ROMs without having to manually find all your previous changes. It is a pretty much cut 'n paste layout as you can see where the changes are and just copy them into the new source file. It uses a split window format for comparing previous and new source files. I usually view the original modded file in the right window and the new file I want to mod in the left window. Differences will be highlighted. Just marked the changes and copy them from the right window to the left window. Don't forget to save the file before exiting.
2. The attached zip file which contains the battery icons for both the dock and tablet and the modified xml files. The icons were created using BatteryIconCreator_V9.0 which you can find on the web. Makes creating icons easy plus you can merge 2 icons into 1. The zip file contains xml files for JellyBean v10.4.4.20 ROMs. It should work on previous versions as I started working on this with v10.4.4.16.
3. apktool150.jar - from here: http://miui.connortumbleson.com/other/apktool/apktool_1.5.0.jar
4. aapt.exe - from here: http://miui.connortumbleson.com/other/apktool/aapt/win/aapt.exe
For items 3 and 4, I have included them for Windows only. You should already know how to use apktool already and where these files go.
IF your ARE NOT on Windows O/S, go to this link to get the correct aapt file: APKTOOL
You MUST HAVE both of the files (3 & 4). Very important.
There are no install zips attached to this post. I am just too lazy to make them.
This is mostly for developers of TF700T Roms.
The files we will be modding:
framework-res.apk
SystemUI.apk
Transformer.apk
First thing to do is to decompile all 3 files:
java -jar apktool150.jar d <source.apk> <folder>
where <source.apk> is one of the above 3 files and <folder> is where you want them decompiled to.
Example: java -jar apktool150.jar d SystemUI.apk systemui
First the tablet battery mod:
SYSTEMUI.APK
Tablet icons
1. Copy the tablet battery icons to: /res/drawable-sw720dp-hdpi
2. Copy stat_sys_battery.xml AND stat_sys_battery_charge.xml to /res/drawable
3. Add the following to the end of /res/values-sw600dp/styles.xml:
<style name="StatusBarBatteryNotificationText2">
<item name="android:textSize">1.0dip</item>
<item name="android:textColor">#00999999</item>
</style>
4. Change /res/layout/status_bar_quick_settings_title.xml
(change both dock and battery) below is the modified script change (partial script).
<TextView android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="1.0dip" android:layout_marginTop="-4.0dip" android:src="@drawable/ic_notification_open" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" android:layout_below="@id/battery" android:layout_centerHorizontal="true" style="@style/StatusBarBatteryNotificationText2" />
FRAMEWORK_RES.APK
Dock-icons
1. Copy the dock battery icons to /res/drawable-hdpi
2. Copy stat_sys_dock_battery.xml AND stat_sys_dock_battery_charge.xml to /res/drawable
TRANSFORMER.APK
1. Change res/layout/status_bar_docking.xml:below is the modified script change (partial script).
<ImageView android:layout_gravity="center_vertical" android:src="@drawable/asus_ep_kb_battery_dock" android:layout_width="32.0dip" android:layout_height="32.0dip" android:scaleType="centerInside" />
<TextView android:layout_gravity="right|center" android:id="@id/battery_level" androidaddingRight="12.0dip" android:layout_width="56.0dip" android:layout_height="wrap_content" android:singleLine="true" android:layout_toRightOf="@drawable/asus_ep_kb_battery_dock" android:layout_alignBaseline="@drawable/asus_ep_kb_battery_dock" style="@style/StatusBarNotificationText" />
2. Add asus_ep_kb_battery_dock.png to /res/drawable-hdpi/
After you have done all of that, you need to compile them:
BUT FIRST: SystemUI.apk will not be decompiled correctly -> res/values/public.xml
We need to change some things or it will not compile.
Open /res/values/public.xml and go all the way to the end.
Change the last 2 entries to look like the following (the decompile hex value ordering in out of sequence):
<public type="menu" name="notification_popup_menu" id="0x7f0f0000" />
<public type="menu" name="recent_popup_menu" id="0x7f0f0001" />
Save the file and exit.
Now we can compile all the files.
java -jar apktool150.jar b <source folder>
where <source folder> is where you decompile the apk to.
Example: java -jar apktool150.jar b systemui
the apk file will be in the dist subfolder under systemui
After all 3 files have been compiled, you need to copy the META-INF folder and the AndroidManifest.xml from the original apk to the newly built apk. You need to do this for each of the 3 files.
The TF700T does not like the resources.arsc entry compressed. So...we have to extract the contents from SystemUI.apk and Transformer.apk. Create a new apk (using store only) no compression. You can use 7zip for this.
After you have done this for the SystemUI.apk and Transformer.apk files, zipalign all 3 files and install them in their proper folders on your tablet. I have included a zip align program in the attached zip file. Put the 3 files in the align folder and run the zip-app.bat program.
I have tried to make this easy, especially if you use WinMerge. It's as easy as copy 'n paste.
All files, including the modded source files (except Winmerge) are included in the attached zip file.
ZIPFILE: TF700T 1% Battery Mod
Thanks man, donno if im gonna implement this but hopefully we can get some devs to preload it onto other roms. You should pm scott and hiemanshu! thanks again.
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
gutts10 said:
Thanks man, donno if im gonna implement this but hopefully we can get some devs to preload it onto other roms. You should pm scott and hiemanshu! thanks again.
Sent from my ASUS Transformer Pad TF700T using Tapatalk 2
Click to expand...
Click to collapse
I'm sure users would prefer percentage anyways, right?
From TF700, hit THANKS for others
Hi! thanks for this mod and for opening a dedicated thread.
Does the zip have a version to go for the latest job update? I can implement it straight into the ROM quickly if so. Otherwise I'll work through instructions and ask as I go.
sbdags said:
Does the zip have a version to go for the latest job update? I can implement it straight into the ROM quickly if so. Otherwise I'll work through instructions and ask as I go.
Click to expand...
Click to collapse
The easiest way is to just do file compares based on the files mentioned in Post #1.
If you use winmerge.exe it is easy to find the differences and cut and paste. It's what I use for all my ROM development for TF700T and GS3.
The files are from 104420.
OK Couple of questions - I tried to use the .20 files but SystemUI.apk is different.
There is no res/values folder......
neither is there a /res/values-sw600dp either ....
Are they important or have Asus changed the files?
Edit: Ah figured it out - ignore me!
I'm watching you
sbdags said:
OK Couple of questions - I tried to use the .20 files but SystemUI.apk is different.
There is no res/values folder......
neither is there a /res/values-sw600dp either ....
Are they important or have Asus changed the files?
Edit: Ah figured it out - ignore me!
Click to expand...
Click to collapse
Sent from my ASUS Transformer Pad TF700T
chogardjr said:
I'm watching you
Sent from my ASUS Transformer Pad TF700T
Click to expand...
Click to collapse
Figured it out and got it working
Thanks OP!
The icon and the % are not clear like stock...hard to read.
buhohitr said:
The icon and the % are not clear like stock...hard to read.
Click to expand...
Click to collapse
Agreed.
For my GNex I use circlesmod by hooolm, which is a lot clearer. I think I'll try throwing a mod together with those icons...
http://circlesmod.dk/?s=dl

[GUIDE][MOD] How to change settings background image on Jellybean 4.2.x

This is how you can change all the system backgrounds plain colors (settings, contacts, etc) to an actual image instead of a color
The how to:
1. Decompile the framework-res.apk using Android Multitool
2. navigate to the res>styles>styles.xml and with notepad++ locate <style name="Theme"> and edit these lines:
change:
Code:
<item name="colorBackground">@color/background_dark</item>
to this
Code:
<item name="colorBackground">@color/transparent</item>
then change:
Code:
<item name="windowBackground">@drawable/screen_background_dark</item>
to this one to use a png for the background:
Code:
<item name="windowBackground">@drawable/backgroundftw</item>
3. Locate <style name="Theme.Black" parent="@style/Theme">
and change this line:
Code:
<item name="colorBackground">@color/black</item>
to this:
Code:
<item name="colorBackground">@color/transparent</item>
then change:
Code:
<item name="windowBackground">@color/black</item>
to this for the png image:
Code:
<item name="windowBackground">@drawable/backgroundftw</item>
4. Use a 512x512 png , name it "backgroundftw" and place it in drawable-nodpi folder
5. Recompile the framework-res.apk and replace it with the old framework-res.apk in system/framework
6. Enjoy
Things required for this tutorial:
1. Android Miltitool to decompile and replace image
2. notepad++ for the coding
3. Your brain
4. You have to know where to obtain the framework-res.apk from on your phone. Just go to system/framework using root explorer
5. Make a backup of ur ROM or a flashable of your old framework-res.apk just incase if you make a mistake while coding. So that you dont encounter a bootloop
6. Find a video on youtube to learn how to compile and decompile your framework-res.apk
Difficulty for this tutorial: medium
For images CLICK HERE
good but wrong way bro......
ur steps are correct but method is wrong....
u cannot obtain styles.xml or find value folder with 7 zip....
u need apktool for that....
n just adding images or edited styles.xml ...to framework-res.apk
bootloops n fcs.....
i
Avenger4droid said:
good but wrong way bro......
ur steps are correct but method is wrong....
u cannot obtain styles.xml or find value folder with 7 zip....
u need apktool for that....
n just adding images or edited styles.xml ...to framework-res.apk
bootloops n fcs.....
i
Click to expand...
Click to collapse
Will update the thread tomorrow
nathanjp said:
will update the thread tomorrow
Click to expand...
Click to collapse
update the thread then i will try for sure don't want bootloop
upload video bro
awesome workk bro but if u upload a video step by step then its very useful to every one or if not possible then plzz upload a image bro
Thread updated try it now
gaurav247star said:
update the thread then i will try for sure don't want bootloop
Click to expand...
Click to collapse
Bro i updated the thread a couple days ago. Try it now
great work and helpful guide
nathanjp said:
This is how you can change all the system backgrounds plain colors (settings, contacts, etc) to an actual image instead of a color
The how to:
1. Decompile the framework-res.apk using Android Multitool
2. navigate to the res>lstyles>styles.xml and with notepad++ locate <style name="Theme"> and edit these lines:
change:
Code:
<item name="colorBackground">@color/background_dark</item>
to this
Code:
<item name="colorBackground">@color/transparent</item>
then change:
Code:
<item name="windowBackground">@drawable/screen_background_dark</item>
to this one to use a png for the background:
Code:
<item name="windowBackground">@drawable/backgroundftw</item>
3. Locate <style name="Theme.Black" parent="@style/Theme">
and change this line:
Code:
<item name="colorBackground">@color/black</item>
to this:
Code:
<item name="colorBackground">@color/transparent</item>
then change:
Code:
<item name="windowBackground">@color/black</item>
to this for the png image:
Code:
<item name="windowBackground">@drawable/backgroundftw</item>
4. Use a 512x512 png , name it "backgroundftw" and place it in drawable-nodpi folder
5. Recompile the framework-res.apk and replace it with the old framework-res.apk in system/framework
6. Enjoy
Things required for this tutorial:
1. Android Miltitool to decompile and replace image
2. notepad++ for the coding
3. Your brain
4. You have to know where to obtain the framework-res.apk from on your phone. Just go to system/framework using root explorer
5. Make a backup of ur ROM or a flashable of your old framework-res.apk just incase if you make a mistake while coding. So that you dont encounter a bootloop
6. Find a video on youtube to learn how to compile and decompile your framework-res.apk
Difficulty for this tutorial: medium
Click to expand...
Click to collapse
Good work keep it up
djrkb24 said:
Good work keep it up
Click to expand...
Click to collapse
Have u tried the tutorial??
Guys do post your screenshots if you have tried out the tutorial
Will post a newer and simpler tutorial to make it easy for u guys. All you have to do is replace the image in this. Flash able zip will so be available
Hit the thanks button if you guys would like that
nathanjp said:
Will post a newer and simpler tutorial to make it easy for u guys. All you have to do is replace the image in this. Flash able zip will so be available
Hit the thanks button if you guys would like that
Click to expand...
Click to collapse
Isn't the settings background located in /res/drawable/background_holo_dark.xml?
DonDizzurp said:
Isn't the settings background located in /res/drawable/background_holo_dark.xml?
Click to expand...
Click to collapse
Nope you dont wanna edit that
nathanjp said:
Nope you dont wanna edit that
Click to expand...
Click to collapse
That's what I edited in order to remove the gradient and get an all black background. I did the styles.xml mod to get the wallpaper working though.
Its A Brilliant Guide Brother..Thanks..!
Thunder_Droid said:
Its A Brilliant Guide Brother..Thanks..!
Click to expand...
Click to collapse
Thanks bro.
work..thank you bro
could any1 let me know that how to make background transpearent
Copied Post GARBAGE

Categories

Resources