yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] danieldmm:
Don't be. It will not bit... :cool:

Take a big breath and then try again following OP.

Cheers

Enviado pela minha bomba i9100 através doTapaTalk.
[Android Q&A, Help & Troubleshooting] danieldmm:
Double post. Some mod delete please.
[Android Q&A, Help & Troubleshooting] Avilove.Cullen:
Now i am getting this error while copiling ..

C:\apktools>apktool b Settings
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more

C:\apktools>
[Android Q&A, Help & Troubleshooting] evol4g:
Follow the instructions I gave you a few posts back..
[Android Q&A, Help & Troubleshooting] Avilove.Cullen:
Bro i installed twframework-res.apk also :(

But still the same error :(
[Android Q&A, Help & Troubleshooting] evol4g:
BC your entering the wrong command.. look at the post with the instructions I gave you I gave you all the info you need
[Android Q&A, Help & Troubleshooting] Avilove.Cullen:
are you telling about the "java" command ?? :confused:
[Android Q&A, Help & Troubleshooting] evol4g:
Dude if you read the post I CLEARLY stated that your commands were wrong and you should write the codes just like I showed you.. YES with 'java' in every command you type JUST LIKE I SHOWED YOU
[Android Q&A, Help & Troubleshooting] Avilove.Cullen:
after writing that code also i am getting error .. !! :(

this is my last post in your thread ... I am sorry for irritating you :(
[Android Q&A, Help & Troubleshooting] gumbald:
I've been having problems with an app that's been throwing an error after recompiling - guess this is down to using test keys when I do - it seems doing it this way would be simpler. However, I've decompiled, recompiled and then added resources.arsc to it - when I try to install I get INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION. This is just an app from the store, there shouldn't be any frameworks involved... Any ideas where I start to look?

Actually, running logcat at the same time:

D/VoldCmdListener( 1866): asec finalize smdl2tmp1
I/DefContainer( 6261): Finalized container smdl2tmp1
D/dalvikvm( 6261): WAIT_FOR_CONCURRENT_GC blocked 0ms
I/DefContainer( 6261): Unmounting smdl2tmp1 at path /mnt/asec/smdl2tmp1
D/dalvikvm( 6261): GC_EXPLICIT freed 18K, 40% free 8040K/13315K, paused 2ms+2ms,
total 20ms
D/dalvikvm( 2170): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 2170): GC_EXPLICIT freed 209K, 19% free 15226K/18631K, paused 2ms+5m
s, total 75ms
D/VoldCmdListener( 1866): asec unmount smdl2tmp1 force
W/ActivityManager( 2170): No content provider found for permission revoke: file:
///data/local/tmp/com.bskyb.skygo-2.apk
D/VoldCmdListener( 1866): asec mount smdl2tmp1 {} 1000
D/VoldCmdListener( 1866): asec path smdl2tmp1
I/PackageHelper( 2170): Forcibly destroying container smdl2tmp1
D/dalvikvm( 2170): WAIT_FOR_CONCURRENT_GC blocked 0ms
W/PackageParser( 2170): Exception reading /mnt/asec/smdl2tmp1/pkg.apk
W/PackageParser( 2170): java.lang.NullPointerException
W/PackageParser( 2170): at android.content.pm.PackageParser.collectCerti
ficates(PackageParser.java:619)
W/PackageParser( 2170): at com.android.server.pm.PackageManagerService.i
nstallPackageLI(PackageManagerService.java:7249)
W/PackageParser( 2170): at com.android.server.pm.PackageManagerService.a
ccess$1600(PackageManagerService.java:159)
W/PackageParser( 2170): at com.android.server.pm.PackageManagerService$5
.run(PackageManagerService.java:5546)
W/PackageParser( 2170): at android.os.Handler.handleCallback(Handler.jav
a:615)
W/PackageParser( 2170): at android.os.Handler.dispatchMessage(Handler.ja
va:92)
W/PackageParser( 2170): at android.os.Looper.loop(Looper.java:137)
W/PackageParser( 2170): at android.os.HandlerThread.run(HandlerThread.ja
va:60)
D/dalvikvm( 2170): GC_EXPLICIT freed 122K, 19% free 15254K/18631K, paused 2ms+6m
s, total 68ms
D/VoldCmdListener( 1866): asec destroy smdl2tmp1 force
W/Vold ( 1866): smdl2tmp1 unmount attempt 1 failed (Device or resource busy)
D/dalvikvm( 2170): WAIT_FOR_CONCURRENT_GC blocked 0ms
E/VoldConnector( 2170): NDC Command {65 asec destroy smdl2tmp1 force} took too l
ong (1333ms)
D/dalvikvm( 2170): GC_EXPLICIT freed 58K, 19% free 15249K/18631K, paused 14ms+7m
s, total 124ms
D/AndroidRuntime( 6592): Shutting down VM
D/dalvikvm( 6592): GC_CONCURRENT freed 121K, 82% free 465K/2560K, paused 0ms+0ms
, total 5ms
I/AndroidRuntime( 6592): NOTE: attach of thread 'Binder_3' failed

Seems to be certificate related?
[Android Q&A, Help & Troubleshooting] edfrommathclass:
Errors when Recompiling

I have been attempting to compile my framework-res.apk for several days with just about every version of apktool I can find online but am still receiving the same error message. This is the error I am receiving:

I have replaced the aapt with the latest one from the Android SDK but same error message. I did notice that at the end of the paths there is a forward slash while all the other slashes are back slashes. I am not sure how to resolve this and can't seem to find any answers anywhere but any help would be appreciated.

Also, this occurs even when I make no changes to the framework-res.apk.
[Android Q&A, Help & Troubleshooting] evol4g:
Your on Linux aren't you?
[Android Q&A, Help & Troubleshooting] edfrommathclass:
I am actually running Windows 7 Ultimate. I ended up copying the resources.arsc file from the original apk and it compiled fine. Now I'm just trying to figure out which .xml files I should edit for the lockscreen text. Haha.
[Android Q&A, Help & Troubleshooting] moson:
question regarding apk editing

Hello,

First of all, thanks for the instructions in OP! The last few days I tried 2 different ways to decompile->edit->recompile my framework-res.apk but nothing worked. I just finished the 1st testrun by replacing default_background.jpg and IT WORKED! Thanks again!

If I change both xml files AND a .png for example (in one run), i have also to replace resources.arsc in the 2nd step I guess?

And a few more general questions:

Can I just replace the default_background.JPG with a default_background.PNG? If so, is that possible with every jpg/png?

Since I'm trying MIUI at the moment, I have a framework-miui-res.apk beside the regular framework-res.apk. How does that work? Does the 'phone' get its data from the standard framework-res.apk and ADDS additional framework-miui-res.apk-info? And in how far those both files are prioritized?

I'm running the latest MIUI on a HTC Leo but since my questions aren't of specific nature, I don't think it's necessary to post my specs... otherwise, tell me :)

Sorry for the noob questions but I hope you guys can answer briefly. Thanks in advance!
[Android Q&A, Help & Troubleshooting] fix-this!:
thank you soo much for this guide!
[Android Q&A, Help & Troubleshooting] sainath23:
Thanks it works for me. After a lot of time I got this working APKTOOL. Successfully Decompile and Recompile framework-res.apk and SystemUI.apk. ;)
[Android Q&A, Help & Troubleshooting] rsngfrce:
Samsung Epic 4G Touch, stock ICS 4.0.4 rooted with clockwork mod. Windows 7 (64 bit).

All I want to do is remove the 'Swipe screen to unlock' text from the lock screen. I have been working on this for weeks now, using multiple versions of multiple APK tools, and always get errors. Using the method described in this thead seems to have gotten me closest to my goal, but the end result of my first attempt was a soft-bricked phone.

To my understanding, to remove the "Swipe screen" text, I need to remove some text from framework-res\res\values\strings.xml. Removing that text is the only change I am making.

Here is what I have done:

1) Unzipped the 4 files to apk tools folder.

2) Copied framework-res.apk from my phone to that folder.

3) Renamed 1.4.2 as specified

4) Opened a command window to the folder.

5) Installed framework-res.apk as specified.

6) Copied twframework-res.apk from my phone to the folder.

7) Installed twframework-res.apk as specified.

* At this point, I am not completely clear if I needed to install twframework-res.apk, since I am editing framework-res.apk (although maybe I should be editing twframework-res.apk instead), but I installed it anyway.

8) Decompiled framework-res.apk

9) Edited the string.xml with Notepad++ and saved.

10) Renamed the apktools versions to use 1.4.3.

11) Compiled the APK.

12) Opened the revised APK with Winrar.

13) Copied the resorces.arsc file out of the APK.

14) Opened the original unmodifed APK with Winrar and replaced the resources.arsc (Store mode), save the APK.

* It doesn't seem obvious that I would not need to replace the strings.xml file that I edited, just the resources.arsc which I didn't touch, but that is my understanding from what this thread says?

At this point, I needed to ADB the framework-res.apk to my phone. I've never done this, and the install vs push vs shell options are confusing to me. I'm going outside the scope of this thread, but can anyone tell me the correct ADB command to put the framework-res.apk back into my phone?

Whether I ADB'd incorrectly or had a problem with the decompiling/recompiling process I am unsure, but I ended up with a soft brick and had to perform a nandroid restore.

