[Q] Modify/View XML - Galaxy S II Themes and Apps

Sorry for my english.
I using SGS2 with stock firmware 4.0.3 no brand XXLPF, i unzipped the file SystemUI.apk but I can not read xml file.
I am using linux (gedit, vim) and windows (notepad++) and is impossible to change them seem encoded.
thanks

You need to decompile the apk and then the xml's will be readable and editable with notepad++
There's lots of threads with info but here's a good place to start http://forum.xda-developers.com/showthread.php?t=1433053

Related

[Q] *Solved* Obtaining Resource ID's

Question for all the themers out there. What's the easiest method to get the resource ID for a png you've just created for say com.htc.resources.apk? Also is there a way do get the Resource ID's for multiple images in the same directory ie. com.htc.resources.apk /drawable-hdpi?
There's a few methods floating around that I've checked out but I figured I'd ask individuals that have probably refined this process.
Thanks...Lou
EDIT: I found this method to work and it saves you from having to look up all of the resource ID's separately and manually update the public.xml file....
For example if you open com.htc.resources.apk with an archive manager like 7zip for windows or archive manager if you're using linux and drop in your edited png's then use apktool to decompile the framework it should create all of the resource ID's in the public.xml file for you. At this point if you have any xml edits or smali edits to do complete those then recompile. Now just extract the "res" folder and the "resources" files from the compiled apk and using the same archive manager from above to open the original com.htc.resources.apk and replace the files you should be good to go.

[Q] Begginner's Theming Question

I am very interested in theming and I downloaded all the recommended software/programs mentioned in the theming threads...
However I can NOT find the answer to my question---
once I have everything I need to edit/create a theme how do I actually begin?
What I mean is, for example, if you want to edit a .PSD file you would open Photoshop to edit the file....
so which program do I use first to open the theme I plan to edit? and is there a "stock" theme to edit as I like or would I download...say...the Evo stock ROM and edit the files in there?
I think I read I should begin with 7z? is this right?
All I've found so far is alot of technical explanations for someone who has experience...once I find out the basics I'm sure it will all fall into place...
if there IS an easy answer posted can someone PLEASE point me in the right direction?
Thanks.
*EDIT*
I was double-clicking on framework-res.apk (following instructions) which was why it wasn't working...once I extracted the file using 7zip all the drawable files were there...I had NO IDEA there were THIS many .png images to edit...lord have mercy...this is gonna be FUN.
If u use a program called apk manager u can put an apk in the and decompile the apk. That mean it opens up the resources.arcs and the classes.dex files and also turns the bianry XML files to readable XML. Meaning u can use this to edit XML and smali files to change colors(mostly in xml files) and also rearange things if u know how to edit smali files. The decompiling also show u all the pngs and the .9 PNG files. The .9 PNG files here will already be showing there draw 9 edit so all u really have to do is edit the image leaving the very edges alone and ur done. Then once all ur edits are done u can recompile the apk and push it back to ur phone. U might have to resign the apk or however u want but there is an easy way to get started. The framework apk is a system apk so u might have to select the correct way to decompile it.
Hope this helps.
See other tutorials on how to create flashable zips and how to edit smali files and XML files.
Usually codes in XML files for colors are set in an eight digit code that cool look like this...ff000000(black) or this ffffffff(white). If u good XML color codes u can find many sites that give show u colors and there codes but to help it works like this...ffrrbbgg....meaning ff (amount of transparency) rr (red) bb (blue) gg (green). I might have put colors in wrong order but u get gist I hope.
Just make sure when editing ur PNG images that when u save them u save them as a PNG only also when editing .9 png files(stretchable pngs) that u leave it as a .9png file. When u save it if it asks just save as PNG but the .9 will stay.
Hope this helps a little
Btw the amount if edits through out an entire them (many apks) is rediculous and many people have no clue how time consuming it can be.
If u need further help u can gtalk me and id be happy to walk u through the process. [email protected]
yeah I downloadad all the tools needed but where I got stuck was, once I have the tools, ROM, etc where do I actually begin at?
I was reading the Ultimate Theming Guide by Google (here) but got confused when it said "double-click the framework-res.apk"...it should have said "extract framework-res.apk with 7ZIP"....when I double-clicked I got all the crazy-looking letters that seemed to be encoded...when I extracted with 7ZIP I saw all the drawable images...all 800+ of them...had no idea there were that many...
so all I have to do, as far as small changes, is edit the .png images in the drawable folders, archive it back together and sign it? do I make it a .ZIP or an UPDATE archive?
broad_st_bully said:
yeah I downloadad all the tools needed but where I got stuck was, once I have the tools, ROM, etc where do I actually begin at?
I was reading the Ultimate Theming Guide by Google (here) but got confused when it said "double-click the framework-res.apk"...it should have said "extract framework-res.apk with 7ZIP"....when I double-clicked I got all the crazy-looking letters that seemed to be encoded...when I extracted with 7ZIP I saw all the drawable images...all 800+ of them...had no idea there were that many...
so all I have to do, as far as small changes, is edit the .png images in the drawable folders, archive it back together and sign it? do I make it a .ZIP or an UPDATE archive?
Click to expand...
Click to collapse
If u want to flash it yes if u want to just copy and paste to ur phone then no. If u c & p it then make sure u set the permissions after
smurf
so if i edit the 9.pngs say just the color i dont have to run them through draw9patch or anything like that?
dased14 said:
smurf
so if i edit the 9.pngs say just the color i dont have to run them through draw9patch or anything like that?
Click to expand...
Click to collapse
If u edit their colors u have to run in draw9patch and then recompile them. There is a program called "xultimate-d9pc" that u can use to recompile them. Do a goodle search and Ull find the script. Its easy to use and easy to setup. If u don't ur .9 files will look jacked up
i have that(couldnt get it to work right) i'll try it again. thanks smurf
dased14 said:
i have that(couldnt get it to work right) i'll try it again. thanks smurf
Click to expand...
Click to collapse
To get it to work I created a folder call draw 9 compiler. I put the script and the folder called originals in there. Inside the original folder I creates a few folders called drawable, drawable-hdpi, drawable-mdpi, drawable-ldpi. Then after I edit and draw9patch my images I put each one in the ffolders they belong in and go to xultamate-d9pc and click k on it and it will create a done folder u can go into and and all the images will be fixed in there
I'll try that, thanks for the tip
now the voices are 3d
sweet that looks to work perfect only thing extra i had to do was make original/res/then the other folders you said. thank you smurf
dased14 said:
sweet that looks to work perfect only thing extra i had to do was make original/res/then the other folders you said. thank you smurf
Click to expand...
Click to collapse
Ur welcome and yeah my bad I meant to tell u Res file first. But glad its working

