Related
I'm trying to edit some of the files in framework-res and other system files. I am able to successfully decomp and recomp anything from the system/app folder, however, when I get to framework-res.apk, it gives me a lot of errors (pasted below). At first, I thought it was something that I was doing wrong in editing an xml file, but then I tried simply decompiling and then immediately recompiling the file, and got the same errors.
I have the very latest version of apktool and aapt with framework-res.apk installed into the program and the latest SDK. The only thing I think might be an issue is that I'm using files from 4.02. Not sure if this even makes a difference.
Any advice?
Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\owner\Desktop\Nexus\apktool>apktool b framework-res framework-edit.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values\plurals.xml:
79: error: Multiple substitutions specified in non-positional format; did you me
an to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values\plurals.xml:
79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-bg\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-bg\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ca\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ca\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-cs\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-cs\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-da\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-da\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-de\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-de\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-el\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-el\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-en-rGB\plura
ls.xml:79: error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-en-rGB\plura
ls.xml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-es\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-es\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-es-rUS\plura
ls.xml:79: error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-es-rUS\plura
ls.xml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-fi\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-fi\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-fr\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-fr\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-hr\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-hr\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-hu\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-hu\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-in\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-in\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-it\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-it\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ja\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ja\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ko\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ko\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-lt\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-lt\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-lv\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-lv\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-nb\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-nb\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-nl\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-nl\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-pl\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-pl\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-pt\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; diExcep
tion in thread "main" brut.androlib.AndrolibException: brut.common.BrutException
: could not exec command: [aapt, p, -F, C:\DOCUME~1\owner\LOCALS~1\Temp\APKTOOL1
245866895833091365.tmp, -x, -S, C:\Documents and Settings\owner\Desktop\Nexus\ap
ktool\fr\res, -M, C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\Andro
idManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\D
OCUME~1\owner\LOCALS~1\Temp\APKTOOL1245866895833091365.tmp, -x, -S, C:\Documents
and Settings\owner\Desktop\Nexus\apktool\fr\res, -M, C:\Documents and Settings\
owner\Desktop\Nexus\apktool\fr\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
d you mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-pt\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-pt-rPT\plura
ls.xml:79: error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-pt-rPT\plura
ls.xml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ro\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ro\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ru\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-ru\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sk\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sk\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sl\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sl\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sr\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sr\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sv\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-sv\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-tl\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-tl\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-tr\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-tr\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-uk\plurals.x
ml:79: error: Multiple substitutions specified in non-positional format; did you
mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-uk\plurals.x
ml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-zh-rCN\plura
ls.xml:79: error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-zh-rCN\plura
ls.xml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-zh-rTW\plura
ls.xml:79: error: Multiple substitutions specified in non-positional format; did
you mean to add the formatted="false" attribute?
C:\Documents and Settings\owner\Desktop\Nexus\apktool\fr\res\values-zh-rTW\plura
ls.xml:79: error: Found tag </item> where </plurals> is expected
C:\Documents and Settings\owner\Desktop\Nexus\apktool>
I'm having the same issues, it seems to be a problem with the aapt binary.
The Gingerbread aapt gave this error:
Code:
X:\android\crt>apktool b -f framework-res
W: Could not find sources
I: Building resources...
invalid resource directory name: X:\android\crt\framework-res\res/drawable-sw600
dp-hdpi
invalid resource directory name: X:\android\crt\framework-res\res/layout-sw600dp
invalid resource directory name: X:\android\crt\framework-res\res/layout-w600dp
invalid resource directory name: X:\android\crt\framework-res\res/values-h720dp
invalid resource directory name: X:\android\crt\framework-res\res/values-sw600dp
invalid resource directory name: X:\android\crt\framework-res\res/values-sw600dp
-land
invalid resource directory name: X:\android\crt\framework-res\res/values-sw600dp
-w1024dp
invalid resource directory name: X:\android\crt\framework-res\res/values-sw600dp
-w1280dp
invalid resource directory name: X:\android\crt\framework-res\res/values-w360dp
invalid resource directory name: X:\android\crt\framework-res\res/values-w480dp
invalid resource directory name: X:\android\crt\framework-res\res/values-w500dp
invalid resource directory name: X:\android\crt\framework-res\res/values-w600dp
invalid resource directory name: X:\android\crt\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Cj\AppData\Local\Temp\APKT
OOL6979654477300252838.tmp, -x, -S, X:\android\crt\framework-res\res, -M, X:\and
roid\crt\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Cj\AppData\Local\Temp\APKTOOL6979654477300252838.tmp, -x, -S, X:\android\cr
t\framework-res\res, -M, X:\android\crt\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
The ICS aapt, same framework to recompile(4.0.3), now gives this:
Code:
X:\android\crt>apktool b -f framework-res
W: Could not find sources
I: Building resources...
X:\android\crt\framework-res\res\values\plurals.xml:79: error: Multiple substitu
tions specified in non-positional format; did you mean to add the formatted="fal
se" attribute?
X:\android\crt\framework-res\res\values\plurals.xml:79: error: Found tag </item>
where </plurals> is expected
X:\android\crt\framework-res\res\values-af\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-af\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-am\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-am\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-ar\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ar\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-bg\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-bg\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-ca\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ca\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-cs\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-cs\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-da\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-da\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-de\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-de\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-el\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-el\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-en-rGB\plurals.xml:79: error: Multiple s
ubstitutions specified in non-positional format; did you mean to add the formatt
ed="false" attribute?
X:\android\crt\framework-res\res\values-en-rGB\plurals.xml:79: error: Found tag
</item> where </plurals> is expected
X:\android\crt\framework-res\res\values-es\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-es\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-es-rUS\plurals.xml:79: error: Multiple s
ubstitutions specified in non-positional format; did you mean to add the formatt
ed="false" attribute?
X:\android\crt\framework-res\res\values-es-rUS\plurals.xml:79: error: Found tag
</item> where </plurals> is expected
X:\android\crt\framework-res\res\values-fa\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-fa\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-fi\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-fi\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-fr\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-fr\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-hi\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-hi\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-hr\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-hr\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-hu\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-hu\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-in\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-in\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-it\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-it\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-iw\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-iw\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-ja\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ja\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-ko\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ko\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-lt\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-lt\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-lv\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-lv\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-ms\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ms\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-nb\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-nb\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-nl\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-nl\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-pl\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-pl\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-pt\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-pt\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-pt-rPT\plurals.xml:79: error: Multiple s
ubstitutions specified in non-positional format; did you mean to add the formatt
ed="false" attribute?
X:\android\crt\framework-res\res\values-pt-rPT\plurals.xml:79: error: Found tag
</item> where </plurals> is expected
X:\android\crt\framework-res\res\values-ro\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ro\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-ru\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-ru\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-sk\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-sk\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-sl\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-sl\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-sr\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-sr\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-sv\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-sv\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-sw\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-sw\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-th\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-th\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-tl\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-tl\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-tr\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-tr\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-uk\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-uk\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-vi\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-vi\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
X:\android\crt\framework-res\res\values-zh-rCN\plurals.xml:79: error: Multiple s
ubstitutions specified in non-positional format; did you mean to add the formatt
ed="false" attribute?
X:\android\crt\framework-res\res\values-zh-rCN\plurals.xml:79: error: Found tag
</item> where </plurals> is expected
X:\android\crt\framework-res\res\values-zh-rTW\plurals.xml:79: error: Multiple s
ubstitutions specified in non-positional format; did you mean to add the formatt
ed="false" attribute?
X:\android\crt\framework-res\res\values-zh-rTW\plurals.xml:79: error: Found tag
</item> where </plurals> is expected
X:\android\crt\framework-res\res\values-zu\plurals.xml:79: error: Multiple subst
itutions specified in non-positional format; did you mean to add the formatted="
false" attribute?
X:\android\crt\framework-res\res\values-zu\plurals.xml:79: error: Found tag </it
em> where </plurals> is expected
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Cj\AppData\Local\Temp\APKT
OOL5397850870725338747.tmp, -x, -S, X:\android\crt\framework-res\res, -M, X:\and
roid\crt\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Cj\AppData\Local\Temp\APKTOOL5397850870725338747.tmp, -x, -S, X:\android\cr
t\framework-res\res, -M, X:\android\crt\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
I think the guys at apktools are working on it according to these posts (sorry, cant post links yet):
code.google.com/p/android-apktool/issues/detail?id=267
code.google.com/p/android-apktool/issues/detail?id=277
EDIT: did more research and found the solution, in case anybody needs it, I've attached an apktool version that will work with ICS
Found here:
forum.xda-developers.com/showpost.php?p=22070364&postcount=6
If you are an amateur/aficionado modder or themer, this is for you:
Some people are still having problems de/compiling system apks on Samsung ICS builds, most of the errors arising are related to "bad magic values". I googled a little and managed to find a modded Apktool. I’ve tested it and it has worked fine so far with many apks (e.g. framework-res, TouchWiz30Launcher, etc).
I packed all necessary files below, including new aapt from Android SDK 4.0.3. As you may already know, you need latest JDK for this to work.
*** NOTICE *** There are some apks like SystemUI that need special treatment. If errors are found when decompiling an apk with ICS Apktool, you have to try decompiling it using the Original Apktool which I've just uploaded, then for recompiling it you need to use the ICS Apktool (if you run the Original Apktool to recompile, you will probably encounter errors). Remember, both packages contain different aapt executables so it is recommended making two separate folders for each zip content.
Credit goes to Brut.all who developed the original Apktool and gcrut…@gmail.com who modded it.
NOTE: This thread is not intended to be a guide for modding or theming. If you want to start messing with apks, there are many tutorials out there.
this is not work for me... got error when trying to decompile SystemUI.apk:
Code:
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 35 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
any solution?
i04055 said:
this is not work for me... got error when trying to decompile SystemUI.apk:
Code:
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 35 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
any solution?
Click to expand...
Click to collapse
Delete classes.dex from SystemUI.apk before decompiling. If you want to edit classes.dex use smali/baksmali 1.3.2.
i04055 said:
this is not work for me... got error when trying to decompile SystemUI.apk:
Code:
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 35 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
any solution?
Click to expand...
Click to collapse
Do the following:
Decompile SystemUI using "Original Apktool" (already uploaded to the OP). If you try to recompile the apk with the Original Apktool you might find errors so you have to recompile it but this time using the "ICS Apktool". I hope this work for you.
sileshnair said:
Delete classes.dex from SystemUI.apk before decompiling. If you want to edit classes.dex use smali/baksmali 1.3.2.
Click to expand...
Click to collapse
I am succeed decompile it without classes.dex, searching for baksmali now...
-- edit ---
I've tried, but get the same error as below....
xtremesv said:
Do the following:
Decompile SystemUI using "Original Apktool" (already uploaded to the OP). If you try to recompile the apk with the Original Apktool you might find errors so you have to recompile it but this time using the "ICS Apktool". I hope this work for you.
Click to expand...
Click to collapse
I am able to decompile it with original apk tool but when I tried to recompile it using ICS apktool i got this error :
Code:
E:\android\Lab\SystemUI\res\values\public.xml:318: error: Public symbol drawable/tw_stat_sys_6_level_signal_3 declared h
erbrut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\edp\LOCA
LS~1\Temp\APKTOOL4562847521524937175.tmp, -I, C:\Documents and Settings\edp\apktool\framework\1.apk, -S, E:\android\Lab\
SystemUI\res, -M, E:\android\Lab\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\edp\LOCALS~1\Temp\APKTOOL4562847
521524937175.tmp, -I, C:\Documents and Settings\edp\apktool\framework\1.apk, -S, E:\android\Lab\SystemUI\res, -M, E:\and
roid\Lab\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
e is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:319: error: Public symbol drawable/tw_stat_sys_6_level_signal_3_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:320: error: Public symbol drawable/tw_stat_sys_6_level_signal_4 declared h
ere is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:321: error: Public symbol drawable/tw_stat_sys_6_level_signal_4_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:322: error: Public symbol drawable/tw_stat_sys_6_level_signal_5 declared h
ere is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:323: error: Public symbol drawable/tw_stat_sys_6_level_signal_5_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:324: error: Public symbol drawable/tw_stat_sys_6_level_signal_6 declared h
ere is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:325: error: Public symbol drawable/tw_stat_sys_6_level_signal_6_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:99: error: Public symbol drawable/tw_stat_sys_battery_not_charge declared
here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:326: error: Public symbol drawable/tw_stat_sys_signal_null declared here i
s not defined.
E:\android\Lab\SystemUI\res\values\public.xml:327: error: Public symbol drawable/tw_status_bar_close_on declared here is
not defined.
E:\android\Lab\SystemUI\res\values\public.xml:101: error: Public symbol drawable/zzz_stat_vt_signal declared here is not
defined.
E:\android\Lab\SystemUI\res\values\public.xml:102: error: Public symbol drawable/zzz_stat_vt_signal_null declared here i
s not defined.
what's going wrong here?
i04055 said:
I've tried, but get the same error as below....
I am able to decompile it with original apk tool but when I tried to recompile it using ICS apktool i got this error :
Code:
E:\android\Lab\SystemUI\res\values\public.xml:318: error: Public symbol drawable/tw_stat_sys_6_level_signal_3 declared h
erbrut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\edp\LOCA
LS~1\Temp\APKTOOL4562847521524937175.tmp, -I, C:\Documents and Settings\edp\apktool\framework\1.apk, -S, E:\android\Lab\
SystemUI\res, -M, E:\android\Lab\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\edp\LOCALS~1\Temp\APKTOOL4562847
521524937175.tmp, -I, C:\Documents and Settings\edp\apktool\framework\1.apk, -S, E:\android\Lab\SystemUI\res, -M, E:\and
roid\Lab\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
e is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:319: error: Public symbol drawable/tw_stat_sys_6_level_signal_3_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:320: error: Public symbol drawable/tw_stat_sys_6_level_signal_4 declared h
ere is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:321: error: Public symbol drawable/tw_stat_sys_6_level_signal_4_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:322: error: Public symbol drawable/tw_stat_sys_6_level_signal_5 declared h
ere is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:323: error: Public symbol drawable/tw_stat_sys_6_level_signal_5_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:324: error: Public symbol drawable/tw_stat_sys_6_level_signal_6 declared h
ere is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:325: error: Public symbol drawable/tw_stat_sys_6_level_signal_6_fully decl
ared here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:99: error: Public symbol drawable/tw_stat_sys_battery_not_charge declared
here is not defined.
E:\android\Lab\SystemUI\res\values\public.xml:326: error: Public symbol drawable/tw_stat_sys_signal_null declared here i
s not defined.
E:\android\Lab\SystemUI\res\values\public.xml:327: error: Public symbol drawable/tw_status_bar_close_on declared here is
not defined.
E:\android\Lab\SystemUI\res\values\public.xml:101: error: Public symbol drawable/zzz_stat_vt_signal declared here is not
defined.
E:\android\Lab\SystemUI\res\values\public.xml:102: error: Public symbol drawable/zzz_stat_vt_signal_null declared here i
s not defined.
what's going wrong here?
Click to expand...
Click to collapse
Take into account that both packages contents must be in separate folders to retain their respective aapt file which is different for each one. The best way to do this is to decompile SystemUI with Original Apktool then take the generated SystemUI folder and copy it into the ICS Apktool folder and recompile after your modding is done.
Nice thread mate. This will e of great help for new themers
Cheers
xtremesv said:
Take into account that both packages contents must be in separate folders to retain their respective aapt file which is different for each one. The best way to do this is to decompile SystemUI with Original Apktool then take the generated SystemUI folder and copy it into the ICS Apktool folder and recompile after your modding is done.
Click to expand...
Click to collapse
too bad... stil got same error... I'm really confused....
good job, helpful tool.
thank you.
I've solved my problems with apktool v1.4.3 and ICS-JPQ using the original aapt file of the last SDK/plattform-tools and not the aapt file provided by apktool. Now I can decompile/recompile whatever ICS file (at least for now).
Tested with framework-res.apk, SystemUI.apk, Settings.apk, Phone.apk and android.policy.jar
my2cents
i04055 said:
too bad... stil got same error... I'm really confused....
Click to expand...
Click to collapse
The last error you posted seemed related to bad version of aapt.exe. That's why I recommended using both Apktools one for decompiling and the other for rebuilding, that way is how it has worked in my case.
I wish I could've helped you more.
intronauta said:
I've solved my problems with apktool v1.4.3 and ICS-JPQ using the original aapt file of the last SDK/plattform-tools and not the aapt file provided by apktool. Now I can decompile/recompile whatever ICS file (at least for now).
Tested with framework-res.apk, SystemUI.apk, Settings.apk, Phone.apk and android.policy.jar
my2cents
Click to expand...
Click to collapse
this method work for me in the past, while decompiling MIUI's framework, now, can't seem to make it work using stock rom's framework, tried using different version of apktool and apk manager, and the one in this thread, to no avail. im also having that aapt problem
It's really a pain in the ass to find a way to decompile/compile any ics apk file, so hope the tips suggested in this thread work...
Sent from my GT-I9100 using Tapatalk 2 Beta-2
Here is my ApkManager, it's based on ApkManager 4.9 and contain an updated aapt and hacked Apktool 1.4.3 (new magic values) with updated smali (thanks to Ficeto).
I hope this will help you, it should work for all current ICS apps.
wanam said:
Here is my ApkManager, it's based on ApkManager 4.9 and contain an updated aapt and hacked Apktool 1.4.3 (new magic values) with updated smali (thanks to Ficeto).
I hope this will help you, it should work for all current ICS apps.
Click to expand...
Click to collapse
TKS wanam
wanam said:
Here is my ApkManager, it's based on ApkManager 4.9 and contain an updated aapt and hacked Apktool 1.4.3 (new magic values) with updated smali (thanks to Ficeto).
I hope this will help you, it should work for all current ICS apps.
Click to expand...
Click to collapse
Thanks, Wanam. I do really want this tool, too!!!
wanam said:
Here is my ApkManager, it's based on ApkManager 4.9 and contain an updated aapt and hacked Apktool 1.4.3 (new magic values) with updated smali (thanks to Ficeto).
I hope this will help you, it should work for all current ICS apps.
Click to expand...
Click to collapse
I just tried de-compiling and re-compiling the systemui.apk, which is the only apk I've had issues with since making the transfer to ICS and it worked perfect using this. Thank you SOOO much!!
Tiffany84 said:
I just tried de-compiling and re-compiling the systemui.apk, which is the only apk I've had issues with since making the transfer to ICS and it worked perfect using this. Thank you SOOO much!!
Click to expand...
Click to collapse
Hi, Tiffany. I have trouble when I decompile and compile SystemUI.apk. Can you show me the step? Do I need to pull framework-res.apk and twframework-res.apk first and run "apktool if" command?
Sent from my GT-I9100 using XDA
cyfgeorge said:
Hi, Tiffany. I have trouble when I decompile and compile SystemUI.apk. Can you show me the step? Do I need to pull framework-res.apk and twframework-res.apk first and run "apktool if" command?
Sent from my GT-I9100 using XDA
Click to expand...
Click to collapse
Yes, only framework-res.apk.
wanam said:
Here is my ApkManager, it's based on ApkManager 4.9 and contain an updated aapt and hacked Apktool 1.4.3 (new magic values) with updated smali (thanks to Ficeto).
I hope this will help you, it should work for all current ICS apps.
Click to expand...
Click to collapse
I'm struggling with this could someone help please? I'm getting the following error when compiling framework-res
--------------------------------------------------------------------------
|24/03/2012 -- 17:09:19.00|
--------------------------------------------------------------------------
'mode' is not recognized as an internal or external command,
operable program or batch file.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res\values\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res\values-en-rGB\plurals.xml:79: error: Found tag </item> where </plurals> is expected
C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res\values-en-rUS\plurals.xml:79: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res\values-en-rUS\plurals.xml:79: error: Found tag </item> where </plurals> is expected
aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'policylab_allow_htmlemail' has no default translation in C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res; found: en_US
aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no default translation in C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res; found: en_GB
aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation in C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res; found: en_GB
aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no default translation in C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res; found: en_GB
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Mike\AppData\Local\Temp\APKTOOL4577066397448428082.tmp, -x, -S, C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res, -M, C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Mike\AppData\Local\Temp\APKTOOL4577066397448428082.tmp, -x, -S, C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\res, -M, C:\Android\android-sdk\Apk_Manager_ICS\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
The system cannot find the file specified.
'7za' is not recognized as an internal or external command,
operable program or batch file.
'7za' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the file specified.
Click to expand...
Click to collapse
Here's the log from decompiling
--------------------------------------------------------------------------
|24/03/2012 -- 17:01:57.71|
--------------------------------------------------------------------------
'mode' is not recognized as an internal or external command,
operable program or batch file.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)
Could Not Find C:\Android\android-sdk\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\Android\android-sdk\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Click to expand...
Click to collapse
Hi guys,
To enable these mods you need:
apktool 1.5.2 or the latest APK Manager
smali/baksmali
Knowledge of decompiling/recompiling
knowledge of how to read logcats
framework-res.apk
services.jar
SecSettings.apk
SecSettingsProvider.apk
framework-res.apk
Navigate to: /res/values/bools.xml
On Screen Nav Buttons (GNexus Style):
Code:
[CENTER]<bool name="config_showNavigationBar">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_showNavigationBar">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
4 Way Rotation:
Code:
[CENTER]<bool name="config_allowAllRotations">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_allowAllRotations">[COLOR="red"]true[/COLOR]</bool>[/CENTER]
Lock Screen Rotation:
Code:
[CENTER]<bool name="config_enableLockScreenRotation">[COLOR="red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_enableLockScreenRotation">[COLOR="red"]true[/COLOR]</bool>[/CENTER]
and
Code:
[CENTER]<bool name="lockscreen_isPortrait">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
change to
Code:
[CENTER]<bool name="lockscreen_isPortrait">[COLOR="red"]false[/COLOR]</bool>[/CENTER]
Disable Keyboard Switch In StatusBar When Typing
Code:
[CENTER]<bool name="show_ongoing_ime_switcher">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="show_ongoing_ime_switcher">[COLOR="red"]false[/COLOR]</bool>[/CENTER]
Unplugging From USB doesn't Turn Screen On
Code:
[CENTER]<bool name="config_unplugTurnsOnScreen">[COLOR="red"]true[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_unplugTurnsOnScreen">[COLOR="red"]false[/COLOR]</bool>[/CENTER]
To remove 'Unlock lockscreen with menu key' For AOSP Lockscreen:
Code:
[CENTER]<bool name="config_disableMenuKeyInLockScreen">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_disableMenuKeyInLockScreen">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
To remove Help Overlay for Touchwiz Lockscreen:
Code:
[CENTER]<bool name="config_isHelpOverlayEnabled">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_isHelpOverlayEnabled">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
To permanently disable Multi Windows:
Code:
[CENTER]<bool name="config_multiWindowControlbar">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="config_multiWindowControlbar">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Brightness Values:
res/values/arrays
Change the following values (Taken from mattiadj's brightness fix thread - thanks)
Code:
<integer-array name="config_autoBrightnessLevels">
<item>0</item>
<item>1</item>
<item>20</item>
<item>150</item>
<item>400</item>
<item>800</item>
<item>1500</item>
<item>3000</item>
<item>6000</item>
<item>9000</item>
<item>15000</item>
</integer-array>
<integer-array name="config_autoBrightnessHysteresisLevels">
<item>0</item>
<item>2</item>
<item>50</item>
<item>110</item>
<item>320</item>
<item>900</item>
<item>2000</item>
<item>6000</item>
<item>8000</item>
<item>10000</item>
<item>12000</item>
</integer-array>
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>30</item>
<item>50</item>
<item>60</item>
<item>80</item>
<item>100</item>
<item>120</item>
<item>150</item>
<item>190</item>
<item>210</item>
<item>230</item>
<item>255</item>
</integer-array>
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>200</item>
<item>100</item>
<item>0</item>
<item>0</item>
</integer-array>
<integer-array name="config_autoBrightnessKeyboardBacklightValues ">
<item>255</item>
<item>200</item>
<item>100</item>
<item>0</item>
<item>0</item>
</integer-array>
SecSettingsProvider.apk
To enable installation of non market (3rd party) apps by default:
Navigate to: /res/values/bools.xml
Code:
[CENTER]<bool name="def_install_non_market_apps">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="def_install_non_market_apps">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
To disable the lockscreen completely:
Code:
[CENTER]<bool name="def_lockscreen_disabled">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="def_lockscreen_disabled">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
To enable Wifi from boot:
Code:
[CENTER]<bool name="def_wifi_on">[COLOR="Red"]false[/COLOR]</bool>[/CENTER]
Change to:
Code:
[CENTER]<bool name="def_wifi_on">[COLOR="Red"]true[/COLOR]</bool>[/CENTER]
SecSettings.apk
To enable Device Status Info "Normal" Instead Of "Modified":
Navigate to: smali/com/android/settings/deviceinfo/Status.smali
Search for:
Code:
.method private changeSysScopeStatus()V
Change entire method to:
Code:
.method private changeSysScopeStatus()V
.locals 2
const-string v0, "sysscope_status"
invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v0
const v1, [COLOR="deepskyblue"]0x7f090128 #sysscope_normal[/COLOR]
invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
return-void
.end method
Now navigate to /res/values/public
Search for "sysscope_normal" (Without quotes) - take the 0x7 number associated with it and paste it over the number in the above code with #sysscope_normal at the side of it (the one given isn't correct for your phone)
services.jar
To disable signature checks on system apps:
Navigate to: /smali/com/android/server/pm
Search for
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Change entire method to:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "DSA:"
const-string p1, "Skip signatures check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
I'll be adding more mods to this over the coming weeks
Please no more requests for ICS/Stock animations, thats not what this thread is for
Update 26/05/13
framework-res.apk:
Added mod for disabling help overlay on Touchwiz lockscreen
Added brightness fix values
Added mod to disable MultiWindow
SecSettingsProvider.apk:
- Enable Wifi from boot
- Install non market apps by default
- To disable the lockscreen completely
SecSettings.apk:
- To enable Device Status Info "Normal" Instead Of "Modified"
Services.jar:
- To disable signature checks on system apps
Update 24/01/13
Added mod for AOSP Lockscreen menu key disable
Reuploaded APK Manager folder for users (Includes apktool 1.5.1 and latest relevant aapt)
Thanks:
jovy23
Wanam
Mattiadj
Darkside Agent said:
Hi, i couldn't find this posted anywhere so i thought i would share it
To enable 4 way lockscreen rotation & 4 way screen rotation you need:
Working ics apktool (google it, theres plenty on xda)
framework-res.apk from any deodexed ICS ROM (preferably with ICS lockscreen)
Setup i am using:
Apex launcher
Apex screen rotation set to auto rotate
ICS Lockscreen (Not tested on stock)
Decompile framework-res.apk
Navigate to: /res/values/bools.xml
Recompile.
When recompiling with apktool, you should get an error message just before it finishes the build. When its finished, ignore the created .apk and navigate to C:\Users\'your name'\framework-res\build\apk - take the resources.arsc from that folder, open your existing framework-res.apk with winzip/winrar etc and paste the resources.arsc over the existing one
Done, you now have 4 way lockscreen rotation & 4 way screen rotation
Click to expand...
Click to collapse
Nice one DSA
no worries, always glad to share
Nice
I will include this Mod to my script "new version" if you may
Thnak you.
go for it dude, enjoy!
OP updated with CRT and SIP mods
enjoy
OP updated with new mods
If anyone has problems performing these mods, let me know and i will do it for you
Thanx, always nice to have the mods collected in one place.
Darkside Agent said:
OP updated with new mods
If anyone has problems performing these mods, let me know and i will do it for you
Click to expand...
Click to collapse
I'll take you up on that one OP, I'm trying to do the CRT, disable the keyboard icon on notification
I decompile the apk and made the necessary changes to the xml file, but when I try to compile it again I get several errors and while I can get a general idea of what do they say I don't know how to solve them, could you help me with this?
Hi
Have you followed the instruction regarding recompiling? ie ignore the error...Have you copied the resource.arsc file over?
If you are still having issues, upload the framework file and i will sort it
Hey mate, I take it these steps would work on a custom rom. Looking to add the CRT effect and disable the ime switcher on Crysis Sensation rom.
Don't see why not...give it a go and report back!
I stopped because the option for the CRT effect was already set in the roms framework, although it doesn't work so god knows lol
Have you turned animations off in the developer settings?
Genius lol. On another note, would you have any idea why the screen flashes with the crt effect sometimes. Might just leave it off, kinda annoying when it happens lol
Do you mean it flashes when you lock the screen? I think it's related to open apps or internet connection..but I'm not sure...
Very nice, thanks you .
Still no good, I used my laptop to try again with a fresh install of the sdk and still nothing...
Code:
C:\ICS Apktool>apktool d c:\framework-res.apk c:\frame
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\ICS Apktool>apktool b c:\frame
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in
c:\frame\res; found: en_US
aapt: warning: string 'policylab_allow_htmlemail' has no default translation in
c:\frame\res; found: en_US
aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no defau
lt translation in c:\frame\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation
in c:\frame\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no defau
lt translation in c:\frame\res; found: en_GB es pt
c:\frame\res\values\plurals.xml:79: error: Multiple substitutions specified in n
on-positional format; did you mean to add the formatted="false" attribute?
c:\frame\res\values\plurals.xml:79: error: Found tag </item> where </plurals> is
expected
c:\frame\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specifi
ed in non-positional format; did you mean to add the formatted="false" attribute
?
c:\frame\res\values-en-rGB\plurals.xml:79: error: Found tag </item> where </plur
als> is expected
c:\frame\res\values-en-rUS\plurals.xml:79: error: Multiple substitutions specifi
ed in non-positional format; did you mean to add the formatted="false" attribute
?
c:\frame\res\values-en-rUS\plurals.xml:79: error: Found tag </item> where </plur
als> is expected
c:\frame\res\values-es\plurals.xml:79: error: Multiple substitutions specified i
n non-positional format; did you mean to add the formatted="false" attribute?
c:\frame\res\values-es\plurals.xml:79: error: Found tag </item> where </plurals>
is expected
c:\frame\res\values-pt\plurals.xml:79: error: Multiple substitutions specified i
n non-positional format; did you mean to add the formatted="false" attribute?
c:\frame\res\values-pt\plurals.xml:79: error: Found tag </item> where </plurals>
is expected
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Mario\AppData\Local\Temp\A
PKTOOL8803180150134749875.tmp, -x, -S, c:\frame\res, -M, c:\frame\AndroidManifes
t.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Mario\AppData\Local\Temp\APKTOOL8803180150134749875.tmp, -x, -S, c:\frame\r
es, -M, c:\frame\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Kirot said:
Still no good, I used my laptop to try again with a fresh install of the sdk and still nothing...
Code:
C:\ICS Apktool>apktool d c:\framework-res.apk c:\frame
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\ICS Apktool>apktool b c:\frame
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'policydesc_allow_htmlemail' has no default translation in
c:\frame\res; found: en_US
aapt: warning: string 'policylab_allow_htmlemail' has no default translation in
c:\frame\res; found: en_US
aapt: warning: string 'wifi_p2p_pbc_go_negotiation_request_message' has no defau
lt translation in c:\frame\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_display_message' has no default translation
in c:\frame\res; found: en_GB es pt
aapt: warning: string 'wifi_p2p_pin_go_negotiation_request_message' has no defau
lt translation in c:\frame\res; found: en_GB es pt
c:\frame\res\values\plurals.xml:79: error: Multiple substitutions specified in n
on-positional format; did you mean to add the formatted="false" attribute?
c:\frame\res\values\plurals.xml:79: error: Found tag where is
expected
c:\frame\res\values-en-rGB\plurals.xml:79: error: Multiple substitutions specifi
ed in non-positional format; did you mean to add the formatted="false" attribute
?
c:\frame\res\values-en-rGB\plurals.xml:79: error: Found tag where is expected
c:\frame\res\values-en-rUS\plurals.xml:79: error: Multiple substitutions specifi
ed in non-positional format; did you mean to add the formatted="false" attribute
?
c:\frame\res\values-en-rUS\plurals.xml:79: error: Found tag where is expected
c:\frame\res\values-es\plurals.xml:79: error: Multiple substitutions specified i
n non-positional format; did you mean to add the formatted="false" attribute?
c:\frame\res\values-es\plurals.xml:79: error: Found tag where
is expected
c:\frame\res\values-pt\plurals.xml:79: error: Multiple substitutions specified i
n non-positional format; did you mean to add the formatted="false" attribute?
c:\frame\res\values-pt\plurals.xml:79: error: Found tag where
is expected
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Mario\AppData\Local\Temp\A
PKTOOL8803180150134749875.tmp, -x, -S, c:\frame\res, -M, c:\frame\AndroidManifes
t.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
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.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Mario\AppData\Local\Temp\APKTOOL8803180150134749875.tmp, -x, -S, c:\frame\r
es, -M, c:\frame\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
Instead of using c:/ framework path, just create cmd shortcut in the folder where you copied apktool
Then simply,
Apktool d framework-res.apk
And
Apktool b framework-res.apk
Sent from my GT-I9100 using xda premium
Big thanks for this howto and the mod.
Question, do you know how to implement notification toggles
in systemui like AOKP to enable / disable wlan, gps etc?
Realy thanks
i am having some problem recompiling the new build 0.587 SystemUI
I get this message
C:\Apktool>apktool b SystemUI fin.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Apktool\SystemUI\res\values\styles.xml:3: error: Error retrieving parent for
item: No resource found that matches the given name '@android:style/TextAppearan
ce.StatusBar'.
C:\Apktool\SystemUI\res\values\styles.xml:8: error: Error retrieving parent for
item: No resource found that matches the given name '@android:style/TextAppearan
ce.StatusBar'.
C:\Apktool\SystemUI\res\values\styles.xml:9: error: Error retrieving parent for
item: No resource found that matches the given name '@android:style/TextAppearan
ce.StatusBar'.
C:\Apktool\SystemUI\res\values\styles.xml:14: error: Error retrieving parent for
item: No resource found that matches the given name '@android:style/TextAppeara
nce.StatusBar'.
C:\Apktool\SystemUI\res\values\styles.xml:46: error: Error retrieving parent for
item: No resource found that matches the given name '@android:style/TextAppeara
nce.StatusBar.Ticker'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\NOIM\AppData\Local\Temp\AP
KTOOL3986682972765043768.tmp, -I, C:\Users\NOIM\apktool\framework\1.apk, -S, C:\
Apktool\SystemUI\res, -M, C:\Apktool\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:325)
at brut.androlib.Androlib.buildResources(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:193)
at brut.androlib.Androlib.build(Androlib.java:175)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\NOIM\AppData\Local\Temp\APKTOOL3986682972765043768.tmp, -I, C:\Users\NOIM\a
pktool\framework\1.apk, -S, C:\Apktool\SystemUI\res, -M, C:\Apktool\SystemUI\And
roidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:249)
... 6 more
Click to expand...
Click to collapse
CAn anyone find whats Wrong ???
Have you installed the relevant files first? http://forum.xda-developers.com/showthread.php?t=1759573
SystemUI has different recompile.. I was looking for a solution for 20 days but noone helped.. anyway here is %100 solution of myself for recompiling SystemUI.apk
>> use wanam's ICS apk manager. it works with GB too..
>> Before decompile .apk , right click and ' open archive ' with 7-zip. Drag & drop classes.dex file to a folder or desktop, and delete inside the .apk..
Decompile it, do what you want and recompile.. After all is ok, open unsigned apk with 7-zip and drag&drop classes.dex back.
Cheers..
Opss, ıf U still have recompile problem, try using latest 'aapt' file. ,)
thanks for the reply ...i will give each method a try ...
I have been searching for a way to keep my DPI down and have a taller Gboard without root/exposed. My banking app will not work with magisk.
I found this article ( https://www.google.com/amp/s/www.xda-developers.com/gboard-tweaks-height-sensitivity/amp/ ) and it worked (before I realized my bank app didn't). Obviously I can't use the same process as I don't have root. In the comments there is a guy GWE who makes a statement about editing the APK.
"Decompile the app, go to res/values/arrays, find the keyboard height entry and add your values (sizes like for ex. 1.25, 1.30 etc. and names).
Then go to res/values/strings and make new entries with the names you put in arrays (in my case I went for "extra tall" and "huge"?).
Recompile, now the new values will show in the settings , done!!!"
I have never done this so maybe I'm wrong, but I opened the APK in Android Studio and I couldn't follow the path he had layed out for me. I was hoping that maybe someone could point me in the right direction?
Any help would be appreciated!
Thank you!
S52Stu said:
I have been searching for a way to keep my DPI down and have a taller Gboard without root/exposed. My banking app will not work with magisk.
I found this article ( https://www.google.com/amp/s/www.xda-developers.com/gboard-tweaks-height-sensitivity/amp/ ) and it worked (before I realized my bank app didn't). Obviously I can't use the same process as I don't have root. In the comments there is a guy GWE who makes a statement about editing the APK.
"Decompile the app, go to res/values/arrays, find the keyboard height entry and add your values (sizes like for ex. 1.25, 1.30 etc. and names).
Then go to res/values/strings and make new entries with the names you put in arrays (in my case I went for "extra tall" and "huge"?).
Recompile, now the new values will show in the settings , done!!!"
I have never done this so maybe I'm wrong, but I opened the APK in Android Studio and I couldn't follow the path he had layed out for me. I was hoping that maybe someone could point me in the right direction?
Any help would be appreciated!
Thank you!
Click to expand...
Click to collapse
I too would like to know if this is possible. Like you, I like having a lower DPI but don't like how small it makes the keyboard. I'm done with the days of rooting so hopefully someone knows of a way.
Decompiling an apk requires Apktool.
You need first to install your framework res using "apktool if framework-res.apk" (read on internet how to do this)
When you want to decompile the apk, you have to type "apktool d <apkname.apk>" so you'll get the folder.
Recompiling is "apktool b <decompiled folder name>" and maybe you need to sign the apk after that.
So, is not a super easy process, I think you need to understand better how to do it reading some posts on xda like this one.
Good luck :good:
APK Tool
TENN3R said:
Decompiling an apk requires Apktool.
You need first to install your framework res using "apktool if framework-res.apk" (read on internet how to do this)
When you want to decompile the apk, you have to type "apktool d <apkname.apk>" so you'll get the folder.
Recompiling is "apktool b <decompiled folder name>" and maybe you need to sign the apk after that.
So, is not a super easy process, I think you need to understand better how to do it reading some posts on xda like this one.
Good luck :good:
Click to expand...
Click to collapse
Thanks for the reply. And I have used APK tool to decompile now as I'm not half asleep messing around I have done a bunch of reading. I have found the files needed to modify and have modified them. Then in the process of the Recompiling I get nothing but errors. (obviously figuring this is me I tested my theory)
If I decompile with apk tool (up to date 2.3.1 and Java 1.8.0) and do not touch the file it still will not recompile. It comes with errors. Now this may be because of framework issues, but in my reading I had found that framework was built into the new apktool? Is that not the case? I will continue reading and I appreciate your reply to me.
Thank you and here is a copy of my log.
Microsoft Windows [Version 10.0.16299.309]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\Jarvis\Desktop\APK Tool>java -jar apktool.jar if framework-res.apk
S: WARNING: Could not write to (C:\Users\Jarvis\AppData\Local\apktool\framework), using C:\Users\Jarvis\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
I: Framework installed to: C:\Users\Jarvis\AppData\Local\Temp\1.apk
C:\Users\Jarvis\Desktop\APK Tool>java -jar apktool.jar d com.google.android.inputmethod.latin_7.0.8.188704572
Input file (com.google.android.inputmethod.latin_7.0.8.188704572) was not found or was not readable.
C:\Users\Jarvis\Desktop\APK Tool>java -jar apktool.jar d com.google.android.inputmethod.latin_7.0.8.188704572.apk
I: Using Apktool 2.3.1 on com.google.android.inputmethod.latin_7.0.8.188704572.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
S: WARNING: Could not write to (C:\Users\Jarvis\AppData\Local\apktool\framework), using C:\Users\Jarvis\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
I: Loading resource table from file: C:\Users\Jarvis\AppData\Local\Temp\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
C:\Users\Jarvis\Desktop\APK Tool>java -jar apktool.jar b com.google.android.inputmethod.latin_7.0.8.188704572
I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
S: WARNING: Could not write to (C:\Users\Jarvis\AppData\Local\apktool\framework), using C:\Users\Jarvis\AppData\Local\Temp\ instead...
S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\layout-v21\language_list_entry.xml:4: error: No resource identifier found for attribute 'buttonTint' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\layout-v21\language_picker_item.xml:4: error: No resource identifier found for attribute 'buttonTint' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\layout-v21\theme_selector_candidate_builder_launcher.xml:2: error: No resource identifier found for attribute 'outlineProvider' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\animator\slide_search_candidate.xml:2: error: Error: String types not allowed (at 'valueFrom' with value '0f').
W:
Exception in thread "main" W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\animator\slide_search_candidate.xml:2: error: Error: String types not allowed (at 'valueTo' with value '1f').
W:
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Jarvis\AppData\Local\Temp\brut_util_Jar_2642557352166116402.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --target-sdk-version, 27, --version-code, 26700810, --version-name, 7.0.8.188704572-release-arm64-v8a, --no-version-vectors, -F, C:\Users\Jarvis\AppData\Local\Temp\APKTOOL629891987092943402.tmp, -0, arsc, -0, META-INF/services/com.fasterxml.jackson.core.JsonFactory, -0, META-INF/services/com.google.protobuf.GeneratedExtensionRegistryLoader, -0, zip, -0, binarypb, -0, so, -0, pic, -0, dict, -0, json, -0, arsc, -I, C:\Users\Jarvis\AppData\Local\Temp\1.apk, -S, C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res, -M, C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
at brut.androlib.Androlib.buildResources(Androlib.java:426)
at brut.androlib.Androlib.build(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Jarvis\AppData\Local\Temp\brut_util_Jar_2642557352166116402.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --target-sdk-version, 27, --version-code, 26700810, --version-name, 7.0.8.188704572-release-arm64-v8a, --no-version-vectors, -F, C:\Users\Jarvis\AppData\Local\Temp\APKTOOL629891987092943402.tmp, -0, arsc, -0, META-INF/services/com.fasterxml.jackson.core.JsonFactory, -0, META-INF/services/com.google.protobuf.GeneratedExtensionRegistryLoader, -0, zip, -0, binarypb, -0, so, -0, pic, -0, dict, -0, json, -0, arsc, -I, C:\Users\Jarvis\AppData\Local\Temp\1.apk, -S, C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res, -M, C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:456)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Jarvis\AppData\Local\Temp\brut_util_Jar_2642557352166116402.tmp, p, --forced-package-id, 127, --min-sdk-version, 17, --target-sdk-version, 27, --version-code, 26700810, --version-name, 7.0.8.188704572-release-arm64-v8a, --no-version-vectors, -F, C:\Users\Jarvis\AppData\Local\Temp\APKTOOL629891987092943402.tmp, -0, arsc, -0, META-INF/services/com.fasterxml.jackson.core.JsonFactory, -0, META-INF/services/com.google.protobuf.GeneratedExtensionRegistryLoader, -0, zip, -0, binarypb, -0, so, -0, pic, -0, dict, -0, json, -0, arsc, -I, C:\Users\Jarvis\AppData\Local\Temp\1.apk, -S, C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res, -M, C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:450)
... 6 more
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\xml-v22\method.xml:129: error: No resource identifier found for attribute 'languageTag' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\xml-v23\method.xml:131: error: No resource identifier found for attribute 'languageTag' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\xml-v26\method.xml:131: error: No resource identifier found for attribute 'languageTag' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable-v21\abc_ratingbar_indicator_material.xml:7: error: No resource identifier found for attribute 'tileModeX' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable-v21\abc_ratingbar_material.xml:7: error: No resource identifier found for attribute 'tileModeX' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable-v21\abc_ratingbar_small_material.xml:7: error: No resource identifier found for attribute 'tileModeX' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable\abc_vector_test.xml:4: error: No resource identifier found for attribute 'fillColor' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable-v21\bg_ja_key_slide_left_material_dark_theme.xml:4: error: No resource identifier found for attribute 'fillColor' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable-v21\bg_ja_key_slide_up_material_dark_theme.xml:4: error: No resource identifier found for attribute 'fillColor' in package 'android'
W:
W: C:\Users\Jarvis\Desktop\APK Tool\com.google.android.inputmethod.latin_7.0.8.188704572\res\drawable\drag_handle.xml:4: error: No resource identifier found for attribute 'fillColor' in package 'android'
W:
C:\Users\Jarvis\Desktop\APK Tool>
Try put apktool folder directly in C:\
backup/download your framework-res.apk file and put it in the apktool folder
remove the previous one (usually in C:\Users\YourName\apktool\framework\1.apk)
browse to c:\apktool folder with cmd and install the framework (apktool if)
decompile (remember .apk at the end)
edit
try recompile
Also note that in the guide it's not used "java -jar apktool.jar d blabla.apk"
Just browse with cmd in the folder and type "apktool d blabla.apk"
Or, search for the error in specific threads, since I think it's not related to apktool, but something on the commands used.
Framework
TENN3R said:
Try put apktool folder directly in C:\
backup/download your framework-res.apk file and put it in the apktool folder
remove the previous one (usually in C:\Users\YourName\apktool\framework\1.apk)
browse to c:\apktool folder with cmd and install the framework (apktool if)
decompile (remember .apk at the end)
edit
try recompile
Also note that in the guide it's not used "java -jar apktool.jar d blabla.apk"
Just browse with cmd in the folder and type "apktool d blabla.apk"
Or, search for the error in specific threads, since I think it's not related to apktool, but something on the commands used.
Click to expand...
Click to collapse
Maybe that is where I'm lost. I have read the apktool framework page (info) and I'm not sure how to find the specific framework I'm looking for? In the mean time I will move to C:/ and try again
thank you
S52Stu said:
Maybe that is where I'm lost. I have read the apktool framework page (info) and I'm not sure how to find the specific framework I'm looking for?
Click to expand...
Click to collapse
The framework res is the file in your phone.
From the official documentation: you need that if you want to decompile proprietary stuff, google keyboard *should not* need this, also because your previous decompilation was succesful, the problem was recompiling.
I always install the framework on every update that comes just to be sure with decompiling things etc, but for now I think you can skip this. But if you're experiencing problems try read that post
TENN3R said:
The framework res is the file in your phone.
From the official documentation: you need that if you want to decompile proprietary stuff, google keyboard *should not* need this, also because your previous decompilation was succesful, the problem was recompiling.
I always install the framework on every update that comes just to be sure with decompiling things etc, but for now I think you can skip this. But if you're experiencing problems try read that post
Click to expand...
Click to collapse
Tenn3r - I have read that and figured the same thing you were saying. I will pull the framework from my phone - but as it should be AOSP I dont think I would need it.
The main reason I was using Java -jar is because it gave me actual prompts like when something was happening. When you dont use it you get this...
Microsoft Windows [Version 10.0.16299.309]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\APK Tool>apktool.jar if com.google.android.gsf_8.1.0-27_minAPI27(nodpi)_apkmirror.com.apk
C:\APK Tool>apktool.jar d com.google.android.inputmethod.latin_7.0.8.188704572.apk
C:\APK Tool>apktool.jar b com.google.android.inputmethod.latin_7.0.8.188704572
C:\APK Tool>
I have spent entirely too long on a Saturday messing around with this and getting no where simply because I want my keyboard to be a little higher
I have to go do some yard work and stop looking at my computer for a little. But I'll be back at it later. Again thank you for humoring me. It is appreciated.
Ok I had some time so I modified the apk for you: download here
I start thinking the problem could be how you set the files of apktool, since at the very beginning I had some problems too.
So I share with you my apktool folder: download here
Extract those files in "C:\Apktool"
Create shortcut of ApktoolStart.bat on desktop (so you just have to double click on the shortcut)
Type commands "apktool blabla" (no more need of "apktool.jar bla bla")
The txt file is the command you need to execute AFTER you build the apk (will be in "decompiled-folder/dist"), for signing, otherwise install error when try to install on your phone.
For more details visit the tutorial I mentioned some posts before.
P.S: I did not test the apk, so in case of errors you may have to uninstall updates in settings > gboard
Thank you!! I'm gonna try to build it again as my reference but you went above and beyond and I appreciate it!
TENN3R said:
Ok I had some time so I modified the apk for you: download here
I start thinking the problem could be how you set the files of apktool, since at the very beginning I had some problems too.
So I share with you my apktool folder: download here
Extract those files in "C:\Apktool"
Create shortcut of ApktoolStart.bat on desktop (so you just have to double click on the shortcut)
Type commands "apktool blabla" (no more need of "apktool.jar bla bla")
The txt file is the command you need to execute AFTER you build the apk (will be in "decompiled-folder/dist"), for signing, otherwise install error when try to install on your phone.
For more details visit the tutorial I mentioned some posts before.
P.S: I did not test the apk, so in case of errors you may have to uninstall updates in settings > gboard
Click to expand...
Click to collapse
Any way you could share the apk again? I've tried modifying it myself but just can't seem to get it.
GBoard now supports a floating keyboard: Link. Just skip to the Floating Keyboard section and enable it. No mucking around, it works on top of your apps, and you can position it anywhere on your screen. You can also resize it to whatever you want.
amartolos said:
GBoard now supports a floating keyboard: Link. Just skip to the Floating Keyboard section and enable it. No mucking around, it works on top of your apps, and you can position it anywhere on your screen. You can also resize it to whatever you want.
Click to expand...
Click to collapse
Thanks for the info. Although it looks like there is an upper limit of how large you can make the keyboard, and that upper limit is actually smaller than when the keyboard is docked. Am I doing something wrong? In the screenshots, it looks like you can stretch it to as large as you want.
joshua1892 said:
Thanks for the info. Although it looks like there is an upper limit of how large you can make the keyboard, and that upper limit is actually smaller than when the keyboard is docked. Am I doing something wrong? In the screenshots, it looks like you can stretch it to as large as you want.
Click to expand...
Click to collapse
I was also under that impression, although personally prefer smaller keyboards so I guess I never pushed the upper bounds. Looks like there is indeed a max limit, and it's roughly the size of the docked one-handed mode. Doh...