zdzhjx / android-apktool

Automatically exported from code.google.com/p/android-apktool
Other
0 stars 0 forks source link

apktool failed to decompile and then build an apk without having edited the files in this apk #739

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. apktool d -s textra.apk
2. apktool b textra

What is the expected output? What do you see instead?
The application should decompile and then recompile, as I haven't touched any 
resources or other files.

Instead I get this output with some errors:

C:\Users\Robin\Documents\Programma's\apktool>apktool d -s textra.apk
I: Using Apktool 2.0.0-RC3 on textra.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Robin\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Copying raw classes.dex file...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

C:\Users\Robin\Documents\Programma's\apktool>apktool b textra
I: Using Apktool 2.0.0-RC3 on textra
I: Copying textra classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
warning: string 'appearance_bubble_color_blue' has no default translation.
warning: string 'appearance_bubble_color_green' has no default translation.
warning: string 'appearance_bubble_color_grey' has no default translation.
warning: string 'appearance_bubble_color_orange' has no default translation.
warning: string 'appearance_bubble_color_pink' has no default translation.
warning: string 'appearance_bubble_color_purple' has no default translation.
warning: string 'appearance_bubble_color_red' has no default translation.
warning: string 'appearance_bubble_color_white' has no default translation.
warning: string 'appearance_bubble_color_yellow' has no default translation.
warning: string 'appearance_prompt_bubble_incoming_color' has no default transla
tion.
warning: string 'appearance_prompt_bubble_incoming_color_conflict' has no defaul
t translation.
warning: string 'appearance_prompt_bubble_incoming_color_explanation' has no def
ault translation.
warning: string 'appearance_prompt_bubble_outgoing_color' has no default transla
tion.
warning: string 'appearance_prompt_bubble_outgoing_color_conflict' has no defaul
t translation.
warning: string 'appearance_prompt_bubble_outgoing_color_explanation' has no def
ault translation.
warning: string 'appearance_title' has no default translation.
warning: string 'choose_recipient_to' has no default translation.
warning: string 'class0_cant_reply' has no default translation.
warning: string 'class0_closeButton' has no default translation.
warning: string 'contactbadge_add_as_new' has no default translation.
warning: string 'contactbadge_add_to_existing' has no default translation.
warning: string 'convo_deleteconfirm_cancel' has no default translation.
warning: string 'convo_deleteconfirm_delete' has no default translation.
warning: string 'convo_deleteconfirm_warn_locked_one' has no default translation
.
warning: string 'convo_deleteconfirm_warn_locked_other' has no default translati
on.
warning: string 'convolist_cab_appearance' has no default translation.
warning: string 'convolist_cab_new_message' has no default translation.
warning: string 'convolist_deleteconfirm_cancel' has no default translation.
warning: string 'convolist_deleteconfirm_delete' has no default translation.
warning: string 'convolist_deleteconfirm_delete_all' has no default translation.

warning: string 'convolist_deleteconfirm_delete_unlocked' has no default transla
tion.
warning: string 'convolist_make_default_app_blurb' has no default translation.
warning: string 'convolist_nodata2' has no default translation.
warning: string 'convolist_yesterday' has no default translation.
warning: string 'defaultappearance_title' has no default translation.
warning: string 'newmessage_menu_cancel' has no default translation.
warning: string 'notification_repeats_description' has no default translation.
warning: string 'notification_style_drawer_privacy' has no default translation.
warning: string 'notificationstyle_prompt_autoshowpopup_value_no' has no default
 translation.
warning: string 'notificationstyle_prompt_autoshowpopup_value_yes' has no defaul
t translation.
warning: string 'notificationstyle_prompt_autoshowpopup_value_yes_explain' has n
o default translation.
warning: string 'notificationstyle_prompt_autoshowpopup_value_yes_with_kb' has n
o default translation.
warning: string 'notificationstyle_prompt_notification_icon_explanation' has no
default translation.
warning: string 'notificationstyle_prompt_showMessageTextInDrawer' has no defaul
t translation.
warning: string 'notificationstyle_prompt_showMessageTextInDrawer_conflict' has
no default translation.
warning: string 'pickattachment_audio_choose_title' has no default translation.
warning: string 'plusPanel_activity_not_found_audio_capture' has no default tran
slation.
warning: string 'plusPanel_audioButtonGroup_label' has no default translation.
warning: string 'plusPanel_contactButtonGroup_label' has no default translation.