[Q] Themes & Roms Developers i need your help plz

Hi everyone
sorry for posting the same theard twice
I posted my question here couz it is not a normal question
I have xperia arc 2.3.4 rooted
I am trying to make my own theme and here is what i done
1- i copied the framework-res.apk from my system
2- i decompile it useing Apktool last version
3- i changed a lot of pictures inside it with the same name and type (.png all)
4- i edit a xml file by adding more lines ( the battery xml )
5- i complied it useing apktool without any problems
6- i signed it with apksign without any problems
7- i replaced it with the one in my system with root explorer and it forcedclose and then i restart the phone
The phone booted to the locke screen and it was new with my new pictures and the new battery also was new with my pictures
But when i unlock the phone and type the pin code EVERY THING FORCED CLOSE ! And the phone rebooted with the same problem
Now what the f... I did wrong what is the problem ? I have been working all day on it with a big fail !!!!!!! Plz help plz plz
Are the permissions correct?
sinkster©
sinkster said:
Are the permissions correct?
sinkster©
Click to expand...
Click to collapse
yes
Mr.Smile said:
4- i edit a xml file by adding more lines ( the battery xml )
6- i signed it with apksign without any problems
Click to expand...
Click to collapse
Those are your problems right there...
Firstly, you cannot add anything to an apk, without adding a unique id in public.xml.
Secondly, you don't need to sign system apps.
iridaki said:
Those are your problems right there...
Firstly, you cannot add anything to an apk, without adding a unique id in public.xml.
Secondly, you don't need to sign system apps.
Click to expand...
Click to collapse
So what to do now ? How i maked work
i have used winrar to replace images and it work but without replaceing the xml
for xml i decompiled the file and edit the xml by adding few lines then i compile it and took the xml from it to the file i edit with winrar but it does't work i think the problem that i have edit the xml but did't add a unique id in public.xml couz i don't know how to do it
Mr.Smile said:
for xml i decompiled the file and edit the xml by adding few lines then i compile it and took the xml from it to the file i edit with winrar but it does't work i think the problem that i have edit the xml but did't add a unique id in public.xml couz i don't know how to do it
Click to expand...
Click to collapse
You need to count in hex and add the new drawables, being careful not to have duplicate ids.
Also you need to edit the battery display and animation files so that the new images are used.
I recommend UOT Kitchen if you are not that experienced.
iR¡[email protected]!* via Tapatalk 2

