yashsingh1/xdaforums huggingface dataset:
[Android Software Development] mscion:
@barryflanagan

I noticed that if I try the -ld /sdcard command that I get ubuntu instead or root. Also when I open a terminal in unity desktop and copy a file to \sdcard I am able to view contents of that file when back to android using a terminal. I did not change any setting as you suggested. I'm trying to think if I did anything peculiar when I installed unity. Nothing comes to mind yet...
[Android Software Development] duchski:
Welcome to the club. I have an Matrix with CM9 and all I get is grey screen with a cross. Tried every option. I guess something is missing in CM9
[Android Software Development] bryandrummer:
So I should add those commands to the "ubuntu.sh" file in an appropriate place and I should be good then?
[Android Software Development] barryflanagan:
No! Just type them in when you are inside the Linux terminal. Just go into Unity desktop and open a terminal and do it in there.

It only needs to be done once.

Once you have done it close down the Linux app completely (if you don't know what I mean, reboot the whole phone.tablet)
[Android Software Development] ETDREAM:
my phone run ubuntu wrong

I use vnc connect ubuntu，but sreen only display a “X”，Prompt“ no /root/.xsession file no windows manager and no terminal........”，who can help me？？
[Android Software Development] btwthieves:
Segmentation Fault

I'm getting a gray screen with the default X cursor (like I used to get in good ol' xmonad). The mouse moves but I can't interact with anything.

This is my localhost:0.log file:

24/05/12 19:49:28 Xvnc version TightVNC-1.3.9
24/05/12 19:49:28 Copyright (C) 2000-2007 TightVNC Group
24/05/12 19:49:28 Copyright (C) 1999 AT&T Laboratories Cambridge
24/05/12 19:49:28 All Rights Reserved.
24/05/12 19:49:28 See tightvnccom/ for information on TightVNC
24/05/12 19:49:28 Desktop name 'X' (localhost:0)
24/05/12 19:49:28 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
24/05/12 19:49:28 Listening for VNC connections on TCP port 5900
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/home/ubuntu/.Xresources'
Segmentation fault

24/05/12 19:49:40 Got connection from client 127.0.0.1
24/05/12 19:49:40 Using protocol version 3.8
24/05/12 19:49:40 Enabling TightVNC protocol extensions
24/05/12 19:49:40 Full-control authentication passed by 127.0.0.1
24/05/12 19:49:40 Pixel format for client 127.0.0.1:
24/05/12 19:49:40 8 bpp, depth 3
24/05/12 19:49:40 true colour: max r 1 g 1 b 1, shift r 2 g 1 b 0
24/05/12 19:49:40 rfbProcessClientNormalMessage: ignoring unknown encoding 16
24/05/12 19:49:40 Using hextile encoding for client 127.0.0.1
24/05/12 19:49:40 Enabling LastRect protocol extension for client 127.0.0.1
24/05/12 19:49:40 rfbProcessClientNormalMessage: ignoring unknown encoding -223

I'm getting these same results with the small and full versions of ubuntu 12.04 as well as BackTrackV5. Results are also consistent across androidVNC and Remote VNC apps.

Any help you can give me is appreciated. I'm excited about the versatility of this project and can't wait to turn my Viewsonic gTablet into a more productive device.

Device info:

Viewsonic gTablet

ROM: Beasty/Clemsyn Froyo, overclocked 1.6 GHz, data2loop enabled, fresh install

EDIT: Ubuntu 12.04 (all versions) and BackTrack didn't work, but 10.10 light did. Unfortunately a similar log file does not exist in this version, so I haven't been able to isolate the original problem.
[Android Software Development] smallba:
Wrong Thread
[Android Software Development] btwthieves:
Wrong thread? Am I posting in the wrong thread, was your post accidentally in this thread (wrongly), or what? If it's the former, would you mind directing me to the proper thread? Thank you.
[Android Software Development] bryandrummer:
Awesome now I get it. Sorry still learning terminology but now that I know where to do things I think I got it. Ill try when I get home. Thank you
[Android Software Development] smallba:
I posted in the wrong thread accidentally, I'm sorry for the confusion
[Android Software Development] tuxling:
There seem to be problems with 12.04 and the Tegra 2 chip used in your phone. (Unity and Firefox don't work)

But i believe the image without Unity should start fine, but without a working Firefox!

I doubt the scripts has anything to do with it, but you can try using the 10.10 script with the 12.04 image without Unity.

(The scripts are almost identical, better error reporting in 12.04 being the biggest difference)
[Android Software Development] mscion:
@tuxling I don't have my phone with me to check but if I use the 10.10 script with 12.04 will I then have the option of LXDE or Gnome desktop or is all that imbedded in the img file?

Also I was wondering if anyone as had any success using the X server app instead of VNC. I am unable to connect to ubuntu. Instead I am connected to root of my phone.

Thanks!

EDIT: OK Option of LXDE or Gnome when using 10.10 script with 12.04. Ans: No.
[Android Software Development] bryandrummer:
this worked to get my internal sd card to function the way i wanted thank you. however i am still having issues with my external card. file properties show that ubuntu is the owner and it belongs to the sdcard rw group, but says the owner had no rights, group has rw and others only have r. i have tried chmod to add r and rw rights to ubuntu and got nothing, and tried to right click and add them: ubuntu says that i dont have permission to change anything, root looks like everything works but when you open the properties again there were no changes. I tried to change ownership of the folder to root, and it said "operation not permitted". I added another user called "temp" and tried to change the ownership to that user and it said the same thing. my idea with that was to change the owner and then just add ubuntu to the group because group has rw permission.

the main sd was the important thing for me and thank you for that much but i was wondering if you had any other suggestions before i gave up on my external sd card
[Android Software Development] mscion:
Not sure if this is what you are asking but, if you are looking for a file you made on ubuntu and saved on external_sd so you have access to it after, say logging off ubuntu. You can find that file on android by opening a terminal and going to /mnt/sdcard/external_sd

Hope this helps.

EDIT: If you use the path /external_sd for saving a document on ubuntu 12.04 then the file is accessible from either /mnt/sdcard/external_sd or sdcard/enternal_sd on android.
[Android Software Development] tuxling:
No, unfortunately vnc is the only way to get a gui for now.

I heard people unable to connect with the recommended vnc viewer had better luck with other viewers, so you might want to try some from Google Play.

(I can't recommend one as i newer used a vnc viewer on Android, i always use my laptop to connect to my phone)
[Android Software Development] bryandrummer:
Thanks for the input but my problem was listed in a little more detail a Page or too back. I fixed half of it (the part concerning the internal sd) . The problem that remains is that unless I have given a program root access, I can't read or write to my external sd card. I have an Acer iconia which has an internal memory and allows for an external card as well. When displaying properties of the external sd folder, it says I have no access to read or write for the owner, I do have read and write for the group, and just read for others. I haven't found a way to either change the permissions or doing something else so I dont have to jump through hoops to open the folder. Every attempt and method used for change permissions doesn't work. Hopefully that clears it up a bit.
[Android Software Development] leolawliet:
I can confirm that Ubuntu Installer works perfectly as described, on my LG myTouch 4G. Thanks :)
[Android Software Development] mscion:
I played a little more with saving files in ubuntu 10 and ubuntu 12. I could read, modify and write a file using the android polaris editor for a file in external_sd that had originally been saved in the path

1)ubuntu 10.10 /root/Desktop/external_sd

2)ubuntu 12.04 /external_sd

In both cases the file ends up in external_sd and I had full access to files without changing any permissions. Perhaps this works because I'm using the Galaxy Note.
[Android Software Development] harishmenace:
I downloaded Ubuntu installer from the market and followed the instructions, but I get error in vnc saying connection refused.
[Android Software Development] barryflanagan:
Make sure to enter in the password "ubuntu" in your vnc settings
[Android Software Development] B@je:
Hi everyone im using the 10.10 small image but i cant install any programs i keep getting this error

app_36@android:/ $ export PATH=/data/local/bin:$PATH

app_36@android:/ $ su

app_36@android:/ # cd /sdcard/ubuntu

app_36@android:/sdcard/ubuntu # cd ubuntu.sh

sh: cd: /sdcard/ubuntu/ubuntu.sh - Not a directory

1|app_36@android:/sdcard/ubuntu # sh ubuntu.sh

Loop device exists

net.ipv4.ip_forward = 1

Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:

eth0: No such device

Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:

