dinit on Android! #275
IngwiePhoenix
started this conversation in
Show and tell
Replies: 1 comment
-
Nice guide 👍 , I will move this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Just dropping in here for a small little bit of cool stuff.
The steps for this are quite easy:
pkg install openssh
ssh-keygen
cp -R .ssh /sdcard
cat /sdcard/your_key >> .ssh/authorized_keys
sshd
id
to pick the right username, then do:ssh <user>@<ip> -p 8022
- this should make things MUCH easier from here on out!pkg install ndk-sysroot clang binutils-is-llvm make git
./configure --prefix=$PREFIX --syscontrolsocket=$PREFIX/var/run/dinitctl --sbindir=$PREFIX/bin --disable-cgroups --disable-shutdown
make -j(nproc)
make install
After that, you should have:
Next, you can install the "Termux:Boot" plugin. As per the instructions, create a
.termux/boot
folder. Here is a snippet of what I did:(I also temporarily added 01-sshd just in case, I plan to move that to a dinit unit.)
Here is the configure generated mconfig:
Now... why? Well, why not. o.o That's literally the only reason why. I have deployed dinit in docker containers and as a user-space init system a few times now - the service syntax is ultra simple and quick to produce and
dinitctl list
is easy and fast to read. I even tried to compile it for my TV through the OpenLGTV compiler to handle auto-mounting the inserted USB drive and starting Syncthing to transfer emulator saves. So yeah - I do it, because I can. :)That's all! Have a nice day and thanks for this awesome init system!
Kind regards,
Ingwie
Beta Was this translation helpful? Give feedback.
All reactions