Apktool problems? - Verizon HTC Droid Incredible 4G LTE

I had no problem with apktool decompiling any of cm10 apps but as soon as I go to decompile HTC apps I get errors. I pulled com.htc.resources.apk and framework-res.apk and used "apktool if framework-res.apk" it installs inside my /apktool/framework/ as 1.apk fine... But when I do " apktool if com.htc.reaources.apk" I get errors but it does move it to /apktool/framework/ as 2.apk..... I go to decompile and I get like flag 36 errors. Any solution.?
Sent from my ADR6410LVW using xda premium

And it won't compile after either

Related

Volume Slider Color

I'm wanting to change the color of the slider when you turn your volume up and down from yellow to another color. I'm running CM7 fascinatemtd ROM by JT, I know which folder it's in and how to do it. My question is, I use Apk Manager to decomplie my framework-res.apk which was pulled from the ROM using 7zip, I've decompiled the apk, edited the XML file, when I went to recompile the framework-res apk using option 11, a error pop up and told me to read the log, I hit enter, answered yes to system question, then went to keep folder and deleted the resources file as instructed, and hit enter, I was left with an unsigned framework-res.apk file, renamed it to framework-res.apk, and pushed it back into ROM with 7zip, rebooted recovery, cleared caches, and installed ROM, but phone wouldn't boot up. So what am I doing wrong...
Obviously not
Sent from my SCH-I500 using XDA App
What color do you want the slider man
Sent from my SCH-I500 using XDA App
Blue would match my theme the HEX code is 11114b...
Sent from my SCH-I500 using XDA Premium App
If apkmanager errors common logic would dictate to read the log and see what is going wrong
Trying to flash a broken apk won't work obviously
I've gotten it to decompile and recompile bit the problem now os the changes I've made don't show up I'm not getting any errors before I was ising a ROM that I themed so I went back and used the original ROM how do I get the changes to stay...
Sent from my SCH-I500 using XDA Premium App
And you're trying to edit progress_horizontal.xml? And changing code to ff11114b leaving the "f's" in?
good day.
Yes
Sent from my SCH-I500 using XDA Premium App
I should rename unsigned framework.res to framework.res right...
Sent from my SCH-I500 using XDA Premium App
And during the compile process, you hit y for "system apk" and hit y for "would you like to copy over any files..............." and from the keep folder delete resources.arsc and continue to compile. And yes rename back to framework-res.apk.
good day.
Answered yes to system app and no to copy over files, didn't delete arsc and changes stayed, but if I install will I get boot loop since I didn't delete arsc....
Sent from my SCH-I500 using XDA Premium App
If I hit y to copy over files the changes don't stay only if I hit n
Sent from my SCH-I500 using XDA Premium App
it worked, by not copying over the files and not deleting the resources arsc file, does anyone know what the XML file name is for the download progress bar color is...and thanks for your help guys...
Here's what I would do if I was on Windows!
Download apktool & dependencies:
http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2
Unpack both archives to your Windows folder. This will make apktool accessible through cmd anywhere.
CD in cmd window to the location of your apk, If you haven't already done so and install the resources by copying or pulling (framework-res.apk, twframework-res.apk for touchwiz) or (framework-res.apk, SystemUI.apk for GB). Once copied to the folder you are cd'd too...
Install the resources
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile and make your changes..
apktool d framework-res.apk
Recompile when done
apktool b framework-res
If it built succesfully, then make a copy of your framework-res.apk. Then navigate to framework-res/build/apk! Open your copied apk with 7zip and drag n drop res & resources.arsc from framework-res/build/apk inside! Close it up..
Push and test.. On windows you may need to navigate to your sdk directory if not properly setup!
adb push "your_copied_file"/system/framework/framework-res.apk
If you get a failed to write to system, run this first.
adb shell su -c rw
YES got all progress bar colors changed to blue now my CM7 Fascinatemdt ROM is themed all of my drawable hdpi and XML files are complete I might post this as a theme, thank you for your help...
Sent from my SCH-I500 using XDA Premium App
notta said:
Here's what I would do if I was on Windows!
Download apktool & dependencies:
http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
http://android-apktool.googlecode.com/files/apktool-install-windows-r04-brut1.tar.bz2
Unpack both archives to your Windows folder. This will make apktool accessible through cmd anywhere.
CD in cmd window to the location of your apk, If you haven't already done so and install the resources by copying or pulling (framework-res.apk, twframework-res.apk for touchwiz) or (framework-res.apk, SystemUI.apk for GB). Once copied to the folder you are cd'd too...
Install the resources
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile and make your changes..
apktool d framework-res.apk
Recompile when done
apktool b framework-res
If it built succesfully, then make a copy of your framework-res.apk. Then navigate to framework-res/build/apk! Open your copied apk with 7zip and drag n drop res & resources.arsc from framework-res/build/apk inside! Close it up..
Push and test.. On windows you may need to navigate to your sdk directory if not properly setup!
adb push "your_copied_file"/system/framework/framework-res.apk
If you get a failed to write to system, run this first.
adb shell su -c rw
Click to expand...
Click to collapse
will this work also when trying to decompile/recompile a non system app, like one from the market, that has dependencies
adude247 said:
will this work also when trying to decompile/recompile a non system app, like one from the market, that has dependencies
Click to expand...
Click to collapse
It will work with anything provided you have the resources. Some apk's are picky by means of what you can replace.
The method above is using apktool the way it is supposed to be used. That apkmanager thing sounded crazy with the delete this after that, hit y or n before this. Seems like alot of un-needed steps and confusion!
On linux it's even easier, pretty much fully auto!
notta said:
It will work with anything provided you have the resources. Some apk's are picky by means of what you can replace.
The method above is using apktool the way it is supposed to be used. That apkmanager thing sounded crazy with the delete this after that, hit y or n before this. Seems like alot of un-needed steps and confusion!
On linux it's even easier, pretty much fully auto!
Click to expand...
Click to collapse
yeah, I didn't delete anything just decompiled, edited the XML, and recompiled, that was the only way I could get the changes to stay. Any suggestions on what to use if the above resources don't work to get the apk to decompile, an example of an apk that I want to edit but cant get it to recompile after decompiling and editing the XMLs is....
adude247 said:
yeah, I didn't delete anything just decompiled, edited the XML, and recompiled, that was the only way I could get the changes to stay. Any suggestions on what to use if the above resources don't work to get the apk to decompile, an example of an apk that I want to edit but cant get it to recompile after decompiling and editing the XMLs is....
Click to expand...
Click to collapse
I can't and won't explain getting resources for market apps or generally someone else's work. However there are several ways to approach non-building apk's.
For example aapt has the capability to recompile standalone 9's as well as xml's, which can then be injected into the apk with the 7zip method. Especially useful for minor changes.
Another example for stubborn apk's would be the Eclipse or similar project. This is where you would partially build the files you wanted to change.
Thanks for the advice...
Sent from my SCH-I500 using XDA Premium App

