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...
Related
Hey guys,
I'm trying to finish up my new homescreens, and my last widget is Audio Manager Pro. I've tried the metamorph on it, but it wasn't working. I've also tried to manually open the .apk and edit the .pngs i needed to edit, but have issues getting it signed. Any modders have some free time to help a theme noob?
What I am trying to do is make the background .pngs for the widgets transparent. Any help would be greatly appreciated!
Bump, any help or suggestions would be great!
Sent from my Evo.
I will be keeping an eye on this. The transparent skin they have for AM is transparent BUT the little bars that show levels are yellow, orange, and green or red or some yucky (to me) color combo! (they match NONE of the wallpapers I use) I wrote the developer this morning and asked for transparent but with like white, or shiny metallic bars ....
Yea, the am transparent skin on the market isn't really fully transparent. I also want the background to the fuxia skin transparent.
Sent from my Evo.
I answered my own question, but I thought I'd share what I did to make it happen.
1. adb pulled the apk
2. Opened the .apk in betterzip (mac user) WITHOUT EXTRACTING, and pulled the folders that needed editing.
3. Edited .pngs in Photoshop
4. Dragged the folders back into Betterzip into the correct directories.
5. Saved the changes to the .apk
6. adb pushed the .apk to /system/app
7. Profit!
Hopefully that helped someone!
That would help me IF i knew what I was doing ... I don't have Photoshop and I def don't know how to do that.
I did see under standalone's on this following link, 6th one down had it. Isn't that it? I tried it but it didnt' work for me. Just like the Genie one won't. Everything else my phone had taken easy.
http://forum.xda-developers.com/showthread.php?t=652661
kyleblakepeters said:
I answered my own question, but I thought I'd share what I did to make it happen.
1. adb pulled the apk
2. Opened the .apk in betterzip (mac user) WITHOUT EXTRACTING, and pulled the folders that needed editing.
3. Edited .pngs in Photoshop
4. Dragged the folders back into Betterzip into the correct directories.
5. Saved the changes to the .apk
6. adb pushed the .apk to /system/app
7. Profit!
Hopefully that helped someone!
Click to expand...
Click to collapse
Having the same problem, also can't get SetCPU widget to go transparent.
So, open the apk in a zip program, take out what needs editing, edit, put back in?
Yes and push back to system/app. Make sure to delete the app from the phone before pushing back.
Sent from my Evo.
effluent said:
Having the same problem, also can't get SetCPU widget to go transparent.
So, open the apk in a zip program, take out what needs editing, edit, put back in?
Click to expand...
Click to collapse
Umm.. SetCPU has an option to make the background clear.. Just an FYI.. It's a setting you change when you first open the widget..
I tend to like things to look mostly stock, but I also wanted an H icon when it was in use... so I've knocked up this framework (used my FRG83D one, dunno if it's OK to use on older versions) with only that one change.
Probably not of that much interest to people, but rude not to share all the same.
http://www.multiupload.com/JB9SXZLF1G
Just overwrite (might want to take a backup first etc.) /system/framework/framework-res.apk with the one in the link and reboot.
I noticed that after pushing/rebooting, my accounts had vanished. No idea if that's normal when replacing the framework, but it only took a minute to re-add them.
Or, flashable .zip so you don't lose account details: http://www.multiupload.com/22TNJDP10X
New version, updated for FRG83G: http://www.multiupload.com/1DI1TBZNWA
Rusty! said:
...I noticed that after pushing/rebooting, my accounts had vanished. No idea if that's normal when replacing the framework, but it only took a minute to re-add them.
Click to expand...
Click to collapse
If you make a flashable update.zip your accounts do not vanish
Ahh right, well to save anyone that issue, I'll add one to the OP
Anyone on this side of the pond try this ?
Like the title says....anyone here in the US/Canada try this out yet ?
I'm running 2.2.1 (FRG83D) and the IN/OUT H PNG's icons are already there in the framework-res.apk, so I'm just curious what it is you did to turn them in your update script.
Also...the
Cert.rsa
Cert.sf
Manifest.mf
files you're including are older than the certs that are in the framework-res.apk that's in 2.2.1 (FRG83D). This is both within the update zip, and inside the framework-res.apk that's in your update zip.
Any particular reason you included the older certs in the framework-res.apk ?
Just curious trying to see what you've turned on to get the H to appear.
Decompile framework-res.apk, and look in /res/values for bools.xml
In there you just change config_hspa_data_distinguishable to true, save and recompile.
The reason the certs are in the update are because I just flung my updated framework into an existing update.zip for framework. Worked fine though. No idea why they would be older in my .apk, as I pulled it straight from my phone By product of recompiling perhaps?
So...anyone take the plunge ?
Anyone try this on theirs ?
Update: Works as advertised...ran speedtest.....definitely picks up the difference.
Updated for FRG83G: http://www.multiupload.com/1DI1TBZNWA
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?
So I've been on a big themeing kick lately and got bored of themeing systemui and framework so I decided to modify my MMS. I blacked it out with blue text and looks pretty sweet. I then decided to try and modify my keyboard to have red color keys instead of the original white. I decompiled LatinIME.apk, went into values/styles.xml. I only edited 3 lines of hex code changing it from white to red (#FFFFFFFF to #FFF44444). I recompiled, deleted the resources file and pushed it to system/app using Root Explorer and of course I fixed permissions. After rebooting device for mods to take affect I immediately get an error message stating, "Unfortunately, Android Keyboard Has Stopped." I have tried everything I can think of to make this work but for some reason I just can't get the keyboard to stop force closing. I know my mods DO work because when I open my MMS and try to open the keyboard, after the error message pops up my keyboard pops up behind it with the red keys! But then it goes away after I discard the message. I took some logcats but I can't figure out what the issue is with them......please take a look and let me know if you see anything that I don't.
For your information I am running Eaglesblood 4.0.4 AOSP, stock kernel.
Well I finally got it working, if anyone is interested. All I had to do was replace the resources.arsc file in the original apk with my modded resources.arsc from the newly compiled apk and push THAT one to my phone. Now I have a working themed keyboard!
Hi.. maybe a late answer.
for any system apk, after building the apk, you should :
Copy the original META-INF folder and perhaps AndroidManifest.xml from the original apk to the new one
Repack the apk, no need to sign.
Appreciate the response, but I posted my solution just above your's lol