[Q] Decompiling JB Rosie - AT&T, Rogers HTC One X, Telstra One XL

So I asked this question a long while ago, never got an answer, so I am trying again. I am interested in creating a 4x5 Rosie for JB Sense with mikeyxda's tut. I had done so previously for ICS Rosie, but can't seem to get anything going with JB Rosie. I get stuck at the very first step - decompiling Rosie.apk
1) I installed the framework from com.htc.resources.apk, framework-htc-res.apk, and framework-res.apk
2) Decompiled Rosie.apk
3) Without doing anything I attempt to recompile Rosie.apk
When I compare the original (step #2) to the recompiled one (step #3) I see a huge size mismatch - 1868 KB vs. 788 KB. If I flash the recompiled Rosie back to the phone it crashes immediately and does not work. I have tried this with both apktool 1.5.2 as well as VTS, with the same result in both cases.
Any suggestions?
EDIT: after comparing the recompiled and original APK, I am seeing the following differences:
assets\ is stored with zero compression in the original but "deflated" in the recompiled app
META-INF is present in the original but absent in the recompiled app
resources.arsc is a slightly different size and a newer version
Not sure whether any of this is significant or what to do about it. Heeeeeelp

When you decompile Rosie.apk do you get any errors?
Only asking due to the fact that MIUI has a ToolBox mod that was made by a dev, he made a special smali.jar and baksmali.jar for it. He had made the file names of the two main smali files for toolbox too long so the "commercial" smali/baksmali couldn't decompile those files.
Sent from my HTC One X using xda premium

Myrder said:
When you decompile Rosie.apk do you get any errors?
Only asking due to the fact that MIUI has a ToolBox mod that was made by a dev, he made a special smali.jar and baksmali.jar for it. He had made the file names of the two main smali files for toolbox too long so the "commercial" smali/baksmali couldn't decompile those files.
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
No errors only warnings

Related

[Q] Modding Rosie.apk

Ok I'm trying to make Mods to the Rosie.apk. But everytime I load my Rosie.apk I continued FC on htc.sense.com, Even if I make no changes to the rosie it still does this...What I'm doing is.....
1) apktool d Rosie.apk
2) I make no changes and just recompile it
apktool b
I get no errors so It seems to build just fine
3)Then I sign the apk
java -jar signapk.jar testkey.x509.pem testkey.pk8 Rosie.apk Rosie2.apk
4)I put it in a flashable zip file(I know this isnt't the problem)
flash it and everything loads fine then nonstop FC
I am running Ubuntu if that makes a difference........ANyone got any Ideas
I know i was having issues similar to this, I think it depends on the rom you pulled rosie.apk from and it's dependancy's when you recompile? Virtuous is giving me fits in this area even without modding anything just decompile and recompile..
My issue is with com.htc.resources
Or is rosie.apk not a system app and dont need signing? I dont think you sign system apps
I do you have the right resources for apktool and I even tried flashing an unsigned version as well with no luck

Solved - Modifying Rosie.apk

Wasssup fellas! Ok so I'm no themer but I've started to delve into your world a little bit. I'm looking to draw on the experience of any of you that have successfully modified the Rosie. So here's my set up
I've got Apktool set up in Ubuntu before you ask I downloaded 1.3.1 not 1.3.2
I have all the dependencies in place
I've installed the framework (apktool if com.htc.resources.apk)
Rosie.apk decompiles with no errors (apktool d Rosie.apk out)
I've modified /res/value/colors.xml to add transparency to the app drawer? (This may be my issue)
Compiled (cd out/ .......apktool b) compiles with no errors
I've tried this signing Rosie.apk, Not signing it, Copying out the "Res" and "Resource" file and going into the original Rosie.apk with Ark Manager without extracting the archive and dropped in the "Res and "Resource" files.
Same result each time when I push the file via ADB or put it in a flashable zip the phone boots goes through the animation capacitive keys light up then the phone gets stuck on the last frame of the boot animation and just hangs there forever no boot loops just hangs there?
Any help would be more than appreciated, thanks guys!
Lou
gtalk @ RedemptionRom
email: [email protected]
Rosie in my sky raider theme is working great. And I modified the png's inside it. Didn't need to do all of the things you did. I just themed the png's, zipped it up in an update.zip and then flashed it through recovery.
But I did not edit the colors.xml like you did. I left that alone.
[¦] mobile [¦]
Be sure to use the same com.htc.resources.apk and framework-res.apk from the ROM you took Rosie from.
HeyItsLou said:
Wasssup fellas! Ok so I'm no themer but I've started to delve into your world a little bit. I'm looking to draw on the experience of any of you that have successfully modified the Rosie. So here's my set up
I've got Apktool set up in Ubuntu before you ask I downloaded 1.3.1 not 1.3.2
I have all the dependencies in place
I've installed the framework (apktool if com.htc.resources.apk)
Rosie.apk decompiles with no errors (apktool d Rosie.apk out)
I've modified /res/value/colors.xml to add transparency to the app drawer? (This may be my issue)
Compiled (cd out/ .......apktool b) compiles with no errors
I've tried this signing Rosie.apk, Not signing it, Copying out the "Res" and "Resource" file and going into the original Rosie.apk with Ark Manager without extracting the archive and dropped in the "Res and "Resource" files.
Same result each time when I push the file via ADB or put it in a flashable zip the phone boots goes through the animation capacitive keys light up then the phone gets stuck on the last frame of the boot animation and just hangs there forever no boot loops just hangs there?
Any help would be more than appreciated, thanks guys!
Lou
gtalk @ RedemptionRom
email: [email protected]
Click to expand...
Click to collapse
This means sense failed to load. The phone booted but sense does not work. If you have a back up launcher it would have defaulted to that. Good way to test is to install lp or launcher 2 so next time it will still load in.
synisterwolf said:
This means sense failed to load. The phone booted but sense does not work. If you have a back up launcher it would have defaulted to that. Good way to test is to install lp or launcher 2 so next time it will still load in.
Click to expand...
Click to collapse
Great idea!!! Doing that makes testing much easier fairly obvious don't know how I missed that one.
Berzerker7 said:
Be sure to use the same com.htc.resources.apk and framework-res.apk from the ROM you took Rosie from.
Click to expand...
Click to collapse
The Rosie is part of the theme I'm using which comes with both the Framework-res.apk and com.htc.resources.apk. Am I correct in using this set of framework files or should I be using the Rom's original framework?
What exactly are you trying to modify in rosie? Is it just the app drawer background? I can tell you that rosie has little to do with framework-res. The app drawer background colors are located in launcher.xml and allappsgridview.xml.
deficitism said:
What exactly are you trying to modify in rosie? Is it just the app drawer background? I can tell you that rosie has little to do with framework-res. The app drawer background colors are located in launcher.xml and allappsgridview.xml.
Click to expand...
Click to collapse
I mentioned the framework because apktool requires you to install it to decompile rosie.apk. I will check those xml's out. The failed boot may be because I edited the /res/values/colors.xml file. I don't have my virtual machine fired up but I did edit one of the all_apps strings in there from #ff000000 to #80000000 on the advice of a themer. This may be what f'd me up.
HeyItsLou said:
I mentioned the framework because apktool requires you to install it to decompile rosie.apk. I will check those xml's out. The failed boot may be because I edited the /res/values/colors.xml file. I don't have my virtual machine fired up but I did edit one of the all_apps strings in there from #ff000000 to #80000000 on the advice of a themer. This may be what f'd me up.
Click to expand...
Click to collapse
Yeah don't worry about the colors.xml. just those 2 xmls I mentioned.
deficitism said:
Yeah don't worry about the colors.xml. just those 2 xmls I mentioned.
Click to expand...
Click to collapse
Will do, thanks man.
deficitism said:
Yeah don't worry about the colors.xml. just those 2 xmls I mentioned.
Click to expand...
Click to collapse
What changes should I make to the XML's for transparency? Also after I compile Rosie what do you recommend for a process in getting the new changes implemented? To clarify, should I rip the resources file and classes.dex out of the new compiled version and replace the ones in the stock Rosie? Ive tried about 20 different methods and I get force closes each time...thanks man!
Sent from my ADR6300 using XDA App
If it compiled correctly you should be able to push the compiled version to /system/app with no trouble. There are 2 possibilities:
1) The apk got signed with whatever tool you are using and system apk's can't be signed this way. I think APKManager signed with the test cert automatically.
2) The changes in the xml's may not be correct for which we need to wait for deficitism to verify what was changed. Typically changing color attribs won't cause an FC though.
One thing you can try is to just extract the res folder, where the changes are, in the new Rosie to your PC and open the original with 7zip and drag that folder to the 7zip window. Then push that.
NilsP said:
If it compiled correctly you should be able to push the compiled version to /system/app with no trouble. There are 2 possibilities:
1) The apk got signed with whatever tool you are using and system apk's can't be signed this way. I think APKManager signed with the test cert automatically.
2) The changes in the xml's may not be correct for which we need to wait for deficitism to verify what was changed. Typically changing color attribs won't cause an FC though.
One thing you can try is to just extract the res folder, where the changes are, in the new Rosie to your PC and open the original with 7zip and drag that folder to the 7zip window. Then push that.
Click to expand...
Click to collapse
Thanks dude, I actually figured it out no more help needed.
HeyItsLou said:
Thanks dude, I actually figured it out no more help needed.
Click to expand...
Click to collapse
Cool, glad you got it working.
So what was the cure?

