[GUIDE] Freenet for Android

Search This thread

facuarmo

Senior Member
Apr 13, 2014
572
995
22
Pilar
UPDATE: 09/12/2016 (dd:mm:yyyy, just in case).

The guide has been updated! :cowboy:. Enjoy it guys :fingers-crossed:.

I'm not responsible for anything that happens with your phone, also, some people experienced some bricks on certain devices, so, just take care where you put paths and data because your phone maybe vulnerable to bricks!

Hi guys, assuming that you read the disclaimer above, so you understand what you're doing, also, and not less important, that this will most likely void your phone's warranty.

Ok, let's go.

Firstly... what's Freenet? From Wikipedia

Freenet is a peer-to-peer platform for censorship-resistant communication. It uses a decentralized distributed data store to keep and deliver information, and has a suite of free software for publishing and communicating on the Web without fear of censorship. Both Freenet and some of its associated tools were originally designed by Ian Clarke, who defined Freenet's goal as providing freedom of speech on the Internet with strong anonymity protection

As Freenet started, they don't gave any signal of being ported as an APK for Android (or something like this) so, we'll enjoy the availability of OpenJDK for ARMEL and ARMHF thankfully to the development of Raspberry Pi and Arduino (and whatever else kind of free hardware).

What do I need?
You need to:
  • Download and install "Linux Deploy" (from Google Play)
  • Download and install a SSH Client (for Android) or this one (for Windows/Linux/Mac PC) (how to use below).
  • At least, 768 mb of free space on your internal or external memory (anywhere you want to put your distro)
  • Free space on your internal memory, or a SD Card. If you're going to use your SD Card make sure it's working well.
  • A good internet connection (to retrieve the packages) [ 6 mbps or more recommended ]

System Requirements

  • CPU: 1 GHz dual-core (any)
  • RAM: 512 mb
  • SD Card: 8GB Class 4 Memory Card(at least)