Having issues with decompiling Mms.apk for compression fix

Hey guys I have an evo 4g I am trying to apply steelH's Mms compression fix and I'm wondering what I'm doing wrong. I extracted the MMS.apk file along with the framework-res.apk file into the apktool directory to install the framework with the apktool if framework-res.apk command and it said that it was installed then I tried to decompile with apktool d Mms.apk and it just gave me a bunch of errors and at the end it said that it needed the proper framework files but the folder with all the decompiled files were still there. So I went ahead and found the imagemodel.smali file and made the necessary changes and tried to recompile it but it gives me a bunch of errors that you can see in this screenshot. Any idea what I should do to fix this so I can recompile and put the MMS.apk file back into my phone with the fix?
Usually when you get the weird characters it means the apk did not decompile properly, make sure when you decompile the SystemUI.apk you also put framework-res .apk In your apktool folder. Then in cmd type
apktool if framework-res.apk
apktool d SystemUI.apk
Well if you take a look at the screenshot my framework-res.apk is in the folder with the apktool and the Mms.apk which I wanted to decompile and those are the commands I used except I didnt need to decompile systemUI but rather Mms.apk. So I'm wondering what I'm doing wrong since I've done exactly what you suggested in the first place. the 1.apk is from the first command as it installed correctly according to cmd.
Have you type those word in cmd? You need to type in those code while decompiling ssystem app
Accidentally sent from my Google Nexus S using XDA Premium
yes i typed in cmd: apktool if framework-res.apk but not apktool d systemui.apk I don't want to decompile that file. I'm confused about why you're telling me to decompile that file. can you please give me an explanation as to why I need to decompile that file to decompile mms.apk?
EDIT: Nevermind, I figured out what the problem was. I also needed to bring out and install the resources from the rom for the decompile to work.
SprintTouchPro2 said:
yes i typed in cmd: apktool if framework-res.apk but not apktool d systemui.apk I don't want to decompile that file. I'm confused about why you're telling me to decompile that file. can you please give me an explanation as to why I need to decompile that file to decompile mms.apk?
EDIT: Nevermind, I figured out what the problem was. I also needed to bring out and install the resources from the rom for the decompile to work.
Click to expand...
Click to collapse
Can you post more info on this?

