yashsingh1/xdaforums huggingface dataset:
[Android Software Development] raziel23x:
What is odd though is made A TOOL called APK Multi-Tool which is mainly a wrapper with more functions for apktool using the app with your latest build plus the aapt off your website. Me and another guy installed both the jb frameworks res and the system ui but I get errors and he's not when compiling using the same setup
[Android Software Development] Ticklefish:
Well, that would explain it..although it's bad news. Thanks, I'll tell the person who told me about this.
[Android Software Development] reosm:
recompile the code is changing the framework, but does not framework-miui-res.apk solution here?
[Android Software Development] bgcngm:
I'm just saying that you may have another aapt somewhere in the path, that is taking command over the "good" aapt.
[Android Software Development] Jamison904:
We figured this out over in my ROM thread for the M919 tmo S4. Figured I would post this here to help others having this issue with other S4 devices.

Add these to your SystemUI styles.xml

<style name="SystemBarNotificationText">
<item name="android:textSize">16.0sp</item>
<item name="android:textColor">#ff999999</item>
</style>
<style name="SystemBarPanelSettingsRow">
<item name="android:orientation">horizontal</item>
<item name="android:background">?android:listChoiceBackgroundIndicator</item>
<item name="android:paddingRight">16.0dip</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">64.0dip</item>
</style>
<style name="SystemBarPanelSettingsContents">
<item name="android:textSize">18.0sp</item>
<item name="android:textColor">?android:textColorPrimary</item>
<item name="android:layout_gravity">left|center</item>
<item name="android:layout_width">0.0dip</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1.0</item>
</style>
<style name="SystemBarPanelSettingsIcon">
<item name="android:layout_width">64.0dip</item>
<item name="android:layout_height">fill_parent</item>
<item name="android:scaleType">center</item>
</style>
<style name="SystemBarPanelSettingsPanelSeparator">
<item name="android:background">@*android:drawable/divider_horizontal_dark</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">1.0dip</item>
<item name="android:layout_marginRight">0.0dip</item>
</style>

And

Add this to your framework-res.apk/res/values/layouts.xml

<item type="layout" name="keyguard_transport_control">false</item>

Now these will compile. Big thanks to [MENTION=5001866]Mr Impossible[/MENTION] and [MENTION=2200516]evil1art[/MENTION] for figuring these out for us.
[Android Software Development] sieuan:
Can anyone help me? Thanks!:(
[Android Software Development] plegdroid:
[MENTION=4948569]sieuan[/MENTION]

I've never deviated from this way of working and never had issues.

http://xdaforums.com/showthread.php?t=1752201

also check your drive where your apktool folder is and run a search for any other aapt, delete any other than the one in your working apktool folder. :)

if you've got sdk installed(not required to use apktool), remove the aapt from there.

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] dully79:
Morning folks,

I keep getting a strange error when building:

java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building apk file...
[COLOR=Red]The system cannot find the file specified.[/COLOR]

Does anyone have a clue what file it is referencing?

I have the latest apktool.jar/bat, java jdk/jre and up to date android sdk. I've also tried reverting to older versions but that doesnt work either.

Any help would be appreciated.
[Android Software Development] plegdroid:
Afternoon.

can try deleting the aapt from sdk if not already done so. :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] sieuan:
I have Android SDK installed, how to remove the aapt from there, sir? Thanks!

/// And, can you test decompile/compile my framework-res.apk help me? I tried on 2 laptop (win7&win8) and i ask my friend test decompile/recompile it for me, and he get the same errors when recompile.
[Android Software Development] plegdroid:
Afternoon Matey :)

Off the top of my head :D ,find the sdk folder on your c drive and it will have a folder within called tools, it will be in there, just delete it and reboot the pc. sdk ships with a aapt, and we install the one from the op, and it causes conflicts. there can be only one aapt :D