[Q] Converting readable .xml to human unreadable android .xml

Hi!
I have not found any answers from Google so I'm going to post it here and those who can answer Thank You!
I can't recompile some apps that is secured or something like that..
I have modified Dolphin browser Beta's xml files to support Flash player on Jelly Bean but I can't make .xml files to human unreadable like how them are in the app packages.
Code:
/res/xml/webcontent_prefences.xml
default value from ON-DEMaND to true
deleted: dolphin:entries="@array/pref_plugin_state_choices" dolphin:entryValues="@array/pref_plugin_state_values"
/res/xml/browser_prefences.xml
added: <mobi.mgeek.preference.FlashPlayerPreference dolphin:key="plugin_state" dolphin:title="@string/pref_content_plugins" dolphin:defaultValue="true" dolphin:background="@drawable/settings_bg_middle_bk" />
Please help me if you know how to do that..
I have tried to compile another apk with those files but then it will fail compiling the APK and I have no idea what to do and how to do!
hmmmm... i am not programmer that makes applications , but as far as i know , XML files in APK is only for layout or resources , am i correct ?
if you wanna make your browser support flash , seems it doesn't have anything to do with XML files.
and usually , shouldn't you decompile the APK files first , and then modify , and recompile after all ???
in any case , it should be APK/XML human unreadable files ----(decompile)---> human readable and modify ---(recompile)---> unreadable again.
I'm not exactly sure what the command is but I believe aapt (from the Android SDK) is your best bet. Either that or something like APKTool or FJ-APKTools so that you can just 'decompile' it and replace whatever files you need (human-readable XML that is) and then repackage/'compile' it all up again.
Unlawful said:
I'm not exactly sure what the command is but I believe aapt (from the Android SDK) is your best bet. Either that or something like APKTool or FJ-APKTools so that you can just 'decompile' it and replace whatever files you need (human-readable XML that is) and then repackage/'compile' it all up again.
Click to expand...
Click to collapse
I have used APKtool and FJ-APKtools and no luck with those, so that's why I need to do it manually somehow..
I read from internet that somehow can do something to .xml file via aapt but I don't think it could be able to convert the .xml to human unreadable .xml

Htc weather icons

Hi everyone,
does anyone knows why the weather icons extracted from htc framework.apk or weather widget.apk looks as they are damaged (as you can see in attached jpg there is a strange background instead of a empty background) ?
does exist some specific application to view them properly?
thanks
From which file and which directory did you get them ? and how did you extracted them ?
just opened /system/framework/com.htc.resources.apk then /res/drawable-xhpdi
i also tried apktool to decompile apk but same result
well you are on the right path. you need to decompile them properly. i use Virtual Ten Studio, works perfectly :good:
edit : you can't decompile the com.htc.recources.apk and that weather picture is not in the com.htc.recourses.apk anyway........
the com.htc.resources.apk can be unpacked with 7zip, then edit the files in the xhdpi folder. when done you open the com.htc.resources.apk and drag the edited xhdpi folder back in to the file.
the weatherwidget that actually has that picture needs to be decompiled.
Mr Hofs said:
well you are on the right path. you need to decompile them properly. i use Virtual Ten Studio, works perfectly :good:
edit : you can't decompile the com.htc.recources.apk and that weather picture is not in the com.htc.recourses.apk anyway........
the com.htc.resources.apk can be unpacked with 7zip, then edit the files in the xhdpi folder. when done you open the com.htc.resources.apk and drag the edited xhdpi folder back in to the file.
the weatherwidget that actually has that picture needs to be decompiled.
Click to expand...
Click to collapse
thanks for you support but i can't get Virtual ten studio anywhere
only "virtuous ten studio" appears in google search
sorry my mistake....thats the one. autocorrectfail
maybe i miss some step. if I decompile com.htc.resources.apk or /system/app/weatherwidget.apk i always get "corrupted" weather jpg inside xhdpi folder. how can I see that icons without that strange background?. i need to modify them but first i need to open/see them properly
thanks again for your support
You cant decompile the resources.apk you must unzip it and modify the PNG files and place them back in the .apk
For the others it should work, maybe you should setup the proper framework. Check the VTS site. All sorts of tutorials there

Categories

Resources