yashsingh1/xdaforums huggingface dataset:
[Android Software Development] mbh87:
anyone know why my xmls are being spaced like this?

http://i.imgur.com/KUZ1m.png
[Android Software Development] raziel23x:
This is a known issue and is fixed in the new version on Github. IBotPeaches is not ready to compile though since he has a few more bugs he wants to squish before release
[Android Software Development] scumfromohio:
I hate to ask a really noobish question but do i need to keep the old apktool and just extract 1.4.9 into that one. Because i just extracted 1.4.9 opened a command line and it says 'apktool' is not recognized as

operable program or batch file... And when i seen this thread i deleted the old apktool folder.
[Android Software Development] raziel23x:
Rename the jar file to apktool.jar
[Android Software Development] mbh87:
Are there any directions to compile it? It's a huge annoyance and pretty much cant get anything to compile when making changes to XMLs.
[Android Software Development] raziel23x:
I pretty much just delete all the white spaces and correct any plurals errors and then compile with no problems. But the next up coming release has this fixed

You can do what I did compile three src code your self
[Android Software Development] scumfromohio:
Then do I put the apktool.jar in the apktool folder I used to use, haha sorry man.
[Android Software Development] cowsquad:
Yes, you have to put this apktool.jar to the folder you have stored the previous apktool.jar
[Android Software Development] iBotPeaches:
I'm going to release 1.4.10 today. It just has the spacing issue fixed and minor things. No point in making everyone wait when the most annoying bug is fixed.
[Android Software Development] varun.chitre15:
Mind if I include this in my tool? :D

Its getting a major update :D

In my signature :good:
[Android Software Development] SaintZ93:
I can confirm that reverting to java 1.7 and jdk update u79 works. On the new updates I would try to modify my SystemUI.apk and would recompile fine but would show up black after flashing it. Tried the same edit with older version and works now. Install both 32 and 64 bit though.
[Android Software Development] Morningstar:
Yeah, but can you build the latest apktool from source with 1.7? I have no problems with decompiling or recompiling anything, just with trying to build the latest apktool update.
[Android Software Development] SaintZ93:
I'm using the Advanced Apktool by BDFreak as well as IBotPeaches newest .jar file combined. So yes its working just fine.
[Android Software Development] Thebear j koss:
He's talking about building apktool not apps.

Thebe@r'$ G@L@XY

Go here- http://xdaforums.com/showthread.php?t=1016053

for amazing SuperSwiftkey themes❕❕❕
[Android Software Development] SaintZ93:
Ahh, I see now, misunderstood what he was trying to say, sorry about that.
[Android Software Development] Morningstar:
Lol no worries. I just looked at when java 1.8 was released, and it was some time ago. The Mac I usually build on is set to auto-update, so I don't think the java version is the problem...Nothing else has changed on my Mac, so I can only assume it's something with the latest updates that's borked.

If anyone has successfully built the latest apktool (from 3 or 4 days ago) from source, please let me know so I can try to further narrow down the problem. As it is, it fails on AccessorTest every time..
[Android Software Development] DaOldMan:
I have built the latest 2.0.1 apktool from sources. Had the problems with that test so I moved the sources to root dir and then it compiled without any problems :)
[Android Software Development] Morningstar:
Interesting. I'll give that a try. Much easier than trying to remove that test altogether in source, which is what I just started working on lol.

Thanks for the info!

[emoji106]
[Android Software Development] :
If people have issues with decompile vendor apps

Reason is that they forgotten the specific vendor framework

Noticed in 5.1 Its lge-res that is needed also there is a framework permission which i am unsure if it'll help but it can be imported
[Android Software Development] Morningstar:
Sounds like it may be the same issue as with twframework-res. Try decompiling with one of the v2 releases, and recompiling with 2.0.0-beta9.
[Android Software Development] Ticklefish:
Intriguing. So the icons are there but apktool can't find them?

