yashsingh1/xdaforums huggingface dataset:
[Android Software Development] sparkie172:
cant find out whats going on

Hello all i am trying to learn how to theme and customize apps so i can try to build a rom to my likes. The problem is when i decompile and recompile with no changes i get this http://paste.ubuntu.com/6345042/ . i have tried other apps some will recompile some wont. I looked at the files but dont understand what happend.

Also all tutorials i find are about system ui.

---------- Post added at 11:24 AM ---------- Previous post was at 11:18 AM ----------

java -jar apktool_2.0.0b7.jar d or b APK HERE -O FILE NAME

-o for output.

I didnt unpack it. I just put the file in my apktool folder and use command from that folder in terminal.
[Android Software Development] iBotPeaches:
I don't know what the "latest" Gmail is, but this is what I did.

Pulled Gmail.apk from my phone (according to it, it was version 4.6 (836823).

(Using 2.x built from source, using new API19 frameworks)

apktool d Gmail.apk

(Changed color in /res/values/colors.xml)

apktool b -c Gmail.apk (-c flag is from 2.x suite, to retain META-INF)

adb reboot recovery

adb push Gmail.apk /system/app/Gmail.apk

adb reboot

Opened up Gmail, white text on white bg. My color change went live, and no problem. Show me in these steps where something didn't work for you, or provide me a different version of Gmail. I can't duplicate any problem.
[Android Software Development] ManuMu:
Hi, I have the same apk as you, the same apktool, the same API. But still a compilation problem. How to ensure that the API has been taken into account?

Thanks for your job !
[Android Software Development] brolee93:
[MENTION=3924617]iBotPeaches[/MENTION] Have you delete public.xml before recompiling ?
[Android Software Development] iBotPeaches:
Why would I do that? That would break any resource mentioned in the java portion of the application, as all the IDs would reshuffle breaking the application's use.

[MENTION=3233860]ManuMu[/MENTION]

Make sure you are using Apktool 2.x, and clear the file at $HOME/apktool/framework/1.apk
[Android Software Development] Gunthermic:
I get all that, but once App is flashed/pushed. App says parsing error.

NoteIII Android 4.3 is Device.
[Android Software Development] djdarkknight96:
You doing this in Windows or Linux? Not working for me neither in Windows.

Sent from my Nexus 7 2013 using ClearJellyed Tapatalk 4
[Android Software Development] TeamBlackOut:
iBot, I've tried in Windows 8, apktool 2.x with 4.4 framework resources loaded and it decompiles with a missing versionCode and versionNumber in the android.manifest.xml. Compiling Gmail works fine but no matter if we push to system, flash in a zip file, sign it with a test.key and install to Data, use stock apk and drag edited res, resources and classes to it and flash or push the result is the same.. it has a parsing error. If you were able to build and install and have WoW due to your edits, then all of us are obviously doing something wrong, have something set up wrong, etc. I know that we are a small part of the apktool universe but our team uses it daily for Team Black Out. We have over 100 free android apps that we've Inverted and made Transparent. Gmail is a primary Google App that we offer so whatever we can do to have your assistance would be greatly appreciated. I've offered a high donation amount via twitter to you that will stand and we've donated in the past as well. We appreciate your time and work since it appears to be pretty much a 1 man show and isn't easy, I'm sure.
[Android Software Development] vmancini3:
^ +1,000,000 whatever is causing these errors I'm sure would be related to why no matter what I do I can't recompile the Google keyboard, even though I've successfully done a bunch of other apk's no problem.....SystemUI, framework-res, twframework-res, MMS, TapaTalk, greenify, etc....

Sent from my SCH-I535 NOT using that garbage called TapaTalk 4!
[Android Software Development] zelendel:
They may be doing the same thing a few other apps have done. If the Apk is altered in anyway (DE compiled or unzipped) then it self destructs. This maybe why it is happening. I remember seeing an article on Android dev about how do do this but that was months ago.

Wayne Tech Nexus
[Android Software Development] Gunthermic:
I 100% agree. It's about the resources file that borks and cuases the install problem..

Thank you sir for taking the time and to replicate the same error..
[Android Software Development] fisha21:
On the contrary, these posts of yours are always a great way to learn more about apktool and how to debug the less standard errors. I always find them very useful
[Android Software Development] notmyepic:
Having compile issues for the recently updated paid Swype (version 1.6.2.22328) from the Play store. I know the agreement that Swype and XDA have and I do honor that, this is for my personal use and learning about theming

I have tried both versions of apktool, frameworks from S3, Note 3, and one with beta version.

I am on Windows 8.1 with all necessary JRE and SDK updates installed.

Some errors are in various array.xml for either dimen-array or fraction-array "where item is expected"

Most errors are in public.xml for something "declared here is not defined"

Any ideas?

View attachment Error_Log.txt
[Android Software Development] DAddYE:
Quick question. I've a Sony Xperia Z1 rooted and with 4.2.2, I'm trying to just decompile compile and sign (tried also coping meta-inf etc) and as a result I'm always stuck with boot loops. I've read in another thread that apktool has problems whit xperia devices. Is that true? How to solve? Thanks
[Android Software Development] Ticklefish:
You're trying to decompile framework-res.apk, right? Sony did something odd to it and, although you won't get any errors, it won't recompile properly.

There are ways around it though but it depends on what mod you're actually wanting to do..
[Android Software Development] DAddYE:
Yes, I'm trying to decompile framework-res.apk in order to change some values in /res/values/bools.xml

Do you know any workaround?

Thanks
[Android Software Development] Ticklefish:
Yeah, I've got the Z (if only I'd known the Z1 was out a few months later!!) and I've got the same issue.