Help with 10% increments on Blur 3.4.2

Reading another thread I found out how to successfully get the battery icons to drop by 10% increments, but when I go into settings I can not go into settings and select battery manager. It causes the settings to force close.
I must missing something somewhere. Here are my steps I took.
1. Decompile framework-res.apk
2. Edit stat_sys_battery.xml in both /drawable a drawable-hdpi.
Added in all of the stat_sys_battery.png's
3. Recompile framework-res.apk
4. Using win-rar replace META-INF and AndroidManifest.xml from the original framew res.apk
5. Pushed the framework-res.apk to my phone
Now it seems the phone functions properly, but most of all the options in settings cause settings to force close.
Any help on this matter would be greatly appreciated.
Sent from my DROIDX using DroidForums App
Sent from my DROIDX using XDA App
I personally find it hilarious that even on 3.4.2 which is the newest release, motorola still has not fixed the battery manager force close issue... theyve had like four OTA updates now since it originally came out and still nothing
is 3.4.2 an official release from Moto and Verizon?
sent from the xda premium app for android
1. Decompile framework-res.apk (save a copy for modifications later)
2. Edit stat_sys_battery.xml in both /drawable a drawable-hdpi.
3. Added in all of the stat_sys_battery.png's
4. Recompile framework-res.apk
5. Using win-rar copy everything, with the exception of the res folder, that's changed from the newframework-res.apk to the original you saved for Modding. Your goal is to end up using the ORIGINAL .apk not the recompiled one. I think you need resource.arsc and android manifest only (not sure).
6. Replace the xmls in the original fw with the new ones and do the same with the pngs. You should have slightly more pngs (additional percentages) than before.
5. Pushed the modified OLD framework-res.apk to my phone
GL
Thank you for the response. I did get it to work correctly, my big mistake, was during the recompile. I used apk manager and it asks if you would like to keep all unchanged files from the original, them makes a keep folder and you delete what you changed. And if an xml gets edited to also delete the resources file. Then use the new apk and replace the meta and androidmanifest. Works great now. Now I just need to make new battery meter that is easier to read hout or make new battery icons as these were made for
Sent from my DROIDX using XDA App
Doh! I thought you were trying to modify a themed framework-res.apk (stock framework can be decompiled/recompiled with no issues).
Glad you got it working.