Can anyone offer me any help or advise with this? Thanks!
[Android Q&A, Help & Troubleshooting] alteredlikeness:
First, it sounds like you compiled properly.. and the strings.xml along with the rest of the /values folder gets tucked into the resources.arsc when it's compiled.

As, for adb push - it's not the only way to get a file on your phone, but you need to set the proper permissions after pushing it. Do that through adb shell... or, just open root explorer as you push it and set permissions with that..

You can also push with root explorer, or put it in a zip package to flash in recovery..

Sent from my phone's mind
[Android Q&A, Help & Troubleshooting] rsngfrce:
It worked (FINALLY)!

HOORAY! After a couple more soft bricks, I finally did it! I ended up using Total Commander with the Android ADB plugin to move the framework-res.apk to my phone and to fix the permissions, and I had to make some edits to the plurals.xml files that I found referenced in other threads to get the apk to recompile properly in the first place, but it worked! Thanks for your help, and thanks to evol4g for this thread! :)
[Android Q&A, Help & Troubleshooting] android addicts:
I got this error.

C:\apktool>java -jar apktool.jar b SystemUI

I: Checking whether sources has changed...

I: Smaling...

I: Checking whether resources has changed...

I: Building resources...

aapt: warning: string 'status_bar_settings_auto_brightness_label' has no default

translation in C:\apktool\SystemUI\res; found: af am ar bg ca cs da de el en_GB

es es_US fa fi fr hi hr hu in it iw ja ko lt lv ms nb nl pl pt pt_PT ro ru sk s

l sr sv sw th tl tr uk vi zh_CN zh_TW zu

I: Building apk file...

Thanks!
[Android Q&A, Help & Troubleshooting] evol4g:
Whoaaa I never seen anything like that O.o
[Android Q&A, Help & Troubleshooting] Ticklefish:
That's not an error, it's just a warning. It means that the app doesn't know what that string would be in different languages. It won't stop the app from working and can most likely be completely ignored.

In fact, that's what apktool is doing. It carried on building the apk after displaying that warning. I wouldn't worry about it. :)

---------- Post added at 12:35 PM ---------- Previous post was at 12:30 PM ----------

Not sure about the bad magic value with your SystemUI.apk but I had similar issues with my framework-res.apk until I installed the right resource file before decompiling.

I'm on stock Timescape 4.04 and installed SemcGenericUxpRes.apk. This solved the problem straight away.

I'd have a look through your system/app and system/framework folders and basically install anything with the word 'res' in it. You might install some files that you don't need to but it won't cause any harm and it will mean that you've installed every resource file available. This might fix your issue with SystemUI.apk as well.
[Android Q&A, Help & Troubleshooting] Wel1973:
ohh!! Thank you! I am going to try on what he comments to me.

