yashsingh1/xdaforums huggingface dataset:
[Android Software Development] anukilimanoor:
Thanks... Will upload both framework and apk...

---------- Post added at 03:37 PM ---------- Previous post was at 03:05 PM ----------

framework-res.apk

SecPhone.apk
[Android Software Development] asrock37:
you are right, decompiling no problem

recompiling with no changes you got those errors:

I open those strings and here I got it:

string in values folder:

<string name="throttle_time_frame_subtext">"%1$d٪ of cycle elapsed

Next period starts in %2$d days (%3$s)"</string>

with errors:

values-es-rUS

<string name="throttle_time_frame_subtext">"%1$d% del ciclo transcurrido

El siguiente perodo comienza en %2$d das (%3$s)."</string>

values-it:

<string name="throttle_time_frame_subtext">"%1$d% del ciclo trascorso

Il periodo succ. inizia tra %2$d gg (%3$s)"</string>

values-es:

<string name="throttle_time_frame_subtext">"%1$d% del ciclo transcurrido.

Próx período en %2$d días (%3$s)"</string>

now the solution:

open the strings.xml in values folder look for throttle_time_frame_subtext copy the charater after $d which supposed the '%'

open those strings.xml in those folders with errors, look for the same throttle_time_frame_subtext and replace the second '%' the text in bold font, with the charater that you copied in strings.xml in values folder.

---------- Post added at 08:27 PM ---------- Previous post was at 08:15 PM ----------

@iBotPeaches, a suggestion, I think if space after '%', it is expected that it is a % sign not a variable.

Cheers

asrock
[Android Software Development] anukilimanoor:
Thanks for your support..

In this case we can edit the strings.xml. While compiling SystemUI.apk it is not giving any error but the apk will not work.. The same thing happened to me when I was using another apktool for JB 4.1.1, but after using this apktool 4.1.1 works fine....

After applying the solution I'm getting the following error
[Android Software Development] asrock37:
What version of apktool are you using... I used the 1.5.1 and i got to errors
[Android Software Development] dreamer94:
I was trying to enable CRT OFF effect on my device (Galaxy S)

I tried too many appt files,apktool.jar files... and at all of them,i had an error while re-compiling framework-res.apks...

THEN i found this thread;

And tried this aapt(Wİndows version) and also apktool.jar(v1.5.0) and it worked!!!

Believe me if you have any issues on re compiling in any devices's apks,try differrent aapt/apktool files where belongs in OP.

Thank you!
[Android Software Development] anukilimanoor:
Tried both 1.5 and 1.5.1 but same...
[Android Software Development] asrock37:
You did not install the framework-res.apk

re-install it and try again...
[Android Software Development] iBotPeaches:
I'm in process of moving everything back to the Google Code Apktool page. Links might break today or something. Just ignore it. Moving wiki and bug reports back to that Google code page.

Just pro guard and new smali then I'll release v1.5.1
[Android Software Development] iBotPeaches:
Where did you get this keyboard? Its package is com.google.android.inputmethod.latin, but all other keyboards is com.android.inputmethod.latin. Simply changing that in AndroidManifest fixes that. I checked AOSP and its the latter, so where did this APK come from?

Ignore, figured it out.
[Android Software Development] mateorod:
I would like to see this too (unless I am missing something that is already there xP). The -b flag from the smali binaries.

Is this on the radar?

Thanks for the work iBot and contributors.
[Android Software Development] ---blacksoul---:
Nothing, nothing, NOTHING always the same damn mistake, I do not know what to do, please someone help me this stupid error is doing already postponed by six months the release of my ROM, PLEASE HELP ME PLEASE
[Android Software Development] Jamison904:
Never mind I figured it out.
[Android Software Development] fisha21:
There are actually about 3 places that need correcting in each faulty xml. I did post the fixed xmls, in case it helps anyone....
[Android Software Development] SnakeHaveYou:
Hello, i'm having some problems..

I'm trying to decompile and build the SecMms.apk from the latest i9300 ROM, I9300XXDLJ5. I got the SecMms.apk and twframework-res.apk and framework-res.apk from WanamLite's ROM.

