Apktool
Apktool copied to clipboard
[BUG] Build keeps failing after an exception
Information
- Apktool Version (
apktool -version) - latest one - Operating System (Mac, Linux, Windows) - Windows
- APK From? (Playstore, ROM, Other) - Playstore
i was trying to build an apk with the normal command "java -jar apktool.jar b name" and i got this exception at the end stage: "java.io.IOException: There is not enough space on the disk", which let me know i didn't have enought space on my disk, i solved the problem and now when i retype "java -jar apktool.jar b name" i get the following error: "Unable to rename temporary file" the only thing i did to solve this error is to decompile the apk again. its a small bug but it will be good if it can be solved
Apktool dumps some files into tmp for executing aapt. This has issues on systems where execution from tmp is disallowed. You may use -a to point to a copy of the aapt binaries.
https://ibotpeaches.github.io/Apktool/documentation/#rebuild
Maybe I'll look into adapting -a to just redirecting the location of tmp. So I'll hold this open for that.
Apktool dumps some files into tmp for executing aapt. This has issues on systems where execution from tmp is disallowed. You may use
-ato point to a copy of the aapt binaries.https://ibotpeaches.github.io/Apktool/documentation/#rebuild
Maybe I'll look into adapting
-ato just redirecting the location of tmp. So I'll hold this open for that.
isn't a better fix just deleting the remaining temporary files each re-build? or randomizing the temperary file name each build (honestly just guessing what the file is, i havent read any code related to it)? i think you miss understood the problem i was facing.
this error is caused by residue of *.apktool_temp need to delete the temporary file before outFile.renameTo(tempFile);
https://github.com/iBotPeaches/Apktool/blob/35ce8fc061d31e30978c6f65d194fe3c4191b0be/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java#L663
this error is caused by residue of *.apktool_temp need to delete the temporary file before outFile.renameTo(tempFile);
https://github.com/iBotPeaches/Apktool/blob/35ce8fc061d31e30978c6f65d194fe3c4191b0be/brut.apktool/apktool-lib/src/main/java/brut/androlib/Androlib.java#L663
Could you put up a pull request with what you suggest the solution is? I see the tempFile.delete() so not following.