yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Phone_Guru:
Build with latest commits

http://www.mediafire.com/download/1r5od5brt8d22pk/apktool.jar
[Android Software Development] UnicoIjo:
Pls help

Im trying to decompile SystemUI.apk but i't always give me this error

I'm using apktool-2.0.0-Beta9

Device : Zopo ZP 980+

ROM: Ported Kitkat 4.4.2

OS: Windows 7
[Android Software Development] DSA:
install the relevant frameworks
[Android Software Development] UnicoIjo:
already pulled and install the framework-res.apk by using this code: "apktool if framework-res.apk" and it installed in /apktool folder..
[Android Software Development] erikalin:
Keep going. Install all of the relevant frameworks. ;)

Sent from my U.S. Verizon HTC One M8.
[Android Software Development] DSA:
is it a tw rom? did you also install twframework res?
[Android Software Development] UnicoIjo:
I'll try.. thanks for the reply..

---------- Post added at 11:39 AM ---------- Previous post was at 11:33 AM ----------

Framework-res.apk only..

Its a ported Kitkat ROM for ZOPO ZP980+ from needrom.com.. for me the rom is stable but I want to Modify and play around kitkat UI.. sadly i always encounter that error when i'm trying to decompile/recompile the SystemUI.apk
[Android Software Development] Spannaa:
Is there a mediatek-res.apk in the \system\framework folder?

If so, install this too and try again.
[Android Software Development] UnicoIjo:
i'll try :confused:

It worked like a charm.. thanks guys..
[Android Software Development] yakie996:
hello,

i'm using a LG G3 D855 I installed the framework-res.apk and renamed the LGSystemUI.apk to SystemUI.apk to install it but when i try to decompile LGSystemUI.apk it says that the framework isn't installed. the LGSystemUI.apk in position System/priv-app/

https://www.dropbox.com/sh/mxq5xjslytymhuz/AABUhLlcVlPt2mByfo2zRZvba?dl=0
[Android Software Development] djdarkknight96:
Hmm I don't theme anything but aosp but I've never had to install systemui to decompile anything...is that a sense thing like Rosie used to be? Yeah I'm old school....Lol
[Android Software Development] yakie996:
I meant if i tried to decompile the LGSystemUI.apk it said the framework-res.apk wasn't installed which I installed look at my previous post i provided a link to those files
[Android Software Development] djdarkknight96:
I'm only wondering if that's needed, is it overriding the framework install? I seen a 1.apk and a 127.apk back when I had to install sense Rosie framework. So I'm wanting to learn why as well.

Try installing framework only then decompile systemui. Just a guess.

Free TBO Updater App

Fix Gmail

My KlearKat Nexus 7 sent this using tapatalk
[Android Software Development] Ticklefish:
This does seem to suggest that you need another framework file to install. You shouldn't on a stock rom but if you're on a custom rom, it's always possible.

It might be worth asking the rom's dev.

You shouldn't need to rename LGSystemUI.apk to SystemUI.apk to install it. Apktool should be able to install it normally.

Although, you don't need to install an apk to be able to decompile it. The only reason you'd install a framework file is if you're trying to decompile an apk that shares some of the same resources.

Have you tried installing 'lge-res.apk'?
[Android Software Development] yakie996:
i tried to install lge-res.apk and now i can decompile the LGSystemUI.apk thank you!
[Android Software Development] Ticklefish:
That's what the THANKS button is for... ;)

Glad you got it working! :highfive:
[Android Software Development] cerj:
I tapped that for him...lol..Your the man
[Android Software Development] Al Arsyadi:
[MENTION=3924617]iBotPeaches[/MENTION]

I got this error message, how to solve it?

I: Using Apktool 2.0.0-3d2e93-SNAPSHOT on xxx.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Android\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=, name=version
, value=0x00000014
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Unknown Source)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSeria
lizer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:
696)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSer
ializerDelegate.java:106)
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
07)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:9
1)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:307
)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:123)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)
[Android Software Development] sam_0829:
Mate were you able to Decompile LG app? i am trying to decompile LG G3 Weather apk but gives me same error like you with Magic Code 01 18 .... Error..
[Android Software Development] Ticklefish:
I've been able to decompile some...which apktool are you using?
[Android Software Development] sam_0829:
I tried apktool modified for Lg ... posted some pages back ...
[Android Software Development] sandeepu21:
Hello friends

I am trying to decompile framework-res.apk but having few error like below

ol-install-windows-r05-ibot>apktool d framework-res.apk

I: Using Apktool 2.0.0-3d2e93-SNAPSHOT on framework-res.apk

I: Loading resource table...

W: Config flags size > 38. Exceeding bytes: 0x2400.

W: Invalid config flags detected. Dropping resources: string-ERR0

W: Config flags size > 38. Exceeding bytes: 0x9C00.

W: Invalid config flags detected. Dropping resources: string-ERR1

W: Config flags size > 38. Exceeding bytes: 0x2A02.

W: Invalid config flags detected. Dropping resources: string-ERR2

W: Config flags size > 38. Exceeding bytes: 0x9C00.

W: Invalid config flags detected. Dropping resources: string-ERR3

W: Config flags size > 38. Exceeding bytes: 0x8801.

W: Invalid config flags detected. Dropping resources: string-ERR4

W: Config flags size > 38. Exceeding bytes: 0xE703.

W: Invalid config flags detected. Dropping resources: string-ERR5

I am well aware of framework-res.apk modify process. I am able to decompile other framework-res.apk properly.

This apk is from kitkat ROM.

Can anyone help me.......... ??
[Android Software Development] sixline:
Help needed

I am trying to modify the edittext text color in framework of my rom but whenever I compile the framework, a lot of errors occur. Please see the attached log. Even if just decompile and compile the framework-res.apk without any change these errors occur. I don't know whats going on here as I am relatively new to this. Please help as I am badly in need to change this value. I am also attaching the framework-res.apk
[Android Software Development] KkdGab:
[MENTION=3924617]iBotPeaches[/MENTION] if I compile aapt for huawei vendor, may I share it on the forums? Or is it only for private use. My talks decompile fine, but some pngs are replaced with FALSE value, so I am going to compile my own, so my point is,when I'm finished, may I share it?

Sent from my HUAWEI Y210-0100
[Android Software Development] iBotPeaches:
If you made changes to aapt to support Huawei recompile. You must of made changes to apktool as well, since those changes go hand in hand. I'd be interested in seeing the code diffs.

However, if you want to utilize the power of 2.x, you need to compile a mac, win and linux binary of your modified aapt so it can be included in the apktool binary. Then you have a custom 2.x Huawei apktool.
[Android Software Development] KkdGab:
OK, thanks, I will look into it.

Sent from my HUAWEI Y210-0100
[Android Software Development] KkdGab:
Ok, did some research, the older huawei devices can decompile fine, but some files fail to be decoded. I will look into the newer devices.

Sent from my HUAWEI Y210-0100
[Android Software Development] iBotPeaches:
A new version has been released!

v2.0.0 RC2 (Released October 5, 2014)

Download: https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.0.0rc2.jar

Details of Release: http://connortumbleson.com/2014/10/05/apktool-2-0-0-rc2-released/
[Android Software Development] djdarkknight96:
Works on Google now, got it a few min ago from source....awesome work.

Still no go on Google plus 4.6 but got way more resources then before now...need a log let me know.

DJ
[Android Software Development] iBotPeaches:
I know :( , I had hoped it was around the same bug, however this is broken on the individual resource level of decoding where the GoogleNow bug was a shift in data which broke the entire apk in Apktool's POV. Still trying to isolate what the bad resource is in GooglePlus & why it is failing. With Apktool being my senior project, I assure you I will figure it out soon.
[Android Software Development] djdarkknight96:
No doubt YOU DA MAN!
[Android Software Development] Phone_Guru:
Works on play store 5.9.13
[Android Software Development] rush25:
hey what does this log mean ?

C:\android\apktool>apktool d 1.apk

Exception in thread "main" java.lang.UnsupportedClassVersionError: brut/apktool/

Main : Unsupported major.minor version 51.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:620)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12

4)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$000(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

C:\android\apktool>
[Android Software Development] PerfectSlayer:
Hi [MENTION=4337046]rush25[/MENTION]

Install a Java 7 runtime to get apktool working ;)

(according the build file)
[Android Software Development] rush25:
i just updated my jre to version 7 update 67 yet same error :(
[Android Software Development] iBotPeaches:
If you run `java -version` at command line, it will probably still say "java 6". You need to update your PATH environmental variable to point to the bin directory of the downloaded JRE7. My guess is that is its still pointing to the JRE6 installation you have.
[Android Software Development] rush25:
yes its showing 1.6.0 .. how do i manually change the path ?

and moreover jdk 7 doesnt work with playstore ?
[Android Software Development] DSA:
Advanced settings on pc-enviroment variables-path

Change existing path to new folder
[Android Software Development] PerfectSlayer:
See the official Java path help.
[Android Software Development] rush25:
it may or may not seem weird but i didnt have nay path existing there

i had just set environment variables when i was setting up adt

C:\Program Files\ADT\adt-bundle-windows-x86-20140321\sdk\tools;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\ADT\adt-bundle-windows-x86-20140321\sdk\tools

rest i dont have any path

i also made a new path pointing to C:\Program Files\Java\jdk1.7.0_67\bin but still java version is shown 1.6.0
[Android Software Development] Darkman:
Thanks for Update the Tool :good::good::good:

I have recmpilied a file with

java -jar apktool.jar b SecSettings NEWSecSettings.apk

and the new File is landed in the folder APKTool\SecSettings\dist with name SecSettings.apk

So the Script does not rename the File? But place the new File in the new Folder APKTool\SecSettings\dist ? Ist this right?
[Android Software Development] DSA:
Misread post, sorry

[MENTION=4337046]rush25[/MENTION]

So adding ;C:\Program Files\Java\jdk1.7.0\bin; to the end of your existing path does nothing?
[Android Software Development] rush25:
yup no changes .. still shows version as 1.6.0
[Android Software Development] iBotPeaches:
You forgot to read migration instructions :) https://code.google.com/p/android-apktool/wiki/MigrationInstructions