Iam unable to test the framework as iam on holiday :D

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] dully79:
Tried, ive even tried using various versions of apkmanager and multi tool and i still recieve the same error.

The apk rebuilds fine and decompiles with no errors, but when i try to build with or without changes i receive the error.

It produces this error regardless of the apk being a system app or not.:eek:

I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\dully79\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...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.

All frameworks and systemui apk's are installed.

---------- Post added at 12:47 PM ---------- Previous post was at 12:46 PM ----------

If you have an up to date sdk you'll find it in build-tools, it's been moved.:)
[Android Software Development] plegdroid:
[MENTION=2538774]dully79[/MENTION], can you please post the compile command part of the error the part before baksmaling. :)

ie, java -jar b ect

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] dully79:
C:\android>apktool b empty_xhdpi
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
[Android Software Development] sieuan:
Alright, sir! I go to the tools folder in Android SDK, and deleted the aapt, then i reboot my PC.

Then i I follow step by step your instructions, and i get the same error:
[Android Software Development] dully79:
Open a fresh cmd and type aapt.

It should return with a menu.

If not you need to add it to your path.
[Android Software Development] androidphone2012:
Do we need more tools to decompile Hangouts? :confused:

Edit: Deleted "/assets/", "/com/", "/lib/", "/assembly-descriptor.xml" and then can decompile / recompile :)
[Android Software Development] sieuan:
Thanks sir!

i open fresh cmd and type aapt, and here is the results:

how to add it to path, sir?
[Android Software Development] dully79:
Does it do the same when you type apktool?

If it returns with options, a quick fix is to drop aapt into your apktool folder. If you get an error, Google how to add path variable.
[Android Software Development] sieuan:
OK sir!

