C:\Android\Apktool 1.4.7>apktool d HtcDialer.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Arsc files with zero
or multiple packages
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:67)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:45)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:151)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
Still not working properly on sense 4.0.3 apk files... Still throws tons of integer mismatches and doesnt decompile the dialer which is what we were hoping for...
The current error for everyone that Im aware of is
PHP:C:\Android\Apktool 1.4.7>apktool d HtcDialer.apk I: Loading resource table... Exception in thread "main" brut.androlib.AndrolibException: Arsc files with zero or multiple packages at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav a:67) at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav a:43) at brut.androlib.Androlib.getResTable(Androlib.java:45) at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:151) at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101) at brut.apktool.Main.cmdDecode(Main.java:128) at brut.apktool.Main.main(Main.java:65)
God, that is a nasty error. Send me that APK please? ibotpeaches (at) gmail (dot) com.
I'll step through it and see why its doing that.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at sun.awt.image.ByteInterleavedRaster.getSamples(Unknown Source)
at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:60)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:68)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:94)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:101)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
D:\ROM\TOOLS\ApkTools\Phone\res\values-de\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to
add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-de\strings.xml:195: error: Unexpected end tag string
D:\ROM\TOOLS\ApkTools\Phone\res\values-es\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to
add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-es\strings.xml:195: error: Unexpected end tag string
D:\ROM\TOOLS\ApkTools\Phone\res\values-es-rUS\strings.xml:197: error: Multiple substitutions specified in non-positional format; did you mea
n to add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-es-rUS\strings.xml:198: error: Unexpected end tag string
D:\ROM\TOOLS\ApkTools\Phone\res\values-it\strings.xml:194: error: Multiple substitutions specified in non-positional format; did you mean to
add the formatted="false" attribute?
D:\ROM\TOOLS\ApkTools\Phone\res\values-it\strings.xml:195: error: Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\User\A
ppData\Local\Temp\APKTOOL3107178834914996807.tmp, -I, D:\User\apktool\framework\1.apk, -S, D:\ROM\TOOLS\ApkTools\Phone\res, -M, D:\ROM\TOOLS
\ApkTools\Phone\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
at brut.androlib.Androlib.buildResources(Androlib.java:249)
at brut.androlib.Androlib.build(Androlib.java:172)
at brut.androlib.Androlib.build(Androlib.java:155)
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\User\AppData\Local\Temp\APKTOOL3107178834914996807.tmp,
-I, D:\User\apktool\framework\1.apk, -S, D:\ROM\TOOLS\ApkTools\Phone\res, -M, D:\ROM\TOOLS\ApkTools\Phone\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
!!!Aborted!!!
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings_title"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<com.android.settings.BrightnessPreference android:title="@string/brightness" android:key="brightness" android:dialogTitle="@string/brightness"
/>
<CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer"
/>
<ListPreference android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:persistent="false" android:entries="@array/screen_timeout_entries" android:entryValues="@array/screen_timeout_values"
/>
<ListPreference android:title="@string/battery_style" android:key="battery_styles" android:persistent="false" android:entries="@array/battery_style_entries" android:entryValues="@array/battery_style_values"
/>
<ListPreference android:title="@string/pref_nightmode_title" android:key="nightmode" android:entries="@array/render_entries" android:entryValues="@array/render_values" android:defaultValue="@string/config_night_modes"
/>
<PreferenceCategory />
<ListPreference android:title="@string/animations_title" android:key="animations" android:persistent="false" android:entries="@array/animations_entries" android:entryValues="@array/animations_values"
/>
<ListPreference android:title="@string/pref_alertdiaog_sytle_title" android:key="alterdialogstyle" android:entries="@array/alertdialog_sytle" android:entryValues="@array/alertdialog_values" android:defaultValue="@string/config_alertdiaog_styles"
/>
<CheckBoxPreference android:title="@string/pref_electron_beam_animation_on" android:key="electron_beam_animation_on"
/>
<CheckBoxPreference android:title="@string/pref_electron_beam_animation_off" android:key="electron_beam_animation_off"
/>
</PreferenceScreen>
C:\Android\Apktool 1.4.8>apktool d HtcDialer.apk
I: Decoding AndroidManifest.xml with only framework resources...
I: Loading resource table from file: C:\Users\pneuma\apktool\framework\1.apk
I: Loaded.
I: Loading resource table from file: C:\Users\pneuma\apktool\framework\2.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
description, value=0x7f0b0035
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f0b0032
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0026
W: Could not decode attr value, using undecoded value instead: ns=android, name=
label, value=0x7f0b003c
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0029
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d002b
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d002a
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d002a
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d002a
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d0048
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d002a
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x7f0d002a
I: Copying assets and libs...
On the new 1.4.8 I get this error when trying to decompile the 4.0.3 HtcDialer.apk and I get no images or xmls I get a manifest and an apktool.yml... Its gotten more of it in the compiler but Im guessing something still needs tweaked.. Not sure if you got it decompiled or not Ibot and if so how and what do I have to change to get it decompiled and recompiled?
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find sup
erclass Ljava/lang/Object;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass(ClassPa
th.java:832)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:
685)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:282
)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:16
3)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.j
ava:131)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:111)
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:72)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
Error while loading class La/a/a/a; from file C:\Users\EvanVanVan\Desktop\apktool\targetapp.apk
Error while loading ClassPath class La/a/a/a;
Hi, I'm getting this error when trying to decompile an apk (which didnt happen with 1.4.3):
I'll email you the apk if you'd like.
Thanks for the continued work
edit: I guess it was a problem with the apk or my command using the -d (debug) option from the other thread
apktool d -d targetapk.apk == Error
apktool d targetapk.apk == Decompiles fine
Just isn't debuggable
Yeah I tried that I get the same error as before and I also pulled the HtcDialer.apk out of a stock LTE build and I still have no luck I get the same error as before... I posted the dialer on the last page I want someone to be able to decompile and compile lol I just want to know the procress lol... If anyone has any luck let me know please...Thanks for the new version. Am now able to decompile HTCDialer, although r.9.pngs get converted to 9.pngs.
Still unable to decompile com.HTC.resources.apk without the --keep-broken-res tag, so still can't get at resources.arsc. Not sure if you're already aware of this, but can post the error log and apk if needed.
Pnuema, using 1.4.8, I was able to decompile and recompile HTCDialer. The only thing I did differently to you was to leave the apk with its full name, ie not delete all the letter groups in the name. Dont see why that should make a difference but worth a try?
Sent from my HTC One X using xda premium
- [#3492] Fix #GHSA-vgwr-4w3p-xmjv (Arbitrary file writes on Windows). (Thanks Cl0udG0d)
e28e4b4a413a252617d92b657a33c947
7956eb04194300ce0d0a84ad18771eebc94b89fb8d1ddcce8ea4c056818646f4
- Android 5.1 Support
- New Apktool website since Googlecode is shutting down.
- #658- Fixed issue with double escaping of & and <. (Thanks jhornber)
- #840 - Add support for BCP-47 tags.
- #878 - Fixed issue with unknown files not respecting compression method. (Thanks simtel12)
- #890 - Fixed issue with apktool branding apks with platformBuildName.
- #904 - Fixed issue with multiple dex files skipped when using -s.
- #636 - Fixed issue with @string references in <provider> attributes.
- Increased performance. (Thanks thuxnder & rover12421)
- Fixed issue decoding `.spi` files as 9 patch images. (Thanks Furniel)
Note - This changelog contains changes since 2.0.0 RC4. For full changes in 2.0.0 see here
On my immediate radar is now
- Smali updated to 2.1.2
- #1220 - Fixed issue where APK would wrongly identify as wrong packageId.
- #1224 - Added AndroidManifest.xml file into frameworks to satisfy stock aapt constraints. (Thanks BurgerZ)
- #1235 - Restore -d / --debug-mode to set android:debuggable to true. (Thanks Benjamin-Dobell)
- #1234 - Insert literal versionName if its a reference to satisfy aapt. (Thanks padlar)
- #1131 - Fix Samsung APKs that have an unknown 4 bytes of padding.
- #1240 - Fixed manifest rename for Adobe AIR applications.
- #1005 - Fixed issues with apks that used .9.xml files which improperly triggered 9patch decoder.
- #1020 - Fixed issues with compressing resources that shouldn't be. (Thanks agrieve)
- #1023 - Fixed issue with reference attributes being decoded improperly. (Thanks phhusson)
- #928 - Fixed issue with version qualifiers being added on build.
- #999 - Added support for Android Marshmallow.
- Updated smali/baksmali to 2.0.8