Only I have installed the Framework-res.apk in this case, so which..

I am going to work. I will comment, If i keep on having errors..

Big THX.
[Android Q&A, Help & Troubleshooting] android addicts:
Can o use this tool for decompile market free apps?
[Android Q&A, Help & Troubleshooting] Ticklefish:
Depends on the app.
[Android Q&A, Help & Troubleshooting] happybay:
thanks, I tried that on my ZTE, but failed...
[Android Q&A, Help & Troubleshooting] Chrack:
I have a strange problem.

First all de/recompile works great if i not change the androidmanifest.xml!

If i change it the app doesnt work anymore.

Its working if i flash the app over the orig. App in the Rom.

But if i flash it in the Rom without the orig. App the modet App dont work.

So whats the problem with the android.manifest.xml?

Gesendet von meinem GT-N7000 mit Tapatalk 2
[Android Q&A, Help & Troubleshooting] alteredlikeness:
Signatures are the problem. You will need to re-sign basically every app that doesn't get updated in the Play Store if you edit the Android.Manifest.xml and want it to work in a ROM - or maybe all of them that have the same original AndroidManifest dates...

Sent from my phone's mind
[Android Q&A, Help & Troubleshooting] zinconnu:
Thanks for this thread, it helped me a lot. :good:
[Android Q&A, Help & Troubleshooting] vasili_defy:
Hey guys ,I get this error while recompiling SystemUI.apk and framework-res.apk ..:(

I have installed framework-res as told in first post..

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:142)

at brut.androlib.Androlib.build(Androlib.java:159)

at brut.androlib.Androlib.build(Androlib.java:154)

at brut.apktool.Main.cmdBuild(Main.java:182)

at brut.apktool.Main.main(Main.java:67)

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)

at brut.androlib.Androlib.readMetaFile(Androlib.java:138)

... 4 more

What is wrong with it..Plz Help!!
[Android Q&A, Help & Troubleshooting] alteredlikeness:
what command are you entering to compile?

you need leave off the .apk extension... for example: java -jar apktool.jar b SystemUI
[Android Q&A, Help & Troubleshooting] alextranced:
need a little help...is it ok if I get this error? http://vvcap.net/db/WuPGHx7bp7KFGpZK-oeH.htp

I edited Phone.apk and disabled noise reduction , so far so good but I don't want any surprises.
[Android Q&A, Help & Troubleshooting] danieldmm:
Everything fine... :) , its not error, its warnings related to languages....

Cheers
[Android Q&A, Help & Troubleshooting] Megalith27:
Need a little help, I'm trying to recompile framework-res, using this command

apktool.jar b framework-res

but nothing happens, I even dont get any errors.

Any advice? Thanks in advance
[Android Q&A, Help & Troubleshooting] rsngfrce:
At the risk of asking a stupid question, you are proceeding that with "java -jar" right?
[Android Q&A, Help & Troubleshooting] Megalith27:
Yeah, no problem with that...as I decompiled it...but can't recompile...I'm wondering if this has something to do with it being JB framework-res:confused:

Edit: I realized that there is a new folder in framework-res folder called "build" and "apk" folder in it, but that apk folder is empty
[Android Q&A, Help & Troubleshooting] rsngfrce:
I'll get the stupid questions out of the way until someone with more knowledge comes along. I have had those empty folders you mention when there were errors while I was recompiling, which makes me think some recompiling took place even though you didn't see anything. You did recompile with 1.4.3 right, not 1.4.2?
[Android Q&A, Help & Troubleshooting] Megalith27:
With v1.5
[Android Q&A, Help & Troubleshooting] Ticklefish:
apktool can sometimes take a few minutes to do anything. I don't think the computer views its demands for resources as a priority...or something like that.

How long do you wait for?
[Android Q&A, Help & Troubleshooting] Megalith27:
About 10 minutes...

Can you or someone, please, recompile it for me if I attach folder here?