what should i do next, sir?
[Android Software Development] dully79:
Get de/compiling and enjoy.
[Android Software Development] sieuan:
I tried again, and still get the same errors:(

Here my file, can you help me test de/recompile it, sir? http://www.mediafire.com/download/9pim59iz4vdpnx2/framework-res_mediatek-res_P700.zip

I want to add my language into resources.arsc, and I've been trying for a few month with a lot of tools but still can not recompile this framework-res.apk, even when I keep it original without editing anything.
[Android Software Development] dully79:
What happens if you type apktool into your cmd?
[Android Software Development] sieuan:
Here is result, sir!
[Android Software Development] iBotPeaches:
This is a bad apk. It won't work. Here is the verbose output of the build command: http://connortumbleson.com/xda/xda_p41923842

As you can see, its "aapt" that is failing, not apktool, and I looked over that 20,000 line file and found 0 error within aapt. Therefore, this is a bad apk since it refuses to give any idea of what the problem is.
[Android Software Development] sieuan:
Oh, how sad is that:( this apk i copied from the stock rom deodexed.

/// BTW, is there any way to build the resources.arsc ?
[Android Software Development] sieuan:
Ok sir, I have a question, why its said that "Could not find sources", sir? Thanks!
[Android Software Development] dejanxxxx:
I have problem with this when want compile .I try this http://xdaforums.com/member.php?u=4462413 , but again get error.I want compile Phone.apk.
[Android Software Development] gollum17:
When you decompile phone.apk apk tool will create the file apktool.yml and it will place it in the root folder of phone, it's needed for it to recompile properly, and removing it causes this error. If you can't find it or you emptied your trash, decompile phone.apk into a different folder and place it into your original decompiled phone.apk
[Android Software Development] ghoster76:
Update to 2.0 please
[Android Software Development] iBotPeaches:
lol? when its ready young friend.
[Android Software Development] zelendel:
Will the apktool and appt update be able to handle the new changes in aokp?
[Android Software Development] iBotPeaches:
Link me to whatever change or thing your talking about that might be breaking apktool.
[Android Software Development] zelendel:
Seems it has to do with the TRD changes for the dark toggle. Maybe the Apktool for slim roms should work.

http://gerrit.aokp.co/#/c/8644/
[Android Software Development] iBotPeaches:
Yep, it won't work at all. Those changes are completely different than the original "dark rom" whatever inverted things I already merged. So then here is the problem.

These changes don't add just add a few new qualifiers like the previous one did. It adds an entire new category with new qualifiers. For one this will increase our configuration header, by a few bytes. Like 4.2 did when they added the RTL/LTR layout category. You could treat this change like any other AOSP new version, and add the new numbers, increase the version and it'll work. However, then we will have a problem when a new AOSP version comes out, Apktool will see the "extra, but new" unknown blocks of data, which Apktool will read as this inverted data (assuming whatever AOSP adds is the same size / struct that inverted is). This will misrepresent the data, possibly creating duplicate resources or missing resources which is a slippery slope to mess with.

I think this is what I'm going to do. Strip all the inverted stuff from the REPO, break it back down to just standard stuff. Branch 2.0 off onto a branch for this change, and let users build that branch if they want to use that feature. These changes are too critical for master branch. Especially when Apktool has to continue to work on every device / version without intentionally creating problems for the future, and since all these ROMs continue to expand on this feature without agreeing on one solid set of guidelines for them, I can't chase these changes down and track them in master anymore. It'll be best saved for a branch, and not part of the main Apktool.

If I understood this change wrong, (I just read the commit and looked a few key files), then let me know. This was my understanding and my response.
[Android Software Development] zelendel:
You maybe right. I have gotten it to decompile with Slims APKtool but cant seem to find an aapt.exe (compiled) that will work with it.
[Android Software Development] denzel09:
Thans it works
[Android Software Development] iBotPeaches:
Yeah, you'd need to build a new aapt with those new qualifiers. I'll do some cleanup work on my aapt repo, and try and remove all the current "slim" changes it has, so I can branch these into a new one and get one built. Since AOKP is larger than some of these smaller ROMs, I'd venture to say their method and execution should now be the default / go to for this change. Hopefully other ROMs (who use this), will follow that commit so they can all be on the same page. Otherwise we will have tons of APKs with random bytes of new data, which Apktool won't be able to handle.

I can't wait to start getting random bug reports about duplicate resources :/

OPPO did exactly this ^, except their qualifier had nothing to do with inversion. It was just called "oppo" and hooked into special OPPO folders. That is why I won't directly add support for OPPO ROMs into Apktool. There change just would cause problems on new AOSP versions.

MIUI on the other hand, only adds 3 resources into an existing qualifier. They also pad the number by like 20, so even if 10 years of AOSP versions passed, it still wouldn't conflict with their version (Unless AOSP happens to add the same names as MIUI).

What does this mean for you?

It'll no longer be part of the "official" Apktool I put out on Google Code, etc. You'll just have to find a special build, that I'll release here. Since aapt is bundled inside Apktool, you won't have to worry about maintaining a copy of "patched" aapt and apktool. Since they'll be bundled together.
[Android Software Development] kufikugel:
Hey,

the main problem on our first implementation and especially after we pushed it up to 69 that we had some side effects and errors with it when apps using the uiMode qualifier for other reasons (car dock eg) as well the high numbered qualifier broke on some parts due that the current bit mask from google cut it off. So there were three possibilities...to change the bit mask (which would bring a lot other problems)....or to go down to a qualifier number below 10 (which is as well not good) or to use a complete one on it's own which does not effect any other external app or system. Thats why we changed it.

BTW the AOKP one is from us ;)

about other roms....we published the change...aokp merged it already, rootbox, carbon rom, liquid roms merged it already as well. So I think there will be not much roms left with the old qualifier especially when (beside CM and PA) two off the biggest roms (Slim and AOKP) have it in their source ;)

cheers

Lars
[Android Software Development] pauldiddy:
when decompiling the latest gmail,I always get this:

java version "1.7.0_21"

Java(TM) SE Runtime Environment (build 1.7.0_21-b11)

Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

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

