[Q&A] Linux-on-Android project

Search This thread

devwithzachary

Inactive Recognized Developer
Oct 12, 2009
2,934
1,899
31
London
Huawei P40
loaxdabanner.png

READ THE FAQ BEFORE POSTING ANYTHING thank you
For Development posts and more information about the project please use the main development thread HERE

This is the thread to ask all your questions about the LinuxonAndroid project
 
Last edited:
I am getting this screen after doing all the things mentioned in install guide to install ubuntu 12.04, on stock ics 4.0.4 and after starting vnc manually ,it cant connect to localhost, an error pops up saying

VNC connection failed!
failed to connect to localhost/127.0.0.1 (port 5900):
connect failed: ECONNREFUSED (Connection refused)
 

Attachments

  • Screenshot_2013-02-23-01-41-50.jpg
    Screenshot_2013-02-23-01-41-50.jpg
    31.8 KB · Views: 3,209

wolfpack612

Senior Member
Nov 18, 2006
438
74
Hollywood
I am getting this screen after doing all the things mentioned in install guide to install ubuntu 12.04, on stock ics 4.0.4 and after starting vnc manually ,it cant connect to localhost, an error pops up saying

VNC connection failed!
failed to connect to localhost/127.0.0.1 (port 5900):
connect failed: ECONNREFUSED (Connection refused)

try to update scripts to see if it helps. Open the app, click launch, then click on settings on the top right and go to update scripts.

Sent from my SGH-T889 using xda premium
 
  • Like
Reactions: Azharkanorwala
Thanks man I updated the script and it worked(see screenshot 1), but i have some questions
1 We need to start VNC server manually or it starts on its own.
2 i have done the setting provided in install guide but it shows the error
VNC connection failed!
failed to connect to localhost/127.0.0.1 (port 5900):
connect failed: ECONNREFUSED (Connection refused) .
 

Attachments

  • Screenshot_2013-02-23-08-41-22.jpg
    Screenshot_2013-02-23-08-41-22.jpg
    54.2 KB · Views: 2,542
  • Screenshot_2013-02-23-08-49-32.jpg
    Screenshot_2013-02-23-08-49-32.jpg
    28.2 KB · Views: 2,362

emil10001

Senior Member
Jan 29, 2009
59
6
feigdev.com
I'm curious to know if you guys are looking at doing this without VNC? I haven't found much, but here's a video of someone who seems to have figured it out: https://www.youtube.com/watch?v=zxats9ejrG0

I'm hopeful that as the Ubuntu phone/tablet projects progress, we'll get some useful bits from them, since they're currently built on top of CM10.1.
 

DarkhShadow

Senior Member
Sep 25, 2011
1,808
268
Essex
I'm curious to know if you guys are looking at doing this without VNC? I haven't found much, but here's a video of someone who seems to have figured it out: https://www.youtube.com/watch?v=zxats9ejrG0

I'm hopeful that as the Ubuntu phone/tablet projects progress, we'll get some useful bits from them, since they're currently built on top of CM10.1.

They are, its one of the stretch goals on the kick starter.

Sent from my Jelly Nexus 4
 

danist727

Senior Member
Mar 3, 2012
333
184
Hong Kong
problem with browser

would anyone please help me with the browser. I am using HTC rhyme with 1ghz and768mb ram. I can't start Firefox and chromeium show a blank screen on any webpage. I have tried to install other browsers by apt-get commands but all no success. I would like to have your help
 

joesnose

Senior Member
Dec 5, 2009
860
163
Hi,

I bought a donation key but it doesnt seem to have unlocked any new features.

Great app thanks.
 

thesaltonsea

Member
Jun 16, 2011
16
4
Ihtiman
Hi, im testing the backtrack on my galaxy nexus. How to change the resolution, because first i set it to 1280x720, but i forget about the onscreen buttons of the nexus and when im VNC im not fullscreen ?

Its really cool to use linux on the phone, congrats for the good work !
 

wolfpack612

Senior Member
Nov 18, 2006
438
74
Hollywood
Hi, im testing the backtrack on my galaxy nexus. How to change the resolution, because first i set it to 1280x720, but i forget about the onscreen buttons of the nexus and when im VNC im not fullscreen ?

Its really cool to use linux on the phone, congrats for the good work !

you can change it in the .config file located where your backtrack image is located.

