yashsingh1/xdaforums huggingface dataset:
[Android Software Development] sandy7:
idk why u guys are facing this problem...

as per [MENTION=4097077]xxhorseriderxxx[/MENTION] provided the files to me...i could easily decompile it..

[B][COLOR="Red"]E:\APKTool>apktool if E:\APKTool\twframework-res.apk
I: Framework installed to: C:\Users\monstar\apktool\framework\2.apk

E:\APKTool>apktool if E:\APKTool\framework-res.apk
I: Framework installed to: C:\Users\monstar\apktool\framework\1.apk

E:\APKTool>apktool if E:\APKTool\SystemUI.apk
I: Framework installed to: C:\Users\monstar\apktool\framework\127.apk[/COLOR][/B]

E:\APKTool>apktool d E:\APKTool\SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\monstar\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...

E:\APKTool>
[Android Software Development] Jamison904:
The issue is recompiling them. Decompiling is just fine. You can decompile them then not even touch it then try to recompile it and it will error out. This is the issue.
[Android Software Development] sandy7:
May be it needs some dummy apk's installed
[Android Software Development] zelendel:
Did you install the system ui as a framework as well?

Wayne Tech Nexus
[Android Software Development] iBotPeaches:
Any directory errors means that your aapt is out of date. Thankfully this won't be a problem in 2.0 as we include the aapt binaries inside Apktool. If your using v1.5.2 you can pass a parameter --aapt /location/to/aapt and that'll fix it (if you can't find the aapt in your $PATH to update)
[Android Software Development] ghoster76:
It's good to see that news, I was waiting for a long time ago
[Android Software Development] xxhorseriderxxx:
Yeah, the problem isn't in decompiling, it's recompliling. Any ideas on how to recompile the SystemUI.apk and framework-res.apk?
[Android Software Development] jenizaro:
I decompile a TSF Shell theme and after that I DONT change anything, try to recompile it back in a minute. It gives me same error for all apks (games, apps, themes doesnt matter). I get this error. I have Android SDK, Java, JDK installed. (OS: W7 64bit). Any ideas?

I: Smaling...
[14,0] No enum constant org.jf.dexlib.Annota
sibility.RUNTYME
Exception in thread "main" brut.androlib.And
xception: Could not smali file: C:\TickleMyA
\_working\com.jenizaro.theme.marinethemehd.a
li\android\annotation\SuppressLint.smali
at brut.androlib.src.DexFileBuilder.
liFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.
liFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.bu
e(SmaliBuilder.java:66)
at brut.androlib.src.SmaliBuilder.bu
aliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.bu
aliBuilder.java:37)
at brut.androlib.Androlib.buildSourc
i(Androlib.java:257)
at brut.androlib.Androlib.buildSourc
rolib.java:214)
at brut.androlib.Androlib.build(Andr
ava:205)
at brut.androlib.Androlib.build(Andr
ava:176)
at brut.apktool.Main.cmdBuild(Main.j
8)
at brut.apktool.Main.main(Main.java:
Devam etmek için bir tusa basin . . .
[Android Software Development] texture:
Hi,

Do you planned to release before a "pre-relase" version of 2.0 or not?

Thanks.
[Android Software Development] iBotPeaches:
Yes there will be a pre-release for users to help catch any major bugs we missed before we go public. That'll probably be here in a few weeks.
[Android Software Development] hocgwai:
I am having problems correctly compiling framework-res.apk from an i9505 galaxy s4 mde rom

what i am trying to do is add the android navigation bar at the bottom of the screen. this used to be done with editing the framework-res/res/values/bools.xml file, recompiling framework-res and then reinjecting resource.arsc. however, my attempts have ended in systemui crashes.

here's my workflow:

I am using the latest apktool (1.52) and aapt (feb 13,2013) to decompile and build

i have also included systemui.apk and twframework-res.apk using apktool if command

initially i had [MENTION=651413]layo[/MENTION]ut errors which i bypassed using connor.tumbleson's fix suggestion (appending '+' to [MENTION=651413]layo[/MENTION]ut errorrs) and then framework-res would build

then I reinjected the new resource.arsc file into my original frameworks-res.apk and copied that into my /system/frameworks folder.

after rebooting i get systemui crashes (and the navigation bar still does not show up)

This mod has worked for every version of ICS/JB previous to this version.

anyone else having the same issue? any suggestions?

thanks in advance
[Android Software Development] iBotPeaches:
That might be the cause of my bypass + fix, if you can send me the public.xml of original apk and then rebuild apk. Do this

aapt d resources original.apk > original_apk_public_xml
aapt d resources rebuilt.apk > rebuilt_apk_public_xml

I think the + stands for creating that layout (it errors out because you are using a private style, thus you need to either 1) move it to styles.xml locally or 2) work around it using the plus sign. I can confirm my ideas with the public.xml file(s). Off-topic, I should purchase an S4 so I can tackle this new wave of devices.
[Android Software Development] hocgwai:
Here are the two publc xml files zip'd