I can decompile and build without errors, but the built apk is something like 1MB smaller than the original, EVEN if i don't make any modifications..

I've tried 1.5.1, 1.5.0 and 1.4.10. The aapt.exe from this thread, the one from the latest SDK update and from the Google code's website..

The built apk doesn't show in the appdrawer..

Any suggestion?
[Android Software Development] asrock37:
You did not signed the apk that is why it is lesser than the original one.

Sent from my GT-I9100 using Asnet ROM
[Android Software Development] anukilimanoor:
Thanks for your support... :)
[Android Software Development] markdmac:
How do you compile it?

Any chance of getting you to share your compiled version that works or perhaps get instructions on how to do the compiling on my own? The readme included with the source does not say how to do it. I need to compile for use with Windows. Thanks
[Android Software Development] Spannaa:
The instructions are here.
[Android Software Development] rujelus22:
I have tried those instructions on 3 different PC's 2 windows and 1 linux. I can not get it to build.

If I do gradlew assemble then it will build.

I am able to compile the 4.2 framework-res with that jar but not the 4.2 keyboard.
[Android Software Development] iBotPeaches:
I don't mean to sound mean to everyone, but when I have it working with the new API I'll release a new version. Don't expect my random commits to work wonders with all your APKs. Please just wait until I release a stable version.

The commits to github are mainly for the people that sit in IRC with me and help test new versions. If you cannot provide logs or anything and complain theres not much I can do and frankly its annoying.

With that being said. No more bug reports in this thread. Use the google code page now.

@Keyboard apk doesn't work because its manifest package name is separate than what is defined in the resources, thus during build all hell breaks loose. See below bug and wait till fix.

http://code.google.com/p/android-apktool/issues/detail?id=252

No 4.2/4.1.2 until that bug is fixed ^ Probably after thanksgiving.
[Android Software Development] rujelus22:
OK, sweet thanks for the info. I am not trying to rush you or complain, just letting you know what happened.
[Android Software Development] Ticklefish:
I've spotted that Chainfire has recently released their own modified version of aapt: http://xdaforums.com/showthread.php?t=1907281

Is it worth using that one or sticking with the one in this thread's OP?
[Android Software Development] iBotPeaches:
You can use his. Your only required to use my aapt if you build any ROMs with MIUI / Oppo as they modify aapt for their builds. I take Chainfires amazing work & merge it into AOSP along with the MIUI / Oppo changes and release my aapt versions. Though as I said, if you don't build MIUI / Oppo ROMs you can use whatever Chainfire releases.

I already have new Windows / Linux aapts built. Waiting to get home to build an Mac OS X binary, then I'm updating the packages on the Google Code page as they haven't been updated since like r14 of the SDK.
[Android Software Development] CosmicDan:
In the folder there is already faapt.exe which is updated by iBotPeaches, just use that one, rename it to aapt.exe and replace your Android SDK ones and any other ones in the path.

EDIT: Nevermind :)
[Android Software Development] SnakeHaveYou:
Thank you! This is new for me, never signed any apk on my Captivate hehe..

Now it's 600KB smaller :P, but it works perfect!!
[Android Software Development] CosmicDan:
Signatures are tiny, 600KB isn't it :P

Don't worry about the size, iBotPeaches APKTool (and/or maybe smali) just does better compression than the original source builds do. But some vendor/proprietary/stock APK's do have their own signatures - particularly Sony - while they are not huge they are needed if you want to use them on a non-debug ROM without hacks (e.g. on the stock ROM it came from).
[Android Software Development] mistm:
... wrong post ... (couldnt find how to delete it)
[Android Software Development] arzbhatia:
I really need to decompile 4.2 framework-res and SystemUI apks for a custom ROM (I'm in charge of the user interface) and I'm not able to, same multiple resources error.

The worst part - I don't know how to build from source. Those who have, could you please decompile it for me and send the files in zips through mail or anything?
[Android Software Development] udK:
Thank you for this fix.

---

I just compiled apktool with the patch above, tested with a stock 4.2 and it does work fine now.

Download (linux and windows): http://goo.im/devs/udK/APKTool

Enjoy ;)
[Android Software Development] udK:
Sorry it's my fault, I uploaded the linux version two times just with different names -.- download it again, should be fine now.
[Android Software Development] pakjebakmeel:
... THANK ... YOU ...

Decompiled, modified and recompiled framework-res.apk and SystemUI.apk from Google's stockrom takju (JOP40C) to get 36px navbar height and it worked like a charm.

:good::good::good:
[Android Software Development] TUN_SD:
I try to decompile/compile the new gmail apk, android:versionCode="600" android:versionName="4.2"

but I get these errors. I tried to install (apktool if fr....) the framework from the 4.2 system dump, but without luck.

H:\JB\Gmail2TEST\res\xml\gmail_widget_info.xml:2: error: No resource identifier
found for attribute 'widgetCategory' in package 'android'
H:\JB\Gmail2TEST\res\xml-sw600dp\gmail_widget_info.xml:2: error: No resource ide
ntifier found for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-ver
sion, 17, -F, C:\Users\TUN_SD\AppData\Local\Temp\APKTOOL6607521437832531413.tmp,
-I, C:\Users\TUN_SD\apktool\framework\1.apk, -S, H:\JB\Gmail2TEST\res, -M, H:\J
B\Gmail2TEST\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:337)
at brut.androlib.Androlib.buildResources(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:207)
at brut.androlib.Androlib.build(Androlib.java:180)
at brut.apktool.Main.cmdBuild(Main.java:209)
at brut.apktool.Main.main(Main.java:72)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 14, --target-sdk-version, 17, -F, C:\Users\TUN_SD\AppData\Local\Temp\
APKTOOL6607521437832531413.tmp, -I, C:\Users\TUN_SD\apktool\framework\1.apk, -S,
H:\JB\Gmail2TEST\res, -M, H:\JB\Gmail2TEST\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)

any ideas, what I did wrong or how to fix that? thanks for your help, highly appreciated. ;)

edit: installed apktool 1.5.1 from op, no luck.

but it worked with the zip from some posts above. lol.

any way, thanks for the apktool. keep up the good work. :D
[Android Software Development] androidphone2012:
1. can decompile and recompile 4.2 SystemUI.apk :)

2. can decompile 4.2 framework-res.apk but cant recompile :confused:

.
.
.
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apk\other\..\projects\framework-res.apk\res/drawable-ldrtl-xhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt.exe, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\DOCUME~1\Kts\LOCALS~1\Temp\APKTOOL8336440028804295559.tmp, -x, -S, C:\apk\other\..\projects\framework-res.apk\res, -M, C:\apk\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:258)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:337)
at brut.androlib.Androlib.buildResources(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:207)
at brut.androlib.Androlib.build(Androlib.java:180)
at brut.apktool.Main.cmdBuild(Main.java:209)
at brut.apktool.Main.main(Main.java:72)
Caused by: brut.common.BrutException: could not exec command: [aapt.exe, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\DOCUME~1\Kts\LOCALS~1\Temp\APKTOOL8336440028804295559.tmp, -x, -S, C:\apk\other\..\projects\framework-res.apk\res, -M, C:\apk\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:256)
... 6 more
[Android Software Development] Phone_Guru:
I still have these errors using the zip from few posts ago.
[Android Software Development] ÜBER™:
Delete the public.xml in values and rebuild.

Sent from my Galaxy Nexus
[Android Software Development] udK:
Try with this aapt.exe -> http://tinyw.in/up7n

>java -jar apktool.jar d framework-res.apk

I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...

>java -jar apktool.jar b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

Try to download it again and replace aapt.exe with this version -> http://tinyw.in/up7n
[Android Software Development] ÜBER™:
Brian that looks like you've messed up a .9.PNG you'll have to use apk multi tool or something that keeps an entire log to see what is causing it spit out all the errors. I've seen this exact error before and it turned out to be a malformed .9.png

Sent from my Galaxy Nexus
[Android Software Development] raziel23x:
I have a linux version check my signature
[Android Software Development] gcrutchr:
If you are just replacing icons, you do not need to decompile an apk.

The only exception is if you modify or replace .9 pngs. Then you need

to decompile/recompile. But...you can put the .9 png file in another apk

that does compile/recompile, extract that .9 png and put it in your other

apk file.
[Android Software Development] raziel23x:
Our he can download the Linux version of APK Multi-Tool I guess everyone forgets the Linux version had it own forum topic since windows users our number Linux
[Android Software Development] atl4ntis:
anyone successfully recompiled the new google gallery/camera from 4.2?

I keep getting this error when recompiling:

error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance'. +6
[Android Software Development] Jelmertjuhh:
I have successfully recompiled it.

Take a look at this issue on the googlecode page of APKTool :

http://code.google.com/p/android-ap...tus Priority Milestone Owner Summary Modified
[Android Software Development] atl4ntis:
thank you sir, very appreciated
[Android Software Development] plegdroid:
thank you, that would explain everything :D

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] androidphone2012:
thanks! can recompile 4.2 framework-res.apk :)
[Android Software Development] *mondman*:
I have apk manager 5.02 and i have download apktool 1.5.1 but i can not decompile an apk jb.. why?? thanks:)
[Android Software Development] zelendel:
Considering all the great info you provided I am sure someone will be able to help:rolleyes:

Sent from Arkham
[Android Software Development] djdarkknight96:
There are links a few pages back to the files that can decompile and compile 4.2 apk's.
[Android Software Development] Phone_Guru:
Didn;t work. I deleted the two xmls and recompiled fine but it makes the file crash.
[Android Software Development] klinker:
I have an isue too. I can decompile & recompail framework without errors, but if i change any code in any xml the lock of the lockscreen isn't centered anymore but moved to the right.
[Android Software Development] ÜBER™:
Lol Ive seen that. Its very irritating.

Sent from my Galaxy Nexus
[Android Software Development] mixtapes08:
Dont have those problems. Try this one

Copy all the xmls and image edit you did in your compiled framework to your original framework use 7zip.

Copy the resources.arsc too.

-GNex
[Android Software Development] iBotPeaches:
Nope thats not the cause. Ignore the commas, its just the parameters in the command.

http://code.google.com/p/android-ap...tus Priority Milestone Owner Summary Modified

Thats the bug that this is.
[Android Software Development] tsubus:
Thanks for the clarification. Any known workarounds? I see that the bug has been reported almost a year ago
[Android Software Development] iBotPeaches:
Yes, the error message says " did you mean formatted="false"". Maybe add that to any line that it screams on? That is the known way to fix it.
[Android Software Development] klinker:
Tnx...it worked :highfive:
[Android Software Development] ---blacksoul---:
No one knows how to fix my problem? :crying:

C:\Users\Utente\Desktop\Programmazione\Capas-project ROM\Programmi\ApkMultiTools
-APK-Multi-Tool-012bda1\place-apk-here-for-modding>apktool b Settings.apk almost
done.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:162)
at brut.androlib.Androlib.build(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:158)
... 4 more
[Android Software Development] flshg:
remove any spaces from the original apk filename, then decompile, and try recompile
[Android Software Development] Ticklefish:
You're missing apktool.yml from your decompiled app. That means it didn't decompile fully.
[Android Software Development] mimin0:
Hey folks, quick question. I have to add a dictionary to 4.2 keyboard that runs in 4.1.2 framework. I decoded/built the LatinIME.apk successfully with 4.1.2 framework-res.apk but it wouldn't work, soft keyboard is not available as an input method. Do I need to install framework-res from 4.2?

Was anyone able to successfully build 4.2 keyboard?

BTW, I had to change the package name in the manifest file from "com.google.android.inputmethod.latin" to "com.android.inputmethod.latin" in order to compile. I assume it's because of 4.1.2 framework?

Thanks.
[Android Software Development] iBotPeaches:
No Android 4.2 until Apktool v1.5.1

Which won't be, till this bug is fixed: http://code.google.com/p/android-ap...tus Priority Milestone Owner Summary Modified

And I haven't had a good block of free time yet.
[Android Software Development] victor711:
i got this eror what can i do ? please help me