What you need to do is decompile framework-res.apk and also system/vendor/overlay/android-res.apk.

Copy bools.xml from framework-res.apk into the values folder of android-res.apk. Make the changes you need then recompile android-res.apk. Use the same META-INF folder with the same compression and put onto your phone.
[Android Software Development] hotaru2k3:
you could do what I've been doing for most of my mods lately: use apktool to find out what needs to be changed and then write an xposed module that makes the changes.
[Android Software Development] Ticklefish:
One of these days there's going to be a big flame war between the decompilers and the module makers..I can just sense it coming...
[Android Software Development] DAddYE:
Awesome! Thanks!

---------- Post added at 08:06 PM ---------- Previous post was at 07:55 PM ----------

Mmm, I don't have this file:

root@android:/ # ls -al /system/vendor/
drwxr-xr-x root shell 1970-01-16 10:53 camera
drwxr-xr-x root shell 2013-11-07 22:33 etc
drwxr-xr-x root shell 1970-01-16 10:53 firmware
drwxr-xr-x root shell 1970-01-16 10:53 fota
drwxr-xr-x root shell 1970-01-16 10:53 lib
drwxr-xr-x root root 1970-01-16 10:53 pittpatt
[Android Software Development] Shaftamle:
Whenever I decompile an apk and it has

Original_package: android, in the apktool.yml it will not recompile. Shows many "no resource identifier" over and over as the error. It is because the original package is different from current package, thus it has nothing to build from.the Google keyboard, the nexus kit kat keyboard are 2 I've seen this on. What causes the package name difference and is there a way to change or fix so it will build correctly?

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] Ticklefish:
Try looking here: http://xdaforums.com/showthread.php?t=2321207
[Android Software Development] jrc2:
I get this problem when I try to install the framework-res.apk file from CM 10.2 for Samsung GT-P3110:

$ sudo apktool if framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: java.util.zip.ZipException: error in opening zip file
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:582)
at brut.androlib.Androlib.installFramework(Androlib.java:473)
at brut.apktool.Main.cmdInstallFramework(Main.java:250)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.zip.ZipFile.<init>(ZipFile.java:143)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:552)
... 3 more

I do not have this problem when I use the framework-res.apk from CM 10.1 though. I am using apktool 1.5.2 on Linux Mint 15.
[Android Software Development] Phone_Guru:
Can someone with some build experience please build me Apktool 2.0B8?
[Android Software Development] arunsai123:
Apktool can't properly compile framework-htc-res.apk.I decompiles and recompiles that apk without errors. whenever I push it.(even without editing) phone doesn't boots and shows "bad resource table" in logcat.

I am using latest apktool.

Sent from my HTC Explorer A310e
[Android Software Development] creeve4:
I have not been following this thread for quite some time, where can I find a version of apktool that can decompile AND compile 4.3 apks such as SystemUI and framework-res?
[Android Software Development] jrc2:
I have been looking for the same thing for Linux Mint 15 for a while now.
[Android Software Development] iBotPeaches:
Build from source wip-2.0 branch of Apktool.
[Android Software Development] jrc2:
Is there any way to install framework from 4.3 on Linux apktool without errors?
[Android Software Development] laura almeida:
Is there anyway to install framework-res.apk of kitkat ?
[Android Software Development] kkk-sgs2:
cant decompile android 4.4 dailer.apk

--------------------------------------------------------------------------
|18.11.2013 -- 23:03:53,29|
--------------------------------------------------------------------------
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:540)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:76)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:68)
at brut.androlib.Androlib.getResTable(Androlib.java:51)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:191)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:116)
at brut.apktool.Main.cmdDecode(Main.java:148)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000000
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:219)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:179)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:167)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:133)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:108)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more
[Android Software Development] iBotPeaches:
There are new qualifier changes that are added in the wip-2.0 branch. I never backported them to 1.5.2 because the codebase has changed too much to start cherry-picking changes.

In theory, the amount of bytes in the kitkat header are the same as JB, just with additional qualifiers. So some apks might work as is, assuming you use the newest aapt and newest framework. All of which can be found in the recent commits to the wip-2.0 branch.

In short, build wip-2.0. Apktool will be in this "limbo" state for awhile. I don't think I will release anymore of the 1.x series and 2.x isn't yet ready for production due to the embarrassing bugs that JRE7 and windows has.

I think a lot of people don't understand how it easy it is to build from source, either way. Maybe its time to invest some effort into a automatic nightly build system where binaries are published, since a good portion of people are looking for binaries.
[Android Software Development] Shaftamle:
When installing framework using the "if" command, how do I determine what level framework to use? Is the framework level dependant on the min/target SDK version of the apk, the version of apktool being used or something else? IE: trying to Decompile/recompile an app that has min SDK version 14 and target 18. What framework is preferred?

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] iBotPeaches:
Apktool maintains a separation from the frameworks. Every newer version of Apktool internally contains its own framework. EX, in the newest 2.0.0b8 version it has an API19 framework inside of it. This means if you have no framework at $HOME/apktool/framework/1.apk and you try to use Apktool, it will copy its internal framework to there. Usually since Android contains backward compatibility (for the most part). You can just use the internal framework provided by Apktool.

Though you will quickly learn that any Android version produced by LG, Sony, HTC, Samsung have their own frameworks and changes, which is why the separation was produced to allow users to install frameworks using tagging for multiple OEM's without having to worry about changing frameworks often. For your question. Use the target version for market apps, which is 90% of the time the latest / latest - 1.

For apks that are a part of a ROM. Its pretty simple. Just use ALL the apks in /system/framework. Basically any APK in there (usually 1-5) are framework apks and need to be installed to properly handle the apks in /system/app.
[Android Software Development] Shaftamle:
As always, thank you sir.

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] notmyepic:
Thanks to [MENTION=290867]ozkaya[/MENTION], changed the errors for dimen & fractions to string arrays and was able to compile
[Android Software Development] Shaftamle:
OK, one more question for you guys. I have decompile an apk, recompiled with a few changes in the res folder, switched the resources.arsc to original apk,resign and install with no problems, a working app.

But then I do the exact same process and same changes but this time I changed a few hex codes in res/values/colors.xml. the app still recompiles but this time when I sign and install I get a parse error. How is this possible?

Changing #ff000000 to #ffffffff should not cause a parse error, right?

Sent from a Shaftamle Galaxy S4

"Thanks Button" is always appreciated!

http://mycolorscreen.com/Shaftamle/
[Android Software Development] iBotPeaches:
See this post: http://xdaforums.com/showpost.php?p=47135260&postcount=2147 I believe your problem is related. I just fixed some non-related bugs in Apktool, so I'm taking another look at your problem / that problem now.
[Android Software Development] boomerxyz:
I have been using your apktool for android 4.2.2 and it's worked fine, but it doesn't seem to work for android 4.3. I am attempting to use it on the SystemUI.apk for Android 4.3 (Samsung Galaxy S4 T-Mobile - Rom from http://xdaforums.com/showthread.php?t=2545711&page=7). It is generating the following errors. I if'd SystemUI.apk, framework-res.apk, and twframework-res.apk, decompliled SystemUI.apk, and without making any changes to SystemUI, recompiled SystemUI. Here are the errors. Any suggestions? (I am using apktool 1.5.2) I took the liberty of removing identifying information, hence the xxxxxxxx. Researching this error, I understand that no yml files were supposedly created in the decompile process, but it is present in my SystemUI folder.

C:\Users\xxxxxxx\Desktop\apktool>apktool d SystemUI.apk

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

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

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

C:\Users\xxxxxxx\Desktop\apktool>apktool d SystemUI.apk

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

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

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

C:\Users\xxxxxxx\Desktop\apktool>apktool b SystemUI.apk

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN

otExist: apktool.yml

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

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

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

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

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

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

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

103)

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

... 4 more
[Android Software Development] boomerxyz:
Tried again from scratch the above process and now I'm getting the error attached.
[Android Software Development] kuano:
I'm trying to decompile my framework-res.apk, however I get "Multiple Resources" Error due to several non standard subfolders "drawable-hdpi-jrdtheme001" to "...-jrdtheme004". So far I had no luck, modifying the ResConfigFlags.java. What do I have to do, to make this work?

Thanks in advance!
[Android Software Development] steal25:
Try using the framework-res that you are trying to decompile as a resource, install it using the apktool if cmd.
[Android Software Development] kuano:
Trying to load it as a resource has the exact same effect.

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080003 drawable/arrow_up_float, config=-hdpi

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:198)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:167)

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

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:108)

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

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

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

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:611)

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

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

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

The problem should be something similar to this: https://code.google.com/p/android-apktool/issues/detail?id=148
[Android Software Development] nobody573:
Who can i download the Apktool beta8

Gesendet von meinem GT-I9300 mit Tapatalk
[Android Software Development] jackq:
nevermind. got it
[Android Software Development] DualJoe:
[MENTION=3924617]iBotPeaches[/MENTION]:

I've successfully recompiled 'framework.jar' on CM11 but apktool omitted the 'preloaded-classes' and 'MANIFEST.MF' files and put them into unknown+original folder instead. Wouldn't it be better to replace them to the same position in the output file? I put them manually there after compilation but i don't know if its really mandatory.
[Android Software Development] iBotPeaches:
Had intentions of spending all weekend on apktool, but I hard-bricked my SGS3 (AT&T). This isn't good and has priority.

I've been doing research of where to get my JTAG Repair done as literally every repair method failed, and I'll have to outsource my phone to get it fixed via JTAG flash.

Point being, apktool v1.4.10 is delayed now. Didn't get my time this weekend, and I'm moving homes next weekend. Sorry for the troubles and delay all.
[Android Software Development] 1982Strand:
Hi iBot.. Nice work with this tool, really nice indeed!

No more plurals.xml errors in Music and framework-res and no more "formatted false"- fixing.. No more <tag> errors in framework-miui-res. GREAT!

But still a few things in regards to MIUI..

The Email.apk. It gets messed up when decompiling and fixes are still needed to make it compile error-free.

See the attached zip, it includes diff patches for what needs fixing.

And for framework-miui-res, we still need to ad 2-5 in apktool.yml and for Compass it's only 6.

Don't know if these things are fixable at all and you're probably aware of these already, just thought i'd post them. I think the apktool.yml issue is on the bugtracker aswell though :)
[Android Software Development] Ticklefish:
Ouch. Not to worry, I'm sure we can wait. Best of luck getting your phone fixed!
[Android Software Development] prdog1:
http://mobiletechvideos.mybigcommerce.com/

College Station Texas. $60
[Android Software Development] MrDSL:
I just noticed this myself..Have you noticed any issues when recompiling and actually using the apk?
[Android Software Development] creeve4:
I haven't experienced any problems yet...
[Android Software Development] purian23:
I am having the issues on my end, I can decompile, recompile Contacts.apk for example. Push/Flash to my phone and its basically unusable, FC's. With one image mod, and even tested no mods at all. Just a decompile, recompile and flash. No errors thrown, so idk what it would be.
[Android Software Development] iBotPeaches:
Whats the FC say? Invalid resource or something? Maybe there is a new resource type I don't have support for.
[Android Software Development] purian23:
Thanks for the quick reply IBot, I wll try and reproduce for you by tomorrow. I have it fixed now, by the old fashioned 7zip since it was just image mods. But the FC screen flash was so fast to show and then gone all I could see was the FC itself. Let me see what I can dig up for you. Like the other good luck on the S3 dude, thats a bummer ;(
[Android Software Development] MrDSL:
Is this for AOSP? My understanding is you can only build Contacts.apk directly from source or it will FC..Something to do with t9

Its the only apk I know of thats like that.
[Android Software Development] purian23:
Hmmm that would be intresting, I have tried Mms as well. But I will try again to be sure.
[Android Software Development] MrDSL:
I havent had any issues building Mms JB app but I always generic sign the apk because for whatever reason on some phones the apk simply doesnt show up not being signed even though its a system app.

When I generic sign it, it seems to work fine for everyone.
[Android Software Development] purian23:
That's a good point too. That was the trouble I was having with the Mms not showing up at all, because I knew I wasn't supposed to sign it being a system app. I'm not sure on what drawbacks are being system signed if any. When you say generic sign it, do you mean with like android signer vs the apk/mutli-tools signer?

Thanks btw :eek:
[Android Software Development] MrDSL:
I havent had any reports of any issues and I've been using my Mms app for some time and everything is fine.

Yeah like apkmulti-tools
[Android Software Development] purian23:
Perfect I will give that a go. Thank you!

IBot Peaches, I will let you know as weel. Since it's said not to sign these to see if you need to look at anything else!