Thanks for any help you can offer.

https://dl.dropboxusercontent.com/u/24975342/public_xml.zip
[Android Software Development] iBotPeaches:
Yeah the problem is what I thought. I'll have to research this more, I believe the next idea is to move any private styles to the local styles.xml to prevent the rebuild errors.
[Android Software Development] plegdroid:
their warnings not errors. both of the apk built. some of the strings have no translations into the languages noted ,so will only show as English. :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] iBotPeaches:
Well :p

Those are strings that exist in things other than values. So that shows any string that is in values-xx that is NOT in values. This results in warnings. Cyanogenmod changed their aapt to throw ERRORS instead though :/ That keeps the REPO clean and prevents massive warnings from outdated languages.

Usually if the string only says "found: xx" one language, then its probably that language just adding an extra string. However, if it says "found: xx,xx,xx,xx" with a ton of strings, then that APK recently removed a string without cleaning its language XML.

I don't think AAPT warns about strings in values that are not in values-xx. This is because some strings (usually say _values in them) and have the translate="false" attribute cannot be translated by another language without breaking the ROM. Since these strings are required by the APK in the exact form they are in. The problem is though is that these APKs are built with that attribute striped, so on decompile you never see them. Thats why the good rule of thumb is to never translate strings that either say _values in their name, or look like something you don't translate :p
[Android Software Development] plegdroid:
Your explanation, was more beautifully written than mine :p

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] panda00:
Well I got it working by adding a string that the warning reports is missing. Thank you.

Sent from my GT-I9105P
[Android Software Development] Jarmezrocks:
Hey guys,

I could really do with someones help/input? I have 180 Live wallpapers to make for several large clients and I am and I am basing the wallpaper off an existing wallpaper for which I do not have the code for. The previous developer left, so I have taken over. My boss is stoked I can even step off from where he started considering I had nothing.

Anyway I have attached a blank template of the (decompiled) apk which doesn't want to compile? I have to post up a blank template due to the information being used being sensitive in nature and copyrighted materials. So it is plain white PNGs for now.

The apk works when decompiled and recompiled again, thats no issue, I can even make all the changes with the images, so that part of the resources is fine also. However I want to extend the number of slides that are displayed in the animation. When I do this it doesn't want to compile?

This is the following error that i can get continuously when attempting to rebuild.:

--------------------------------------------------------------------------

|Tue 21/05/2013 -- 9:17:51.50|

--------------------------------------------------------------------------

java version "1.7.0_02"

Java(TM) SE Runtime Environment (build 1.7.0_02-b13)

Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

I: Checking whether sources has changed...

I: Smaling...

Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@2d059fd6

at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)

at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)

at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)

at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:243)

at brut.androlib.Androlib.buildSources(Androlib.java:200)

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

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

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

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

Zip decompiled apk attached here:

http://goo.gl/Ijpjn

As you can imagine there is a matter of urgency and I am quite willing to donate to anyone that can help me get this working. Thanks

Regards,