[Q] decompiling androidmanifest.xml

I'm fooling with an sgsii apk that works on Vibrant and I9000 but not on 4g -- anyone know of a PC application that will decompile the AndroidManifest.xml file so it can be edited?
nazcalito said:
I'm fooling with an sgsii apk that works on Vibrant and I9000 but not on 4g -- anyone know of a PC application that will decompile the AndroidManifest.xml file so it can be edited?
Click to expand...
Click to collapse
Look into apkmanager
Sent from my SGH-T959V using Tapatalk
Don't know if it will work or not but try using the "how to decompile an apk" guide that I posted
Sent from my SGH-T959V using XDA App
it will work but for that you need to decompile a working classes dex file one from the origonal apk and one from the sgs4g u also need to delete out the resources arsc and let it compile a new one the new_classes.dex file (the one from the sgs4g) needs to be put into the modified apk file and renamed from New_classes.dex to classes.dex
You're not saying just replace the classes.dex and the resources.arsc files with ones from the 4g? I can already rename an apk file to zip and unzip the thing, in fact I've replaced icons and stuff in apps with no problem
nazcalito said:
You're not saying just replace the classes.dex and the resources.arsc files with ones from the 4g? I can already rename an apk file to zip and unzip the thing, in fact I've replaced icons and stuff in apps with no problem
Click to expand...
Click to collapse
images are one thng no the classes dex needs to be decompiled and recompiled (after your edits) for the 4g.. They are not that interchangeable
the resources will be rebuilt when u recompile the apk so thats not a really big issue
ok the app is the digital clock from sgs II. This is a picture.
I know there are lots of digital clock apps around but I don't like any of them.
Plans were not to change app at all but just port it.
Hmm now I'm confused. The apktool decompiles the classes.dex and resources.arsc files and I end up with smali files, so I guess I should re-read the thread on porting roms, aha but what 4g classes.dex file do I use, something from an apk like this one?
I have gone through the smali files and there is nothing about storage. I'm not sure why the stock app won't install without modification.
I am sure all you need to do is get a key and sign the app. Not sure how to do it though because I don't build apps, I mod (system) apps only, and test key sign zips.

Adding my own 1% battery icons

So as in my earlier thread I have moved back to eagles blood 4.0.4 AOSP rom. One of the drawbacks is that the hdpi drawable folder in my systemui does not have 1% icons. I've read a few tuts on how to make my own....or add them from a downloadable zip.
My question to those who are more knowledgeable about development is this: will opening the drawable hdpi folder from my systemui.apk with 7-zip and replacing all my stock sys_batt PNG images with the custom 1% images and then saving those to the folder and pushing the systemui.apk back to my phone do the trick?
Sent from my LG-P999 using xda premium
Pain-N-Panic said:
So as in my earlier thread I have moved back to eagles blood 4.0.4 AOSP rom. One of the drawbacks is that the hdpi drawable folder in my systemui does not have 1% icons. I've read a few tuts on how to make my own....or add them from a downloadable zip.
My question to those who are more knowledgeable about development is this: will opening the drawable hdpi folder from my systemui.apk with 7-zip and replacing all my stock sys_batt PNG images with the custom 1% images and then saving those to the folder and pushing the systemui.apk back to my phone do the trick?
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
Should add long as those are referenced (I think in the xml, but then, I have never done this myself). Would need a nandroid for sure .
-- The noob says:
From first-hand experience, a smartphone is incapable of making you smarter!
Nope, they're not. I have to manually reference them in the sys_bat icon XML file located in drawable folder. Then I have to swap in the images in the drawable hdpi folder once they're referenced. However, I'm having issues. Once I extract the files from the apk with 7zip, specifically the drawable folder to get to the sys_bat icon XML file, I cannot open it in notepad++ to edit it. I'm getting an error. Any ideas mansa?
Edit- LOL nandroid was the first thing I did!
Now I have to crank out this stupid paper for class so I can continue tinkering with my Android lol
Sent from my LG-P999 using xda premium
Ok, So I've come to learn that in order to edit XML files within the APK, that the APK needs to be decompiled with APK Tool, not simply extracted using 7zip. I downloaded APK tool and set everything up according to this tut----> http://forum.xda-developers.com/showthread.php?t=1989533
I have the APKTOOL folder placed on the root of my C:/ drive. Inside that folder I have placed the following aapt (the apktool exe or application file), apktool (batch file), apktool.jar, and my framework-res.apk (I know I need to use systemui.apk, I'm just using this as I follow the tutorial on how to get this program working before I try anything on my own files). When I get to the command c:\apktool>apktool if system.apk to install the APK on my system so I can decompile I get an error saying it's not a recognized command. Any ideas dev-friendly users?
So I realized I didn't have the JDK installed on my pc since I did a system wipe on it the other day. Reinstalled it but it's still not working. Very frustrating. I'm also using win 8 if that means anything.
Giving up on apktool as I cannot seem to get a way around the error. However, apk manager seems much more user friendly and have seen tuts using the program specifically for ics roms. I've only seen tuts for apktool using jelly bean roms so maybe that's the issue. I won't be home until late tonight as I have class. If anyone has any tips/suggestions please let me know.
Sent from my LG-P999 using xda premium
Not that many people are in here anyway but I figured I'd give it a shot. So I went to use apk manager instead of apk tool which seemed to be a much more "newb friendly" program. I can successfully decompile my framework-res.apk but cannot decompile my systemUI.apk afterward. I get an error....here's my log if anyone can help me with it:
EDIT- deleted log as I was able to decompile systemUI with a different apk program. That was a huge headache getting it to decompile. Now editing the XML should be no problem, along with swapping out the PNG's. Recompiling on the other hand will most likely be another headache!

Categories

Resources