First part: Installing a Linux Distribution on your Android Device​

  1. Open "Play Store", search for "Linux Deploy" (or open the Play Store link written above).
  2. Tap the first result and install it.
    Screenshot_2016_12_09_22_32_13.png

    Screenshot_2016_12_09_22_32_17.png

    Screenshot_2016_12_09_22_32_30.png
  3. Open "Linux Deploy" and tap the "Download" icon.
    screen1.png
  4. Then, set the settings below like this (unless you want to modify them and you know what you're going to do)

Distribution: Debian - I suggest to not change it, because OpenJDK/Oracle Java have trouble with other distros in ARMEL and / or ARMHF.
Distribution suite: wheezy - I suggest to not change it, because OpenJDK/Oracle Java have trouble with other distros in ARMEL and / or ARMHF.
Source path: http://ftp.debian.org/debian/
Installation type: File
Installation path: /sdcard/linux.img - to install to the internal memory (unless your phone isn't partitioned with a fake internal SD, else this will be your external SD), if you are planning to use your external SD leave it untouched or if you changed it write the variable ${EXTERNAL_STORAGE} instead of /sdcard.
Image size (MB): Whatever you want more than 768, in MegaBytes. - I suggest 3 GB ( 3000 MB* ) to make sure that the OS will have space for all what it wants to save.
File system: Auto
User name: android
User password: android
SSH > Enable: tick

It should look like those screenshots:

screen5.png

screen13.png

screen33.png


Marked parts with a red square are the most important things you should change as explained above.

That's all, don't touch anything else, unless you know what it does.

Now, get back to the application's main screen and tap "Menu" (your device's menu button or the three dots button at the top of the screen) and then "Install", it will give a popup saying: "Start installation of GNU/Linux system?"; tap "OK".

screen14.png

screen15.png


Allow the application to get root permissions.

screen16.png


WARNING: I've noticed a programming error in the software which makes it unable to wait the user to allow the superuser permissions. That way, the program fails sometimes to start the installation. If that happens, just tap Stop and then repeat the installation steps above and it'll work.

Then, wait until it installs the OS, and make sure you don't close the app and don't lose WiFi, losing WiFi connection will result in an unfinished and non-working Linux installation, then you'll need to delete "linux.img" and re-install, so take care; also for battery, make sure that it's nicely and lovely charged.

The installation, depending on your CPU, RAM and Internet Bandwith, will take up to, aproximately 3 or 4 hours.

For me, it took one hour (downloading at 6 Mbps).

When the installation ends, you'll see something like:

[xx:xx:xx] <<< deploy

(where x(s) were the current time when the process ended)

That for the last line.

It should look similar to this screenshot:

screen25.png


Second part: Preparing your distro for Java and Freenet​

When you see the message explained in the above screenshot, you're able to tap "Start".

Tap "Start", and then "Ok". It should look like those screenshots:

screen25.png

screen26.png


When it successfully (or not) starts, it'll say:

[xx:xx:xx] <<< end: start

Like this:

screen27.png


Then, you'll see on the NavBar your IP address, for me, it is "192.168.1.115" (local). We're actually going to use Putty from Windows. A basic Putty usage will be explained in the next screenshots:

  • Browse to http://www.putty.org and click in the download page link:
    screen1.png
  • Do the steps in order as shown in the screenshot:
    screen2.png
  • Open putty.exe (yeah, I'm captain obvious)
    screen3.png
  • Fill the text box with your phone's local IP address and then click "Open".
    screen4.png
  • Hit "Yes" for that warning.
    screen5.png

Congratulations! If everything's fine, you should see something like this:

screen6.png


Once done, type the next command hitting enter after every command:

Code:
sudo -s
nano script.sh

Then, copy this code:
Code:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer

(thanks to WebUpd8 for the repo and the commands list for Wheezy)

And paste it in Putty's window right-clicking anywhere in the window's black space.

Now run:

Code:
sh script.sh

Follow the installation steps shown by the script and don't forget to accept any of the terms and conditions shown by Oracle's Java installer.

When it installs, you can type:

java

To check if it works; if it works it'll give you the help menu.

Okay, then, type:

wget 'https://freenetproject.org/jnlp/freenet_installer.jar'

And then:

java -jar freenet_installer.jar

When you complete the wizard, you need to run it, so, do
cd <where you put it>
And then do
sudo nano run.sh

edit the line where it says "./bin/wrapper...." and "./bin/1run.sh...." change them to "/bin/wrapper..." and "/bin/1run.sh...., then, save with CTRL + O and Y.

Right now, you can do:

./run.sh start

Let Freenet do the first run, when it completes (about 10 minutes), visit in your Android browser that URL:

http://127.0.0.1:8888/

Complete the wizard, and then, you're done, you can use Freenet exactly as you do with your PC :D

Third part: My phone is lagging and Freenet / whole Distro aren't responding! What should I do?

Remember, nothing is perfect, an entire OS running behind another is a nicely big task assuming that it's an ARM processor and it's running on a phone, but you can do something to get it a bit more responsive; just do it:

  • Clean your RAM before opening your browser, to make sure that all other trash is removed
  • Have your phone in a cold state, at least during Freenet bootup and during node announcement
  • Shut it down properly (stop Freenet with CTRL + C and then, after all is closed tap STOP on the Linux Deploy's UI)
  • Freeze bad programmed apps, such as: Files Managers (almost all of them), Google Now (Google Search App), Facebook, Fancy Widgets, Google Play Services, Google Play Store, Messenger, Whatsapp and almost every game
  • Switch to another ROM that's better managed than stock or your current custom; for the Alcatel One Touch Idol 6030a I suggest to switch to DragonPL wich is the better that I found for that phone, anyway it's for the MT6882, I checked that it works perfectly!
  • And, at last, reboot your phone, it might be good; if you reboot it, please make sure that you do a Full Reboot and not a Software Reboot, because of doing a Software Reboot may leave some data loaded to RAM and it will be exactly the same (or worse) that leaving it as it is.

Hope you enjoy it! Leave a "Thanks" if you like it!
 
Last edited:

Cobmaster

Senior Member
Oct 18, 2011
314
112
Lecco
Samsung Galaxy S10+
OnePlus 7 Pro
Very big THANKS!

I personally tested the this guide, it's awesome!
Anyway I suggest to include a little guide to install oracle java8 since openjdk7 is quite old and Freenet complains about it.
Personally it's not a big deal, but for others can be difficult.
EDIT: I'm on SM G850F and it runs perfectly.
 
  • Like
Reactions: facuarmo

facuarmo

Senior Member
Apr 13, 2014
572
995
22
Pilar
I personally tested the this guide, it's awesome!
Anyway I suggest to include a little guide to install oracle java8 since openjdk7 is quite old and Freenet complains about it.
Personally it's not a big deal, but for others can be difficult.
EDIT: I'm on SM G850F and it runs perfectly.

Thanks for your contribution at making this guide better.

I believe the Java thing can be solved by just updating apt-get's database and running the installation command changing the 7 for an 8. Please reply if it's just that or tell me what you did to get it to work with Java 8 and I'll add it to the guide.

Also, it's likely to be outdated. I thought no one was going to see it anymore, I'll update it later ;). Just tell me that, please.


EDIT: I've updated the thread with all the new requirements and setup. All done, enjoy it ;).
 
Last edited:
  • Like
Reactions: Cobmaster

Cobmaster

Senior Member
Oct 18, 2011
314
112
Lecco
Samsung Galaxy S10+
OnePlus 7 Pro
Thanks for your contribution at making this guide better.

I believe the Java thing can be solved by just updating apt-get's database and running the installation command changing the 7 for an 8. Please reply if it's just that or tell me what you did to get it to work with Java 8 and I'll add it to the guide.

Also, it's likely to be outdated. I thought no one was going to see it anymore, I'll update it later ;). Just tell me that, please.


EDIT: I've updated the thread with all the new requirements and setup. All done, enjoy it ;).
I was about to write a reply, but you are fast! Good job!
:good::good:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    UPDATE: 09/12/2016 (dd:mm:yyyy, just in case).

    The guide has been updated! :cowboy:. Enjoy it guys :fingers-crossed:.

    I'm not responsible for anything that happens with your phone, also, some people experienced some bricks on certain devices, so, just take care where you put paths and data because your phone maybe vulnerable to bricks!

    Hi guys, assuming that you read the disclaimer above, so you understand what you're doing, also, and not less important, that this will most likely void your phone's warranty.

    Ok, let's go.

    Firstly... what's Freenet? From Wikipedia

    Freenet is a peer-to-peer platform for censorship-resistant communication. It uses a decentralized distributed data store to keep and deliver information, and has a suite of free software for publishing and communicating on the Web without fear of censorship. Both Freenet and some of its associated tools were originally designed by Ian Clarke, who defined Freenet's goal as providing freedom of speech on the Internet with strong anonymity protection

    As Freenet started, they don't gave any signal of being ported as an APK for Android (or something like this) so, we'll enjoy the availability of OpenJDK for ARMEL and ARMHF thankfully to the development of Raspberry Pi and Arduino (and whatever else kind of free hardware).

    What do I need?
    You need to:
    • Download and install "Linux Deploy" (from Google Play)
    • Download and install a SSH Client (for Android) or this one (for Windows/Linux/Mac PC) (how to use below).
    • At least, 768 mb of free space on your internal or external memory (anywhere you want to put your distro)
    • Free space on your internal memory, or a SD Card. If you're going to use your SD Card make sure it's working well.
    • A good internet connection (to retrieve the packages) [ 6 mbps or more recommended ]

    System Requirements

    • CPU: 1 GHz dual-core (any)
    • RAM: 512 mb
    • SD Card: 8GB Class 4 Memory Card(at least)

    First part: Installing a Linux Distribution on your Android Device​

    1. Open "Play Store", search for "Linux Deploy" (or open the Play Store link written above).
    2. Tap the first result and install it.
      Screenshot_2016_12_09_22_32_13.png

      Screenshot_2016_12_09_22_32_17.png

      Screenshot_2016_12_09_22_32_30.png
    3. Open "Linux Deploy" and tap the "Download" icon.
      screen1.png
    4. Then, set the settings below like this (unless you want to modify them and you know what you're going to do)

    Distribution: Debian - I suggest to not change it, because OpenJDK/Oracle Java have trouble with other distros in ARMEL and / or ARMHF.
    Distribution suite: wheezy - I suggest to not change it, because OpenJDK/Oracle Java have trouble with other distros in ARMEL and / or ARMHF.
    Source path: http://ftp.debian.org/debian/
    Installation type: File
    Installation path: /sdcard/linux.img - to install to the internal memory (unless your phone isn't partitioned with a fake internal SD, else this will be your external SD), if you are planning to use your external SD leave it untouched or if you changed it write the variable ${EXTERNAL_STORAGE} instead of /sdcard.
    Image size (MB): Whatever you want more than 768, in MegaBytes. - I suggest 3 GB ( 3000 MB* ) to make sure that the OS will have space for all what it wants to save.
    File system: Auto
    User name: android
    User password: android
    SSH > Enable: tick

    It should look like those screenshots:

    screen5.png

    screen13.png

    screen33.png


    Marked parts with a red square are the most important things you should change as explained above.

    That's all, don't touch anything else, unless you know what it does.

    Now, get back to the application's main screen and tap "Menu" (your device's menu button or the three dots button at the top of the screen) and then "Install", it will give a popup saying: "Start installation of GNU/Linux system?"; tap "OK".

    screen14.png

    screen15.png


    Allow the application to get root permissions.

    screen16.png


    WARNING: I've noticed a programming error in the software which makes it unable to wait the user to allow the superuser permissions. That way, the program fails sometimes to start the installation. If that happens, just tap Stop and then repeat the installation steps above and it'll work.

    Then, wait until it installs the OS, and make sure you don't close the app and don't lose WiFi, losing WiFi connection will result in an unfinished and non-working Linux installation, then you'll need to delete "linux.img" and re-install, so take care; also for battery, make sure that it's nicely and lovely charged.

    The installation, depending on your CPU, RAM and Internet Bandwith, will take up to, aproximately 3 or 4 hours.

    For me, it took one hour (downloading at 6 Mbps).

    When the installation ends, you'll see something like:

    [xx:xx:xx] <<< deploy

    (where x(s) were the current time when the process ended)

    That for the last line.

    It should look similar to this screenshot:

    screen25.png


    Second part: Preparing your distro for Java and Freenet​

    When you see the message explained in the above screenshot, you're able to tap "Start".

    Tap "Start", and then "Ok". It should look like those screenshots:

    screen25.png

    screen26.png


    When it successfully (or not) starts, it'll say:

    [xx:xx:xx] <<< end: start

    Like this:

    screen27.png


    Then, you'll see on the NavBar your IP address, for me, it is "192.168.1.115" (local). We're actually going to use Putty from Windows. A basic Putty usage will be explained in the next screenshots:

    • Browse to http://www.putty.org and click in the download page link:
      screen1.png
    • Do the steps in order as shown in the screenshot:
      screen2.png
    • Open putty.exe (yeah, I'm captain obvious)
      screen3.png
    • Fill the text box with your phone's local IP address and then click "Open".
      screen4.png
    • Hit "Yes" for that warning.
      screen5.png

    Congratulations! If everything's fine, you should see something like this:

    screen6.png


    Once done, type the next command hitting enter after every command:

    Code:
    sudo -s
    nano script.sh

    Then, copy this code:
    Code:
    echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
    echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
    apt-get update
    apt-get install oracle-java8-installer

    (thanks to WebUpd8 for the repo and the commands list for Wheezy)

    And paste it in Putty's window right-clicking anywhere in the window's black space.

    Now run:

    Code:
    sh script.sh

    Follow the installation steps shown by the script and don't forget to accept any of the terms and conditions shown by Oracle's Java installer.

    When it installs, you can type:

    java

    To check if it works; if it works it'll give you the help menu.

    Okay, then, type:

    wget 'https://freenetproject.org/jnlp/freenet_installer.jar'

    And then:

    java -jar freenet_installer.jar

    When you complete the wizard, you need to run it, so, do
    cd <where you put it>
    And then do
    sudo nano run.sh

    edit the line where it says "./bin/wrapper...." and "./bin/1run.sh...." change them to "/bin/wrapper..." and "/bin/1run.sh...., then, save with CTRL + O and Y.

    Right now, you can do:

    ./run.sh start

    Let Freenet do the first run, when it completes (about 10 minutes), visit in your Android browser that URL:

    http://127.0.0.1:8888/

    Complete the wizard, and then, you're done, you can use Freenet exactly as you do with your PC :D

    Third part: My phone is lagging and Freenet / whole Distro aren't responding! What should I do?

    Remember, nothing is perfect, an entire OS running behind another is a nicely big task assuming that it's an ARM processor and it's running on a phone, but you can do something to get it a bit more responsive; just do it:

    • Clean your RAM before opening your browser, to make sure that all other trash is removed
    • Have your phone in a cold state, at least during Freenet bootup and during node announcement
    • Shut it down properly (stop Freenet with CTRL + C and then, after all is closed tap STOP on the Linux Deploy's UI)
    • Freeze bad programmed apps, such as: Files Managers (almost all of them), Google Now (Google Search App), Facebook, Fancy Widgets, Google Play Services, Google Play Store, Messenger, Whatsapp and almost every game
    • Switch to another ROM that's better managed than stock or your current custom; for the Alcatel One Touch Idol 6030a I suggest to switch to DragonPL wich is the better that I found for that phone, anyway it's for the MT6882, I checked that it works perfectly!
    • And, at last, reboot your phone, it might be good; if you reboot it, please make sure that you do a Full Reboot and not a Software Reboot, because of doing a Software Reboot may leave some data loaded to RAM and it will be exactly the same (or worse) that leaving it as it is.

    Hope you enjoy it! Leave a "Thanks" if you like it!
    1
    Very big THANKS!

    I personally tested the this guide, it's awesome!
    Anyway I suggest to include a little guide to install oracle java8 since openjdk7 is quite old and Freenet complains about it.
    Personally it's not a big deal, but for others can be difficult.
    EDIT: I'm on SM G850F and it runs perfectly.
    1
    I personally tested the this guide, it's awesome!
    Anyway I suggest to include a little guide to install oracle java8 since openjdk7 is quite old and Freenet complains about it.
    Personally it's not a big deal, but for others can be difficult.
    EDIT: I'm on SM G850F and it runs perfectly.

    Thanks for your contribution at making this guide better.

    I believe the Java thing can be solved by just updating apt-get's database and running the installation command changing the 7 for an 8. Please reply if it's just that or tell me what you did to get it to work with Java 8 and I'll add it to the guide.

    Also, it's likely to be outdated. I thought no one was going to see it anymore, I'll update it later ;). Just tell me that, please.


    EDIT: I've updated the thread with all the new requirements and setup. All done, enjoy it ;).