Sent from my SGH-T889 using xda premium
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    loaxdabanner.png

    READ THE FAQ BEFORE POSTING ANYTHING thank you
    For Development posts and more information about the project please use the main development thread HERE

    This is the thread to ask all your questions about the LinuxonAndroid project
    4
    Just upgraded Android to CM 11 (based on KitKat) and cannot run Linux :( i have downloaded the most recent bootscript.
    For some reason that's not yet fully understood (by me, at least), CM11 doesn't "like" the Complete Linux Installer App. You can still run LinuxOnAndroid, but you'll have to call bootscript.sh manually, or using a script like mrhnet described 2 posts above yours. Whatever the cause is, CM11 isn't allowing the CLI App to executed it's final
    Code:
    sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /path/to/imagefile.img
    inside Terminal Emulator. Running this command manually, or from another script, should get LinuxOnAndroid running again on your device. :)

    ---------- Post added at 12:02 PM ---------- Previous post was at 11:45 AM ----------

    Section: "mounting external_sd"
    ----------------------------------------------

    Code:
    if [ -d /Removable/USBdisk1 ]; then
       $bbox mkdir $mnt/USB1
       $bbox mount -o bind /Removable/USBdisk1  $mnt/USB1
    fi
    
    if [ -d /Removable/USBdisk1 ]; then
       $bbox mkdir $mnt/USB1
       $bbox mount -o bind /Removable/USBdisk1  $mnt/USB1
    fi
    I haven't checked your attached file yet, but I think the following modifications to the section quoted above might help your script run more "transparently" & without throwing "directory already exists" error messages (I know, it's mainly just looks at that point, but I like seeing 0 error messages):
    Code:
    if [ -d /Removable/USBdisk1 ]; then
       if [ ! -d $mnt/USB1 ]; then # Check for directory before creating
          $bbox mkdir $mnt/USB1    # to avoid "directory already exists" error
       fi
       $bbox mount -o bind /Removable/USBdisk1  $mnt/USB1
       if [ $? == 0 ];then USB1Mounted="Yes"; fi  # If mounted successfully,
    fi                                            # set variable to "Yes" so umount
                                                  # statement will run later
         # else you'll get an error:
         # "umount can't unmount /data/local/mnt: Device or resource busy"
    
    if [ -d /Removable/USBdisk2 ]; then
        if [ ! -d $mnt/USB2 ]; then
          $bbox mkdir $mnt/USB2
       fi
       $bbox mount -o bind /Removable/USBdisk2  $mnt/USB2
       if [ $? == 0 ];then USB2Mounted="Yes"; fi
    fi


    ---------- Post added at 12:13 PM ---------- Previous post was at 12:02 PM ----------

    **But one difference noted from 4.3 is that, root (sudo/su) access is needed while in VNC to access the mounted sdcard/external_sd. Maybe someone could explain why is that.. (I'm on SlimKAT 4.4.2; xperia SP).

    [Highlight]EDIT: SELinux enforcing maybe not fully implemented in the ROM I'm using, although it's indicated as such. Otherwise, it's strange that I can run a script while "selinux enforcing" :confused:. However, Linux doesn't start through the app, unlike in 4.3; It starts through that 'ubuntu' script of course. So, might have to manually do "setenforce 0" before running it, in case selinux is correctly/fully implemented I think...??[/highlight]
    In reply to your having to su within VNC to use /external_sd, please check your /root/init.sh script (from inside chroot linux) for a line containing "external-sd". Several of the (expecially ubuntu) images contain an init.sh with a typographical error in them; that line should contain "external_sd" instead, having it mis-typed causes an error when giving access permissions to your ubuntu user at first boot of your image.
    Once that line is corrected, you will need to delete the /root/DONOTDELETE.txt file from within the chroot linux; then exit out of linux & start linux again.
    When restarting linux, you'll see a moderately long chain of "error: cannot create [directory/user/group] _______, [directory/user/group] already exists" messages. Those are to be expected, as you just forced init.sh to re-install many of your initial setup environment actions. ... as long as those are the only error messages you see, the edit & re-run of init.sh should fix your problem with accessing /external_sd from within VNC.

    ...about the SElinux Enforcing thing. I'm not sure on this one, but I do know that shell scripts are opened & "read" once before being opened and "executed." It just might be that the setenforce 0 command is "seen" by SElinux on the first read, and thus allows the script to be executed based on that. I know it's a thin theory, but as of this moment, it's the only one I have.
    3
    Hey wrsg,

    Here's the loop device debugging script I promised. Rename your /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh file to .../bootscript.old then copy the file linked below to /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh and chmod it to 0755.
    After a reboot, you can run the debug script by telling the CLI app to boot your image normally (the bootscript.debug.sh script will automatically run, testing your device's ability to mount your image file on /dev/block/loop255, and /dev/block/loop1 through loop5, then exit. Please run the script this way at least once, then post the script output from your terminal here, so we can see how your device responded to the attempts. After that, you can rename bootscript.old back to bootscript.sh, and chmod to 0755, allowing CLI to load your image normally.

    Script: http://www.robherc.com/hosted/linuxonandroid/bootscript.loopdebug.sh
    3
    I would like to be able to talk (upload) sketches on my Arduino Uno board from within chrooted linux environment using the Arduino IDE that I installed.
    ...
    I would really like to learn how to mount/forward usb devices to the linux environment so I can just work within the environment and not go in and out of it.
    If you haven't done so yet, please download the newest bootscript.sh file & install according to the instructions in My LinuxOnAndroid FAQ. In the new bootscript.sh file, I have the /dev folder from android bound to /dev in linux, so you can find attached devices in there, pretty much the same as using linux directly on your home PC :)
    3
    robherc's LinuxOnAndroid FAQ

    Hey all, I've noticed several people have been having problems that weren't addressed in the "official" linuxonandroid FAQ, so I have started building my own unofficial "add-on FAQ" here: http://www.robherc.com/hosted/linuxonandroid/FAQ.html
    It's by no means an exhaustive resource, but it should help several of you at least get a head-start on the troubleshooting process while you're first working on getting LinuxOnAndroid, or the Complete Linux Installer app, running on your device. Over the next several weeks, I'll be continuing to add new topics to expand my FAQ, so check it regularly for updates, and please let me know if there's anything you'd like to see added. :good: