ibotpeaches / apktool Goto Github PK
View Code? Open in Web Editor NEWA tool for reverse engineering Android apk files
Home Page: https://apktool.org/
License: Apache License 2.0
A tool for reverse engineering Android apk files
Home Page: https://apktool.org/
License: Apache License 2.0
I'd used the apk version 1.5.0 to decompile with debug option
What I've done is like the below,
c:>apktool -v d -d e:\Superuser.apk e:\out
error occurred with the message i am attaching
http://www.mediafire.com/view/?d13c8lk2q1wtbsm
here is the Superuser.apk i used
http://www.mediafire.com/?f3g4s3r8yp13bic
I've got the result of .smali files but I couldn't get the .java files
p.s.
there is a small bug,
In Error Message, "Error occured" should be fixed with "Error occurred"
Sometimes when recompiling, it shows Frames used = 1
but on re-compile it fails, because it needs 1, and either 2 or 3.
When decompiling, not correctly reporting the frames used.
Fixed version works with everything but framework-res
version: 1.4.5.5e49d31
apkFileName: AntiSpam.apk
isFrameworkApk: false
usesFramework:
ids:
- 1
- 3
When I use apktool 1.4.9 Release and 1.4.8 Beta to decompile some apks, I got not well-formated AndroidManifest.xml.
For example, I got:
<manifest android:versionName="3.1.0" android:versionCode="1004" package="com.samsung.inputmethod" android:sharedUserId="android.uid.system" coreApp="true"
xmlns:android="http://schemas.android.com/apk/res/android"
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.INJECT_EVENTS" />
<application android:icon="@drawable/app_icon" android:label="@string/ime_name"
<service android:name=".SimeDecoderService" android:exported="true" <intent-filter> <action android:name="com.samsung.inputmethod.Decoder_Service" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </service>
<service android:name=".SamsungIME" android:label="@string/ime_name" android:permission="android.permission.BIND_INPUT_METHOD"
<intent-filter android:priority="1"> <action android:name="android.view.InputMethod" /> </intent-filter> <meta-data android:name="android.view.im" android:resource="@xml/method" /> </service>
...
For the same apk, go back to use apktool 1.4.7 Release to do decompile, the result is good:
...
Please investigate and fix it. Thank you.
Please get the APK from https://hotfile.com/dl/176237426/0f42cac/voicetalk_NLI.apk.html
Simply decompile the APK and then rebuild it without any change, error message popup.
apktool v1.5.0.5a056e3
C:\Users\admin\Desktop>apktool d C:\Users\admin\Desktop\voicetalk_NLI.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\admin\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "drawable-sw320dp-hdpi/weekly_weather_press.9
.png". Renaming it to .png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/bubble_typing.9.png".
Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/voice_talk_message_02.
9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw360dp-hdpi/weekly_weather_press.9
.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw360dp-hdpi/weekly_weather_focus.9
.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw320dp-hdpi/weekly_weather_focus.9
.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/voice_talk_message_01.
9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/bubble_typed.9.png". R
enaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw360dp-hdpi/weekly_weather_select.
9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw320dp-hdpi/weekly_weather_select.
9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw320dp-hdpi/weekly_weather_normal.
9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/voice_talk_message_03.
9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/voice_talk_button_sear
ch.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw720dp-mdpi/voice_talk_screen_popu
p_press_03.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-sw360dp-hdpi/weekly_weather_normal.
9.png". Renaming it to *.png.
I: Decoding values */ XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\admin\Desktop>apktool b C:\Users\admin\Desktop\voicetalk_NLI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\admin\Desktop\voicetalk_NLI\res\values\arrays.xml:205: error: Found tag
reference-array where item is expected
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:627: error: Public en
try identifier 0x7f070039 entry index is larger than available symbols (index 57
, total symbols 27).
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:627: error: Public sy
mbol array/dayMatchers declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:626: error: Public en
try identifier 0x7f070038 entry index is larger than available symbols (index 56
, total symbols 27).
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:626: error: Public sy
mbol array/monthMatchers declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:628: error: Public sy
mbol array/svox_symbols declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:629: error: Public sy
mbol array/svox_timezones declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:615: error: Public sy
mbol array/wcis_alarm_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:621: error: Public sy
mbol array/wcis_check_weather_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:610: error: Public sy
mbol array/wcis_driving_mode_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:602: error: Public sy
mbol array/wcis_email_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:620: error: Public sy
mbol array/wcis_findcontact_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:622: error: Public sy
mbol array/wcis_get_an_answers_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:617: error: Public sy
mbol array/wcis_hotels_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:624: error: Public sy
mbol array/wcis_local_listings_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:609: error: Public sy
mbol array/wcis_maps_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:619: error: Public sy
mbol array/wcis_memo_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:618: error: Public sy
mbol array/wcis_movies_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:604: error: Public sy
mbol array/wcis_music_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:605: error: Public sy
mbol array/wcis_music_examples_no_radio declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:612: error: Public sy
mbol array/wcis_nav_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:601: error: Public sy
mbol array/wcis_open_app_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:614: error: Public sy
mbol array/wcis_openapps_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:607: error: Public sy
mbol array/wcis_radio_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:611: error: Public sy
mbol array/wcis_recordvoice_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:613: error: Public sy
mbol array/wcis_schedule_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:599: error: Public sy
mbol array/wcis_search_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:600: error: Public sy
mbol array/wcis_search_examples_cn declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:623: error: Public sy
mbol array/wcis_simple_setting_controls_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:598: error: Public sy
mbol array/wcis_sms_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:603: error: Public sy
mbol array/wcis_social_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:608: error: Public sy
mbol array/wcis_social_update_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:606: error: Public sy
mbol array/wcis_task_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:616: error: Public sy
mbol array/wcis_timer_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:596: error: Public sy
mbol array/wcis_voice_and_super_dial_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:597: error: Public sy
mbol array/wcis_voice_dial_car_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:595: error: Public sy
mbol array/wcis_voice_dial_examples declared here is not defined.
C:\Users\admin\Desktop\voicetalk_NLI\res\values\public.xml:625: error: Public sy
mbol array/web_search_names declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 14, --target-sdk-ver
sion, 14, -F, C:\Users\admin\AppData\Local\Temp\APKTOOL8139666236227678100.tmp,
-I, C:\Users\admin\apktool\framework\1.apk, -S, C:\Users\admin\Desktop\voicetalk
_NLI\res, -M, C:\Users\admin\Desktop\voicetalk_NLI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 14, --target-sdk-version, 14, -F, C:\Users\admin\AppData\Local\Temp\A
PKTOOL8139666236227678100.tmp, -I, C:\Users\admin\apktool\framework\1.apk, -S, C
:\Users\admin\Desktop\voicetalk_NLI\res, -M, C:\Users\admin\Desktop\voicetalk_NL
I\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
When I decompile TouchPal Contact apk, it fails.
Here is the apk:
http://uploading.com/files/get/6b987b27/tc.apk
Exception Log:
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResStringValue cannot be cast to brut.androlib.res.data.value.ResAttr
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:35)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:313)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:64)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:98)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:102)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:86)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:169)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:114)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
Got this, which I've never seen before:
http://pastebin.com/Fwzw4EL8
I found more gradle bugs:
Is there Any easy way to have the tool to just skip decompile and recompile of the (ba)smali. Mainly looking at a themers prospective.
I see apktool still doesn't provide good readable compilation errors. Instead it just crashes the same way as long time ago.
i'm not sure which version of smali/baksmali code you use, but smali v1.3.2 already provides good error reporting. For example missing names of labels - which is very helpful if you change a lot of code.
Please add error reporting in apktool.
I found this bug a while ago when I stumbled upon a namespace resolution issue, forgot the actual symptom, but it is definitely a bug:
In brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/AXmlResourceParser.java
line 773:
for (int o = 0; o != m_attributes.length; ++o) {
Should be:
for (int o = 0; o != m_attributes.length; o+=ATTRIBUTE_LENGHT) {
While decompiling apktool outputs:
I: Baksmaling...
testI: Copying assets and libs...
"test" is something like very very old debug info from original baksmali.
Had this been fixed apktool -d ie debug switch?
Somehow the frames are being written badly. Will check.
if (ResXmlEncoders.hasMultipleNonPositionalSubstitutions(mRawValue)) {
serializer.attribute(null, "formatted", "false");
}
was being run by not working. Also, plurals/arrays never run this. Even though theres true xlif data in there. We need to add counter to fix the $1 $2 issue.
Small counter per node. Reset once done.
Please help to fix a problem introduced since the original brut version of apktool: http://code.google.com/p/android-apktool/issues/detail?id=101
In addition to the "& a m p;" being decoded as "& a m p ; a m p ;" problem, " & l t;" also being decoded as "& a m p ; l t". (sorry for the addtional white spaces)
Please take care of it. Thank you.
The past apktools up to ver 1.4.1 allows debugging with netbeans 6.8.
This is due to the fact that the files decompile are in .java instead of .smali.
Furthermore, netbeans 6.8 allows placing breakpoints in commented code.
However, I have been having problems with these deprecated/outdated tools.
I was wondering if it is still possible to debug with the latest version 1.5? Or are there other ways to go around it?
use apktoo d -dj ...
will be appear ๏ผ๏ผ
public Main(){
/*SMALI
.locals 0
.prologue
.line 17
invoke-direct{p0},Landroid/app/Activity;->()V
return-void
*/
}
Hi!
Try to decompile and compile back these apks (Phone.apk and PIM.apk) from LeWa OS:
http://www.mediafire.com/?hnmexasxme2tg6y
\Phone\res\values-zh-rTW\strings.xml:202: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
There is a single "%" symbol in that line (like 78%). Apktool 1.4.2 can handle it without errors.
\PIM\res\layout\act_edit.xml:8: error: Error: No resource found that matches the given name (at 'background' with value '@*android:drawable/item_background_holo_dark_left').
etc.
Again, new apktool can't handle some xmls. 1.4.2 version recompiles this apk w/o errors.
I am trying to modify XMLs of Jelly Bean Contacts.apk. Using all apktools (up to 1.4.9) that has been used for ICS and other Jelly Bean apks, I can decompile and then recomplie it without any error. However, the recompiled Contacts.apk would not work in cell phone, showing a message "Unfortunately, Contacts has stopped!".
To simplify the problem, I simply do decompiling and then recompiling without any modifications. I found that the size of resources.arsc has been changed from 1480 KB to 1525 KB. The new Contacts.apk causes FC!
Note: Files in smali folder can still be modified. After editing, use apktool to recompile and create a new apk. Then use WinRAR or 7zip to drag the newly created classes.dex into the original Contacts.apk. Such a "modified" Contacts.apk works properly. Note here that we did not modify resources.arsc.
This problem is only related to resources.arsc! XMLs cannot be recompiled.
Please fix this problem in apktool 1.4.10.
I try to decomple Settings.apk from CM-10 NIGHTLY ROM. I got the following messages and decompiling was failed. The problem appeared from the version of 9/2/2012.
Do you know how to solve this? Thank you.
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=scrollbarStyle, value=0x010e003b
W: Could not decode attr value, using undecoded value instead: ns=android, name=scrollbarStyle, value=0x010e003b
I: Decoding values_/_ XMLs...
I: Done.
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010e003b
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)
at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:46)
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:86)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
Remove Maven (finally). Remove need for Maven 3rd party REPO.
Still use it to load needed artifacts, but not for holding brut.apktool.smali etc.
C:>apktool if com.htc.resources.apk onex_1.29
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-hdpi-ERR0
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-hdpi-ERR1
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-hdpi-ERR2
W: Config flags size > 36. Exceeding bytes: 0x6000000.
W: Invalid config flags detected: dimen-hdpi-ERR3
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-xhdpi-ERR4
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-xhdpi-ERR5
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-xhdpi-ERR6
W: Config flags size > 36. Exceeding bytes: 0x6000000.
W: Invalid config flags detected: dimen-xhdpi-ERR7
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-ja-hdpi-ERR8
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-ja-hdpi-ERR9
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-ja-hdpi-ERR10
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-ja-xhdpi-ERR11
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-ja-xhdpi-ERR12
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-ja-xhdpi-ERR13
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-ko-hdpi-ERR14
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-ko-hdpi-ERR15
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-ko-hdpi-ERR16
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-ko-xhdpi-ERR17
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-ko-xhdpi-ERR18
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-ko-xhdpi-ERR19
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-zh-rCN-hdpi-ERR20
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-zh-rCN-hdpi-ERR21
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-zh-rCN-hdpi-ERR22
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-zh-rCN-xhdpi-ERR23
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-zh-rCN-xhdpi-ERR24
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-zh-rCN-xhdpi-ERR25
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-zh-rTW-hdpi-ERR26
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-zh-rTW-hdpi-ERR27
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-zh-rTW-hdpi-ERR28
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-zh-rTW-xhdpi-ERR29
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-zh-rTW-xhdpi-ERR30
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-zh-rTW-xhdpi-ERR31
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: integer-hdpi-ERR32
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: integer-hdpi-ERR33
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: integer-hdpi-ERR34
W: Config flags size > 36. Exceeding bytes: 0x6000000.
W: Invalid config flags detected: integer-hdpi-ERR35
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: integer-xhdpi-ERR36
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: integer-xhdpi-ERR37
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: integer-xhdpi-ERR38
W: Config flags size > 36. Exceeding bytes: 0x6000000.
W: Invalid config flags detected: integer-xhdpi-ERR39
I: Framework installed to: C:\Users\Administrator\apktool\framework\2-onex_1.29.apk
Hi.
apktool decodes styles in wrong format:
If you need I could provide all these apks.
Building with gradle target build
fails.
https://buildhive.cloudbees.com/job/tmp-/job/Apktool/2/console
9a78ae6788441a45f41bbf49deb2e4668848d694
ResScalarValue.java:116: cannot find symbol
symbol : variable mBody
location: class brut.androlib.res.data.value.ResScalarValue
if (ResXmlEncoders.hasMNPS(mBody)) {
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception.
Duplicating files in DIR.
Gradle isn't filling version, and the JAR name frankly sucks. It needs to be named apktool-$version-hash.jar
Apktool v${version} - a tool for reengineering Android apk files
Is it possible to add work with multiple frameworks? I have several devices and also several android versions.
Is it possible to add command line option which will tell where to look for framework resources?
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
E:\Apktool>gradlew build
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
:compileTestJava UP-TO-DATE
:processTestResources UP-TO-DATE
:testClasses UP-TO-DATE
:test UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
:brut.apktool:compileJava UP-TO-DATE
:brut.apktool:processResources UP-TO-DATE
:brut.apktool:classes UP-TO-DATE
:brut.apktool:jar UP-TO-DATE
:brut.apktool:assemble UP-TO-DATE
:brut.apktool:compileTestJava UP-TO-DATE
:brut.apktool:processTestResources UP-TO-DATE
:brut.apktool:testClasses UP-TO-DATE
Building > :brut.apktool:test > Resolving dependencies ':brut.apktool:testRunt
:brut.apktool:test UP-TO-DATE
:brut.apktool:check UP-TO-DATE
:brut.apktool:build UP-TO-DATE
:brut.apktool.smali:compileJava UP-TO-DATE
:brut.apktool.smali:processResources UP-TO-DATE
:brut.apktool.smali:classes UP-TO-DATE
:brut.apktool.smali:jar UP-TO-DATE
:brut.apktool.smali:assemble UP-TO-DATE
:brut.apktool.smali:compileTestJava UP-TO-DATE
:brut.apktool.smali:processTestResources UP-TO-DATE
:brut.apktool.smali:testClasses UP-TO-DATE
Building > :brut.apktool.smali:test > Resolving dependencies ':brut.apktool.sm
:brut.apktool.smali:test UP-TO-DATE
:brut.apktool.smali:check UP-TO-DATE
:brut.apktool.smali:build UP-TO-DATE
Building > :brut.j.common:compileJava > Resolving dependencies ':brut.j.common
:brut.j.common:compileJava UP-TO-DATE
:brut.j.common:processResources UP-TO-DATE
:brut.j.common:classes UP-TO-DATE
:brut.j.common:jar UP-TO-DATE
:brut.j.common:assemble UP-TO-DATE
:brut.j.common:compileTestJava UP-TO-DATE
:brut.j.common:processTestResources UP-TO-DATE
:brut.j.common:testClasses UP-TO-DATE
Building > :brut.j.common:test > Resolving dependencies ':brut.j.common:testRu
:brut.j.common:test UP-TO-DATE
:brut.j.common:check UP-TO-DATE
:brut.j.common:build UP-TO-DATE
Building > :brut.j.util:compileJava > Resolving dependencies ':brut.j.util:com
:brut.j.util:compileJava UP-TO-DATE
:brut.j.util:processResources UP-TO-DATE
:brut.j.util:classes UP-TO-DATE
:brut.j.util:jar UP-TO-DATE
Building > :brut.j.dir:compileJava > Resolving dependencies ':brut.j.dir:compi
:brut.j.dir:compileJava UP-TO-DATE
:brut.j.dir:processResources UP-TO-DATE
:brut.j.dir:classes UP-TO-DATE
:brut.j.dir:jar UP-TO-DATE
:brut.j.dir:assemble UP-TO-DATE
:brut.j.dir:compileTestJava UP-TO-DATE
:brut.j.dir:processTestResources UP-TO-DATE
:brut.j.dir:testClasses UP-TO-DATE
Building > :brut.j.dir:test > Resolving dependencies ':brut.j.dir:testRuntime'
:brut.j.dir:test UP-TO-DATE
:brut.j.dir:check UP-TO-DATE
:brut.j.dir:build UP-TO-DATE
:brut.j.util:assemble UP-TO-DATE
:brut.j.util:compileTestJava UP-TO-DATE
:brut.j.util:processTestResources UP-TO-DATE
:brut.j.util:testClasses UP-TO-DATE
Building > :brut.j.util:test > Resolving dependencies ':brut.j.util:testRuntim
:brut.j.util:test UP-TO-DATE
:brut.j.util:check UP-TO-DATE
:brut.j.util:build UP-TO-DATE
Building > :brut.apktool.smali:dexlib:compileJava > Resolving dependencies ':b
:brut.apktool.smali:dexlib:compileJava UP-TO-DATE
:brut.apktool.smali:dexlib:processResources UP-TO-DATE
:brut.apktool.smali:dexlib:classes UP-TO-DATE
:brut.apktool.smali:dexlib:jar UP-TO-DATE
Building > :brut.apktool.smali:util:compileJava > Resolving dependencies ':bru
:brut.apktool.smali:util:compileJava UP-TO-DATE
:brut.apktool.smali:util:processResources UP-TO-DATE
:brut.apktool.smali:util:classes UP-TO-DATE
:brut.apktool.smali:util:jar UP-TO-DATE
Building > :brut.apktool.smali:baksmali:compileJava > Resolving dependencies '
:brut.apktool.smali:baksmali:compileJava UP-TO-DATE
:brut.apktool.smali:baksmali:processResources UP-TO-DATE
:brut.apktool.smali:baksmali:classes UP-TO-DATE
:brut.apktool.smali:baksmali:jar UP-TO-DATE
:brut.apktool.smali:baksmali:assemble UP-TO-DATE
:brut.apktool.smali:baksmali:compileTestJava UP-TO-DATE
:brut.apktool.smali:baksmali:processTestResources UP-TO-DATE
:brut.apktool.smali:baksmali:testClasses UP-TO-DATE
Building > :brut.apktool.smali:baksmali:test > Resolving dependencies ':brut.a
:brut.apktool.smali:baksmali:test UP-TO-DATE
:brut.apktool.smali:baksmali:check UP-TO-DATE
:brut.apktool.smali:baksmali:build UP-TO-DATE
:brut.apktool.smali:dexlib:assemble UP-TO-DATE
:brut.apktool.smali:dexlib:compileTestJava UP-TO-DATE
:brut.apktool.smali:dexlib:processTestResources UP-TO-DATE
:brut.apktool.smali:dexlib:testClasses UP-TO-DATE
Building > :brut.apktool.smali:dexlib:test > Resolving dependencies ':brut.apk
:brut.apktool.smali:dexlib:test UP-TO-DATE
:brut.apktool.smali:dexlib:check UP-TO-DATE
:brut.apktool.smali:dexlib:build UP-TO-DATE
:brut.apktool.smali:smali:generateAntlrSource
FAILURE: Build aborted because of an internal error.
BUILD FAILED
Total time: 29.35 secs
E:\Apktool>
As per.
http://developer.android.com/guide/topics/resources/string-resource.html
<string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>
It seems if there is only one, as just %s or %d, then its probably to trigger formatted="false". Or simply just change it to %1$s.
Which I might do
Smali 1.4.0 is out http://code.google.com/p/smali/ and it mentions that deodexing is much simpler now. No more need to supply the correct bootclasspath entries, just the framework dir.
In addition to catching up to the latest version (I don't know what tweaks does ApkTool does on top of it), is it feasible to:
$ java -jar /usr/local/bin/apktool.jar b Phone
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
/home/armando/Scaricati/apk/Phone/res/values-da/strings.xml:204: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-da/strings.xml:205: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-es/strings.xml:209: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-es/strings.xml:210: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-es-rES/strings.xml:204: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-es-rES/strings.xml:205: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-it/strings.xml:204: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-it/strings.xml:205: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-kk/strings.xml:208: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-kk/strings.xml:209: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-nb/strings.xml:204: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-nb/strings.xml:205: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-ru/strings.xml:209: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-ru/strings.xml:210: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-sv/strings.xml:204: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-sv/strings.xml:205: error: Unexpected end tag string
/home/armando/Scaricati/apk/Phone/res/values-zh-rTW/strings.xml:207: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
/home/armando/Scaricati/apk/Phone/res/values-zh-rTW/strings.xml:207: error: Unexpected end tag string
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 8, --target-sdk-version, 8, -F, /tmp/APKTOOL1535121102529163230.tmp, -I, /home/armando/apktool/framework/1.apk, -I, /home/armando/apktool/framework/2.apk, -S, /home/armando/Scaricati/apk/Phone/res, -M, /home/armando/Scaricati/apk/Phone/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 8, --target-sdk-version, 8, -F, /tmp/APKTOOL1535121102529163230.tmp, -I, /home/armando/apktool/framework/1.apk, -I, /home/armando/apktool/framework/2.apk, -S, /home/armando/Scaricati/apk/Phone/res, -M, /home/armando/Scaricati/apk/Phone/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:253)
... 6 more
Here is the google talk apk extracted from jeally bean phone.
http://uploading.com/files/get/528m7661/gtalk.apk
I try to decompile it using apktool, but the smali folder is missing after decomilation. Thank You
https://github.com/kckrinke/brut.apktool/commit/b31136728d9fe936b93762a828957eeaac54d820
That's my simple fix for the problem. Java's Runtime.exec has issues with spaces in the arguments. For whatever reason, Java will take the String[] given, flatten it, and then promptly split on spaces again thus breaking apktool for OS X users.
All I did was remove the "Application Support/" part of the path and everything works again.
I would have submitted a pull request but I think I b0rked my fork somehow and will investigate later.
appeaches@turf:~/Downloads$ apktool b SystemUI
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8348634422213290285.tmp, -I, /home/peaches/apktool/framework/1.apk, -S, /home/peaches/Downloads/SystemUI/res, -M, /home/peaches/Downloads/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java: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, /tmp/APKTOOL8348634422213290285.tmp, -I, /home/peaches/apktool/framework/1.apk, -S, /home/peaches/Downloads/SystemUI/res, -M, /home/peaches/Downloads/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:249)
... 6 more
The JAR is now around 8.8MB. Thats huge.
Lets learn Proguard and hook it in, should be able to drop down to 4-5MB.
xml formatting is pretty messed up after decompiling
[URL="http://pastebin.com/3MYvfHVQ"][B]What it should look like[/B][/URL]
[URL="http://pastebin.com/9NsDNQ2p"][B]What I am getting with v1.4.9 and the aapt.exe in the OP or the newest from the SDK[/B][/URL]
This happens on all xml files.
(this is mentioned on the 1.5.0 release notes of XDA thread, but reporting here as I'm not sure whether it's the same situation and I see no other open issue)
When attempting to decompile most apks with -d, errors such as these ones will be issued for lots of classes:
Error occured while disassembling class Lorg.achartengine.chart.PointStyle; - skipping class
java.lang.NullPointerException
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeAgetObject(MethodAnalyzer.java:2409)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:759)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:325)
at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:281)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:103)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:185)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:72)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
Error occured while disassembling class Lorg.achartengine.renderer.XYMultipleSeriesRenderer; - skipping class
java.lang.NullPointerException
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeAgetWide(MethodAnalyzer.java:2340)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:756)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:325)
at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:297)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:104)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:185)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:72)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
These examples were obtained on the 1.10.5.0 version of the BBS app, http://forum.xda-developers.com/showthread.php?t=1179809
2 different errors (perhaps there are additional types) - analyzeAgetWide, analyzeAgetObject.
Still in this example, XYMultipleSeriesRenderer fails but simpler classes like XYSeriesRenderer or plain interfaces / abstract classes don't raise errors.
I can type aapt in term all day and it will run no matter what directory I try from so no clue why I am getting:
could not exec command: [aapt, p, -F, /tmp/APKTOOL8285587473001893117.tmp, -I, /home/raziel23x/apktool/framework/1.apk, -S, /tmp/BRUT1489758152357973194.tmp/testapp-orig/res, -M, /tmp/BRUT1489758152357973194.tmp/testapp-orig/AndroidManifest.xml]
Class brut.androlib.BuildAndDecodeTest
all > brut.androlib > BuildAndDecodeTest
1
tests
1
failures
0s
duration
0%
successful
Failed tests
Tests
Standard error
classMethod
brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2719506021616712047.tmp, -I, /home/raziel23x/apktool/framework/1.apk, -S, /tmp/BRUT8203572209075753196.tmp/testapp-orig/res, -M, /tmp/BRUT8203572209075753196.tmp/testapp-orig/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:337)
at brut.androlib.Androlib.buildResources(Androlib.java:284)
at brut.androlib.Androlib.build(Androlib.java:207)
at brut.androlib.BuildAndDecodeTest.beforeClass(BuildAndDecodeTest.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:55)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:42)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:75)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at $Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.TypeCastDispatch.dispatch(TypeCastDispatch.java:30)
at org.gradle.messaging.remote.internal.WorkerProtocol.handleIncoming(WorkerProtocol.java:53)
at org.gradle.messaging.remote.internal.WorkerProtocol.handleIncoming(WorkerProtocol.java:31)
at org.gradle.messaging.remote.internal.ProtocolStack$ProtocolStage.handleIncoming(ProtocolStack.java:167)
at org.gradle.messaging.remote.internal.ProtocolStack$BottomStage.handleIncoming(ProtocolStack.java:277)
at org.gradle.messaging.remote.internal.ProtocolStack$BottomConnection$1.run(ProtocolStack.java:299)
at org.gradle.messaging.remote.internal.ProtocolStack$ExecuteRunnable.dispatch(ProtocolStack.java:120)
at org.gradle.messaging.remote.internal.ProtocolStack$ExecuteRunnable.dispatch(ProtocolStack.java:116)
at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:132)
at org.gradle.messaging.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:33)
at org.gradle.messaging.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:72)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2719506021616712047.tmp, -I, /home/raziel23x/apktool/framework/1.apk, -S, /tmp/BRUT8203572209075753196.tmp/testapp-orig/res, -M, /tmp/BRUT8203572209075753196.tmp/testapp-orig/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:253)
... 49 more
As I know, we need a patched aapt to work.
But the mac version of aapt in http://miui.connortumbleson.com/other/apktool/aapt/ does not work.
Illegal instruction: 4 is thrown when the aapt is ran in Mac 10.8.1
<activity android:name="Guide" android:exported="true" android:enabled="true"
android:configChanges="orientation|keyboardHidden|navigation|screenSize" android:launchMode="singleTop" android:icon="@drawable/icon">
<intent-filter>
<action android:name="com.***.Guide"></action>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
After decoded by apktool, the screenSize disapears as bellow:
<activity android:name="Guide" android:icon="@drawable/icon" android:exported="true" android:enabled="true" android:configChanges="keyboardHidden|navigation|orientation" android:launchMode="singleTop">
<intent-filter>
<action android:name="com.***.Guide" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Error decode com.htc.resouces.apk from HTC One X Sense ROM 4.0.4 (OrDroid 1.1.5)
cmdline:
Merge them into apktool v1.4.7
There is a few mistakes in the file I will be forking the repository and will have a working fix for it mainly the bug is in the structure in line 23 when it its looking in the java_home it should be java.exe not bin/java.exe
Read the new version number of the loaded AAPT, and force the user to have the newest version prior to using.
W: Debug mode not available.
I: Copying raw classes.dex file...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode XML
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:104)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:112)
at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:126)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:152)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:113)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:99)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)
Caused by: java.io.IOException: String data size is not multiple of 4 (3930).
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:65)
at brut.androlib.res.decoder.AXmlResourceParser.doNext(AXmlResourceParser.java:800)
at brut.androlib.res.decoder.AXmlResourceParser.next(AXmlResourceParser.java:96)
at brut.androlib.res.decoder.AXmlResourceParser.nextToken(AXmlResourceParser.java:105)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.nextToken(XmlPullParserDelegate.java:105)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:97)
... 7 more
If the android:textUnderlineThickness property is filed with a font name or string, it results into an error
e.g: sans-serif-light
and the error goes this
error: Error: String types not allowed (at 'android:textUnderlineThickness' with value 'sans-serif-light')
This property is probably introduced with JellyBean and is present in JellyBean PlayStore in styles.xml
<anim name="htc_ime_decelerate_interpolator">@anim/zzz_htc_ime_decelerate_interpolator</anim> <item type="anim" name="htc_ime_decelerate_interpolator">@anim/zzz_htc_ime_decelerate_interpolator</item>
It seems to be wrapping the type into the type of XML. It should store that into the type attribute and keep the item node.
If the android:textUnderlineThickness property is filled with a font name or string, it results into an error
e.g: sans-serif-light
and the error goes this
error: Error: String types not allowed (at 'android:textUnderlineThickness' with value 'sans-serif-light')
This property is probably introduced with JellyBean and is present in JellyBean PlayStore in styles.xml
When decompiling some apk files, arrays.xml cannot be correctly decompilied. Even mannualy correcting these before recompiling, decompiling the recompilied apk still causes this problem.
Please fix it. Thanks.
I should stop updating to dev releases. Makes this too much trouble.
Currently on the 1.3.4-dev branch I'm on, some APKs cannot be decompiled. Yet the newest 1.3.4-dev works fine. Have to update it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.