warning: string 'plusPanel_photoButtonGroup_label' has no default translation.
warning: string 'plusPanel_videoButtonGroup_label' has no default translation.
warning: string 'pluspanel_recently_used' has no default translation.
warning: string 'quickreply_reply' has no default translation.
warning: string 'receipts_category_mms' has no default translation.
warning: string 'receipts_category_sms' has no default translation.
warning: string 'receipts_prompt_mms_explanation' has no default translation.
warning: string 'receipts_prompt_sms_explanation' has no default translation.
warning: string 'send' has no default translation.
warning: string 'settings_dark_theme_summary' has no default translation.
warning: string 'settings_default_appearance_summary' has no default translation
.
warning: string 'settings_default_appearance_title' has no default translation.
warning: string 'settings_default_notification_style_summary' has no default tra
nslation.
warning: string 'settings_email_support_summary' has no default translation.
warning: string 'settings_email_support_title' has no default translation.
warning: string 'settings_menu_done' has no default translation.
warning: string 'settings_play_sent_sound_summary' has no default translation.
warning: string 'settings_your_phone_number_summary' has no default translation.

warning: string 'uv_number_of_subscribers_format' has no default translation.
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.andr
oid.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in http://schemas.andr
oid.com/apk/res/android); using existing value in manifest.
Failed to generate resource table for split ''
C:\Users\Robin\Documents\Programma's\apktool\textra\res\values-v21\styles.xml:6:
 error: Error: Color types not allowed (at 'android:borderRight' with value '#ff
0288d1').

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Robin\
AppData\Local\Temp\brut_util_Jar_983008459947576316.tmp, p, --forced-package-id,
 127, --min-sdk-version, 15, --target-sdk-version, 20, --version-code, 22290, --
version-name, 2.22, -F, C:\Users\Robin\AppData\Local\Temp\APKTOOL798227014850538
3625.tmp, -0, arsc, -I, C:\Users\Robin\apktool\framework\1.apk, -S, C:\Users\Rob
in\Documents\Programma's\apktool\textra\res, -M, C:\Users\Robin\Documents\Progra
mma's\apktool\textra\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
        at brut.androlib.Androlib.buildResources(Androlib.java:374)
        at brut.androlib.Androlib.build(Androlib.java:277)
        at brut.androlib.Androlib.build(Androlib.java:250)
        at brut.apktool.Main.cmdBuild(Main.java:225)
        at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
 exec command: [C:\Users\Robin\AppData\Local\Temp\brut_util_Jar_9830084599475763
16.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version
, 20, --version-code, 22290, --version-name, 2.22, -F, C:\Users\Robin\AppData\Lo
cal\Temp\APKTOOL7982270148505383625.tmp, -0, arsc, -I, C:\Users\Robin\apktool\fr
amework\1.apk, -S, C:\Users\Robin\Documents\Programma's\apktool\textra\res, -M,
C:\Users\Robin\Documents\Programma's\apktool\textra\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:488)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Robin\Ap
pData\Local\Temp\brut_util_Jar_983008459947576316.tmp, p, --forced-package-id, 1
27, --min-sdk-version, 15, --target-sdk-version, 20, --version-code, 22290, --ve
rsion-name, 2.22, -F, C:\Users\Robin\AppData\Local\Temp\APKTOOL79822701485053836
25.tmp, -0, arsc, -I, C:\Users\Robin\apktool\framework\1.apk, -S, C:\Users\Robin
\Documents\Programma's\apktool\textra\res, -M, C:\Users\Robin\Documents\Programm
a's\apktool\textra\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:482)
        ... 6 more

What version of the product are you using? On what operating system?
2.0.0rc3
Windows 7 64-bit

I am trying to edit the strings.yml file for a certain language.

Original issue reported on code.google.com by Robin2Ve...@gmail.com on 28 Dec 2014 at 10:54

GoogleCodeExporter commented 9 years ago
Here's the APK in question

Original comment by Robin2Ve...@gmail.com on 29 Dec 2014 at 3:02

Attachments:

GoogleCodeExporter commented 9 years ago
ibotpeaches@raganok:~/Downloads/Apktool/Bug739$ apktool d textra.apk 
I: Using Apktool 2.0.0-2bd1e5-SNAPSHOT on textra.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/ibotpeaches/apktool/framework/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...
ibotpeaches@raganok:~/Downloads/Apktool/Bug739$ apktool b textra
I: Using Apktool 2.0.0-2bd1e5-SNAPSHOT on textra
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
[ ... translating warnings ] 
Warning: AndroidManifest.xml already defines versionCode (in 
http://schemas.android.com/apk/res/android); using existing value in manifest.
Warning: AndroidManifest.xml already defines versionName (in 
http://schemas.android.com/apk/res/android); using existing value in manifest.
I: Copying libs...
I: Building apk file...
I: Copying unknown files/dir...
ibotpeaches@raganok:~/Downloads/Apktool/Bug739$ 

Couldn't duplicate :(

Based on your stacktrace here: 

 > C:\Users\Robin\Documents\Programma's\apktool\textra\res\values-v21\styles.xml:6:error: Error: Color types not allowed (at 'android:borderRight' with value '#ff0288d1').

I would try deleting C:\Users\Robin\Apktool\framework\1.apk and trying again.

Original comment by connor.tumbleson on 30 Dec 2014 at 12:12

GoogleCodeExporter commented 9 years ago
I already tried that, it had no effect.

Original comment by Robin2Ve...@gmail.com on 30 Dec 2014 at 6:33