I tried to run Linux on Android and I had some issues setting up Debian. The VM is running, but I can't connect via VNC. I already searched the FAQ & Google what to do, but I found no answers. My OnePlus One is rooted and its Kernel has Loop Device Support (export in terminal shows LOOP_MOUNPOINT). Any suggestions?

terminal log:

u0_a129@A0001:/ $
u0_a129@A0001:/ $ cd /sdcard/debian
u0_a129@A0001:/sdcard/debian $ su
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/debian/debian.img
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/debian/debian.img
android/files/bootscript.sh /sdcard/debian/debian.img     <
MD5 file found, use to check .img file? (y/n)
Validating image checksum... OK
Checking loop device... MISSING
Creating loop device... OK
mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument
No user defined mount points
net.ipv4.ip_forward = 1
Using config file /root/cfg/debian.img.config
Config file loaded
Starting first boot setup.......
Creating User account (named debian)
Adding user 'debian' ...
Adding new group 'debian' (1000) ...
Adding new user 'debian' (1000) with group 'debian' ...
Creating home directory '/home/debian' ...
Copying files from '/etc/skel' ...

here starts the interesting part:

passwd: u:r:init_shell:s0 is not authorized to change the password of debian
Permission denied
Try again? [y/N]
chfn: Permission denied.
adduser: '/usr/bin/chfn debian' returned error code 1. Exiting.
usermod: unknown group admin
chown: cannot access 'external_sd': No such file or directory
su: Authentication failure

the rest:

If you see the message 'New 'X' Desktop is localhost:0' then you are
ready to VNC into your debian OS..

If connection from a different machine on the same network as the
android device use the address below: eth0: error fetching interface
information: Device not found If using androidVNC, change the 'Color
Format' setting to 24-bit colour, and once you've VNC'd in, change the
'input mode' to touchpad (in settings) Starting OpenBSD Secure Shell
server: sshd.

To shut down the Linux environment, just enter 'exit' at this terminal
- and WAIT for all shutdown routines to finish!

localhost:~# ls
DONOTDELETE.txt  Downloads  Public     cfg
Desktop          Music      Templates  init.sh
Documents        Pictures   Videos
  • Hi, I am curious. Why did you unaccept my answer?
    – Fiksdal
    Jul 25, 2018 at 15:05
  • I haven't tried it, so I cannot say if its working or not. But this project looks god, maby I'll try it in the future and accept back if it works. However, Linux on Android looks dead.
    – new2f7
    Jul 25, 2018 at 15:09
  • Try it, Linux Deploy rocks.
    – Fiksdal
    Jul 25, 2018 at 17:34

3 Answers 3


Complete Linux Installer is somewhat buggy. Try Linux Deploy. It is much more configurable and stable.


Please search the xda-developers threads related to this project for debian fixes. Unfortunately, debian handles some security things differently than all the other distros we have, so there are manual changes that have to be made in order to allow debian to "like" your device. Alternatively, if you try using one of the other distribution images, you should be able to avoid having this problem altogether.


type this :

setenforce 0

before chrooting

  • 2
    Why? What does that do?
    – ale
    Jan 25, 2015 at 20:26
  • Because I had the same problem and it solved by typing that. I just googling but I forget the reason what is that for
    – john
    Jan 26, 2015 at 3:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .