Updating/Adding distros to GNURoot for Android (Fedora 22 ARMV7L)

Update!

http://nmilosev.svbtle.com/fedora-on-nonrooted-android-phones-2016-update


If you haven’t tried the fantastic app for Android called GNURoot, i strongly urge you to. In a nutshell, if you wanted Linux on your Android phone via chroot, you had to root your phone. This app doesn’t need root to work because it uses [PRoot](proot.me) - chroot clone which doesn’t require root. So you get a full linux environment without rooting your phone/tablet which is really great. Also, there are virtually no performance hits.

So, if you download GNURoot, you immediately have several options to install Linux on your phone/tablet. There is Debian Wheezy (with or without X server), a relatively fresh Gentoo snapshot (which I will be using later), Fedora 17 (sad face), and Aboriginal, which wasn’t available in my country. Now, you can see immediately why I wanted to write this article. While there is a nice number of options, I wanted more. Also, with the way Fedora (still my go-to distro) updates work, you would have to go 17 to 18, then 18 to 19 and so on which I can guarantee you will not work.

Now, If you want Debian, you are in luck, because there is another version on GNURoot, called GNURoot Debian which is open-source and more up to date. If you want a stable and fully supported Linux environment on your Android device, I strongly urge you to download GNURoot Debian and forget this guide. If you do want something more, do continue.


So here I will show you how to update (actually make a new install) Fedora to version 22. This guide is really simple, and doesn’t require any special tools. Also, it is really the same for any Linux distro, and obviously it is a really good idea to install a rolling release one inside GNURoot like Arch so you don’t have to upgrade it all the time. So lets start.

cd /host-rootfs/data/data/champion.gnuroot/app_install

Here, there are three folders

To add a new distro you need to create two folders, one in support and one in roots. They have to be called the same. Type:

mkdir ./roots/fedora22 ./support/fedora22

After this, we will setup the support folder. We need proot and busybox there, so we will just copy them from a working distro:

cp ./support/gentoo/* ./support/fedora22/

Replace gentoo with the name of distro you downloaded, if you didn’t download gentoo.

If you encounter a permission denied just run:

chmod 777 ./support/fedora22

After that, we need to unpack the actual rootfs which you previously downloaded. Firstly:

cd ./roots/fedora22

Then, its really simple:

tar xvf /host-rootfs/[path]

where path is the absolute path to your downloaded archive, for example:

tar xvf /host-rootfs/sdcard/Download/Fedora22-armv7.tar.xz

Wait for the unpacking to be done. At this point, if you exit the terminal and restart GNURoot, a new installed rootfs called “fedora22” will be detected and you will be able to run it. But while we are here, lets do a few more things. GNURoot is already configured to bind your actual root folder to host-rootfs folder. For that it needs an empty folder:

mkdir host-rootfs

Run:

chmod 777 .

if you get a permission denied error.

Also, if you were to start the newly created rootfs, you would see that there is no network because the DNS config isn’t there.

cp ../gentoo/etc/resolv.conf ./etc/

will fix it. Again, replace gentoo with the name of distro you downloaded.

After this you are good to go. You can run your new fedora22 rootfs and play with it. You can delete the “helper” distro, but you don’t have to.

Screenshot_2015-08-01-19-55-05.png

So what about Arch, you may ask. It’s the same really, just download the appropriate rootfs, and use it. Simple as that. Obviously name your roots and support folder “arch”.

Screenshot_2015-08-01-19-52-36.png
Screenshot_2015-08-01-20-04-48.png

What about a desktop environment, you also may ask. Download XServer XSDL from the Play Store, install your DE of choice, and run it like this (LXDE):

env DISPLAY=127.0.0.1:0 startlxde

after starting the XServer XSDL app.

Screenshot_2015-08-01-19-56-40.jpg

I was really impressed by the speed and general responsiveness of the system.

Hope this works for you, and write to me if it doesn’t. Good luck!

Thanks to Corbin Champion for creating GNURoot, and also to the creators of PRoot. Lastly, thanks to Sony for making a phone, which survived this three day torture test.

 
144
Kudos
 
144
Kudos

Now read this

Fedora 24 + Bumblebee + CUDA + Theano

It’s very frustrating when you want to try something out quickly and lose your entire day… But at least next time it will be easier. I hope. This is a guide on how to run Keras (Theano powered neural network Python library) on CUDA with... Continue →