From 0772fc8f1d7f21c2c00e4e4ba9518fb3510c844c Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Wed, 27 Aug 2014 21:27:07 +0800 Subject: busybox.sh: change to operate files under /data/local/tmp/ when selinux enabled, shell command will not be able to operate files/dirs under /data/directory. This change is to fix that problem by changing to operate files under /data/local/tmp directory Change-Id: Ied8e9efec7898fdf16285a8c4dbac7c505df05b8 Signed-off-by: Yongqin Liu --- android/scripts/busybox.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/android/scripts/busybox.sh b/android/scripts/busybox.sh index 076102a..4ba2519 100755 --- a/android/scripts/busybox.sh +++ b/android/scripts/busybox.sh @@ -41,15 +41,16 @@ test_func(){ rm -r /data/busybox 1>/dev/null 2>/dev/null -test_func mkdir /data/busybox -test_func touch /data/busybox/test.txt -test_func ls /data/busybox/test.txt +tgt_dir="/data/local/tmp/" +test_func mkdir ${tgt_dir}/busybox +test_func touch ${tgt_dir}/busybox/test.txt +test_func ls ${tgt_dir}/busybox/test.txt test_func ps test_func whoami test_func which busybox test_func basename /data/busybox/test.txt -test_func cp /data/busybox/test.txt /data/busybox/test2.txt -test_func rm /data/busybox/test2.txt +test_func cp ${tgt_dir}/busybox/test.txt ${tgt_dir}/busybox/test2.txt +test_func rm ${tgt_dir}/busybox/test2.txt test_func dmesg test_func grep service /init.rc -- cgit v1.2.3