Need help for converting to 9.png - Android Q&A, Help & Troubleshooting

Hi guys .. i am making a theme for miui and I am absolutely hopeless with 9.pngs. I am trying to edit some 9.pngs but since miui uses mtz I cannot decompile it and therefore i cannot see the all important 1 px border. I would be grateful if someone knows a way or better still if someone could help me transform some pngs into 9.pngs ....thanks

Not sure if this helps, but you can decompile a mtz file by renaming it to a zip.
Sent from my GT-I9100 using XDA

irteza_h said:
...someone could help me transform some pngs into 9.pngs...
Click to expand...
Click to collapse
Android SDK includes a tool to do that, located at SDK/tools/draw9patch

Related

[Q] What is VRTHEME??

I saw lots of theme which has this in their title. but I can't find any guide or tutorial about this. So, what is this? how could I use it? has it any benefit over usual "decompile/theme/recompile/replace"ing an apk?Is there any script to implement it like apktool?
Its the universal theme flasher created by Villain ROM.
As for all your other questions I'm not sure.
Sent from my GT-I9100 using XDA
thanks,
correct me if I'm worng pls.
Universal theme flasher, is kind of template. and I should extract compiled PNGs and xmls from apk file and paste theme into that. and for editing theme, I need to paste and replace those files into the apk file and then decompile that apk.
then what should I do if I changed something in "values" folder? cause it just appears in decompiled apps and It can't be seen in a compiled app.
sam5154 said:
thanks,
correct me if I'm worng pls.
Universal theme flasher, is kind of template. and I should extract compiled PNGs and xmls from apk file and paste theme into that. and for editing theme, I need to paste and replace those files into the apk file and then decompile that apk.
then what should I do if I changed something in "values" folder? cause it just appears in decompiled apps and It can't be seen in a compiled app.
Click to expand...
Click to collapse
I think after compiling the apk, you should copy the "classes" and the other file *-) I can remember its name, and add them there.
Am not sure *-) I had this question too but I thought abt trying it first and if it doesnt work I wld ask. I have no time to try I have exams
Ba7rani123 said:
I think after compiling the apk, you should copy the "classes" and the other file *-) I can remember its name, and add them there.
Am not sure *-) I had this question too but I thought abt trying it first and if it doesnt work I wld ask. I have no time to try I have exams
Click to expand...
Click to collapse
classes.dex is for the smali that has been edited if there was any.
I assume that if the xmls were edited and they point to new PNG images/objects then the resources has been changed. I would say that in this case you would need to have an updated resources file for these adjustments? This could be pulled from your newly compiled .apk that you want to base your flashable theme off?
I am unsure if resources needs to be updated though for certain? I have flashed in the past new xmls and they worked fine, however these were not referencing any new sources or images...so my thoughts are that these mods I made didn't require this additional file?? I could be wrong. I really should read the thread about it here on XDA. I did a long time ago, but have come a long way since then.
I diverse. Try using it without new resources file and see what happens?
You may also like to looking into Morphing as well (very similar concept).
James
i would also like a explanation to what vrtheme is, all i know is that when i flash it IT NEVER WORKS!
xdarkmario said:
i would also like a explanation to what vrtheme is, all i know is that when i flash it IT NEVER WORKS!
Click to expand...
Click to collapse
is your ROM deodexede? It only works on deodexed Rom?
Sent from my GT-N7100 using Tapatalk 2
sam5154 said:
is your ROM deodexede? It only works on deodexed Rom?
Sent from my GT-N7100 using Tapatalk 2
Click to expand...
Click to collapse
yep, both my phones i tried them on are deodexed.

[Q] Help decompiling framework-res.apk