Can you share your APK files please? I'll give them a try on my setup and see if I can't find a fix for you. :highfive:
[Android Software Development] Morningstar:
Has anyone tried what I posted earlier?
[Android Software Development] DaOldMan:
Well I still can't install the framework from the Blisspop rom :(. It's a 5.1.1 CM based rom.

Here is the framework and SystemUI

Please [MENTION=3924617]iBotPeaches[/MENTION] can you tell me what to do, or what is the problem with this framework ?

Thanks a lot for your wonderful work. Btw 2.0.1 doesn't work as well.
[Android Software Development] iBotPeaches:
Looks like this - https://github.com/iBotPeaches/Apktool/issues/924

Haven't researched that one much yet. Your guess is as good as mine. Probably some NULL padding somewhere that I'm not accounting for.
[Android Software Development] DaOldMan:
Thanks for your time!! This is a major rom.. I hope this issue can be solved soon to allow us to decompile it.
[Android Software Development] mapleshadow:
MOTO360 5.0.2 ClockworkHomeGoogle.apk decompile error

1、The folder name changes, and lost RAW folder, See the picture。

2、Compiled files can not be used, it would lead to moto360 not boot properly.

Attach the framework-res and files, for testing.

http://pan.baidu.com/s/1eQvolY6
[Android Software Development] Antoniokodo:
Yess!! It worked!! I downloaded Apktool 2.00 RC4 to decompile and the Beta 9 to compile, replaced the xml's I needed , builded and it worked flawlessly..although this didn't work with others system apps I tried to translate, because the apps built fine but the Rom did not boot if I made a Wipe Data, but the good old APKMT 1.5.2 did the trick and all the apps works like a charm now. Thanks!!

Seems that, even changing to the path that Apktool says the images had to be it didn´t work with the 2.0.0 Stable Release, thankfully, Morningstar gave me a great solution to my problem. I attach mediatek-res.apk if you would like to take a deeper look:highfive:

Thanks for the help guys!
[Android Software Development] shyvam:
help me devs please please if anyone helps i will really appriciate and thankful to him

i am using latest apktool an aapt in windows

rom= sense4+

when i try to install com.htc.resources.apk as framework in apktool folder then i get always error in command prompt i also updated java in my windows pc but i didn't solve my problem

i tried all versions of apktool but i always get same error

please help me

i get these types of error

u can see

down

http://pastebin.com/8CMvbKD0
[Android Software Development] iBotPeaches:
This is a long standing problem, maybe I've learned something over the months that will help me solve this, but I haven't had success previously - https://github.com/iBotPeaches/Apktool/issues/644
[Android Software Development] felek73:
I haven't had any problem with decompiling and compiling stuff with v2.0.0 , and java 1.7 so far , now i got errors as below..any clue ?

I tried to install CM12.1 framework , any attempt to decompile i.e. SysteumUI.apk gives similar errors ..

C:\ADB>apktool if framework-res.apk

Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars

c file

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:52)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:593)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:575)

at brut.androlib.Androlib.installFramework(Androlib.java:660)

at brut.apktool.Main.cmdInstallFramework(Main.java:240)

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

Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000001

at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)

at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:238)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:189

)

at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:157)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:11

4)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
[Android Software Development] DaOldMan:
Looks like the same problem I reported a page back.... 5.1 problem.. Waiting for a fix too.
[Android Software Development] iBotPeaches:
Looks like the same problem as this: https://github.com/iBotPeaches/Apktool/issues/924 . The good thing about this, is CM 12.1 framework-res.apk is open source. I can figure out what is causing this. Don't worry, I'm on it.
[Android Software Development] cerj:
Thank you iBotPeaches. Without your dedication to apktool and all it involves, there would be a lot less joy in our wonderful world of Android.. Thank you
[Android Software Development] bdorr1105:
Thanks for working on this, I am having the exact same issue
[Android Software Development] DaOldMan:
Don't even know what to say. You bring joy to thousands. Keep up the excellent work!
[Android Software Development] fmedrano1977:
OK so I use VTS to decompile and recompile framework-res from HTC Sense roms. I would just edit the apns.xml and recompile the apk without problems. Since the Sense 7 Lollipop update, what has worked for me no longer works. I have updated VTS to latest apk tool, so decompiling and recompiling framework-res works without isuue. Now adding the modded framework-res to rom.zip and flashing now resultsin a bootloop. Am I missing a step here that has changed?
[Android Software Development] SaintZ93:
Make sure to replace the smali and baksmali files with latest version. That has worked for me, got lollipop files to decomple and recompile without issues. No black screens after flashing.
[Android Software Development] fmedrano1977:
Where do I find these?

