Messy Notes about using ZeroNet and other things
All code published here are under CC-BY-SA licence, if not compatible, then MIT license X)
Yet another method to run ZeroNet on Android :3 and this method is probably the most secure and energy friendly, which likely consumes less power than ZeroNet-kivy app.
Root your device and install busybox.
Download Linuxdeploy from Github or apt.izzysoft.de f-droid and install it.
Set up a linux distro as you like (I use ArchlinuxARM), enable init and ssh in the config panel, run ssh with ConnectBot or Termux, etc, download necessary packages like
openssl-1.0 (ZeroNet doens't support the default
python2-msgpack, then git clone ZeroNet, disable Chart plugin to save energy (unconfirmed), create an init script to auto-start ZeroNet next time.
That's all :3 Then you just need to hit start button on Linuxdeploy and you can use ZeroNet in any browser with
init script example (add
& to the end or the start process will get stuck):
#! /bin/sh python2 zeronet.py --log_level INFO &
noob: O_O What the heck are you talking about? So complicated?
Do you know docker? Here is the tutorial for noob:
Download this img file (coming soon^TM) and copy it to your Android sdcard (internal storage) root directory, install Linuxdeploy, change some options, hit the start button, then you can use ZeroNet in any browser with
Why is this method probably the most secure and energy friendly?
users.json (privatekeys) is inside an img file and can't easily get read by other apps which have internal storage permission. It's energy friendly because it simply uses linux kernel of Android for chroot and doesn't require any other library or software (like ZeroNet-kivy requires the bloated and buggy android-kivy).
That's cool, when will you release the img file?
I don't know, because.. with my current setting the file is 2 GB, there is probably a way to reduce the size (compress or create it in a more flexible format).
Do I really need to root my device?
I just use Termux. It was a bit of a pain to get setup because of some issues with the 3rd party install script, but once I got it working it's been solid and I've had no issues beyond performance slow downs probably due to my phone and not ZN/Termux itself.
And here is Termux-ZeroNet script, still I can't confirm it :3
Expand img size:
The default image created by Linux deploy is 2 GB, and now ZeroMe is enough to fill the space. When out of space, there is also a risk of losing data, and here is my solution:
Copy linux.img (2 GB) to pc, then create a new linux.img of 3 GB by changing the value in Configure screen in Linux Deploy > hit Install > hit stop when it's finished.
Copy new linux.img to pc. Mount both img with
# mount ..,
# rm -rf /mount/new/*,
# cp -rp /mount/old/* /mount/new/, done!