I: Loaded.

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...

I: Done.

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

at brut.androlib.res.data.ResPackage.getResSpec(ResPa ckage.java:61)

at brut.androlib.res.data.ResTable.getResSpec(ResTabl e.java:57)

at brut.androlib.res.data.ResTable.getResSpec(ResTabl e.java:53)

at brut.androlib.res.decoder.ResAttrDecoder.decode(Re sAttrDecoder.java:35)

at brut.androlib.res.decoder.AXmlResourceParser.getAt tributeValue(AXmlResourceParser.java:313)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelega te.getAttributeValue(XmlPullParserDelegate.java:69 )

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.writeStartTag(StaticXmlSerializerWrapper.j ava:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializer Wrapper.event(StaticXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder$1.e vent(XmlPullStreamDecoder.java:64)

at brut.androlib.res.decoder.XmlPullStreamDecoder.dec ode(XmlPullStreamDecoder.java:98)

at brut.androlib.res.decoder.ResStreamDecoderContaine r.decode(ResStreamDecoderContainer.java:34)

at brut.androlib.res.decoder.ResFileDecoder.decode(Re sFileDecoder.java:102)

at brut.androlib.res.decoder.ResFileDecoder.decode(Re sFileDecoder.java:86)

at brut.androlib.res.AndrolibResources.decode(Androli bResources.java:169)

at brut.androlib.Androlib.decodeResourcesFull(Androli b.java:113)

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

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

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

installed the latest framework
[Android Software Development] abo hani:
need help with this

i formated the computer just for apk tool

and after install java and tried the apk tool

i had this

[*] "C:\Users\Mohammad\Downloads\Compressed\AutoAPKTool1.0.7\AutoAPKTool1.0.7\_INPUT_APK\Game Killer.apk"

recompiling "C:\Users\Mohammad\Downloads\Compressed\AutoAPKTool1.0.7\AutoAPKTool1.0.7\_INPUT_APK\Game Killer.apk"...

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

at brut.androlib.Androlib.readMetaFile(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.androlib.Androlib.build(Unknown Source)

at brut.apktool.Main.cmdBuild(Unknown Source)

at brut.apktool.Main.main(Unknown Source)

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

at brut.directory.AbstractDirectory.getFileInput(Unknown Source)

... 5 more
[Android Software Development] iBotPeaches:
Still looks like a framework problem. Don't know what to say. Upload the APK, I'll check.

Please read the Wiki on Apktool project page. You aren't using it correctly, and based on that project path you are using some tool that "manages" apktool. So go ask that developer unless you can reproduce directly using raw apktool via cli.
[Android Software Development] raziel23x:
Yea I told him to remove the white spaces in his path and the files name
[Android Software Development] Jishnu Sur™:
Facing same problem as post 1805 from yesterday.. any idea why it is happening?
[Android Software Development] alteredlikeness:
I originally posted this in the aokp build thread, but here seems more appropriate. And I do see some talk about aokp and new source code, but did not fully read through - I apologize if this has been addressed already.

I can not re-compile my newly built-from-aokp-source framework-res.apk with apktool - and it gives me some strange warnings when installing the framework:

C:\Zed\Ed\progs\Apk_Manager_5.0.2\other>apktool if aokpframework-res.apk
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-nodpi-v8-ERR0
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-v8-ERR1
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-hdpi-v8-ERR2
I: Framework installed to: C:\Users\losers\apktool\framework\1.apk

C:\Zed\Ed\progs\Apk_Manager_5.0.2\other>apktool if aokpoldframework-res.apk
I: Framework installed to: C:\Users\losers\apktool\framework\1.apk

The aokpframework-res.apk is from my June 4 build, and the aokpoldframework-res.apk is from my May 31 build. They both do decompile.. But if I do get it to recompile (usually by just removing the public.xml), it puts me in a bootloop. And, yes, I am using the newest version of apktool (1.5.2), and the most recent appt.exe from the sdk (v17.0.0 build-tools).

The other thing is when I open the apk with an archive manager I can see many other folders that are not coming out on the decompiled end (i.e. drawable-inverted, etc.) - well, actually on the aokpoldframework-res.apk, the "drawable-inverted" folder is decompiled as "drawable-appliance"..?

Is this an issue with the source code, or bad apk? Or apktool, or appt? Or something else? Thanks.
[Android Software Development] zelendel:
You should have read through it as it was explained that the apktool and aapt will need an update to work with the new dark toggle option in AOKP.
[Android Software Development] alteredlikeness:
Thanks.. Sorry - just breezed through the thread while at work today. But that's what I was looking for. Thanks for reiterating.
[Android Software Development] kufikugel:
hope you do not mind to post it here:

for AOKP/rootbox/carbon/liquid/slimbean and whatever using the darkUI

windows version

https://dl.dropboxusercontent.com/u/106208842/apktool/apktool-install-windows-1.5.3-SlimBean.zip

linux version

https://dl.dropboxusercontent.com/u/106208842/apktool/apktool-install-linux-1.5.3-SlimBean.zip

you will find always latest changes for the darkUI and apktool as well here

https://github.com/SlimRoms/apktool/commit/0cc82f05851ce3ac2f51d243c067730c20b9553a
[Android Software Development] alteredlikeness:
Thanks.

But, hmm... I tried it on Linux and got this:

alt@toshibox:~/and/apk_manager/other$ apktool if aokpframework-res.apk
I: Framework installed to: /home/alt/apktool/framework/1.apk
alt@toshibox:~/and/apk_manager/other$ apktool d aokpframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
alt@toshibox:~/and/apk_manager/other$ apktool b aokpframework-res new.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: /home/alt/and/apk_manager/other/aokpframework-res/res/drawable-inverted
invalid resource directory name: /home/alt/and/apk_manager/other/aokpframework-res/res/drawable-inverted-nodpi
invalid resource directory name: /home/alt/and/apk_manager/other/aokpframework-res/res/drawable-inverted-hdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL5125399489498393942.tmp, -x, -0, arsc, -S, /home/alt/and/apk_manager/other/aokpframework-res/res, -M, /home/alt/and/apk_manager/other/aokpframework-res/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:353)
at brut.androlib.Androlib.buildResources(Androlib.java:281)
at brut.androlib.Androlib.build(Androlib.java:209)
at brut.androlib.Androlib.build(Androlib.java:177)
at brut.apktool.Main.cmdBuild(Main.java:237)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL5125399489498393942.tmp, -x, -0, arsc, -S, /home/alt/and/apk_manager/other/aokpframework-res/res, -M, /home/alt/and/apk_manager/other/aokpframework-res/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:406)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:334)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, /tmp/APKTOOL5125399489498393942.tmp, -x, -0, arsc, -S, /home/alt/and/apk_manager/other/aokpframework-res/res, -M, /home/alt/and/apk_manager/other/aokpframework-res/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:404)
... 6 more

Am I missing something here.. or does it still need work? I can't try on Windows until I get back to work tomorrow.. Actually, I might just make the changes in my repo and rebuild the rom before then..
[Android Software Development] Bejda:
Slim apktool worked for me yesterday on windows for Aokp framework.
[Android Software Development] alteredlikeness:
Yup.. worked perfectly for me on Windows too. And, I was able to remove that green charging batt LED that comes on at 70%.. Now to find that red LED that stays on after boot.

So, I have no idea if I messed it up in Linux or what..
[Android Software Development] kufikugel:
on linux you need to change aapt permissions to set it as executable ;) Thats always the case undependent of apktool/aapt version :p
[Android Software Development] alteredlikeness:
Yea, I know.. I swear I did change it to executable.. But maybe I missed it. I will check later.. I have not been "the sharpest tool in the shed" lately. Thanks again.