#! /system/bin/sh ## jancar copy customer source file to in-sdcard src_path= dest_path= while true; do src_path=$(getprop jancar.copyfile.src_path) dest_path=$(getprop jancar.copyfile.dest_path) if [ -n "$src_path" ]; then echo "exit while true src_path:$src_path" if [ -n "$dest_path" ]; then break fi fi done echo "src_path:$src_path" echo "dest_path:$dest_path" if [ -d $src_path ]; then echo "start copy file" setprop service.jancar.copyfile.status 1 am broadcast -a action.jancar.copyfile.start cp -rvf $src_path/. $dest_path else exit -1 fi if [ 0 == $? ]; then setprop service.jancar.copyfile.status 0 am broadcast -a action.jancar.copyfile.complete else am broadcast -a action.jancar.copyfile.error setprop service.jancar.copyfile.status -1 fi echo "end jaccopyfile.sh return $?"