James
[Android Software Development] raziel23x:
Email me at raziel23x@gmail.com I may can help you but email me and we can speak privately to be able to better improve and perhaps fix this
[Android Software Development] ssojyeti2:
It always worked...if the log ends in "building apk file..." then it worked and you will find your apk in the /dist folder
[Android Software Development] panda00:
But I tried it with framework-res, got a bootloop before adding the strings, afterwards it worked perfectly :rolleyes:
[Android Software Development] panda00:
Happened again with SystemUI.apk, attempted to go through with it anyway, bootloop ... This time the number of missing strings was too large for me to fill in manually (perhaps that's just me, effect of laziness). Really need a more practical solution
[Android Software Development] panda00:
As per my understanding, apktool gives an error when a string is not found, could it be altered some how to not give that error, and just warn? Like I've tried to go on and flash the apk anyway, and attained a bootloop. But technically a few strings shouldn't be a problem if not found right? Like it should only show the translation found in other languages' strings.
[Android Software Development] iBotPeaches:
The adding the "missing" untranslated language strings is not the problem causing the bootloop. The bootloop is probably complaining about something else. Your best bet is to just re-inject any modified elements back into the original apk. That retains original signatures w/ new files and saves all the problems which usually causes the bootloops.
[Android Software Development] panda00:
The problem is .... even if I leave the apk untouched, and recompile it, it gives that same error, and a bootloop as well. Odd thing is, it just happened suddenly, previously I compiled countless apk files, liquid smooth... No errors whatsoever, but then this problem occurs, and doesn't stop, I'm trying to figure out what I did between the two periods that caused this wreck... I don't recall anything.
[Android Software Development] plegdroid:
Afternoon matey ,just for clarity, what are you reinjecting back into system? The newly compiled apk or the original with the modded bits placed into? :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] panda00:
The newly compiled apk.
[Android Software Development] plegdroid:
don't. take the modded files that you've recompiled, dex, arsc or res. open up the original undecompiled apk with 7zip ect and move the changed files from build folder and replace into the original undecompiled apk and flash that. the newly compiled apk won't have all the required files within it, as peaches has already above stated.

if that makes sense? :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] panda00:
I understand... Alright so I know that classes.dex in the apk contains the smali folder, that I can do with smali.jar... and the images I can simply put back into the apk using 7zip. Problem comes with XMLs... They get decoded with apktool, shouldn't they be re-encoded before placing them back into the apk?

---------- Post added at 04:41 PM ---------- Previous post was at 04:36 PM ----------

Oh wait, I think I misunderstood you. You mean I should take res folder, classes.dex, resources.aged from the newly compiled all and add it to the old apk.... But that won't do anything but sign the apk, which can be done by copying the meta inf folder...
[Android Software Development] plegdroid:
when you recompile, it creates a new apk,and also a folder called build with the newly compiled dex,arsc and res files (modded ). your moving to the original apk the modded and recompiled files from build folder to replace the unmodified ones. :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] panda00:
Alright thanks, will try it soon. Not like I have much choice anyway lol.
[Android Software Development] blackcat510:
I have problem compiling SemcPhone.apk

I'm using latest version with framework installed, I can decompile and recompile other apks successfully like SystemUI.apk, UxpNxtLockScreen.apk
[Android Software Development] panda00:
Didn't work.

Hope=lost.
[Android Software Development] panda00:
Any more suggestions? :silly:
[Android Software Development] iBotPeaches:
[MENTION=4808743]blackcat510[/MENTION]

Update your aapt. If you get the positional error after updating your aapt, then that'll be fixed for 2.0

[MENTION=4948569]sieuan[/MENTION]

The last bit of that error says "file not found". Its either complaining about aapt or you didn't give it the right command. So not a bug.

[MENTION=5151330]panda00[/MENTION]

I use that exact method users have described to you for almost 2 years now without a problem. That method works, just make sure your using a proper archiver and make sure to not inject AndroidManifest.xml as that invalidates the signature. I have found a few "roms" patch this little workaround though, so if this is the case. You'll just have to resign and re-flash.
[Android Software Development] panda00:
Alright [MENTION=3924617]iBotPeaches[/MENTION]

I'm pretty much hopeless so I'll give you the list of steps from A to Z of what I'm doing, and I'll do it again now after your verification, alright?

1- Get Deodexed framework-res.apk, twframework-res.apk, SystemUI.apk and place them in the apktool folder.

2- apktool if <x>.apk for 3 apk's above.

3- apktool d framework-res.apk

4- apktool b framework-res.apk

5- Open original framework-res.apk with 7zip

6- Copy res folder, resources.arsc from build folder in the decompiled framework-res folder and place it in the original framework-res.apk opened with 7z.

7-Take the apk and flash it.