Hey, i am a bit noob here decompiling, and compiling system apks, so now im trying to decompile framework-res.apk from my CM7 rom, and i get a 9.png errors when decompiling and another strange one when compiling.
The whole CMD window is attached.
I hope get some help with this, i also got it with CM9 framework.
bump
Sent from my SG Ace
That means the .9 pangs were made wrong. This happens when some tries to take the easy way to theme things. You will not be able to compile it until you fix them
zelendel said:
That means the .9 pangs were made wrong. This happens when some tries to take the easy way to theme things. You will not be able to compile it until you fix them
Click to expand...
Click to collapse
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Adgoosuc said:
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Click to expand...
Click to collapse
Yes its because of the theme. If yo look at each file it says is broken you will have to remake all those .9.pngs properly. A search will teach you how to do it. You will need the android SDK installed for sure for the .9.png tool.
Adgoosuc said:
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Click to expand...
Click to collapse
You either have to edit the .9.png files with the draw9patch.bat file located in \android-sdk\tools.. and copy basically the pixel borders - put up two windows side by side - one stock and the one you are editing. And make sure you only have one new copy of that file in your drawable folder when done.. no normal .png's of the same name.
Or you could just "borrow" those .9.png files from another rom and use GIMP to basically edit the color only and save... just don't decompile them - use 7zip instead.
alteredlikeness said:
You either have to edit the .9.png files with the draw9patch.bat file located in \android-sdk\tools.. and copy basically the pixel borders - put up two windows side by side - one stock and the one you are editing. And make sure you only have one new copy of that file in your drawable folder when done.. no normal .png's of the same name.
Or you could just "borrow" those .9.png files from another rom and use GIMP to basically edit the color only and save... just don't decompile them - use 7zip instead.
Click to expand...
Click to collapse
Editing a .9 png like that is not the prper way to do it. He will just have issues if he tries to decompile it again. This is why alot o themes break when people try to decompile them to learn.
Take some time out OP and learn how to do it properly. The easy way is never right.
zelendel said:
Editing a .9 png like that is not the prper way to do it. He will just have issues if he tries to decompile it again. This is why alot o themes break when people try to decompile them to learn.
Take some time out OP and learn how to do it properly. The easy way is never right.
Click to expand...
Click to collapse
Which way is not proper? The 2nd suggestion was not intended to be a proper way, but it can work.. and the first way I suggested is what I would consider a good way to learn how to draw the patches - by comparison with known working ones..
EDIT - please elaborate on the not being able to decompile it again later though - I was aware of this issue and had come across it - but never new the cause.
EDIT 2 - I just noticed your stats - please share your seasoned wisdom... I have got a lot to learn yet...
Ok, i have a better way to do what i want, i jzut want to edif bools.xml inside values folder, so ill apply default theme, decompile and edit, and then i replace it.
Thanks to all who helped me!
Sent from my SG Ace
Adgoosuc said:
Ok, i have a better way to do what i want, i jzut want to edif bools.xml inside values folder, so ill apply default theme, decompile and edit, and then i replace it.
Thanks to all who helped me!
Sent from my SG Ace
Click to expand...
Click to collapse
The bools XML will be over writted when you flash the theme.
alteredlikeness said:
Which way is not proper? The 2nd suggestion was not intended to be a proper way, but it can work.. and the first way I suggested is what I would consider a good way to learn how to draw the patches - by comparison with known working ones..
EDIT - please elaborate on the not being able to decompile it again later though - I was aware of this issue and had come across it - but never new the cause.
EDIT 2 - I just noticed your stats - please share your seasoned wisdom... I have got a lot to learn yet...
Click to expand...
Click to collapse
Ok the 1 px boarder around the image has to be the last thing applied to an image. You can edit it with gimp and 7zip but that breaks the border settings. This is the reason most .9.pngs break when decompiled.

[REQUEST] Clock Color Change

