after I rooted my mobile and execute su I wrote this command
os.writeBytes("echo \"Do I have root?\" >/system/sd/temporary.txt\n");
it's working but I didn't find temprorary.txt I search in sdcard and external card. the hole path is not exist. is there any other memory to search in? or any way to find this path? or there is a problem in the command?
Try those :
/storage/sdcard1 //!< Motorola Xoom
/storage/extsdcard //!< Samsung SGS3
/storage/sdcard0/external_sdcard // user request
/mnt/extsdcard
/mnt/sdcard/external_sd //!< Samsung galaxy family
/mnt/external_sd
/mnt/media_rw/sdcard1 //!< 4.4.2 on CyanogenMod S3
/removable/microsd //!< Asus transformer prime
/mnt/emmc
/storage/external_SD //!< LG
/storage/ext_sd //!< HTC One Max
/storage/removable/sdcard1 //!< Sony Xperia Z1
/data/sdext
/data/sdext2
/data/sdext3
/data/sdext4