8-Attain bootloop (hopefully not this time)
[Android Software Development] varun.chitre15:
Set zero compression for the resources.arsc file. that should fix the issue
[Android Software Development] bgcngm:
On that step, make sure that you use no compression for resources.arsc, that is add the file to the original framework-res.apk using store compression.

EDIT: Same reply above. ;)
[Android Software Development] sieuan:
So, here is my file: http://www.mediafire.com/download/9pim59iz4vdpnx2/framework-res_mediatek-res_P700.zip

can you help me test decompile/recompile it, sir?

I also tried with ApkManager, ApkMultitool, ApkManagerICS, ApkManagerWanam, EasyApkDisassembler,... but also failed.

In the folder system/framework on my phone, there are 2 file: framework-res.apk, mediatek-res.apk.

My command step is:

apktool if framework-res.apk

apktool if mediatek-res.apk

apktool d framework-res.apk

and it decompile without any error, then i type:

apktool b framework-res

but i can't re-compile it, even when I keep it original without editing anything. Can you help me test decompile/recompile it, sir?
[Android Software Development] panda00:
It works. Wow thanks [MENTION=4309448]varun.chitre15[/MENTION] and [MENTION=455439]bgcngm[/MENTION]
[Android Software Development] Vivek_Neel:
Guys I always get "no default translation error" while recompiling systemui.apk

Though I have not touched strings. XML
[Android Software Development] Spannaa:
SGS2 + JB 4.1.2 NeatROM?

If you installed framework-res.apk & twframework-res.apk when you decompiled SystemUI.apk and didn't delete the frameworks afterwards, it should recompile OK with the "no default translation error"s appearing as just warnings rather than errors.
[Android Software Development] Vivek_Neel:
Thanks mate .

And yes. Neat ROM lit 4.7

The way I did

1.installed frameworkres.apk

2.installed twframeworkres.apk

3.installed systemui.apk

4.decompiled systemui.apk

5.edited few .XML (tw-super- status bar.XML and drawable/values/status bar background)

6.recompiled

7.then for signing an apk I just moved androidmanifest.XML and metainf from original to the modded one.

8.I set permission in system

9.moved to system/app

10.no (disappeared)status bar..everything was black.

Am I doing anything wrong?

P s I use apktool

64bit os with java installed
[Android Software Development] Spannaa:
If I'm editing a couple of xmls, I just drop the edited files from the recompiled apk into the original apk with 7-Zip

It should be OK if you copy the META-INF folder and AndroidManifest.xml to the recompiled apk though.

I've only ever had problems with SystemUI.apk when I've had to re-sign the apk because I've edited it's AndroidManifest.xml
[Android Software Development] Vivek_Neel:
Thanks mate. .:)
[Android Software Development] blackcat510:
Update my aapt?

I'm using your latest one at the OP :(
[Android Software Development] bgcngm:
Are you sure of that? Maybe sure your path environment is correctly set.
[Android Software Development] Vivek_Neel:
Mate..how do you set path environment?.

Can I have a small guide?.

I searched it but I did not get the point.. y are we changing the path?

Thanks
[Android Software Development] raziel23x:
Frameworks-res.apk

http://db.tt/fcVpUOOM

Systemui.apk

http://db.tt/3cfFFInt

Mm.apk

http://db.tt/fsJsSiBS

win 7 ultimate

Latest Android SDK as of this post

I am downloading the mini aapt as we speak.
[Android Software Development] expeacer:
I got fully different MD5 :confused:

After second download, I got as same as MD5 with previously downloaded aapt, and fully different than your MD5.

Can you upload it again, or send me in e-mail, or post here?

Thanks!
[Android Software Development] raziel23x:
http://miui.connortumbleson.com/other/apktool/aapt/

Pick the directory of your os
[Android Software Development] expeacer:
If you read back, you will know what's my problem. AAPT working for you in Linux?
[Android Software Development] raziel23x:
My Linux box died two years ago
[Android Software Development] iBotPeaches:
I do apologize. The aapt on my server did have a MD5 mismatch. I re-uploaded and it matches now. Working on this Jellybean System UI problem now.

I see I got an XDA news story :)

Thanks to whoever made this happen.
[Android Software Development] fallen00sniper:
Can I get a manual or some instruction on how to use this, sounds great to help me get started making custom themes and what not.
[Android Software Development] csking33:
Google is your friend :D