V2.0.0 requires -o parameter to output to an apk.

ie

java -jar apktool.jar b SecSettings -o NEWSecSettings.apk
[Android Software Development] PerfectSlayer:
[MENTION=4337046]rush25[/MENTION]

May be you have a java.exe in your C:\Windows\System32 and System32 location is at the beginning of your path environment variable...

(Otherwise, uninstall any public JRE your may have install except the one you want to keep (the Java 1.7 version))
[Android Software Development] steal25:
sorry if this has been discussed/resolved i read back and didnt see anything.

this is an error from trying to decompile framework-res from moto360 (android wear) using latest apktool2 rc2

H:\dev folder\MOTO360\360_dump_deodexed\framework>apktool2 d -b "H:\dev folder\M
OTO360\360_dump_deodexed\framework\framework-res.apk"
I: Using Apktool 2.0.0-RC2 on framework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01030128 style/Theme.DeviceDefault, config=[DEFAULT]
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
0)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:605)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:53)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:93)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)

H:\dev folder\MOTO360\360_dump_deodexed\framework>

ive tried hex editing resources.arsc and numerous different resources to no avail. any insight on this would be great. thanks.
[Android Software Development] iBotPeaches:
There is an open bug report with this same exact error for Android L apks - https://code.google.com/p/android-apktool/issues/detail?id=653 . I did not know if Android Wear APKs were affected, but it appears it is. This issue and the one still affecting various Google Apps (https://code.google.com/p/android-apktool/issues/detail?id=635) I think are connected slightly. Since this problem is duplicate resource and the other is undefined resource, it means some resource is being mislabeled during decode. Hopefully I'll figure this one out soon.
[Android Software Development] MJPollard:
Forgive me if this is a dumb question and/or one that's been asked before, but why is it that every single file in APKs that I compile with apktool (using Windows 7 x64) have a date of 02/28/2008 and a time of 21:33? The actual source files obviously have current dates and times, but they're changed when the files are compiled into the APK. Is this intentional, a limitation of apktool, a bug, or something I'm not doing correctly? Curiosity must be satisfied! :D
[Android Software Development] Phone_Guru:
Play store 5.0.31 has a lot of compiling errors in styles.xml in the values - v21 folder.
[Android Software Development] Ticklefish:
Odd. That doesn't happen to me..I wonder why it's happening to you... :confused:

It would help if you could share those errors. If there's a lot, attach a .txt file instead of quoting them directly in the post.
[Android Software Development] anagramgenius:
did you sign it with signapk?
[Android Software Development] Phone_Guru:
[quote name="Phone_Guru" post=55973041]Play store 5.0.31 has a lot of compiling errors in styles.xml in the values - v21 folder.[/QUOTE]<br />

<br />

It would help if you could share those errors. If there's a lot, attach a .txt file instead of quoting them directly in the post.<br/>

Just try for yourself.
[Android Software Development] MJPollard:
Yes, with this command:

java -Xmx512m -jar signapk.jar testkey.x509.pem testkey.pk8 temp\testtheme.apk output\testtheme.apk

Could it have something to do with the testkey files?

EDIT: Okay, it's signapk that's doing it. The files inside the apks compiled by apktool have the correct timestamps, but the files in the output apks from signapk have the 02/28/2008 21:33 timestamps. If anyone has any suggestions, I'm all ears; if you don't want to clutter up the thread, though, I'll gladly accept PMs!
[Android Software Development] anagramgenius:
yes exactly. you're getting that timestamp because of of signapk. that's because the signature is valid from 02/28/2008 21:33. (change the extension of testkey.x509.pem to testkey.x509.cer. double click it. you can see the validity of the signature)
[Android Software Development] MJPollard:
Mmmmm, okay. Narrows it down considerably. :) Now, forgive what's probably an incredibly stupid question, but what would be the optimal solution (or any solution, actually)? I'd like the apks I sign to reflect proper dates, if at all possible. Would getting a "real" signing key do that? I've never explored the possibility of putting anything onto Google Play, which is why I never used anything other than the test keys.
[Android Software Development] dankoman:
this is already known. i opened up a new issue for it last week here: https://code.google.com/p/android-apktool/issues/detail?id=685

