? Editing: Post:21.body Save Delete Cancel
Content changed Sign & Publish new content

BinChan's ZeroNotes

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)

Follow in NewsfeedFollowing

TOC by date
TOC by tag
View in light theme

Latest comments:

Add new post

Title

21 hours ago · 2 min read ·
3 comments

tag:
Body
Read more

Not found

Tutorial: Run ZeroNet in Android by Linuxdeploy

on Feb 07, 2018 · 2 min read
tag: android tutorial zeronet

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.

Screenshot:


Screenshot_2018-02-07-17-48-19.png (0x0)

How to install:

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 python2-gevent, openssl-1.0 (ZeroNet doens't support the default openssl-1.1), 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 http://localhost:43110

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 http://localhost:43110 ;)

FAQ:

  • Why is this method probably the most secure and energy friendly?

    Because your 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?

    Yes for Linuxdeploy, but there are probably some methods that don't require root permisson, like using Termux [ZeroNet-Termux script], but I can't confirm it.
    Note 1: From /r/zeronet/:

    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

Edit:

  1. 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!

7 Comments:

user_name1 day ago
Reply
Body
realjohndoeon Dec 17, 2018
Reply

Hay! could you see if you can run Freenet and Retroshare with Linuxdeploy. Because that would be awesome, and should be easy to do for you. :-)

binchan2on Feb 11, 2018
Reply

nofish: There should be only a disabled-Chart directory.
I've just added an option to reduce file logging with --log_level INFO
I think it should reduce the battery usage and probably it's also worth disabling the PeerDb plugin (reduces number of peers and savin/restoring loop)

After some test I find that disabling PeerDb plugin will significantly decrease battery life. Looks like fetching new peers by tracker takes more energy than "too many peers and savin/restoring loop". --log_level INFO looks trivial, too, maybe because I only have 10+ sites in my phone instance.

binchan2on Feb 11, 2018
Reply

nofish: There should be only a disabled-Chart directory.
I've just added an option to reduce file logging with --log_level INFO
I think it should reduce the battery usage and probably it's also worth disabling the PeerDb plugin (reduces number of peers and savin/restoring loop)

Thanks in advance! I have both Chart and disabled-Chart because sometimes I update ZeroNet directly with git pull. I think I will just remove Chart folder then.


That's weird, I just git pull and in this time Chart folder didn't appear, maybe I just made a mistake before.

nofishon Feb 10, 2018
Reply

binchan2: Also I've disabled Chart plugin, but after I update ZeroNet, Chart and disabled-Chart are both in the plugins folder, and when starting ZeroNet, the log reports: PluginManager Plugin Chart load error: ImportError: No module named Chart in PluginManager.py. Is it ok?

There should be only a disabled-Chart directory.

I've just added an option to reduce file logging with --log_level INFO

I think it should reduce the battery usage and probably it's also worth disabling the PeerDb plugin (reduces number of peers and savin/restoring loop)

binchan2on Feb 07, 2018
Reply

nofish: [...]

Also I've disabled Chart plugin, but after I update ZeroNet, Chart and disabled-Chart are both in the plugins folder, and when starting ZeroNet, the log reports: PluginManager Plugin Chart load error: ImportError: No module named Chart in PluginManager.py. Is it ok?

binchan2on Feb 07, 2018
Reply

nofish: According to the log it's using python based cryptography that is ~20-50 times slower than openssl. If someone could find a compatible libssl file it would greatly reduce the battery usage.You need to install openssl 1.0 as 1.1 not supported yet

openssl-.1.1.0 is installed by default in Archlinux ARM, openssl-1.0 is also available. And yes, after I installed it, that fallback is gone now. I will monitor the battery comsuming later.

nofishon Feb 07, 2018
Reply

According to the log it's using python based cryptography that is ~20-50 times slower than openssl. If someone could find a compatible libssl file it would greatly reduce the battery usage.
You need to install openssl 1.0 as 1.1 not supported yet

Select user
  • Welcome to ZeroMessage!
This page is a snapshot of ZeroNet. Start your own ZeroNet for complete experience. Learn More