diff options
| -rw-r--r-- | Makefile | 5 | ||||
| -rw-r--r-- | README.md | 16 | ||||
| -rw-r--r-- | data/local/debroid.sh | 17 |
3 files changed, 29 insertions, 9 deletions
@@ -1,2 +1,5 @@ +shell: + adb wait-for-device && adb shell reboot: - adb reboot && adb wait-for-device && adb shell + adb reboot + @@ -112,18 +112,18 @@ cat /etc/debian_version exit ``` -Include to Android startup +Include to Android startup (userinit.sh seems not to work on CM12, so we use a different way here): ``` -# This script is called from /etc/init.d/*userinit, but -# does not exist yet, so create it now -cat <<END >/data/local/userinit.sh -#!/system/bin/sh +adb push data/local/debroid.sh /data/local +``` -cd /storage/sdcard1/Linux -sh jessie.sh start_services -END +Afterwards install a program like ROM Toolbox and add the following bootup command: + +``` +/system/bin/sh /data/local/debroid.sh ``` + Enjoy! diff --git a/data/local/debroid.sh b/data/local/debroid.sh new file mode 100644 index 0000000..47a9505 --- /dev/null +++ b/data/local/debroid.sh @@ -0,0 +1,17 @@ +#!/system/bin/sh + +log=/data/local/debroid.out +err=/data/local/debroid.err + +/system/bin/date > $log + +while : ; do + /system/xbin/mountpoint /storage/sdcard1 + if [ $? -eq 0 ]; then + cd /storage/sdcard1/Linux + /system/bin/sh jessie.sh start_services >> $log 2> $err + /system/bin/date >> $log + exit 0 + fi + /system/bin/sleep 1 +done |