800x480

New 'X' desktop is localhost:0

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost:0.log

* /dev/null is not a character device!

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

If VNC'ing from a different machine on the same network as the android device use the 1st address below:

/root/init.sh: line 44: ifconfig: command 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)

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

root@localhost:/# apt-get install midori

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

javascript-common libjs-mootools libunique-1.0-0 wwwconfig-common

Suggested packages:

apache2 httpd mysql-client postgresql-client apache apache-ssl

The following NEW packages will be installed:

javascript-common libjs-mootools libunique-1.0-0 midori wwwconfig-common

0 upgraded, 5 newly installed, 0 to remove and 34 not upgraded.

Need to get 1106kB/1127kB of archives.

After this operation, 4194kB of additional disk space will be used.

Do you want to continue [Y/n]? Y

Get:1 http://ports.ubuntu.com/ubuntu-ports/ maverick/universe wwwconfig-common all 0.2.1 [22.8kB]

Get:2 http://ports.ubuntu.com/ubuntu-ports/ maverick/universe javascript-common all 7 [3854B]

Get:3 http://ports.ubuntu.com/ubuntu-ports/ maverick/universe libjs-mootools all 1.2.4.0~debian1-1 [248kB]

Get:4 http://ports.ubuntu.com/ubuntu-ports/ maverick/universe midori armel 0.2.4-3 [831kB]

Fetched 1106kB in 10s (107kB/s)

dpkg-preconfigure: unable to re-open stdin:

Can not write log, openpty() failed (/dev/pts not mounted?)

dpkg: warning: 'ldconfig' not found in PATH or not executable.

dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.

dpkg: 2 expected program(s) not found in PATH or not executable.

NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.

E: Sub-process /usr/bin/dpkg returned an error code (2)

root@localhost:/#
[Android Software Development] natoqc:
When inputting your screen resolution, do not write 800*480 but 800x480 (with an x as in excellent) and voilà !

Have fun with your linux. :)
[Android Software Development] harishmenace:
Thank you it worked.
[Android Software Development] TanKCR:
Ya, that seems to be the common problem on this device, I am trying a few methods to fix that, one of which is to run gnome-shell instead of Unity. When I finish this thing I will most likely have a full native install rather than just a terminal build, lol.
[Android Software Development] harishmenace:
Everything works fine, just that keyboard doesn't pop up for entering text but works fine on lap dock. Just can't get the keyboard to enter text in the phone.

Edit-got the answer in other thread, just had to press the circle between the zoom controls.
[Android Software Development] nscxp2005:
That sounds excellent TanKCR.

When you have finished, will it be possible to run Unity?

EDIT Zack, would people with Iconia A500 Tabs be able to use this as Native and Dual boot into it?
[Android Software Development] TanKCR:
On Native yes, but not sure about over terminal/vlc in android. I am going to do some research on what people do when running Ubuntu Server which has no GUI.

As far as native over multiple devices, it really comes down to compiling the kernel with the different hardware platforms taken into account. The processor should function fine since they are all Arm devices, however adding additional support for the different variables of the embedded devices is another thing. Touch screen, wifi, bluetooth, GPS, and such. One positive note is that alot of the drivers actually function across both android and linux, making it a little easier to find them.
[Android Software Development] tuxling:
It would be possible in theory, but as neither Zack or I have a A500 to work with it would be almost impossible for us to implement it.

The installer for such a system would be quite different from what we have now too, so i think it would have to be another project!
[Android Software Development] TanKCR:
The installer and installation process would be a huge difference, as it stands with the TF201 the dual boot is beyond kludgy, lol
[Android Software Development] ITesAndroid:
Hi everyone!

First of all, thanks so much to the developers of this installer, you're doing an AWESOME job guys! I've tried Ubuntu Installer yesterday, works great, but I have a problem when shutting the system down. I'm sorry if this problem was already discussed, but I haven't found the solution yet, it's not that easy for me to read in English (i'm from Ukraine)

I'm using HTC Desire A8181, Froyo 2.2

Kernel: 2.6.32.15-gf5a401chtc-kernel@and18-2 #1.

Build: 2.29.405.5 CL293415 release-keys

Each time when I print "exit" to shut down Ubuntu, here's what I get:

