Decompile and recompile issue
See original GitHub issueApktool Latest OS is linux
Believe it or not , if i decompile an apk and try to recompile it again without any changes in code it fails .
I try using a twitter apk file . I will leave here the link : https://www.mediafire.com/file/82w10791m4xrjaf/Twitter.apk/file
You can decompile it , but you are unable to recompile it again even if no changes were made in the code . Update , forgot to write the logs , here they are :
The log :
----------------------------------Decompiling log--------------------------
I: Using Apktool 2.4.1 on twitter.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /root/.local/share/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=resource, value=0x7e010000
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...
I: Copying META-INF/services directory
---------------------------------------------------------------------------
Recompiling log :
I: Using Apktool 2.4.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.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 sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /opt/testapk/twitter/AndroidManifest.xml:831: error: Error: No resource type specified (at 'resource' with value '@2113994752').
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_12790044432587942505.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 30, --version-code, 28820000, --version-name, 8.82.0-release.00, --no-version-vectors, -F, /tmp/APKTOOL4379167829085885196.tmp, -e, /tmp/APKTOOL8538338056184325237.tmp, -0, arsc, -I, /root/.local/share/apktool/framework/1.apk, -S, /opt/testapk/twitter/res, -M, /opt/testapk/twitter/AndroidManifest.xml]|
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:21 (7 by maintainers)
Top Results From Across the Web
Decompile JAR, Modify it, Recompile again? - Stack Overflow
Decompilation is often inaccurate. There is no guarantee that the Java code that it produces is a correct representation of the original class....
Read more >Decompiling/Recompiling to fix a real issue – It's been a while!
The statement begins with a 'label' (starting with 'IL_' and ending with a colon); one golden rule to remember here is not to...
Read more >What are the problems with a "recompiler", a program ... - Reddit
What are the problems with a "recompiler", a program that can decompile a binary and recompile it differently? ... I've asked a few...
Read more >Why is it so hard to recompile decompiled code? - Quora
You loose any “named” reference, yes the name of a function, variable, class variable, class method, or whatever is lost, at compiler level...
Read more >Decompile Your Microsoft Access Database to Improve ...
Open up any module. Compile it via Debug, Compile.., then File, Save. Go back to the database and Compact it. The location of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Best way to check if any changes can be made in an apk is , decompile and try to recompile , if recompile fails without any changes in the code of apk then apktool will never be able to recompile that apk no matter what you do . I used in twitter.apk the 2.4.1 version but 2.5.0 was also giving the same issues , so the log is from 2.4.1 .
@iBotPeaches can we do something to help you on this issue ? Is it planned to be fixed in the next version or any upcoming versions ? Thanks.