Hey guys, question is kind of simple. I've been editing my frame work and system apks. Last night I finally figured out how to properly decompile the apks so the apktool creates the .yml file. What my question is, ive edited the framework apk and added more png files to it then edited the xml files except public. What is the easiest way to set the hex ids for the png files? I read recompiling would do it but I didn't have time to try it. Would that work or is there another way?
Sent from my htc evo
Just adding pngs cannot add hex ids to public.xml while recompiling
The pngs should be registered first
e.g: If I want to add 1% battery mod then I will register those pngs in status_battery.xml and then add the pngs and then hex ids are addded automatically.
Anyways what are you trying to do?
Burned from my laser torch using pencil cells
Theming my phone using uot kitchen files from a bunch of different mods on there, so basically I downloaded all the kitchen files I liked then took out the images from each I wanted and combined them into one. After that I also edited my own version of headphones using adobe ps and created a fully working and smooth sync animation. Ive already edited the drawable.xml file and added the animation xmls to the appropriate folders. The only thing I need left is do I have to manually add the hex ids in the value folder or does the recompile do that for me?
Sent from my htc evo
Ok so I figured out how to properly theme but for some reason the animations for wifi in range and sync aren't working. This it's what I did from looking at someone elses mod on uot. Created the xml files and placed them into the res/drawable folder. Added the png files to drawable-hpdi folder and changed the original wifi_in range name to a zero at the end. For sync_anim0, made that a 1. So now the xml files I created reflect the png names starting with those two. Is there anything else I need to do?
Sent from my PC36100 using xda premium
Related
I've been a long time reader and I've learned quite a bit today on Android and its applications. I've been trying to recompile a modified Protips.apk and have it successfully run on my D1. I've been unsuccessful, and would like some pointers on where to looks next.
I'm intrigued by the modified Home Screen Tips widget as seen on Cyanogen and BuglessBeast. I figured I could do it too since it seems rather simple.
I pulled Protips.apk from my D1, archived it somewhere else, and ran apktools to decompile the app. I found that in: res/values/arrays.xml there's all the code I need to start changing text. I wanted to do something basic like Hello World as a test, so I slightly changed the first item to read Hello World! on the first line. So I edited the .xml file and considered the job done.
I recompiled my modified contents using apktools, and pushed the apk to my phone. It didn't show up in the widgets menu, so I figured I needed to sign the thing.
First I tried copying the META-INF data from the original APK into the new one, and though the you could apply the widget to the homescreen, it'd error. "Problem loading widget." Next I took the original manifest and popped it into the new APK. Same thing.
I thought I could try singing the modded APK myself. After recompiling I ran the APK through Auto-Sign. It still errors.
Someone mentioned that if you're modifying XML files, the resources.arsc file should be removed "prior to recompiling." I'm lost at this point, since when you decompile with apktools, you don't have access to that resource. If you remove it from the final apk, the app doesn't show up in the widgets menu.
I'm trying to figure out where I'm going wrong. Surely it has to be something rather simple.
------------------
Resolved
Decided to give Apk Manager a try. Decompiled the APK, edited the arrays.xml file, Compiled (deleting resources.arsc where instructed in the keep folder), signed the app, then pushed it to my phone. It works. I'll attempt the process using apktools again now that I have a working mod.
derik001 said:
I've been a long time reader and I've learned quite a bit today on Android and its applications. I've been trying to recompile a modified Protips.apk and have it successfully run on my D1. I've been unsuccessful, and would like some pointers on where to looks next.
I'm intrigued by the modified Home Screen Tips widget as seen on Cyanogen and BuglessBeast. I figured I could do it too since it seems rather simple.
I pulled Protips.apk from my D1, archived it somewhere else, and ran apktools to decompile the app. I found that in: res/values/arrays.xml there's all the code I need to start changing text. I wanted to do something basic like Hello World as a test, so I slightly changed the first item to read Hello World! on the first line. So I edited the .xml file and considered the job done.
I recompiled my modified contents using apktools, and pushed the apk to my phone. It didn't show up in the widgets menu, so I figured I needed to sign the thing.
First I tried copying the META-INF data from the original APK into the new one, and though the you could apply the widget to the homescreen, it'd error. "Problem loading widget." Next I took the original manifest and popped it into the new APK. Same thing.
I thought I could try singing the modded APK myself. After recompiling I ran the APK through Auto-Sign. It still errors.
Someone mentioned that if you're modifying XML files, the resources.arsc file should be removed "prior to recompiling." I'm lost at this point, since when you decompile with apktools, you don't have access to that resource. If you remove it from the final apk, the app doesn't show up in the widgets menu.
I'm trying to figure out where I'm going wrong. Surely it has to be something rather simple.
------------------
Resolved
Decided to give Apk Manager a try. Decompiled the APK, edited the arrays.xml file, Compiled (deleting resources.arsc where instructed in the keep folder), signed the app, then pushed it to my phone. It works. I'll attempt the process using apktools again now that I have a working mod.
Click to expand...
Click to collapse
Using apktool you must sign after other wise it won't install... I had issues using it to do a status bar mod.. Wondering if I can just sign it using that apkmanager and have it work... I used a kitchen to sign mine and it didn't sign right...
Need help from a fellow liberty theme. I've been having problems theming .9.png's. It doesn't seem to matter if I decompile, theme, and recompile, or just use gimp/photoshop in or out of the file. I'm using an existing theme already I'm not building xmls or anything using the same resources. I'm also using draw9patch to draw the patches for when i decompile it. After recompiling it and or flashing it it either bootloops or it'll boot up but EVERYTHING will force close or all of the .9.png's are stretched weird and show the black lines I put in with draw9patch. Is there any themer that could share a step by step guide on how they do it or how to deal with theming .9.png's. any how to out there is not working and its getting really difficult not to give up. I'm sure it is probably my fault but theres no guides on this and I'm really trying to learn
Sent from my DROIDX using XDA App
It may not be the images causing your bootloops or FC's, but a different issue when recompiling. When you recompile, do you get .9 error messages? If not, try pulling out your images and adding them to the original framework-res.apk just through 7zip. If you do get error messages from the .9's while compiling then it is an issue with the guides not being drawn correctly.
UnkleDuke said:
It may not be the images causing your bootloops or FC's, but a different issue when recompiling. When you recompile, do you get .9 error messages? If not, try pulling out your images and adding them to the original framework-res.apk just through 7zip. If you do get error messages from the .9's while compiling then it is an issue with the guides not being drawn correctly.
Click to expand...
Click to collapse
I didn't get any errors this last time. And I used archive manager on Linux to pull the images from the drawable hdpi folder to the one in the themes folder I'm using as a base and it is a liberty 1.5 theme and I'm using liberty 1.5 and everything was fc'ing
Sent from my DROIDX using XDA App
First, read this thoroughly:
http://developer.android.com/guide/developing/tools/draw9patch.html
You take a .9, rename it to a regular .png. Open it, edit it, save it. (as .png still) open that .png inside of draw9patch, add your lines. Save the image (as a .9.png). Put the image into eclipse to recompile the image. (Make an unsigned .apk, and pull it)
This is the only way I've ever done it, and it works every single time. People saying that you should add the lines in photo shop or anything else are lucky I guess, caues I've never got that to work for me.
joe772 said:
First, read this thoroughly:
http://developer.android.com/guide/developing/tools/draw9patch.html
You take a .9, rename it to a regular .png. Open it, edit it, save it. (as .png still) open that .png inside of draw9patch, add your lines. Save the image (as a .9.png). Put the image into eclipse to recompile the image. (Make an unsigned .apk, and pull it)
This is the only way I've ever done it, and it works every single time. People saying that you should add the lines in photo shop or anything else are lucky I guess, caues I've never got that to work for me.
Click to expand...
Click to collapse
I use draw9patch save it and put it in the drawable hdpi used apktool to compile and then just pulled em to the other drawable hdpi grrrrr
Sent from my DROIDX using XDA App
http://androidforums.com/droid-x-all-things-root/246462-theme-help-tutorial.html
sometimes i take the png they give, open it up in photoshop and draw over the layers. that way the size resolution and other things remain the same except for the image
I'm trying to make a battery meter for my rooted Inspire. I downloaded a battery meter to use as a guide template for mine. I have made all the icons and set up my folders exactly the same as the template. I opened the xml file and replaced all the fields with my own information so they are basically the same as the template. When I try to unzip and use it in metamorph, it says that it's not a valid theme file. Can anyone tell me what I'm doing wrong? I've never done this before so I'm trying to learn all I can. I'm not familiar with xml. Is it not ok to just copy the code and change the info? Thanks in advance.
Ok well I'm starting to see my problem isn't editing the xml tags...but the last part of the code, where it's asking for the .apk you're editing and the path. How do I find that information?
I bought a clock widget (Ohio State Clock), and I like almost all i see, except that it is a 4x2 and I really wish it were 4x1... I like to see my wallpaper. I have extracted the apk and searched through the files within to find the images I want to edit. I edited the size of them slightly in Photoshop and saved and zipped it back up, but it wont install on the handset. I didn't assume that it would, but it was worth a shot.
Inside the .apk I have:
Assets folder:
-Schedules XML (I assume this is the football/basketball schedules and scores)
MET-INF folder:
-anddev_k.rsa
-anddev_k.sf
-manifest.mf
Res folder:
-Drawable folder
-----All images and numbers are separate
-----btn XML
-Layout folder: (all XML's)
-----countdown_popup
-----loading
-----main
-----scoreboard
-----transparent
-----w_widget
-----w_widget_analog
-----w_widget_flip
-----widget
-----widget_analog
-----widget_flip
XML folder:
-Widget provider
Android Manifest XML
Classes.dex
Resources.arsc
My question, if possible, is there any way that I can make this clock work with the updated background image i adjusted, or can I piece together a separate clock from these files? Even if anyone knows what any of these files are could share with me so I can figure it out would be greatly appreciated.
ChrisAult2004 said:
I bought a clock widget (Ohio State Clock), and I like almost all i see, except that it is a 4x2 and I really wish it were 4x1... I like to see my wallpaper. I have extracted the apk and searched through the files within to find the images I want to edit. I edited the size of them slightly in Photoshop and saved and zipped it back up, but it wont install on the handset. I didn't assume that it would, but it was worth a shot.
Inside the .apk I have:
Assets folder:
-Schedules XML (I assume this is the football/basketball schedules and scores)
MET-INF folder:
-anddev_k.rsa
-anddev_k.sf
-manifest.mf
Res folder:
-Drawable folder
-----All images and numbers are separate
-----btn XML
-Layout folder: (all XML's)
-----countdown_popup
-----loading
-----main
-----scoreboard
-----transparent
-----w_widget
-----w_widget_analog
-----w_widget_flip
-----widget
-----widget_analog
-----widget_flip
XML folder:
-Widget provider
Android Manifest XML
Classes.dex
Resources.arsc
My question, if possible, is there any way that I can make this clock work with the updated background image i adjusted, or can I piece together a separate clock from these files? Even if anyone knows what any of these files are could share with me so I can figure it out would be greatly appreciated.
Click to expand...
Click to collapse
There is a tool available online called "apksigner" it essentially "reseals" an opened apk and allows it to be installed on android again.
1. Open the APK
2. Navigate to the /res/drawable folder
3. Delete the .pngs you want replaced
4. Drag and drop the png you edited into that folder
5. Delete the META-INF folder inside the APK
6. Close your archiving application.
Click to expand...
Click to collapse
Link to apk resigner: http://www.mediafire.com/?uwzjjydnm2r
Link to the orginal thread: http://forum.xda-developers.com/showthread.php?t=503007
Be sure to thank me if I helped
Thanks man, that helps a lot!
So im working on dropdown toggles for non at&t firm and there is a lack of info on the subject will anyone with any tutorials pm me or post it here? Im close but not there yet....
Sent from my MB865 using XDA
daavvis said:
So im working on dropdown toggles for non at&t firm and there is a lack of info on the subject will anyone with any tutorials pm me or post it here? Im close but not there yet....
Click to expand...
Click to collapse
I just took a screenshot of your sig just in case. LoL
Man, i went at this for a few hours today with the indian rom.. it's a bunch of mis-matched ids between the quickpanel smali files and the public.xml - and a couple other xmls edits are needed too.
I think you gotta add the strings.xml lines and the drawable-hdpi icons, then recompile - that will generate the resource ids in the public.xml. Then decompile the new unsignedSystemUI to get those public.xml ids and change them accordingly in the 8 or so quickpanel smalis, changing like 8 or 10 ids in each one..
I went through all of them and recompiled. But after my status bar forced close, I re-decompiled it and the ids were mismatched again... I messed up a step or two somewhere - who knows.
I'll get back to it again sometime, but good luck in the meantime..
Just remember to delete the classes.dex from the keep folder for the smali edits to stick, and the resources.arsc of course for the values xml edits and others..
That's my half-assed tutorial...
Sent from my mind using XDA
Man, i went at this for a few hours today with the indian rom.. it's a bunch of mis-matched ids between the quickpanel smali files and the public.xml - and a couple other xmls edits are needed too.
I think you gotta add the strings.xml lines and the drawable-hdpi icons, then recompile - that will generate the resource ids in the public.xml. Then decompile the new unsignedSystemUI to get those public.xml ids and change them accordingly in the 8 or so quickpanel smalis, changing like 8 or 10 ids in each one..
I went through all of them and recompiled. But after my status bar forced close, I re-decompiled it and the ids were mismatched again... I messed up a step or two somewhere - who knows.
I'll get back to it again sometime, but good luck in the meantime..
Just remember to delete the classes.dex from the keep folder for the smali edits to stick, and the resources.arsc of course for the values xml edits and others..
That's my half-assed tutorial...
Sent from my mind using XDA
Click to expand...
Click to collapse
Yeah i spent hours changing id's then when i compiled it told me it was skipping the quickpannel folder cause it was unrecognised.... ill be back at it today...
And if u think india firm is bad whip open the asia firm.... the numbers are even further off and theres a whole extra folder in the values folder
........i feel like asking jim about this would be like asking the pres to tie your laces hahaha .........
Grrrrr mot and att
Sent from my MB865 using XDA