C:\Users\Novin Pendar\Desktop\a>apktool b SystemUI almostdone.apk

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

otExist: apktool.yml

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

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

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

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

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

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

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

103)

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

... 4 more
[Android Software Development] Jelmertjuhh:
Maybe you edited or deleted the apktool.yml file?
[Android Software Development] victor711:
where is the file? how can i find this file ?
[Android Software Development] bgcngm:
That file is generated during decompile and can be found on the main folder. Haven't you deleted it?
[Android Software Development] victor711:
no .. i decompile 100% but cant recompiling :( .. could you please help me ...
[Android Software Development] ---blacksoul---:
there are no spaces in the name

apktool.yml is present in the decompiled apk
[Android Software Development] derrzredeem:
hi...

i'm having an issue with Gallery2Google.apk from JB 4.2, it decompiles just fine but won't recompile.

i got this error:

...\Workspace\working-apktool\Gallery2Google\res\values\styles.xml:168:
error: Error retrieving parent for item: No resource found that matches the giv
en name 'TextAppearance'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt.exe, p, --min-sdk-version, 10, --target-sdk
-version, 16, -F, C:\Users\drz\AppData\Local\Temp\APKTOOL1024265207309831729.tmp
, -I, C:\Users\drz\apktool\framework\1.apk, -S, C:\Users\drz\Workspace\working-a
pktool\Gallery2Google\res, -M, C:\Users\drz\Workspace\working-apktool\Gallery2Go
ogle\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:258)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:337)
at brut.androlib.Androlib.buildResources(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:207)
at brut.androlib.Androlib.build(Androlib.java:180)
at brut.apktool.Main.cmdBuild(Main.java:209)
at brut.apktool.Main.main(Main.java:72)
Caused by: brut.common.BrutException: could not exec command: [aapt.exe, p, --mi
n-sdk-version, 10, --target-sdk-version, 16, -F, C:\Users\drz\AppData\Local\Temp
\APKTOOL1024265207309831729.tmp, -I, C:\Users\drz\apktool\framework\1.apk, -S, C
:\Users\drz\Workspace\working-apktool\Gallery2Google\res, -M, C:\Users\drz\Works
pace\working-apktool\Gallery2Google\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:256)
... 6 more

tried to decompile-recompile without any changes, same output.

i'm not sure why it doing this?

edit: it seems aapt is where the error comes from, am i right?

but i've used the same aapt with framework-res, systemUI, and settings it decompile-recompile without any problem :eek:
[Android Software Development] iBotPeaches:
http://xdaforums.com/showthread.php?p=34651931
[Android Software Development] Gunthermic:
Seems people really can't read. 4.2 apk's is not supported, has issues, won't compile correctly... wait all that has been said over, and over for last few weeks.

There is not real help as ApkTool doesnt support 4.2 Apk's..... wait did i just say that?
[Android Software Development] derrzredeem:
ah, guess i miss that post. thanks!

subscribed.
[Android Software Development] lavadepa:
Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Bala>C:\apk\apktool d C:/apk/lidroid-res.apk

I: Loading resource table...

I: Loaded.

I: Loading resource table from file: C:\Documents and Settings\Bala\apktool\fram

ework\1.apk

I: Loaded.

I: Decoding file-resources...

I: Decoding values*/* XMLs...

I: Done.

I: Copying assets and libs...

C:\Documents and Settings\Bala>C:\apk\apktool b C:/apk/lidroid-res.apk C:\lidroi

d-res.apk.out

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

otExist: apktool.yml

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

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

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

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

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

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

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

103)

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

... 4 more

C:\Documents and Settings\Bala>

How to solve it need help.....
[Android Software Development] 350d:
In fact anybody can compile framework-res.apk of JB 4.2? I can decompile it but can't go back.
[Android Software Development] CosmicDan:
You have wrong path in recompile command.

Dude, what was just said two posts above? 4.2 IS NOT SUPPORTED YET. It's a PRE-RELEASE 1.5.1 i.e. not finished.
[Android Software Development] lavadepa:
Thanks for helping me all of u .finally I got worked:thumbup:

Hit thanks button:)If I helped;)