iBotPeaches / Apktool

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

Error Recompile APK #1283

Closed technocode closed 8 years ago

technocode commented 8 years ago

Information

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

C:\APK\apktool>apktool b WhatsApp WhatsApp.apk I: Using Apktool 2.1.1 I: Checking whether sources has changed... I: Smaling smali folder into classes.dex... I: Checking whether resources has changed... I: Building resources... W: C:\APK\apktool\WhatsApp\res\values-v23\styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/A lertDialog'. W: W: C:\APK\apktool\WhatsApp\res\values-v23\styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/D ialogWindowTitle'. W: Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl ibException: brut.common.BrutException: could not exec (exit code = 1): [C:\User s\PCIMAG~1\AppData\Local\Temp\brut_util_Jar_8748596037514316714.tmp, p, --forced -package-id, 127, --min-sdk-version, 7, --target-sdk-version, 23, --version-code , 451236, --version-name, 2.16.146, -F, C:\Users\PCIMAG~1\AppData\Local\Temp\APK TOOL5176249326879770997.tmp, -0, arsc, -0, arsc, -I, C:\Users\Pc Image\apktool\f ramework\1.apk, -S, C:\APK\apktool\WhatsApp\res, -M, C:\APK\apktool\WhatsApp\And roidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437) at brut.androlib.Androlib.buildResources(Androlib.java:371) at brut.androlib.Androlib.build(Androlib.java:281) at brut.androlib.Androlib.build(Androlib.java:254) at brut.apktool.Main.cmdBuild(Main.java:224) at brut.apktool.Main.main(Main.java:84) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\PCIMAG~1\AppData\Local\Temp\brut_util_Jar_87485 96037514316714.tmp, p, --forced-package-id, 127, --min-sdk-version, 7, --target- sdk-version, 23, --version-code, 451236, --version-name, 2.16.146, -F, C:\Users\ PCIMAG~1\AppData\Local\Temp\APKTOOL5176249326879770997.tmp, -0, arsc, -0, arsc, -I, C:\Users\Pc Image\apktool\framework\1.apk, -S, C:\APK\apktool\WhatsApp\res, -M, C:\APK\apktool\WhatsApp\AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav a:436) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ PCIMAG~1\AppData\Local\Temp\brut_util_Jar_8748596037514316714.tmp, p, --forced-p ackage-id, 127, --min-sdk-version, 7, --target-sdk-version, 23, --version-code, 451236, --version-name, 2.16.146, -F, C:\Users\PCIMAG~1\AppData\Local\Temp\APKTO OL5176249326879770997.tmp, -0, arsc, -0, arsc, -I, C:\Users\Pc Image\apktool\fra mework\1.apk, -S, C:\APK\apktool\WhatsApp\res, -M, C:\APK\apktool\WhatsApp\Andro idManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav a:430) ... 6 more

C:\APK\apktool>

QuaternionsRock commented 8 years ago

--forced-package-id has unpredictable results on Windows. Try running it again without forcing the package id.

technocode commented 8 years ago

Still error... anyone want help me recompile this source?

Download link: https://www.dropbox.com/s/gtzpe3l1i500bws/WhatsApp.zip?dl=0

Thank you

iBotPeaches commented 8 years ago
C:\Users\Connor\Desktop\bin>java -jar apktool.jar d "com.google.android.calendar_5.4-119873917-release-2015121745_minAPI17(nodpi).apk"
I: Using Apktool 2.1.1 on com.google.android.calendar_5.4-119873917-release-2015121745_minAPI17(nodpi).apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Connor\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...

C:\Users\Connor\Desktop\bin>java -jar apktool.jar b "com.google.android.calendar_5.4-119873917-release-2015121745_minAPI17(nodpi)"
I: Using Apktool 2.1.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'done' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...

C:\Users\Connor\Desktop\bin>

Could not duplicate @technocode

@QuaternionsRock Please don't spread misinformation. --forced-package-id is required to ensure non standard APKs get the package ID they want, instead of aapt defaulting them to a different one.