Build script help


Apr 2, 2011
Hey guys..
I'm trying to make a small linux script for decompile/recompile of apks.

I got 2 small issues. To start with, i got my script project in /root/test/ and the decompiled apks in /root/test/apk_in/
I want to place the recompiled apks in /root/test/apk_out, but when i run the script, places them like this:

I've googled my way to the commands i use, but i'm doing some stupid error somewhere i'm just not seeing..

And also. When the recompiling is done, i need to extract/inject the original META-INF (or re-signing the apks?), but i have no idea to do this, so any help is appreciated.

Here's the commands in my script for recompiling:
for b in `find apk_in/* -maxdepth 0 -type d`; do
echo "Recompiling $b.apk"
apktool -q b -f $b ./apk_out/$b.apk

Hope to get some tips on this and thanks for your patience with a non-programmer :)
Thats confusing to me.

cd into the directory.

for file in *.apk; do;
apktool -q b -f "$(basename $file)" "./apk_out/$(basename $file).apk"