Hacker News new | past | comments | ask | show | jobs | submit login
Fedora on non-rooted Android phones – 2016 update (nmilosev.svbtle.com)
208 points by cujanovic on Feb 23, 2016 | hide | past | favorite | 44 comments



GNURoot is amazing --- it's a non-root chroot which uses ptrace to fake being in a multiuser root environment while being in a single, normal user --- but it doesn't always work. Something about the security systems of modern Androids can cause it to fail in a variety of ways.

Weirdly, the exact failure mode seems to vary from device to device, so one person's tablet will work fine, while another's will report incorrect errnos on any system call which refers to a nonexistent file, while another will fail to load binaries, etc.

I used GNURoot heavily on a Nexus 7 for a while. Worked beautifully. I used it to write on, with a USB keyboard and a word processor what I wrote myself (<plug> http://cowlark.com/wordgrinder </plug>). But then I unwisely upgraded it to Android 5.1 and everything stopped working. These days I use a Chromebook with Crouton.


I registered just to say thank you for WordGrinder! I used it for a long time when I was in a sysadmin non-job where there was very little work to do.

I used to write blog posts in WordGrinder in a terminal over SSH (so it looked like work) then post them when I got home. It kept me sane until I'd saved up enough money to quit and find something a bit more rewarding.


Thank you very much!

PS. If you're using a version older than 0.5, please upgrade. Now, I'm not saying that 0.4 was buggy, but... please upgrade. Quickly. Before it's too late.

In other news, 0.5 has unit tests now...


I used "Linux Deploy" for a while and my main gripe with the various Linux-for-Android solutions is I couldn't find a good GUI setup for them. The VNC-based solutions were laggy and didn't work when I tried to scroll or even right-click, and had wierd modes of mouse navigation. Using XServer XSDL worked better but still had random problems at times. Youtube had sound out of sync for instance. Also I really wish there was a GUI solution that could make use of the high-DPI screens of Android devices.

Crouton is working fine for me on a Chromebook though. Although sometimes I wonder if I should have gotten a Zenbook instead of a Chromebook ... the 16GB eMMC is really annoying.


Have you checked out Termux? I still use my Nexus 7 more than any other device because of Termux. I can ssh into my irssi machine, run youtube-dl, and even do some light dev using golang and vim.


I love Termux, it works remarkably well and gives me real ssh. The app store ssh clients are OK, but I'd rather just use ssh on the command line. It doesn't do X11 AFAIK, but it works very smoothly with all the normal Unix utilities I use.


Is it any better than VX ConnectBot?


Unlike ConnectBot, Termux is not a terminal, it's a customized linux environment (think of a chroot without really changing root directory), which provides its own linker and libraries (so it's not advised to run android system tools in Termux, thus not a terminal).


I prefer it. ConnectBot is an SSH client, whereas Termux is something kind of like a chroot, though it's a bit different.


why doesn't it just use user namespaces?


I don't think that Android uses those anywhere, so I would assume that most Android kernels are compiled without support for user namespaces. (The 1-2 year old Cyanogenmod kernel for Nexus 4 I had randomly lying around on this PC certainly doesn't have it enabled.)


I don't believe they're turned on in Android kernels.


could you share what you use it for? My usecase is converting my android tablet into lightweight html/js dev machine - adding Arch/xfce and bt keyboard and mouse. I also got it on various android phones, but still struggling to find a valid usecase. you know, other than just tinkering with it, which is also great :) BTW, I think that the current easiest way to try Linux on Android is app called Linux Deploy by meefik. its dev is very active. It allows you to raise arch, debian, ubuntu, slack, kali, opensuse, gentoo, and custom rootfs and spice it up it with lxde/xfce/gnome/kde, as well as adds ssh/vnc/xserver access for you.


Bring your phone in your pocket, connect display (HDMI), mouse+keyboard (Bluetooth). Abracadabra - a Linux desktop!


is someone really doing this on daily basis?


Daily basis? I don't think I've ever said that; I have pretty useful desktop computers in places where I need them daily, this is just a fallback. Although the device is quite beefy enough to work like a netbook, it's only strong enough to work like a netbook (i.e. reasonably powerful for a phone but underpowered for a desktop computer).

I do use my smartphone on a daily basis, but not the same set of apps every day. This one is an app that comes handy every once in a while, but when it does, it's a tremendous help (desktop paradigm doesn't really translate well to Android, so "plug in and use your normal Android apps like it's a desktop computer" is not really an option for me).

That's the whole point - I don't need to lug another physical device around, only an app on the phone. This way, I have an e-book reader (Google Books+And Bible), a map (Locus Pro), a music player (VLC), a good-enough camera, a retro gaming console (DosBox), a sky chart (Google Sky Map), the whole of Wikipedia (Kiwix), a calculator (RealCalc), and a netbook as well; no network required for any of that, just electricity. Now that would be a pretty hefty backpack for things I might need - or a 6" device in my pocket.


