I have created a script which first checks the android version and then installs the corresponding files to the system (as files are not same for every android version)
Here is the script
#!/system/bin/sh
VER=$(echo $(getprop ro.build.version.release))
LIB=/system/lib/libncurses.so
XBINS=/system/xbin/sqlite3
XBINO=/system/xbin/openvpm
XBINZ=/system/xbin/zipalign
LIBD=/system/lib
XBIND=/system/xbin
mount -o rw,remount /system
case $VER in
"2.3"*)
cp tmp/binbox/2.3.*/lib/libncurses.so "$LIBD"
cp tmp/binbox/2.3.*/xbin/sqlite3 "$XBIND"
cp tmp/binbox/2.3.*/xbin/openvpm "$XBIND"
cp tmp/binbox/2.3.*/xbin/zipalign "$XBIND"
chmod 644 "$LIB"
chown 0.0 "$LIB"
chmod 6755 "$XBINS"
chown 0.0 "$XBINS"
chmod 6755 "$XBINO"
chown 0.0 "$XBINO"
chmod 6755 "$XBINZ"
chown 0.0 "$XBINZ"
;;
"4.0"*)
cp /tmp/binbox/4.0.*/lib/libncurses.so "$LIBD"
cp /tmp/binbox/4.0.*/xbin/sqlite3 "$XBIND"
cp tmp/binbox/4.0.*/xbin/openvpm "$XBIND"
cp tmp/binbox/4.0.*/xbin/zipalign "$XBIND"
chmod 644 "$LIB"
chown 0.0 "$LIB"
chmod 6755 "$XBINS"
chown 0.0 "$XBINS"
chmod 6755 "$XBINO"
chown 0.0 "$XBINO"
chmod 6755 "$XBINZ"
chown 0.0 "$XBINZ"
;;
"4.1"*)
cp /tmp/binbox/4.1.*/lib/libncurses.so "$LIBD"
cp /tmp/binbox/4.1.*/xbin/sqlite3 "$XBIND"
chmod 644 "$LIB"
chown 0.0 "$LIB"
chmod 6755 "$XBIN"
chown 0.0 "$XBIN"
;;
"4.2"*)
cp /tmp/binbox/4.2.*/lib/libncurses.so "$LIBD"
cp /tmp/binbox/4.2.*/xbin/sqlite3 "$XBIND"
chmod 644 "$LIB"
chown 0.0 "$LIB"
chmod 6755 "$XBIN"
chown 0.0 "$XBIN"
;;
"4.3"*)
cp /tmp/binbox/4.3.*/lib/libncurses.so "$LIBD"
cp /tmp/binbox/4.3.*/xbin/sqlite3 "$XBIND"
chmod 644 "$LIB"
chown 0.0 "$LIB"
chmod 6755 "$XBIN"
chown 0.0 "$XBIN"
;;
"4.4"*)
cp /tmp/binbox/4.4.*/lib/libncurses.so "$LIBD
cp /tmp/binbox/4.4.*/xbin/sqlite3 "$XBIND"
chmod 644 "$LIB"
chown 0.0 "$LIB"
chmod 6755 "$XBIN"
chown 0.0 "$XBIN"
;;
esac
Running the script I get a getprop:not found
This script is ran in cwm recovery
and files are placed in tmp
as the script is ran in recovery i dont get the exact result of the script
but log is as shown below
Installing: /external_sd/a.zip
Finding update package...
I:Update location: /external_sd/a.zip
Opening update package...
Installing update...
minzip: Extracted file "/tmp/2.3/Arjun2.3.txt"
minzip: Extracted file "/tmp/4.0/Arjun4.0.txt"
minzip: Extracted file "/tmp/4.1/Arjun4.1.txt"
minzip: Extracted file "/tmp/4.2/Arjun4.2.txt"
minzip: Extracted file "/tmp/4.3/Arjun4.3.txt"
minzip: Extracted file "/tmp/4.4/Arjun4.4.txt"
minzip: Extracted file "/tmp/binbox.sh"
about to run program [/sbin/busybox] with 5 args
about to run program [/sbin/busybox] with 5 args
about to run program [/sbin/mount] with 2 args
Mounting /system
about to run program [/tmp/binbox.sh] with 2 args
about to run program [/sbin/busybox] with 3 args
Unmounting partitions...
script result was [Installation is complete...]
Installation is complete...
Install from sdcard complete.
here binbox.sh is the script hope that someone can find a solution