summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (europa) <paul@buetow.org>2015-06-20 11:35:40 +0100
committerPaul Buetow (europa) <paul@buetow.org>2015-06-20 11:35:40 +0100
commit5f3143c014ebcf56a6181a47c53d13f9083bc6eb (patch)
tree4380e7e7e8395c1f90809d0d21e37645150f6e93
parent1a4825120333e302a34e626e28a2ad92640c7623 (diff)
add debroid boot script
-rw-r--r--Makefile5
-rw-r--r--README.md16
-rw-r--r--data/local/debroid.sh17
3 files changed, 29 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 91d21c8..d560517 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,5 @@
+shell:
+ adb wait-for-device && adb shell
reboot:
- adb reboot && adb wait-for-device && adb shell
+ adb reboot
+
diff --git a/README.md b/README.md
index a3505d6..0a49964 100644
--- a/README.md
+++ b/README.md
@@ -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