https://code.google.com/p/smali/downloads/list

??
[Android Software Development] Morningstar:
You have to build them from source.
[Android Software Development] SaintZ93:
Right here https://bitbucket.org/JesusFreke/smali/downloads
[Android Software Development] djdarkknight96:
Hello [MENTION=3924617]iBotPeaches[/MENTION] ,

I rarely have issues or report any but the new Gmail will not fully decompile, I'm usually pretty good figuring these out but these java errors always confuse me....I tried the old version without a problem so I think they changed the resources or something..I attached the apk so you or anyone wants to try.

Thanks!

Error:

C:\Users\djdar_000\Themes\TeamBlackout\APKTool\5.1APKtool>apktool d Gmail-5.2.93

937770.apk

I: Using Apktool 2.0.0 on Gmail-5.2.93937770.apk

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\djdar_000\apktool\framework\1.apk

I: Regular manifest package...

I: Decoding file-resources...

W: Could not decode attr value, using undecoded value instead: ns=internal, name

=layout_maxHeight, value=0x00004001

W: Could not decode attr value, using undecoded value instead: ns=internal, name

=layout_minHeight, value=0x00004001

I: Decoding values */* XMLs...

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:

0x0101055c

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:65)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:61)

at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:3

6)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlRe

sourceParser.java:369)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu

e(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT

ag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Stati

cXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamD

ecoder.java:83)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDe

coder.java:141)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamD

ecoderContainer.java:33)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:1

14)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9

9)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:247

)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:134)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)

at brut.apktool.Main.cmdDecode(Main.java:165)

at brut.apktool.Main.main(Main.java:81)
[Android Software Development] _Sale_:
No errors here

C:\Users\Sale\Desktop\Apktool>apktool d Gmail-5.2.93937770.apk

I: Using Apktool 2.0.0 on Gmail-5.2.93937770.apk

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Sale\apktool\framework\1.apk

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Baksmaling classes.dex...

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...

C:\Users\Sale\Desktop\Apktool>apktool b Gmail-5.2.93937770

I: Using Apktool 2.0.0

I: Checking whether sources has changed...

I: Smaling smali folder into classes.dex...

I: Checking whether resources has changed...

I: Building resources...

I: Building apk file...

I: Copying unknown files/dir...

Try these files
[Android Software Development] djdarkknight96:
Oh wow, but what did I do wrong? Hmm

Thank you
[Android Software Development] _Sale_:
delete the frameworks at $HOME/apktool/framework/ then try installing again

youre welcome
[Android Software Development] djdarkknight96:
Ok will do
[Android Software Development] djdarkknight96:
That worked, not sure why...I have the same files....but thanks again!
[Android Software Development] _Sale_:
https://github.com/iBotPeaches/Apktool/issues/809
[Android Software Development] djdarkknight96:
Great, only thing...I did delete framework and installed New and still no go...used your files that were the same I thought and it works...So did you compile it with those changes or am I just missing something simple.
[Android Software Development] _Sale_:
nope. just downloaded the last apktool and extracted framework-res from my rom (stock deodexed). thats all
[Android Software Development] djdarkknight96:
Doh....I didn't have the newest apktool... I swore I did but thank you!
[Android Software Development] iBotPeaches:
So the issues I mentioned a few weeks ago here, I had fixed (all?) I hope.

The issue with Moto X frameworks and new CM frameworks failing has been fixed. Bug 924

The issue with APKs failing due to casting ResFileValues incorrectly has been fixed. Bug 921

The issue with random APKs failing due to internal attributes has been fixed. Bug 913

The issue with Shared installed frameworks breaking the decode process has been fixed. Bug 936

We are pretty much close to a 2.0.1 release. Just working out some last minute bugs and testing.
[Android Software Development] bgcngm:
Amazing work as always! ;)
[Android Software Development] prdog1:
iBot you rock. Even with school you rock your breaks. :cool:
[Android Software Development] bdorr1105:
Thanks for your hard work and effort
[Android Software Development] cerj:
Amazing.. Thank you
[Android Software Development] daniello8:
Sounds so simple

installed twframework-res.apk

decompiled SystemSU

made the desired change

but cannot compile again. Many others fixed the missing apktool.yml error by installing the framework but here it doesn't work.

d:\_android\APK_Tools>apktool.bat b SystemUI
I: Using Apktool 2.0.0
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:251)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:246)
... 4 more

Anyone?

Edit: BTW .. would I need to sign the file after compiling? I read something about there being some magic that it isn't required .. not sure though.
[Android Software Development] Ticklefish:
If there's no apktool.yml, that's because your APK didn't decompile fully.

Did you install framework-res.apk as well as twframework-res.apk before you decompiled?
[Android Software Development] daniello8:
Thank you!!!

That was it .. I had only installed the twframework file.

Regardless of that I have FCs after editing .. maybe due to having a deodexed rom .. don't know yet :(
[Android Software Development] Ticklefish:
That depends on the editing you did..

If you made lots of changes, it may be worth just making the first one, recompiling and seeing if your APK works. If it does, add the next edit, test it and so on.

Should help you narrow down where the problem is.

It's also worth generating a logcat as well.
[Android Software Development] DaOldMan:
Wonderfull :) ! What about our error to install frameworks-res.apk from 5.1.1 (can't decode asrc) ?
[Android Software Development] daniello8:
Actually I am doing just a single edit but my resulting file is forceclosing at boot. Here are my steps:

use deodexed file e.g. SystemUI.apk

decompile: apktools.bat d SystemUI.apk

Make edits

compile: apktools.bat b SystemUI

Use 7zip to copy [META-INF] Folder from original to new SystemUI.apk
[Android Software Development] Morningstar:
Unless your ROM has signature verification disabled, you also need the original AndroidManifest. Either copy it along with the META-INF folder, or build with apktool b -c yourappname.
[Android Software Development] daniello8:
Thanks .. that -c switch is really helpful! My edit works now .. and most probably most crashes were caused by me editing in a wrong place.
[Android Software Development] Morningstar:
Glad you got it. The -c parameter just copies the original META-INF folder and AndroidManifest back into the apk after recompiling. It's handy, since it saves you from having to do it manually.
[Android Software Development] DaOldMan:
I have compiled 2.0.1 dirty and I am happy to say it works extremely well on 5.1.1 :). Install/decoded arsc without a hitch. I moded the rom without any problems. You are the man !:highfive:
[Android Software Development] bdorr1105:
How do you get 2.0.1?
[Android Software Development] DaOldMan:
Because [MENTION=3924617]iBotPeaches[/MENTION] has a very nice GIThub, you can download his sources and compile them whenever you like. He updates them as he goes so this way you get a most updated tool :) (but also a beta tool with bugs maybe).

He asked me not to link my compiles publicly, but if you really want it send me a PM.
[Android Software Development] Uchiha_Dev:
PLEASE HELP

many smali mod guides still use 1.5.2 apktool smali but apktool 1.5.2 fails to install my framework-res.apk. apktool 2 works like a charm for me but it does not support 1.5.2 smali files, is there any way i can port 1.5.2 smali to apktool 2 ?
[Android Software Development] bovirus:
Use smali updated (2.0.6).
[Android Software Development] prdog1:
Depends on what you are trying to decompile. If 4.0 need 1.5.2. If doing Lollipop need 2.0. If doing 2.0 need to update your smali/bacsmali. :cool:
[Android Software Development] bdorr1105:
I have no idea how to do that, but if you don't mind sharing the apktool.jar that would be awesome and much appreciated. Thanks
[Android Software Development] Uchiha_Dev:
i do not understand what you are saying
[Android Software Development] prdog1:
2.o does not work on KitKat as far as I know..
[Android Software Development] Uchiha_Dev:
i am working on 4.2.2
[Android Software Development] prdog1:
That is KitKat.
[Android Software Development] Thebear j koss:
Jellybean. Kk was 4.4. He needs apktool 1.5.2 i think.

LEGALIZE IT.

Mattias Duarte ruined android. Material design sucks.
[Android Software Development] prdog1:
You are correct Bear.:cool:
[Android Software Development] Thebear j koss:
I have 1.5.2 at home on my pc if you need it. Send me a pm to remind me and i'll send you a link.

LEGALIZE IT.

Mattias Duarte ruined android. Material design sucks.
[Android Software Development] Uchiha_Dev:
here is the thing :

1. i am trying to make a ROM by adding smali mods that i find.

2. most of the smali mods are made for apktool 1.5.2 and the smali mods do not work with apktool 2

3. apktool 1.5.2 gives me a lot of errors when i try to install framework-res.apk

so my question is how do i port apktool 1.5.2 smali mods to apktool 2
[Android Software Development] Thebear j koss:
Not really following, but you would need to find the changes to make yourself or rewrite the code to make it work. There is absolutely no way to port down mods that may work on lollipop to work on jellybean if the code isn't there. If it was that easy it would be done already.

LEGALIZE IT.

Mattias Duarte ruined android. Material design sucks.
[Android Software Development] Uchiha_Dev:
thank you,

---------- Post added at 10:52 PM ---------- Previous post was at 10:44 PM ----------

is there a way to forcefully compile an apk even if has errors ?
[Android Software Development] Thebear j koss:
Nope. Need to fix errors before compiling.

LEGALIZE IT.

Mattias Duarte ruined android. Material design sucks.
[Android Software Development] Ticklefish:
I find the easiest way to do this is to have an APK that can be decompiled and recompiled with both apktool 1.5.2. and apktool 2.0.0..

I decompile the APK with 1.5.2., add the smali files I want to convert, recompile with 1.5.2.......then decompile with 2.0.0. (after installing all the relevant frameworks). Then all I need to do is extract the smali files I added and add them to the APK I'm trying to mod.

Simple , really.

Once you've done it, it's worth uploading the 2.0.0-compatible smali files to the thread you got the 1.5.2. files from. It'll help anyone else who's in your situation.
[Android Software Development] Uchiha_Dev:
thanks a lot, it will work with any apk ?
[Android Software Development] Ticklefish:
Yes, as long as you can decompile and recompile the APK in both versions of apktool.

It's worth using a small APK though, just for speed.

The smali files you're adding to the APK won't affect it in anyway, you're just using the APK file as a converter essentially.
[Android Software Development] Uchiha_Dev:
thank you thank you and another million thank yous
[Android Software Development] Uchiha_Dev:
i already uploaded apktool 2.0 smali files for two smali mods :3 i also found a better way of doing this than yours :3 with my method you will not get errors at all as long as the files are placed in the correct directory and the apk's do not need to work on both apktool 1.5.2 and apktool 2.0, i will write a guide about it later, currently busy making a custom rom :3
[Android Software Development] Aman Dewett:
Need help regarding apktool error

Someone please help me out, i'm getting this error form yesterday while re-compiling apk. Please check attachments.