you can scroll down in that issue to see [MENTION=3924617]iBotPeaches[/MENTION] response to it, but for now, you can use the decompiled files here: http://xdaforums.com/android/themes/playstore-5-0-31-decompiled-compiled-t2903608 that [MENTION=4668174]EMSpilot[/MENTION] has so graciously provided. they can be modified/themed and will recompile without error, so long as you're using apktool RC2.
[Android Software Development] Romancy:
[MENTION=3924617]iBotPeaches[/MENTION] bro i need apktool coptiaple KK 4.4.4 bekoz

when Decompil apk 4.4.4 and dont edit it then Compil dont compil happen error

but edit on apk 4.4.2 its good Decompil and Compil its good

iam try beta 9 apktool and RC2 and iam try multitool
[Android Software Development] Phone_Guru:
The new gmail 5.0 decompiles and recompiles without errors but won't install and when flashed disappears from the launcher. I wonder if this is the same issue as before.
[Android Software Development] DSA:
Gmail isn't themable atm if that's what you are doing

Check the tbo thread for more info
[Android Software Development] :
Actually - It does theme - when using ThemeChooser :)
[Android Software Development] DSA:
Unrelated to the question asked, not sure why you posted that
[Android Software Development] Phone_Guru:
I'm trying to theme the new gmail 5.0. It's totally new so the issues with the old one may not be the same issues as with this one and these may be fixable just like Play Store 5.0.31 needed modification to recompile and 5.0.32 does not.
[Android Software Development] djdarkknight96:
You have to fix the authorities in the manifest so it will install. It works just fine...but....these are debug builds from Google...not worth theming yet anyway.
[Android Software Development] Phone_Guru:
Forgive my basic coding skills but could you explain a bit more? It works perfectly for me so I want to mess with it.
[Android Software Development] Jasi2169:
brother it would be better if you provide links to aapt as well as you have migrated to bitbucket and that binaries should have links as well i think so cus maybe some people will use old binaroes and have problems with it :))
[Android Software Development] gakugaku:
Using which apktool is it decompiling?

I cannot do it in an error.
[Android Software Development] iBotPeaches:
I don't see a reason at all why older builds (1.5.2) would benefit from the newer aapts. For one, 1.5.2 is missing all the qualifiers since jellybean. That makes it quite hard to decompile anything when those are missing. At that point if you some how decompiled an application using 1.5.2 that utilized these newer qualifiers you could have already grabbed aapt from the sdk build-tools or the Apktool repo itself (https://github.com/iBotPeaches/Apkt.../apktool-lib/src/main/resources/prebuilt/aapt).

Not to mention additionally old links are still working fine (the binaries prior and up to 1.5.2), bitbucket only has 2.0+.
[Android Software Development] Ticklefish:
What framework files did you install before decompiling this? And what device are you using?
[Android Software Development] Jasi2169:
you misunderstood brother i meant that if someone using new apktool.jar (eg 2.0.0) and using old aapt

anyway the link you gave is aapt 6mb and right now im using is 834kb which i downloaded long ago and i remember it was v2.0.0 beta 7 when i asked for aapt thats what you gave me and works fine here it is

whats the difference with the new one

http://www9.zippyshare.com/v/21257617/file.html
[Android Software Development] iBotPeaches:
2.0.0 has aapt internally in the jar, so finding and requiring users to install a global aapt is not needed.

The bloated aapt size is actually a bug https://code.google.com/p/android-apktool/issues/detail?id=688 which has since been fixed. The next release which has Lollipop support will have 1mb aapt binaries instead of 5mb. This will drop the overall apktool binary in size back down to ~3.4mb.

You shouldn't need to mess around with aapt. One of the key principles of designing 2.0 was to remove that aspect as 50% of support request were about updating or installing a global aapt executable.
[Android Software Development] Jasi2169:
This Cleared my doubt now :D no more questions ;)
[Android Software Development] Aeyan Ashraf:
Hey ,

problem solved........... I did not edited the .9 png's properly.......... The black borders were creating this mess,,,,,,,,BTW, I am using 4.4.2......and I have everything installed well.............
[Android Software Development] Phone_Guru:
Has there been a change in the build command? I got errors when trying to build the latest version and it normally works fine.
[Android Software Development] iBotPeaches:
You do know Apktool is open source. I rehauled the entire build system about 3 days ago - https://github.com/iBotPeaches/Apktool/pull/94/files . These changes didn't break unit-tests and work on both my windows and linux based computers. You'll have to be more specific with an error of how its failing.

I did use an "incubating" feature of Gradle to incrementally compile Java files, which cut my build time in about half so I kept it. If I have to roll that change back I will, but I need an error log to be sure.