[BUG] temp file not being deleted when building
See original GitHub issueInformation
- Apktool Version (
apktool -version
) - 2.6.0 - Operating System (Mac, Linux, Windows) - Windows
- APK From? (Playstore, ROM, Other) - probably not relevant
Steps to Reproduce
apktool b -o out extractedFolder
- Monitor the %TEMP% folder; during build, two
APKTOOL{longnumber}.tmp
files are created, and one of the is removed again. The other stays there.
Note that this only occurs when (re-)building, not when decompiling an .apk. After digging a bit in the source, I suspect the following lines in buildManifest()
to be the problem:
Here, the temporary file is being created and then deleted again (I guess to get the temp filename). Then the filename is used in a call to aaptPackage()
, but afterwards it isn’t deleted.
Note that buildResourcesFull()
also creates a temp filename, but deletes the created file again in line 512, and that’s the difference to buildManifest()
:
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Top 3 Ways to Fix Windows 10 Temporary Files Not Deleting
Top 3 Ways to Fix Windows 10 Temporary Files Not Deleting · 1. Use Disk Cleanup · 2. Use Command Prompt · 3....
Read more >Temporary Files Won't Delete on Windows 11: 7 Thorough Fixes
To resolve this issue, you should first try deleting all the files manually and then follow the other methods.
Read more >Temporary Files will not Delete in Windows 10 Creator
The last option is to use the Command Prompt to clean up temporary files immediately. Follow the steps below: Press the Windows key...
Read more >Windows 10 Won't Delete Temporary Files [SOLVED]
If Windows 10 won't delete temporary files, then you are in the right spot. We have discussed the methods here to fix the...
Read more >Windows 10 temporary files will not delete: why does this error ...
Windows 10 temporary files will not delete: why does this error happen? · Delete the files manually: · Remove the files using the...
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
Works! I tested with
apktool-2.6.1-797fc3-SNAPSHOT-small.jar
. Thanks for the effort to fix this bug, and for making apktool in the first place!I’d like to test the PR, but unfortunately the GitHub action doesn’t provide a built apktool.jar, only when merged to
master
…