Edit: I'll put it in here anyways, may be there are some volenteers willing to help
[Android Q&A, Help & Troubleshooting] rsngfrce:
OK... I went through all the Plurals.xml files (DAMN, you have a lot more than me... guessing because my phone is US and yours is international) and in line 79 changed "%d of %d" to "%d of %%d"... basically had to do this same thing when I was editing my framework-res. After that, it recompiled without error.

WARNING!!!: I do not know enough about this to know if my framework-res being installed since I didn't have yours will make a difference, so be careful with this, be sure to have a Nandroid backup!
[Android Q&A, Help & Troubleshooting] Megalith27:
Thanks, i'll test once i get to my computer and upload original framework-res.apk if you still need it.

That's wierd though, since i never even tauched plurals.xml, but i read somewhere about getting plurals error during compilation.

Anyway, i need to sort out issues on my side to be able to compile myself, as this can't be permanent solution.

Thanks again for your help

Sent from my A953

Edit: I tried the apk file that you provided and got a bootloop, then I signed the apk file and retried again and got a bootloop one more time...so I don't know what the problem is right now
[Android Q&A, Help & Troubleshooting] Megalith27:
Ok, so I finally got passed through my decompile and compile issues, and managed to edit framework-res.apk, thank you all for your support and help.

But this is the bit that I don't quite get

As I am editing res\values\bools.xml, dimens.xml and integers.xml

So do I need to:

a) replace only these files in original framework-res.apk and also replace resources.arsc in original apk with the one from apk in dist folder? Since this to me seems like the same as replacing whole framework-res.apk. And I get bootloop this way.

b) or replace only edited files and keep the original resources.arsc?

c) or I need to copy resources.arsc file from new framework-res.apk to original one and nothing more, as \values folder does not appear when I open framework-res.apk with 7zip or Winrar?

One aditional question is; do I need to sign framework-res.apk in dist folder before putting into the rom zip?
[Android Q&A, Help & Troubleshooting] rsngfrce:
This was confusing to me to... There are probably other ways of doing this, but this is the method in the OP, which worked for me...

(From memory, so if something doesn't make sense, check the OP). Make a copy of your recompiled framework-res.apk and add .zip to the end of the name. Now open that zip with a compression program (I used WinRar, the OP used something else). Extract the resources.arsc file from the zip (that is all you need because you only edited the XMLs and that info goes into the resources file). Now, take A copy of your ORIGINAL unmodified framework-res.apk and add .zip to the end of the name. Open it with your compression program and replace the resources file in it with the one you took out of your modified version. Save the framework-res.apk with the compression program, make sure to set it to NO COMPRESSION (I think it is called something else). Now remove the .zip from the end of the file you saved and you have your new framework-res.apk. The reason for doing all this is because your original was signed but the new one isn't, so this gets you a signed, modified copy.

Now you just need to get it into your phone. I had difficulty doing this with ADB and other methods, I eventually found the best way for me was with Total Commander on my computer with the Android plug-in. Be sure you set the permissions correctly for the file after you transfer it.

Good luck, took me months to finally get this figured out, but once you get it, it becomes easier, thankfully!
[Android Q&A, Help & Troubleshooting] rsngfrce:
By the way, when I induce bootloop issues like this from messing with the system, I've started doing a custom Nandroid restore and just restoring the system, to save time. If anyone knows a reason not to do this, please let me know.
[Android Q&A, Help & Troubleshooting] Megalith27:
Thanks, man, this helped me a lot and I finally was able to boot into my own custom rom that I was trying to port.

Really appreciated...I just "ran out" of "thanks" yesterday, so I thanked you today :)
[Android Q&A, Help & Troubleshooting] rsngfrce:
Glad I could help, I know how frustrating it can get! :)
[Android Q&A, Help & Troubleshooting] evol4g:
I need to update this thread.. there's a gentleman by the name of ibotpeaches who's worked his ass off continuing the apktool project.. I believe he's on 1.4.10 now.. I'll update op with link to his OP tomorrow and basic instructions to use apktool.. :)
[Android Q&A, Help & Troubleshooting] evol4g:
thread updated!

this new method will work on every version up to the most current JB release

this is just a basic apktool user's guide now lol