I have been struggling with this procedure for the past couple of weeks and I am at my wit's end. I have tried both APKTOOL and APK Manager to decompile my SystemUI.apk and no matter how many ways I try to decompile it, there absolutely is no smali directory.
If I post my SystemUI.apk, would an experienced themer, developer, or modder be kind enough to edit the smali coding to make the clock a different color? I am happy with the icons and everything else; I just want the color change.
The color I was looking for is #33b5e5 (the ICS blue). I would appreciate any help someone would be willing to give. Thanks.
Higgs_Boson said:
I have been struggling with this procedure for the past couple of weeks and I am at my wit's end. I have tried both APKTOOL and APK Manager to decompile my SystemUI.apk and no matter how many ways I try to decompile it, there absolutely is no smali directory.
If I post my SystemUI.apk, would an experienced themer, developer, or modder be kind enough to edit the smali coding to make the clock a different color? I am happy with the icons and everything else; I just want the color change.
The color I was looking for is #33b5e5 (the ICS blue). I would appreciate any help someone would be willing to give. Thanks.
Click to expand...
Click to collapse
I will gladly do it for you right now.
Give me about 10 mins time.
EDIT: took a look at the apk, the reason why there is no smali folder is because you are using an odexed rom I believe. You have to be deodexed to be able to modify the smali inside system apks.
Sent using Tapatalk
klin1344 said:
I will gladly do it for you right now.
Give me about 10 mins time.
EDIT: took a look at the apk, the reason why there is no smali folder is because you are using an odexed rom I believe. You have to be deodexed to be able to modify the smali inside system apks.
Sent using Tapatalk
Click to expand...
Click to collapse
Thank you very much for your help.
Is there nothing that can be done?
Higgs_Boson said:
Thank you very much for your help.
Is there nothing that can be done?
Click to expand...
Click to collapse
You could deodex the apk, make your smali edits, re-odex it again, and then push both files into the correct directories, but it is a very annoying and tedious process.
You should flash a custom rom (all of them are deodexed) and make your smali edits from there.
Sent using Tapatalk

[Q] Changing emotion on i9100??

i replaced with some emotions png files on framework-res.apk emotions ( res/drawablw-hdpi inside) but it didn't work again i check whether framework-res includes my new emos' but yes it has my new emotion png's. But when i text to someone still i got stock emotions .. y? can some one tell me how to replace original files of emos' (I used http://forum.xda-developers.com/showthread.php?t=1578854 to decompile and compile framework-res. because i need CRT effect too. i got CRT effect but not emotions )
help me please
Thankx
sasadara said:
i replaced with some emotions png files on framework-res.apk emotions ( res/drawablw-hdpi inside) but it didn't work
Click to expand...
Click to collapse
You need to change the emoticons in \system\app\Mms.apk\res\drawable-hdpi
Also, it's not necessary to decompile & recompile to do this.
Either just drop the new pngs into Mms.apk using 7-Zip or make a flashable vrtheme - there's some here you can modify.
Spannaa said:
You need to change the emoticons in \system\app\Mms.apk\res\drawable-hdpi
Also, it's not necessary to decompile & recompile to do this.
Either just drop the new pngs into Mms.apk using 7-Zip or make a flashable vrtheme - there's some here you can modify.
Click to expand...
Click to collapse
+1
ahh i got it
Thank you

[Need Help To Make SystemUI.apk]

. Hey all !
Can any one help me how to decompile systemui as well as to make a new systemui.apk .
I googled lot but Im not getting how to decompile UI even I tried to download some tools like apktool but I don't know why that app never starts
Can any one provide me simple and straight method for making a new system UI and provide tools required to make UI
I'm really noob in such things so your help will not only help me but also other noobs like me. .
Thanks
psyduck said:
. Hey all !
Can any one help me how to decompile systemui as well as to make a new systemui.apk .
I googled lot but Im not getting how to decompile UI even I tried to download some tools like apktool but I don't know why that app never starts
Can any one provide me simple and straight method for making a new system UI and provide tools required to make UI
I'm really noob in such things so your help will not only help me but also other noobs like me. .
Thanks
Click to expand...
Click to collapse
It isnt an app that u can just theme with so easily.
U have to open apktool using "CMD" or Command Prompt
If u want to theme easily use ticklefish's Tickle my droid
If u want to theme as u want exactly use apktool.
Also If u just want to edit images (and not xmls)
Just use 7 zip to extract ur apk. Edit pngs in drawable-ldpi and drawable-hdpi using gimp/Paint.net/Photoshop
then put edited files back in the apk
Cheers :cheers:
make sure after the edit put same filename and repack
arun531 said:
make sure after the edit put same filename and repack
Click to expand...
Click to collapse
dont repack ever....
either recompile usin apktool or just replace it from the apk without unpacking
Sent from my SM-T211 using Tapatalk

Categories

Resources