iBotPeaches / Apktool

A tool for reverse engineering Android apk files
https://apktool.org/
Apache License 2.0
20.28k stars 3.59k forks source link

Recompilation fails even when nothing changed #1992

Closed fanmingyi closed 5 years ago

fanmingyi commented 5 years ago

Information

  1. Apktool Version (apktool -version) - 2.3.4
  2. Operating System (Mac, Linux, Windows) - mac
  3. APK From? (Playstore, ROM, Other) - Other

Stacktrace/Logcat

apktool d douyin.apk 
I: Using Apktool 2.3.4 on douyin.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /Users/fmy/Library/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Baksmaling classes5.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
fmydeMacBook-Pro:apk fmy$ apktool b douyin
I: Using Apktool 2.3.4
I: Checking whether sources has changed...
I: Smaling smali folder into classes.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_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /Users/fmy/androidreverse/apk/douyin/res/layout/a.xml:2: error: Error: No resource found that matches the given name (at 'style' with value '@style/RtlOverlay.Widget.AppCompat.ActionBar.TitleItem').
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout/a0.xml:2: error: No resource identifier found for attribute 'paddingBottomNoButtons' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout/a0.xml:2: error: No resource identifier found for attribute 'paddingTopNoTitle' in package 'com.ss.android.ugc.aweme'
W: 

W: /Users/fmy/androidreverse/apk/douyin/res/layout/t_.xml:10: error: Error: No resource found that matches the given name (at 'style' with value '@style/font_size_30').
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout/t_.xml:11: error: Error: No resource found that matches the given name (at 'style' with value '@style/font_size_24').
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout/t_.xml:13: error: Error: No resource found that matches the given name (at 'style' with value '@style/font_size_26').
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:4: error: No resource identifier found for attribute 'layout_constraintBottom_toBottomOf' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:4: error: No resource identifier found for attribute 'layout_constraintTop_toTopOf' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:5: error: No resource identifier found for attribute 'layout_constraintLeft_toLeftOf' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:5: error: No resource identifier found for attribute 'layout_constraintStart_toStartOf' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:5: error: No resource identifier found for attribute 'placeholderImage' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:5: error: No resource identifier found for attribute 'placeholderImageScaleType' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/layout-v17/t_.xml:5: error: No resource identifier found for attribute 'roundAsCircle' in package 'com.ss.android.ugc.aweme'

W: /Users/fmy/androidreverse/apk/douyin/res/color/aay.xml:4: error: No resource identifier found for attribute 'alpha' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/color/aaz.xml:4: error: No resource identifier found for attribute 'alpha' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/color/aaz.xml:5: error: No resource identifier found for attribute 'alpha' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/color/aaz.xml:6: error: No resource identifier found for attribute 'alpha' in package 'com.ss.android.ugc.aweme'
W: 
W: /Users/fmy/androidreverse/apk/douyin/res/color/abi.xml:4: error: No resource identifier found for attribute 'alpha' in package 'com.ss.android.ugc.aweme'
W: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/wh/vxpzkql9475ccmjtv7wpry5c0000gn/T/brut_util_Jar_8388692261462213283.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 23, --version-code, 420, --version-name, 4.2.0, --no-version-vectors, -F, /var/folders/wh/vxpzkql9475ccmjtv7wpry5c0000gn/T/APKTOOL3490284364746680091.tmp, -0, META-INF/android.arch.core_runtime.version, -0, META-INF/android.arch.lifecycle_extensions.version, -0, META-INF/android.arch.lifecycle_livedata-core.version, -0, META-INF/android.arch.lifecycle_livedata.version, -0, META-INF/android.arch.lifecycle_reactivestreams.version, -0, META-INF/android.arch.lifecycle_runtime.version, -0, META-INF/android.arch.lifecycle_viewmodel.version, -0, META-INF/android.arch.paging_runtime.version, -0, META-INF/android.arch.persistence.room_runtime.version, -0, META-INF/android.arch.persistence.room_rxjava2.version, -0, META-INF/android.arch.persistence_db-framework.version, -0, META-INF/android.arch.persistence_db.version, -0, META-INF/android.support.design_material.version, -0, META-INF/androidx.appcompat_appcompat.version, -0, META-INF/androidx.asynclayoutinflater_asynclayoutinflater.version, -0, META-INF/androidx.cardview_cardview.version, -0, META-INF/androidx.coordinatorlayout_coordinatorlayout.version, -0, META-INF/androidx.core_core.version, -0, META-INF/androidx.cursoradapter_cursoradapter.version, -0, META-INF/androidx.customview_customview.version, -0, META-INF/androidx.documentfile_documentfile.version, -0, META-INF/androidx.drawerlayout_drawerlayout.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.legacy_legacy-support-v4.version, -0, META-INF/androidx.loader_loader.version, -0, META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version, -0, META-INF/androidx.media_media.version, -0, META-INF/androidx.palette_palette.version, -0, META-INF/androidx.print_print.version, -0, META-INF/androidx.recyclerview_recyclerview.version, -0, META-INF/androidx.slidingpanelayout_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout_swiperefreshlayout.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.viewpager_viewpager.version, -0, META-INF/com.google.android.material_material.version, -0, png, -0, data, -0, assets/common.bundle.meta, -0, assets/fm-core-3.0.9, -0, mp3, -0, webp, -0, mp4, -0, zip, -0, arsc, -I, /Users/fmy/Library/apktool/framework/1.apk, -S, /Users/fmy/androidreverse/apk/douyin/res, -M, /Users/fmy/androidreverse/apk/douyin/AndroidManifest.xml]

Steps to Reproduce

  1. apktool d douyin.apk

  2. apktool b douyin.apk

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files (.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it. apkLink

Questions to ask before submission

Have you tried apktool d, apktool b without changing anything? YES Are you using the latest apktool version? YES

I can recompile using the following command: apktool d -r douyin.apk apktool b -r douyin

iBotPeaches commented 5 years ago

Thanks for report, but this is a duplicate of an existing issue - #1734