Closed GoogleCodeExporter closed 9 years ago
Someone sent me an APK called this on XDA.
This APK is busted. Its been modified someway that isn't normal. You can fix
the error
F:\Galaxy S3\Apk Tools v3\SecPhone\res\values-es\strings.xml:195: error:
Multiple substitutions spec
ified in non-positional format; did you mean to add the formatted="false"
attribute?
by adding formatted="false" to that line res/values-es/strings.xml (line 195)
and see if that works for the entire APK. If so, its probably an apktool.
If more errors, its because thats a weird "magic" apk.
Original comment by connor.tumbleson
on 4 Dec 2012 at 5:51
I am having this very same issue. Note 2 (SecPhone.apk) on Ubuntu. apktool 1.5.1
================================================================================
=====
hb@ubuntu:~/Desktop/apktool$ ./apktool d SecPhone.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/hb/apktool/framework/1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
hb@ubuntu:~/Desktop/apktool$ ./apktool b SecPhone
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
/home/hb/Desktop/apktool/SecPhone/res/values-es/strings.xml:195: error:
Multiple substitutions specified in non-positional format; did you mean to add
the formatted="false" attribute?
/home/hb/Desktop/apktool/SecPhone/res/values-es/strings.xml:196: error:
Unexpected end tag string
/home/hb/Desktop/apktool/SecPhone/res/values-es-rUS/strings.xml:204: error:
Multiple substitutions specified in non-positional format; did you mean to add
the formatted="false" attribute?
/home/hb/Desktop/apktool/SecPhone/res/values-es-rUS/strings.xml:205: error:
Unexpected end tag string
/home/hb/Desktop/apktool/SecPhone/res/values-it/strings.xml:201: error:
Multiple substitutions specified in non-positional format; did you mean to add
the formatted="false" attribute?
/home/hb/Desktop/apktool/SecPhone/res/values-it/strings.xml:202: error:
Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec
command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F,
/tmp/APKTOOL6242682981002533740.tmp, -I, /home/hb/apktool/framework/1.apk, -S,
/home/hb/Desktop/apktool/SecPhone/res, -M,
/home/hb/Desktop/apktool/SecPhone/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:357)
at brut.androlib.Androlib.buildResources(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:218)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could
not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16,
-F, /tmp/APKTOOL6242682981002533740.tmp, -I, /home/hb/apktool/framework/1.apk,
-S, /home/hb/Desktop/apktool/SecPhone/res, -M,
/home/hb/Desktop/apktool/SecPhone/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:349)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:335)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p,
--min-sdk-version, 16, --target-sdk-version, 16, -F,
/tmp/APKTOOL6242682981002533740.tmp, -I, /home/hb/apktool/framework/1.apk, -S,
/home/hb/Desktop/apktool/SecPhone/res, -M,
/home/hb/Desktop/apktool/SecPhone/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:347)
... 6 more
================================================================================
=====
Original comment by tes...@gmail.com
on 2 Jan 2013 at 1:10
Btw I am not worried about the "error: Multiple substitutions specified in
non-positional format; did you mean to add the formatted="false" attribute?"
error. I can compare values/strings.xml and values-es/strings.xml and change it
to match each other and that fixes those errors, but still getting "Exception
in thread "main" brut.androlib.AndrolibException:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec
command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F,
/tmp/APKTOOL6242682981002533740.tmp, -I, /home/hb/apktool/framework/1.apk, -S,
/home/hb/Desktop/apktool/SecPhone/res, -M,
/home/hb/Desktop/apktool/SecPhone/AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:357)
at brut.androlib.Androlib.buildResources(Androlib.java:282)
at brut.androlib.Androlib.build(Androlib.java:205)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:218)
at brut.apktool.Main.main(Main.java:74)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could
not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16,
-F, /tmp/APKTOOL6242682981002533740.tmp, -I, /home/hb/apktool/framework/1.apk,
-S, /home/hb/Desktop/apktool/SecPhone/res, -M,
/home/hb/Desktop/apktool/SecPhone/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:349)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:335)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p,
--min-sdk-version, 16, --target-sdk-version, 16, -F,
/tmp/APKTOOL6242682981002533740.tmp, -I, /home/hb/apktool/framework/1.apk, -S,
/home/hb/Desktop/apktool/SecPhone/res, -M,
/home/hb/Desktop/apktool/SecPhone/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:347)
... 6 more" error.
Original comment by tes...@gmail.com
on 3 Jan 2013 at 2:39
Original comment by connor.tumbleson
on 6 Jan 2013 at 11:59
Original issue reported on code.google.com by
gharring...@gmail.com
on 2 Dec 2012 at 4:50