[Q] How to properly recompile the framework-res.apk?

I have tried using the APK Manager,
Problem: If I recompile the framework-res.apk, it always gives me loops...
Even if I make a very small change!
(I don't sign it!)
Images can be replaced by opening it in 7-zip but xml files can't be changed that way.
I'm 100% sure that I follow correct steps....
What I'm trying to do:
Power menu: http://forum.xda-developers.com/showthread.php?t=1169443
and
ICS transitions: http://forum.xda-developers.com/showthread.php?t=1343350
I have followed more then 10 threads with same problem but still didn't get a solution.
Sorry if I missed something.
Any help?
*BUMP*
Why don't u sign it?
Sent from my SCH-I400 using xda premium
AFAIK, we don't have to sign a system apk using APK Manager (specially the framework-res.apk)
P.S. The guide (http://forum.xda-developers.com/showthread.php?t=1169443) also states so...
Try to use APKTool, I used to compile it and decompile it with this application and it works fine
Oic. I've always signed my frameworks. Ill not from now on.
Sent from my SCH-I400 using xda premium
Apktool has worked for me in past, haven't tried for a couple of months though so not sure what Rom I was playing with... Oh and unsigned for me
Sent from my Desire HD using xda premium
Use apktool....put the frameowrk-res.apk in the same folder as the apktool u unpacked....then open command prompt and navigate to that folder....type "apktool if framework-res.apk"...that will install the framework...then when that finishes type " apktool d framework-res.apk ./out"...that will decompile the apk into the out folder you just created....make your changes then type..."apktool d -f -b framework-res out" that will recompile....when your finished you have to copy the original metainf folder into the newly recompiled apk....then copy the new classes.dex file into the new apk...done...hope that helped
Sent from my SAMSUNG-SGH-I997 using xda premium

Compiling SystemUI.apk?

I've looked around dozens of threads, but nothing has helped me fix my problem.
I have a Droid Incredible and there is a Quick Settings mod for the dropdown notification bar. My goal is to remove the Hotspot option from that list. When I try decompiling SystemUI.apk with Apktool OR Apkmultitool, I think it works fine. Apktool said there were errors decompiling two images, but I think i fixed those. I have tried installing framework-res.apk and com.htc.resources.apk to decomile it. After making the needed changes and going to compile it, it just spits out errors. No matter what I try I always get an error. What an I doing wrong? What do I need to do to get it to compile without errors?
TeeRom said:
I've looked around dozens of threads, but nothing has helped me fix my problem.
I have a Droid Incredible and there is a Quick Settings mod for the dropdown notification bar. My goal is to remove the Hotspot option from that list. When I try decompiling SystemUI.apk with Apktool OR Apkmultitool, I think it works fine. Apktool said there were errors decompiling two images, but I think i fixed those. I have tried installing framework-res.apk and com.htc.resources.apk to decomile it. After making the needed changes and going to compile it, it just spits out errors. No matter what I try I always get an error. What an I doing wrong? What do I need to do to get it to compile without errors?
Click to expand...
Click to collapse
Might need a bit more info.
What os you running? What commands you running? Have you installed your framework with a tag?
Sent from my Galaxy Nexus using Tapatalk
Evostance said:
Might need a bit more info.
What os you running? What commands you running? Have you installed your framework with a tag?
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
2.3.4 my own version of stock. In APKtool I was running d and b with SystemUI. Don't know if I installed it with a tag.
pull your framework-res.apk
You can then install a tag by installing it as:
apktool if framework-res.apk droid
Decompile it like you have done, but with the tag:
apktool d -f -t droid SystemUI.apk
Made your changes and then recompile it:
apktool b <Path/To/Decompiled/APK>

Having a hell of a time Re-compiling framework-res.apk

I can decompile framework-res.apk just fine using the cmd apktool d etc, etc, etc... But when I try to build it using the cmd apktool b... you get the idea.
I get errors and it won't compile, I've tried using different versions of apktool but all end the same.
What errors do you get and what rom are you using?

Categories

Resources