Apktool
Apktool copied to clipboard
[BUG] brut.androlib.AndrolibException: brut.common.BrutException
Information
-
Apktool Version (
apktool -version
) - 2.6.0 - Operating System (Mac, Linux, Windows) - Windows
- APK From? (Playstore, ROM, Other) - Other: https://trashbox.ru/link/tik-tok-android
Stacktrace/Logcat
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):
[C:\Users\exomi\AppData\Local\Temp\brut_util_Jar_3117225419987412447044259107535364791.tmp, compile, --dir,
C:\Users\exomi\Downloads\tiktok.21.3.41\res, --legacy, -o, C:\Users\exomi\Downloads\tiktok.21.3.41\build\resources.zip]
Steps to Reproduce
-
apktool d --use-aapt2 com.zhiliaoapp.musically_21.3.41_2022103410.apk -o tiktok.21.3.41
-
apktool b --use-aapt2 tiktok.21.3.41
APK
If this APK can be freely shared, please upload/attach a link to it: https://yadi.sk/d/e-MDwrMEIxiY3w
Or download TikTok 21.3.41 from https://trashbox.ru/link/tik-tok-android (file com.zhiliaoapp.musically_21.3.41_2022103410.apk).
Questions to ask before submission
- Have you tried
apktool d
,apktool b
without changing anything? Yes - If you are trying to install a modified apk, did you resign it? -
- Are you using the latest apktool version? Yes
Full log
C:\Users\exomi\Downloads>apktool d --use-aapt2 com.zhiliaoapp.musically_21.3.41_2022103410.apk -o tiktok.21.3.41
I: Using Apktool 2.6.0 on com.zhiliaoapp.musically_21.3.41_2022103410.apk
I: Loading resource table...
I: Decoding Shared Library (com.zhiliaoapp.musically.df_rn_kit), pkgId: 118
I: Decoding Shared Library (com.zhiliaoapp.musically.df_rn_kit), pkgId: 118
I: Decoding Shared Library (com.zhiliaoapp.musically.df_fusing), pkgId: 126
I: Decoding Shared Library (com.zhiliaoapp.musically.df_rn_kit), pkgId: 118
I: Decoding Shared Library (com.zhiliaoapp.musically.df_fusing), pkgId: 126
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\exomi\AppData\Local\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=resource, value=0x76090001
I: Regular manifest package...
I: Decoding file-resources...
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "m/at.9.png". Renaming it to *.png.
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes10.dex...
I: Baksmaling classes11.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Baksmaling classes6.dex...
I: Baksmaling classes7.dex...
I: Baksmaling classes8.dex...
I: Baksmaling classes9.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Copying META-INF/services directory
C:\Users\exomi\Downloads>apktool b --use-aapt2 tiktok.21.3.41
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes10 folder into classes10.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes11 folder into classes11.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes4 folder into classes4.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes5 folder into classes5.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes6 folder into classes6.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes7 folder into classes7.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes8 folder into classes8.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes9 folder into classes9.dex...
I: Checking whether resources has changed...
I: Building resources...
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land-v22\b5u.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land-v22\b5u.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land-v22\bb6.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land-v22\bb6.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land-v22\bb7.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land-v22\bb7.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b3h.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b3h.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b3v.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b3v.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b3w.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b3w.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b52.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b52.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b5c.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b5c.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b5g.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b5g.xml: error: file failed to compile.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b5u.xml:2: error: duplicate attribute.
W: C:\Users\exomi\Downloads\tiktok.21.3.41\res\layout-land\b5u.xml: error: file failed to compile.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\exomi\AppData\Local\Temp\brut_util_Jar_51951479887217683778953365187518858778.tmp, compile, --dir, C:\Users\exomi\Downloads\tiktok.21.3.41\res, --legacy, -o, C:\Users\exomi\Downloads\tiktok.21.3.41\build\resources.zip]
C:\Users\exomi\Downloads>
Same for com.picsart.studio v. 18.1.2 (a the base of a split APK): A fat APK, downloaded from https://picsart-estudio.en.uptodown.com/android/download, can be repackaged without complaints.
apktool b base
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
W: /Users/alex/apk/com.picsart.studio.18.1.2/base/res/values/layouts.xml:3: error: Found tag layout where item is expected
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1):
[/var/folders/1w/7240wdl9515d0ysgkb0db5k80000gn/T/brut_util_Jar_47804093025387816756955523364158636917.tmp,
p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 29, --version-code, 993818102, --version-name, 18.1.2,
--no-version-vectors,
-F, /var/folders/1w/7240wdl9515d0ysgkb0db5k80000gn/T/APKTOOL17354206619333328341.tmp,
-e, /var/folders/1w/7240wdl9515d0ysgkb0db5k80000gn/T/APKTOOL592473383664135113.tmp, -0, arsc,
-I, /Users/alex/Library/apktool/framework/1.apk, -S, /Users/alex/apk/com.picsart.studio.18.1.2/base/res,
-M, /Users/alex/apk/com.picsart.studio.18.1.2/base/AndroidManifest.xml]
Delete layouts.xml
Delete layouts.xml
Also, remove layout/APKTOOL_DUMMY_23e
or whatever from res/values/public.xml
Thanks a lot, @MrIkso
I followed the "remove" action for all the files/values that offended...and each pass it identified additional issues...until only res/values/strings.xml remained
dan.devine@DDevine apktool % apktool b hulu --use-aapt2 --output hulu_debug.apk --debug
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
I: Using aapt2 - setting 'debuggable' attribute to 'true' in AndroidManifest.xml
W: /Users/dan.devine/git/apks/apktool/hulu/res/values/strings.xml:0: error: xml parser error: not well-formed (invalid token).
W: /Users/dan.devine/git/apks/apktool/hulu/res/values/strings.xml: error: file failed to compile.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/kj/fptc6j4n201139r96jh3lm9m0000gq/T/brut_util_Jar_71256022482825948921234605350372005153.tmp, compile, --dir, /Users/dan.devine/git/apks/apktool/hulu/res, --legacy, -o, /Users/dan.devine/git/apks/apktool/hulu/build/resources.zip]
dan.devine@DDevine apktool %
Here's the thing though, the strings.xml file looks just fine!
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="APKTOOL_DUMMYVAL_0x7f130000">Navigate home</string>
<string name="APKTOOL_DUMMYVAL_0x7f130001">Navigate up</string>
<string name="APKTOOL_DUMMYVAL_0x7f130002">More options</string>
<string name="APKTOOL_DUMMYVAL_0x7f130003">Done</string>
<string name="APKTOOL_DUMMYVAL_0x7f130004">See all</string>
<string name="APKTOOL_DUMMYVAL_0x7f130005">Choose an app</string>
<string name="APKTOOL_DUMMYVAL_0x7f130006">OFF</string>
<string name="APKTOOL_DUMMYVAL_0x7f130007">ON</string>
<string name="APKTOOL_DUMMYVAL_0x7f130008">Alt+</string>
<string name="APKTOOL_DUMMYVAL_0x7f130009">Ctrl+</string>
<string name="APKTOOL_DUMMYVAL_0x7f13000a">delete</string>
<string name="APKTOOL_DUMMYVAL_0x7f13000b">enter</string>
<string name="APKTOOL_DUMMYVAL_0x7f13000c">Function+</string>
<string name="APKTOOL_DUMMYVAL_0x7f13000d">Meta+</string>
<string name="APKTOOL_DUMMYVAL_0x7f13000e">Shift+</string>
</resources>
Any more insight as to why this is happening? I removed lots of various layouts/values and other files... it just kept coming!
Using --use-aapt2 -o ./base.apk
solved the issue for me or creating the folder dist
also helped.
Has anyone found a solution for OP's problem? I'm dealing with the same issue using the latest version of TikTok from APKMirror.
same issue here, final worked by:
- delete (previous old version apktool generated): framework/1.apk
- command:
*
rm /Users/crifan/Library/apktool/framework/1.apk
- command:
*
Anyone find a fix for this issue am stuck... I: Using Apktool 2.3.4 I: Checking whether sources has changed... I: Checking whether sources has changed... I: Checking whether resources has changed... I: Building resources... W: /home/john/Downloads/photo1/res/values/public.xml:83: error: Public symbol array/lang_ar declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:84: error: Public symbol array/lang_az declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:85: error: Public symbol array/lang_bn declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:86: error: Public symbol array/lang_common declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:87: error: Public symbol array/lang_cs declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:88: error: Public symbol array/lang_de declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:89: error: Public symbol array/lang_el declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:90: error: Public symbol array/lang_en declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:91: error: Public symbol array/lang_es declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:92: error: Public symbol array/lang_es_us declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:93: error: Public symbol array/lang_fa declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:94: error: Public symbol array/lang_fr declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:95: error: Public symbol array/lang_he declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:96: error: Public symbol array/lang_hi declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:97: error: Public symbol array/lang_hu declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:98: error: Public symbol array/lang_id declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:99: error: Public symbol array/lang_it declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:100: error: Public symbol array/lang_ja declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:101: error: Public symbol array/lang_ko declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:102: error: Public symbol array/lang_ms declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:103: error: Public symbol array/lang_nl declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:104: error: Public symbol array/lang_pl declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:105: error: Public symbol array/lang_pt_br declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:106: error: Public symbol array/lang_ro declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:107: error: Public symbol array/lang_ru declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:108: error: Public symbol array/lang_sv declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:109: error: Public symbol array/lang_tr declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:110: error: Public symbol array/lang_vi declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:111: error: Public symbol array/lang_zh_cn declared here is not defined. W: /home/john/Downloads/photo1/res/values/public.xml:112: error: Public symbol array/lang_zh_tw declared here is not defined. W: /home/john/Downloads/photo1/res/values-v26/styles.xml:14: error: Error: No resource found that matches the given name: attr 'android:forceDarkAllowed'. W: W: /home/john/Downloads/photo1/res/values-v26/styles.xml:43: error: Error: No resource found that matches the given name: attr 'android:forceDarkAllowed'. W: W: /home/john/Downloads/photo1/res/values-v26/styles.xml:73: error: Error: No resource found that matches the given name: attr 'android:forceDarkAllowed'. W: W: /home/john/Downloads/photo1/res/values-v26/styles.xml:102: error: Error: No resource found that matches the given name: attr 'android:forceDarkAllowed'. W: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_1163744707137308659.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 33, --version-code, 2022101400, --version-name, 8.1.2, --no-version-vectors, -F, /tmp/APKTOOL5497013153995429973.tmp, -0, arsc, -0, META-INF/androidx.activity_activity.version, -0, META-INF/androidx.annotation_annotation-experimental.version, -0, META-INF/androidx.appcompat_appcompat-resources.version, -0, META-INF/androidx.appcompat_appcompat.version, -0, META-INF/androidx.arch.core_core-runtime.version, -0, META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version, -0, META-INF/androidx.browser_browser.version, -0, META-INF/androidx.cardview_cardview.version, -0, META-INF/androidx.coordinatorlayout_coordinatorlayout.version, -0, META-INF/androidx.core_core-ktx.version, -0, META-INF/androidx.core_core.version, -0, META-INF/androidx.cursoradapter_cursoradapter.version, -0, META-INF/androidx.customview_customview-poolingcontainer.version, -0, META-INF/androidx.customview_customview.version, -0, META-INF/androidx.documentfile_documentfile.version, -0, META-INF/androidx.draganddrop_draganddrop.version, -0, META-INF/androidx.drawerlayout_drawerlayout.version, -0, META-INF/androidx.dynamicanimation_dynamicanimation.version, -0, META-INF/androidx.emoji2_emoji2-views-helper.version, -0, META-INF/androidx.emoji2_emoji2.version, -0, META-INF/androidx.fragment_fragment.version, -0, META-INF/androidx.gridlayout_gridlayout.version, -0, META-INF/androidx.interpolator_interpolator.version, -0, META-INF/androidx.legacy_legacy-support-core-ui.version, -0, META-INF/androidx.legacy_legacy-support-core-utils.version, -0, META-INF/androidx.lifecycle_lifecycle-livedata-core.version, -0, META-INF/androidx.lifecycle_lifecycle-livedata.version, -0, META-INF/androidx.lifecycle_lifecycle-process.version, -0, META-INF/androidx.lifecycle_lifecycle-runtime.version, -0, META-INF/androidx.lifecycle_lifecycle-service.version, -0, META-INF/androidx.lifecycle_lifecycle-viewmodel-savedstate.version, -0, META-INF/androidx.lifecycle_lifecycle-viewmodel.version, -0, META-INF/androidx.loader_loader.version, -0, META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version, -0, META-INF/androidx.print_print.version, -0, META-INF/androidx.recyclerview_recyclerview.version, -0, META-INF/androidx.room_room-runtime.version, -0, META-INF/androidx.savedstate_savedstate.version, -0, META-INF/androidx.slidingpanelayout_slidingpanelayout.version, -0, META-INF/androidx.sqlite_sqlite-framework.version, -0, META-INF/androidx.sqlite_sqlite.version, -0, META-INF/androidx.startup_startup-runtime.version, -0, META-INF/androidx.swiperefreshlayout_swiperefreshlayout.version, -0, META-INF/androidx.tracing_tracing.version, -0, META-INF/androidx.transition_transition.version, -0, META-INF/androidx.vectordrawable_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable_vectordrawable.version, -0, META-INF/androidx.versionedparcelable_versionedparcelable.version, -0, META-INF/androidx.viewpager2_viewpager2.version, -0, META-INF/androidx.viewpager_viewpager.version, -0, META-INF/androidx.webkit_webkit.version, -0, META-INF/androidx.work_work-runtime.version, -0, META-INF/com.google.android.material_material.version, -0, version, -0, assets/notice.en.txt, -0, profm, -0, res/drawable-hdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, png, -0, res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-hdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-hdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-hdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-hdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-hdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-hdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-hdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-hdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-hdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-hdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-hdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-hdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-hdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-hdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-hdpi-v4/notification_bg_normal.9.png, -0, res/drawable-hdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-ldrtl-hdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-mdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-ldrtl-xxxhdpi-v17/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-mdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-mdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-mdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-mdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-mdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-mdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-mdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-mdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-mdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-mdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-mdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-mdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-mdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-mdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-mdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-mdpi-v4/notification_bg_normal.9.png, -0, res/drawable-mdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-nodpi-v4/filter_frame_wood.9.png, -0, res/drawable-xhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xhdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-xhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-xhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_low_pressed.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal.9.png, -0, res/drawable-xhdpi-v4/notification_bg_normal_pressed.9.png, -0, res/drawable-xxhdpi-v4/abc_ab_share_pack_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxhdpi-v4/abc_cab_background_top_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_divider_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_list_focused_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_longpressed_holo.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_pressed_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_dark.9.png, -0, res/drawable-xxhdpi-v4/abc_list_selector_disabled_holo_light.9.png, -0, res/drawable-xxhdpi-v4/abc_menu_hardkey_panel_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_popup_background_mtrl_mult.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_primary_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_scrubber_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_activated_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/abc_textfield_search_default_mtrl_alpha.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_icon_dark_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_icon_light_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_text_dark_normal_background.9.png, -0, res/drawable-xxhdpi-v4/common_google_signin_btn_text_light_normal_background.9.png, -0, res/drawable-xxxhdpi-v4/abc_btn_switch_to_on_mtrl_00001.9.png, -0, res/drawable-xxxhdpi-v4/abc_btn_switch_to_on_mtrl_00012.9.png, -0, res/drawable-xxxhdpi-v4/abc_spinner_mtrl_am_alpha.9.png, -0, res/drawable-xxxhdpi-v4/abc_switch_track_mtrl_alpha.9.png, -0, res/drawable-xxxhdpi-v4/abc_tab_indicator_mtrl_alpha.9.png, -0, arsc, -I, /home/john/.local/share/apktool/framework/1.apk, -S, /home/john/Downloads/photo1/res, -M, /home/john/Downloads/photo1/AndroidManifest.xml]
There is a lot going on with the Tiktok application so I'm only responding for that original issue. Here is what I notice that either isn't perfect or suffering with some issues:
- 35+ dex files ranging from anti-debug, anti-vm and full of illegal class names
- ConfigFlags over 56 bytes, but the spec as of my current research isn't over 56
- A bunch of nine-patch files that are either intentional corrupt, intentionally missing encoded patch information or just an invalid image meant to trip up decoders
- Some resources not found with non-pkgid1 location
- There is some form of resource obfuscation which I can't place at the moment - it looks to be some custom built
- Split application based on language
- Resource tricks to leverage
@ref
naming killing resource name - tricking up tools like Android Studio
The crash really fails on just understanding some select resource files like:
➜ 2674 cat /home/ibotpeaches/Downloads/Apktool/2674/tiktok/res/anim/a1.xml
<?xml version="1.0" encoding="utf-8"?>
<translate ="@android:anim/decelerate_interpolator" ="@integer/au" ="100.0%p" ="0.0" xmlns="" />%
So I think if anything we should start with making the disassembler a bit more resilient against these type of resource obfuscation tricks - that will then allow us to see what the true error is when we try compilation again.
Did some work over past few weeks. Short version - closing this for other issues and a few things have been resolved that make this buildable (if you remove the buggy split version)
➜ 2674 apktool b tiktok --use-aapt2
I: Using Apktool 2.8.2-22eb80-SNAPSHOT
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs... (/lib)
I: Copying libs... (/META-INF/services)
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk into: tiktok/dist/tiktok.apk
➜ 2674
The remaining items
- config bytes - https://github.com/iBotPeaches/Apktool/issues/3202
- 9patch - https://github.com/iBotPeaches/Apktool/issues/1604
- multiple packages - https://github.com/iBotPeaches/Apktool/issues/2514