Kevin MacMartin 8832b4fa60 tons of improvements, cjdctl has restart, install.sh has uninstall, help | 10 éve | |
---|---|---|
.. | ||
cjdroid | 10 éve | |
README.md | 10 éve | |
cjdroid-build.sh | 10 éve |
These instructions have been tested with various Androids, and Firefox OS build 20140627162151.
$ANDROID_NDK
, set the $NDK
variable in your shell to point to the directory it's located. (eg: export NDK="/opt/android-ndk"
)cjdroid-build.sh
and edit REPO=https://github.com/cjdelisle/cjdns.git
to point to the URL of your desired repository. (eg: REPO="http://newrepo"
)
cjdns-android/cjdns
folder if it exists after changing the repo before you can run cjdroid-build.sh
again.master
, open cjdroid-build.sh
and edit BRANCH="master"
to use the name of your desired branch. (eg: BRANCH="newbranch"
)To clone a fresh repo and build, run ./cjdroid-build.sh
or ./cjdroid-build.sh branchname
.
/system
partition, and to configure the network using tun. The method required to root a phone differs from model to model. If your phone isn't rooted yet and you're not sure where to start, look for the subforum for your device on XDA forums, and hopefully you'll find something that works.Below is a list of the files contained in the deployment package named:~ cjdroid-${version}.tar.gz
:
/system
read/write, installs the files described below to their respective locations, then remounts /system
read-only./system/etc/init.d/99cjdroute
, this is run at boot to start cjdaemon
./system/bin/cjdaemon
, this starts cjdroute if it's supposed to be running, then stops it when the phone sleeps and starts it again if it's supposed to be running when the phone wakes back up./system/bin/cjdctl
, this lets you control cjdroute as well as the daemon.cjdroute
binary, which can be used like normal to generate a config file with: cjdroute --genconf > /sdcard/cjdns/cjdroute.conf
, and you can run: cjdroute < /sdcard/cjdns/cjdroute.conf
to start it manually (running it manually may result in higher than normal battery drain in sleep mode).cjdroid-${version}.tar.gz
are from the repo cloned by cjdroid-build.sh
@ cjdns-android/cjdns
(and not the current repository, if you're running a copy of cjdroid-build.sh
from inside one.)After ./cjdroid-build.sh
finishes building ./build_android/cjdns/cjdroute
, it will generate a deployment package named cjdroid-${version}.tar.gz
. (eg: cjdroid-0.3.2380.tar.gz
)
/sdcard/
on your Android device. (eg: adb push cjdroid-${version}.tar.gz /sdcard/
)adb shell
)/sdcard/
and extract the compressed file: tar zxvf cjdroid-${version}.tar.gz
su -c "sh cjdroid/install.sh"
cjdroute.conf
to /sdcard/cjdns/cjdroute.conf
.After completing the Setup Instructions, cjdns can be controlled as root by running cjdctl
with a valid option. (eg: su -c "cjdctl e")
cjdctl e
or cjdctl enable
: Starting at boot, cjdroute will run whenever the phone is awake.cjdctl d
or cjdctl disable
: Kill cjdroute and prevent it from starting whenever the phone is awake.If you followed the instructions and things don't appear to be working, try some of these ideas to see if you can figure out what's wrong:
cjdroute
manually by running cjdroute < /sdcard/cjdns/cjdroute.conf
should output to stdout, which you can use to help debug configuration issues.ping6 ipv6address
cjdns/contrib/
.cjdroute.conf
must exist @ /sdcard/cjdns/cjdroute.conf
for cjdctl
or cjdaemon
to start cjdroute
.ps | grep cjdroute
ip addr