* Stopping OpenBSD Secure Shell server sshd [ OK ]
Shutting down Ubuntu ARM
lsof: not found
failed.
failed.
failed.
losetup: /dev/block/loop255: Device or resource busy

And I cannot unmount loop255 whatever I try, I cannot restart Ubuntu as well (maybe I don't know how to do this right), the only way to make it all work again is rebooting the device.

Sry, it's my first time working with Linux and command line, so I'm a noob at this LOL Maybe I'm just doing something wrong) Btw I'm using the script downloaded from the installer app without any changes: https://www.dropbox.com/s/yeogu94ck8937um/ubuntu.sh

Thanks in advance!)
[Android Software Development] batoo:
Haven't you installed hamachi?

In my case there was residential tuncfg.

If you type exit and you have got resource busy error try this command:

lsof | grep /data/local/mnt

and you will get list of apps which are using your virtual linux

write down PID number and after that use kill -9 PIDNUMBER

after that you can umount /data/local/mnt
[Android Software Development] ITesAndroid:
batoo, thanks for the reply! No, I haven't installed hamachi.

Unfortunately [ lsof | grep /data/local/mnt ] didn't work for me, I got

lsof: not found
[Android Software Development] batoo:
Oh it seems that you have some "worse" busybox, try to use better terminal pro, it has good and rich busybox with ssh, scp etc. After you write exit (in the chroot environment) and you get message about umount failed write command with lsof.

I recommend you to buy this great terminal application.
[Android Software Development] ITesAndroid:
I've just tried to use the Better Terminal Emulator Pro, but still it keeps saying "lsof: not found" :(
[Android Software Development] batoo:
Try to install busybox instalator from market, which device do you own?
[Android Software Development] ITesAndroid:
Oh I've suddenly found out that my busybox somehow got uninstalled! I've reinstalled in from market and now lsof works. Thanks so much for your help!
[Android Software Development] batoo:
now I am too tired to think about that but tomorrow I will post you something which should be added to ubuntu.sh.

Cya batoo
[Android Software Development] ITesAndroid:
Thank you, batoo!

...

Hmm.. it's strange, but now when I enter "exit" everything seems to be OK:

Killing Xtightvnc process
* Stopping Open BSD Secure Shell server sshd [OK]
Shutting down Ubuntu ARM
[1] Killed sh ubuntu.sh

But then, when I try to run ubuntu again using ubuntu.sh, I get:

Checking loop device... FOUND
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Device or resource busy
Error: Unable to mount the loop device!

then I try lsof | grep /data/local/mnt, but it shows nothing, like if there are no processes but "device" is still "busy"

and I still cannot umount /data/local/mnt...

UPD:

Seems there's another problem with instalation/uninstallation. I've just tried to install and uninstall some programms and here's what I got when using apt-get:

dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
dpkg: 2 expected program(s) not found in PATH or not executable.
NB: root's PATH should usually contain /usr/local/sbin, usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)

What shall I do?

Sorry if my questions sound silly, I'm new to all this stuff :)
[Android Software Development] Himmig:
Hi all,

First of all this is a great project! Great effort!

I wanted to use my broken Acer liquid E to host a small AMP server.

I first tried Debian but I cant use it because it doesnt support the newer PHP versions anymore (Lenny).

Ubuntu 10.1 works but is still a little outdated.

The problem is that I tried diffeent ubuntu 12.04 images but I always get a

"FATAL: Kernel too old" message...

Any ideas?

The kernel version of my rom (ICS 4.0.4) is 2.6.29.6 - couldn't find a newer one.

any suggestions would be highly appreciated
[Android Software Development] tuxling:
I just changed the script to use our internal version of busybox to do the shutdown.

You might want to try the attached script, just copy it over the old ubuntu.sh and it should work. :)
[Android Software Development] ITesAndroid:
Thank you, tuxling, I'm going to try it now :)

One more question - does Ubuntu 12 need much more resources (processor, memory) than Ubuntu 10? I've installed Ubuntu 10.10 and it works good, but if I want to upgrade to 12.04 what is the proper way of uninstalling the old one? Shall I just replace the image file?

UPD:

I've tried the script, but it says:

Creating loop device... ubuntu.sh: /data/data/com.zpwebsites.completelinuxinstaller/files/busybox: not found
FAILED
Error: Unable to create loop device!

I use Ubuntu installer and therefore maybe it should be /data/data/com.zpwebsites.ubuntuinstall/files/busybox?
[Android Software Development] tuxling:
My bad, i assumed you use the Complete Installer! lol

I changed the script to find out which app you got and use busybox from that.

So try the attached script, should be a bit smarter at finding the right busybox. :)

I don't think Ubuntu 12 itself uses much more resources than Ubuntu 10, but if you try using unity it will be slow!

If you want Ubuntu 12 instead of 10 you can just delete the 10 image and download the other.

But you can have both if you want, they just have to be in different folders or one of the images have to be renamed.

If you want both (or more) you can use the same bootscript to start them, just enter

sh script.sh /full/path/to/imagename.img

And the script will mount and "boot" that image for you. :)
[Android Software Development] ITesAndroid:
It works! Now the system shuts down and restarts in a proper way, thanks so much! )

For now I've got just one problem left, the installation/uninstallation:

dpkg: warning: 'ldconfig' not found in PATH or not executable.
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable.
dpkg: 2 expected program(s) not found in PATH or not executable.
NB: root's PATH should usually contain /usr/local/sbin, usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
[Android Software Development] tuxling:
Hmm, this one is weird, thought we fixed that already! :confused: (It IS fixed in the upcoming update though, just checked! lol)

Try entering

export PATH=/sbin:/usr/sbin:$PATH

In the terminal when Ubuntu is started, then try installing again.
[Android Software Development] ITesAndroid:
Yeah, this worked! Thank you)

And if it won't bother you too much, I would really appreciate your help with one more thing... For some reason I can't access the Internet with default settings, so I have to change the resolv.conf manually. Each time when I boot Ubuntu I have to enter "nano -w /etc/resolv.conf", add one line with my DNS "nameserver 94.240.128.5" and save it, only then I can use the internet. Can you please help me to somehow automatize this process in the script? :confused:
[Android Software Development] tuxling:
Glad it works! :) If you haven't already you can add the "export PATH=..." command to the /root/init.sh script so you don't have to enter it every time.

Look in the bootscript, around like 205 you'll find this:

echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts

You can change that to:

echo "nameserver 94.240.128.5" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts

This should do the trick. :)

(In your case, the nameserver IP would have to be changed for other ISP's)

We really need to look at the hosts and resolv.conf files, they are overwritten at every "boot" which prevent users from making changes that stick.
[Android Software Development] batoo:
Your new script doesn't work properly...

/ $ su

# cd sdcard/ubuntu/

# sh ubuntu.sh

Checking loop device... MISSING

Creating loop device... ubuntu.sh: line 89: /data/data/com.zpwebsites.completelinuxinstaller/files/busybox: not found

FAILED

Error: Unable to create loop device!

# ls

ubuntu.img ubuntu.sh

Old one is ok, could you check it pls? I don't have enough of time to compare scripts.

Thank you for your effort!

EDIT: My bad SHAME on me! Linux installer needs to be installed for this one...

I removed it accidentally
[Android Software Development] tuxling:
I made two script changes today, and it look like you got the first version that only work with the complete installer.

Try this one http://xdaforums.com/attachment.php?attachmentid=1094885&d=1338383106

This should work with any of the install guide apps. (It even work without if you have a compatible busybox in /system/xbin)
[Android Software Development] ITesAndroid:
I made those changes to init.sh and ubuntu.sh and now everything's working as expected :)

Thank you, tuxling, you're doing an awesome job helping to bring the real linux to android devices!

P.S. btw there are over 100 available updates, is it safe to update everything using Update Manager, Synaptic, etc.? Are there any system updates that may cause damade to the image or anything?
[Android Software Development] batoo:
Ahhh thx linuxinstaller is gone and it is working
[Android Software Development] mscion:
@tuxling Thanks for the new script. Closing ubuntu is much cleaner now.
[Android Software Development] tuxling:
Glad it works! :)

NO! You can not update the system files like you normally do, it will break the image.

But the installed apps are safe to update. :)
[Android Software Development] ETDREAM:
I use vnc connect ubuntu，but sreen only display a “X”，Prompt“ no /root/.xsession file no windows manager and no terminal........”，who can help me？？