- Download busybox binary or compile busybox to get busybox
- push busybox to android device
# ./adb push busybox /data/busybox - create /etc/passwd /etc/group /etc/shadow
(android shell) # cd /data
(android shell) # touch passwd
(android shell) # touch group
(android shell) # touch shadow
(android recovery mode) # ln -s /data/passwd /system/etc/passwd
(android recovery mode) # ln -s /data/group /system/etc/group
(android recovery mode) # ln -s /data/shadow /system/etc/shadow - create Symbolic linker /bin/sh /bin/vi
(android shell) # mount -o remount,rw rootfs /
(android shell) # mkdir /bin
(android shell) # ln -s /system/bin/sh
(android shell) # ln -s /system/xbin/vi - create folder /var/spool/cron/crontabs
(android shell) # mkdir /var
(android shell) # mkdir /var/spool
(android shell) # mkdir /var/spool/cron
(android shell) # mkdir /var/spool/cron/crontabs - create file root (crontab)
you can use vi or ./busybox crontab -e to create file
(android shell) # vi /var/spool/cron/crontabs/root
(android shell) # ./busybox crontab -e
file format
M H d m w CMD
* * * * * command - run crond
(android shell) # ./busybox crond -l 0 -L /data/cron.log
Use busybox crond, crontab on Android
訂閱:
張貼留言 (Atom)
hi~
回覆刪除when I input 'busybox crond -l 0 -L /data/cron.log'
I cat /data/cron.log, but there is nothing.
my /var/spool/cron/crontabs/root is like this
* * * * * /bin/reboot
my android device should reboot in every minutes.
But it didn't work. Can you give me some suggestion?