http://xdaforums.com/showthread.php?t=1466100
[Android Software Development] fallen00sniper:
Google hasn't been a good friend lately, the old ways have become a new way to bloat advertisements, by old I mean google geeking lol
[Android Software Development] Ticklefish:
Not working on ASUS Transformer, running 4.04. The framework-res.apk de- and recompiles okay, but SystemUI.apk produces an error:

W: Could not find sources
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibE
xception: brut.common.BrutException: could not exe
c command: [aapt, p, -F, C:\DOCUME~1\lawch\LOCALS~
1\Temp\APKTOOL953161380355367525.tmp, -I, C:\Docum
ents and Settings\lawch\apktool\framework\1.apk, -
S, e:\TickleMyAndroid\_working\SystemUI.apk\res, -
M, e:\TickleMyAndroid\_working\SystemUI.apk\Androi
dManifest.xml]
at brut.androlib.res.AndrolibResources.aap
tPackage(AndrolibResources.java:251)
at brut.androlib.Androlib.buildResourcesFu
ll(Androlib.java:325)
at brut.androlib.Androlib.buildResources(A
ndrolib.java:270)
at brut.androlib.Androlib.build(Androlib.j
ava:193)
at brut.androlib.Androlib.build(Androlib.j
ava:175)
at brut.apktool.Main.cmdBuild(Main.java:18
2)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not ex
ec command: [aapt, p, -F, C:\DOCUME~1\lawch\LOCALS
~1\Temp\APKTOOL953161380355367525.tmp, -I, C:\Docu
ments and Settings\lawch\apktool\framework\1.apk,
-S, e:\TickleMyAndroid\_working\SystemUI.apk\res,
-M, e:\TickleMyAndroid\_working\SystemUI.apk\Andro
idManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aap
tPackage(AndrolibResources.java:249)
... 6 more
Press any key to continue . . .

This is using the latest official aapt as well as the modded one mentioned a few posts ago. Aapt actually crashes.

Both apps are attached here: http://xdaforums.com/attachment.php?attachmentid=1231649&d=1343674094

Thanks for all your hard work on this! This thread did get a mention on the news page, although they seem a little behind the times....http://www.xda-developers.com/android/apktool-to-receive-updates-once-again/ :rolleyes:
[Android Software Development] iBotPeaches:
Okay, the bugs to be fixed that are planned for v1.4.10 are

- Fixing double & encoding

- Fixing SystemUI Jellybean ( I think it matches the dual package setup much like some HTC Apps)

- Fixing whitespace in manifest.xml (Revert manifest commit)

I'm adding lots of unit tests to help figure out the & encoding, and reverting the commit for whitespace in manifest is easy. Just working on Jellybean SystemUI now.

Someone sent me an APK called "SamsungChineseIME". I decompiled and re-built it without error. So, I don't know what your reporting.
[Android Software Development] mattmanwrx:
iBotPeaches, SystemUI is fine for me with 4.1.1... I think there were framework changes so the user needs to install jb framework again... Want me to upload the two files?

Edit: except the manifest which white space...
[Android Software Development] iBotPeaches:
Sure. I'll look into those. I did get a report that a user did not have any errors at all using old AAPT, which reinforces my opinion that some companies are using non up to date software or their own modified versions of the Android build system.

apktool just wraps around AAPT and uses it to build the APKs, so most of the errors are actually in AAPT. Which just sucks. We just need to make our own AAPT again using the build engine of rev 12, but the features of r18.
[Android Software Development] mattmanwrx:
Well here are 2 version, CM10 by Winner00, which I have just decompiled and compiled today, using 1.4.9, and the second is a stock modified rom by paulobrien, again, can be modified!

My aapt is 827kb (windows, I know I know!!), which is the newest from sdk 20 (I think it is, I will check! EDIT: seems I have an update to r20.01 and r14 (for platform tools), will update and report back!)

Save you looking for a fix (that I persoanlly think) isn't there!!

Regarding the quote below/post at top of the page, Asus made a big error, no one in the TF101 can get SystemUI to compile again, using any version of apktool! Hence no battery mods for the "stock" rom!!
[Android Software Development] raziel23x:
Is there any way of researching or and work around
[Android Software Development] iBotPeaches:
I don't get that. The researching is going on now, and the work around is to help find every AAPT ever released. r12 seems to work the best.