This somehow makes me want to be able to run CentOS on my smartphone someday as a live, busy webserver.

Given the exponential power growth of smartphones I am sure this will be possible by the end of the decade. Actually we already have 2.5ghz octacore smartphones now, so probably already possible.


Apart from the 'cool' factor, what could possibly be good about running a webserver on a device with very brittle battery life as it is now?

That being said, what stops you from running a server on your phone today?


Nothing.

I've been using my phone as a backup git remote for a few years: https://play.google.com/store/apps/details?id=net.antoniy.gi...


Well the battery would become the UPS of the device, it would instead run off wall power normally.

I already have a small phone farm like that for testing stuff, just not actual hosting.

Never tried to build a whole linux hosting environment on a phone though, not enough motivation because they haven't been powerful enough yet.


When you're distributing something that the government doesn't want you to distribute.

Could be a super cool mesh network thingy, (wasn't Diaspora supposed to do this?) bitcoin?


> When you're distributing something that the government doesn't want you to distribute.

Mobile phones (and their networks) are under heavy surveillance.


https and ssh?


You can run a hidden service off your phone using orbot.


Why would you run a server on a battery? It would be plugged in ofcourse. The purpose would be a low tdp server more powerful than a raspberry pi and a touchscreen included.


I successfully installed it on my Nexus 6P (using gentoo; wheezy couldn't be unpacked, and I had permissions errors in aboriginal).

Problem: "dnf update" simply fails with a "KeyError: 'armv8l'". I guess this is isn't 64 bits ready yet…

Edit: Fedora 23 does support Aarch64, this image does not.


So I'm a little confused by this. Is he running Fedora as the main boot operating system or something on top of/beside Android (which he can switch to like an app within Android)?


on top, since it's using a chroot.


> The only missing bit is the Fedora 23 image, so I created one which you can download from my Google Drive here ... It’s an untouched Fedora minimal ARM image rootfs tarball, with some stuff removed (like kernel, boot partition etc.).

That stuff like this is possible and with as little hacking/messing around as this is actually pretty cool.

Also props for the mention of the X-server app. I've been doing VNC server + client so far, and have always been a little unhappy about the result.


he said a sony phone, but which one did he use?


the more ram you got, the better. I have it on one phone with only 512 MB of Ram, and CPU 2x1.3GHz. CPU is ok. XFCE with Iceweasel struggles with 2-3 tabs. So it is only useful for GUI-less tasks. The second phone I use it on - has Snapdragon 800 - 4x2.3GHz and 2GB RAM. Debian with XFCE flies on it.


Well I have two candidate devices, a Z3 and a Samsung galaxy tab s2. Is there a way to hook up a second screen somehow?


Anything that works for your phone - hdmi, mhl, widi?



beware of 2 mhl specs. 5pin/11pin. Look very similar. I did not read it very carefully, so now I own both


haven't tried yet, i think samsung sells an hdmi thing that needs power via usb and connects to the galaxy tab micro usb port.

Question is whether the tablet could only mirror it's own resolution on linux, or run at a higher monitor resolution, with usb connected mouse and keyboard. That's make it a really useful device all of a sudden.


The phrase "non-rooted" in this article title is disconcerting.


Why? There is no exploit; to the device, this behaves as any other Android app, subject to its restrictions.

This is indeed very useful, as not all phones may be rooted (an issue of legal permission between owner and user, not of technical possibility), and this app enables a pseudo-root, sandboxed system that can be seamlessly uninstalled like any other Android app.

Also, the attack surface of a rooted phone is siginificantly larger (by necessity) than that of an unrooted one; plus you may want to give your users a portable desktop computer without necessarily giving them a rooted device.


It is disconcerting because it is a reminder of the war on general purpose computing and devices where the user of the device does not have control of what software is running on the device.


Are you saying that the "rooted/non-rooted" distinction should never have appeared, and that all devices should be "rooted" (for a lack of better word) by default, giving control to the owner/user? If that's what you're saying, I would certainly agree.


Of course :)


Woah, this is amazing! But I'm somewhat baffled, I really want to switch back to Fedora but I can't even get it installed on my Macbook Air ( https://bugzilla.redhat.com/show_bug.cgi?id=1282244 ), anybody have tips? So I'm somewhat perplexed how they managed to get it on a phone - still, pretty cool.


Considering that it's piggy-backing off an existing Android Linux distribution with all the proper drivers already present, it's not so surprising when you compare it against proprietary Apple hardware.


I got it working just fine though I got a similar or the same error. Just ignore it and you will be fine.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: