Quote:
Originally Posted by TMartin
Looks like a great tool. Can't wait to see the other elements included.
On Linux using apk compression, it isn't removing the apk from the "original_apps" folder. Looks like it performs the rm command but leaves off the file extension so it can't find the file to remove.
EDIT: I get this between each file.
Code:
rm: cannot remove '/home/tmartin/android-utility/working-folder/mod-here-multi/original_apps/HtcProfileWidget': No such file or directory
HtcProfileWidget.apk decompressed
Decompressing HtcRingtoneWidget.apk
/home/tmartin/android-utility/working-folder/mod-here-multi/original_apps/HtcRingtoneWidget: No such file or directory
EDIT #2: Looks like it made ever file 24.2mb & unreadable??
|
Hey TMartin.
I checked the script. The only error I can see is the "open" command, which doesn't regard our situation with the "rm" command.
Here is the code I used:
Code:
decomp_it ()
{
cd $e
for F in *.apk ; do
echo "Decompressing $F"
cd $e
$HOME/bin/7z x -y -o"${F/.apk}" $F &>/dev/null
cd $e/${F/.apk}
zip -"$COMP"r $d/decompressed_apps/$F *
rm -r $d/original_apps/${F/.apk}
echo "$F Decompressed"
done
}
In the above, here are the variables:
Code:
d=$HOME/android-utility/working-folder/mod-here-multi
e=$d/original_apps
COMP=compression level
For some reason "$HOME/bin/7z x -y -o"${F/.apk}" $F &>/dev/null" isn't creating the correct output directory for you. The compression script first decompresses the apk into a directory inside /original_apps with same name (Rosie.apk -> Rosie), then compresses contents in "Rosie" into a Rosie.apk inside /decompressed_apps. Then the "Rosie" folder gets deleted. In your case...the output folder "HtcProfileWidget" was never created. Your error wasn't the "rm" that removes the apk, but the directory that was created during the decompression.
Let me run this script with some other apks and we'll find out the issue.
Here is my output:
Code:
Welcome to Apk Compression Manager
Compression Level set to 5
[0 = no compression | 9 = high compression]
Please set compression level [default=5 ; 0 -> 9]: 0
Compression Level set to 0
Please Place apks in /home/tommytomatoe/android-utility/working-folder/mod-here-multi/original_apps
(nautilus:2168): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
Please press [enter] when ready
Preparing to decompress Apks with Compression Level 0
Decompressing Rosie-v0.9.9a.apk
adding: AndroidManifest.xml (stored 0%)
adding: classes.dex (stored 0%)
adding: META-INF/ (stored 0%)
adding: res/ (stored 0%)
<snipped snipped>
adding: resources.arsc (stored 0%)
Rosie-v0.9.9a.apk Decompressed
Decompressing Rosie-v0.9.9.apk
adding: AndroidManifest.xml (stored 0%)
adding: classes.dex (stored 0%)
adding: META-INF/ (stored 0%)
<snipped snipped>
adding: resources.arsc (stored 0%)
Rosie-v0.9.9.apk Decompressed
Remove Original Apks? [Y/n]: y
Thank you for choosing Android Utility
brought to you by tommytomatoe :)
Please Don't Drink and Drive
Edit 1. Are you placing the apk file inside "original_apps"?
|