yashsingh1/xdaforums huggingface dataset:
[Android Software Development] barryflanagan:
Just to follow up on this. I set my cut down script into /etc/init.d and made it executable (I changed the line "export imgfile=.." to point to the exact path to the ubuntu.img). Now whenever I boot up android, all the mounts are set up and in place for Linux on Android.

I then went into Android Terminal Emulator -> Preferences -> Initial Command and entered in:

su -c "chroot /data/local/mnt /bin/su - barryf"

(barryf is my username, but you might use ubuntu if you are using that default user)

...and now whenever I open up a new terminal it opens up in my Linux environment. Nice.

Setting up the chroot mounts on boot does not have any system impact, so is no cost really in terms of memory or cpu cycles, as I am not loading vncserver or any window manager, etc. If I want one I can simply run

vncserver :0 -geometry 1280x800

...in my terminal.

Having a full Linux shell opening by default is very good. If I really need to be in the pure Android shell, I simply open a new terminal and type in exit or Ctrl-d and I am back to a standard droid shell.
[Android Software Development] Preacher1976:
I've tried again with the new Installer: script v7 and Ubuntu Full 12,04v1.. same result

I'm downloading the Ubuntu Small Image v2... Help !!!! :(

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

app_85@android:/ $ cd /sdcard/ubuntu

app_85@android:/sdcard/ubuntu $ su

app_85@android:/mnt/sdcard/ubuntu # sh ubuntu.sh

Checking loop device... FOUND

net.ipv4.ip_forward = 1

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

eth0: ip 10.0.1.4 mask 255.255.255.0 flags [up broadcast running multicast]

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

1280x800

New 'X' desktop is localhost:0

Starting applications specified in /root/.vnc/xstartup

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

/root/init.sh: line 34: /etc/init.d/ssh: No such file or directory

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:

inet addr:10.0.1.4 Bcast:10.0.1.255 Mask:255.255.255.0

inet addr:127.0.0.1 Mask:255.0.0.0

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:/# exit

exit

Killing Xtightvnc process ID 13752

/root/init.sh: line 66: /etc/init.d/ssh: No such file or directory

Shutting down Ubuntu ARM

failed: Invalid argument

losetup: /dev/block/loop255: No such device or address

1|app_85@android:/mnt/sdcard/ubuntu #
[Android Software Development] barryflanagan:
Hi

When you are in the Linux prompt, can you type in the following and post the output:

netstat -lp -n

... this will show what programs are listening on what IP addresses.

Also have a look at the contents of /root/.vnc/localhost:0.log
[Android Software Development] bryandrummer:
I am using the small 12.04 image. When setting my image up and installing programs, some times things freeze, or I had the terminal force close once even. After that when I try to open my image I get a blank gray screen with cross hairs in the center. Is there any way to fix this so I can get back into my image. It took over an hour to download and install programs and short of making a backup of my image after every install I don't know what my options are.
[Android Software Development] Preacher1976:
Hi, results for Netstat:

No content in the root folder even in superuser mode

app_85@android:/ $ export PATH=/data/local/bin:$PATH app_85@android:/ $ netsat /system/bin/sh: netsat: not found 127|app_85@android:/ $ netstat -lp -n Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:7777 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:7203 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN tcp 0 0 10.149.43.158:44310 90.84.50.160:80 TIME_WAIT tcp 0 0 10.149.43.158:59557 90.84.50.160:80 TIME_WAIT tcp 0 0 10.149.43.158:58181 173.194.41.111:80 TIME_WAIT tcp 0 0 10.149.43.158:50153 173.194.35.231:443 ESTABLISHED tcp 0 0 10.149.43.158:59554 90.84.50.160:80 TIME_WAIT tcp6 0 1 ::ffff:10.149.43.158:59772 ::ffff:74.125.134.139:443 CLOSE_WAIT tcp6 0 0 ::ffff:10.149.43.158:45656 ::ffff:41.202.220.78:443 ESTABLISHED tcp6 0 0 ::ffff:10.149.43.158:58018 ::ffff:173.194.71.193:443 TIME_WAIT tcp6 0 0 ::ffff:10.149.43.158:44441 ::ffff:173.194.69.188:5228 ESTABLISHED tcp6 0 1 ::ffff:10.149.43.158:56222 ::ffff:173.194.35.224:443 CLOSE_WAIT tcp6 0 0 ::ffff:10.149.43.158:53851 ::ffff:173.194.71.193:443 TIME_WAIT tcp6 0 0 ::ffff:10.149.43.158:46590 ::ffff:173.194.71.193:443 ESTABLISHED tcp6 0 0 ::ffff:10.149.43.158:57789 ::ffff:41.202.220.78:443 ESTABLISHED tcp6 0 0 ::ffff:10.149.43.158:53382 ::ffff:41.202.220.78:443 ESTABLISHED tcp6 0 0 ::ffff:10.149.43.158:40579 ::ffff:173.194.71.193:443 TIME_WAIT app_85@android:/ $
[Android Software Development] sLy`:
I'm using:

FoxHound GreyFox V2 ROM | SiyahKernel v3.2rc1 || On my Samsung Galaxy S2

"Siyah kernel merged with Linux 3.0.31"

Using the link provided above i downloaded Free install "Ubuntu 12.04 v1 Full" and used "ubuntu-script-v7-complete.zip".

and this is what i get on Terminal emulator

---------- Post added at 05:27 PM ---------- Previous post was at 05:25 PM ----------

I've recently downloaded busybox provided on "play store"

edit: FIXED I used "ubuntu-script-v7.zip" solved my problem. Just trying to get VNC working.

---------- Post added at 05:57 PM ---------- Previous post was at 05:27 PM ----------

Edit: FIX -- No one told me the password was 'ubuntu'
[Android Software Development] barryflanagan:
you seem to be running this from the Android prompt, not the Linux one as I suggested.

run "sh ubuntu.sh" and from the resulting prompt do

netstat -lp -n

..and also do a

ps ax|grep vnc

and post the output
[Android Software Development] devwithzachary:
Yes the complete script is for the complete installer i shall have to update the source forge documents to stop people downloading the wrong one. And it does say in the last page of the install guide in the apps that the password is ubuntu
[Android Software Development] sLy`:
Sweet. Everything working. Only problem with resolution. Hopefully i could resolve that. One more problem. How can i properly unmount this?

I've exited ubuntu (GUI) "menu-> Disconnect" then in Terminal " 'exit' then 'exit' and 'exit' " again. I opened up Task killer, killed all tasks. opened up Clear-Cache. and cleared cache and memory.

I went into Terminal again. and now to mount ubuntu. (sh ubuntu.sh)

i get error "Failed: Device or resource busy"
[Android Software Development] kylon:
If i type exit it says resouce busy

I can t exit,i have to reboot

Sent from my HTC Desire S with xda premium
[Android Software Development] sLy`:
Anyone know if its possible to install "wine"
[Android Software Development] kylon:
Bho,you can try but if i remenber right it doesn t work because of our hw

Sent from my HTC Desire S with xda premium
[Android Software Development] barryflanagan:
Basically no. Wine Is Not an Emulator (that is where the name came from)

Wine does not emulate CPUs, and Windows does not currently run on Arm.

Wine is not able to run x86 Windows code on an Arm processor.

Hope this helps.
[Android Software Development] Preacher1976:
After entering sh ubuntu.sh and the netstat:

root@localhost:/# netstat -lp -n

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 127.0.0.1:7777 0.0.0.0:* LISTEN 102/rild

tcp 0 0 127.0.0.1:7203 0.0.0.0:* LISTEN 102/rild

tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 24289/Xtightvnc

tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN 115/adbd

tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 24289/Xtightvnc

Active UNIX domain sockets (only servers)

Proto RefCnt Flags Type State I-Node PID/Program name Path

unix 2 [ ACC ] STREAM LISTENING 1302 1/init /dev/socket/property_service

unix 2 [ ACC ] STREAM LISTENING 1411 115/adbd @jdwp-control

unix 2 [ ACC ] STREAM LISTENING 1324 100/netd /dev/socket/dnsproxyd

unix 2 [ ACC ] STREAM LISTENING 1326 100/netd /dev/socket/netd

unix 2 [ ACC ] STREAM LISTENING 1328 99/vold /dev/socket/vold

unix 2 [ ACC ] STREAM LISTENING 1331 102/rild /dev/socket/rild-debug

unix 2 [ ACC ] STREAM LISTENING 1333 102/rild /dev/socket/rild

unix 2 [ ACC ] STREAM LISTENING 1330 104/zygote /dev/socket/zygote

unix 2 [ ACC ] STREAM LISTENING 135065 24330/ssh-agent /tmp/ssh-buShgyn24297/agent.24297

unix 2 [ ACC ] STREAM LISTENING 1346 108/installd /dev/socket/installd

unix 2 [ ACC ] STREAM LISTENING 1348 107/dbus-daemon /dev/socket/dbus

unix 2 [ ACC ] STREAM LISTENING 2280 379/bluetoothd @/org/bluez/audio

unix 2 [ ACC ] SEQPACKET LISTENING 1370 110/gpsd /dev/socket/gps

unix 2 [ ACC ] STREAM LISTENING 1382 109/keystore /dev/socket/keystore

unix 2 [ ACC ] STREAM LISTENING 135397 24410/dbus-daemon @/tmp/dbus-CwV0hiyAnx

unix 2 [ ACC ] STREAM LISTENING 1406 101/debuggerd @android:debuggerd

unix 2 [ ACC ] STREAM LISTENING 2225 379/bluetoothd /dev/socket/bluetooth

unix 2 [ ACC ] STREAM LISTENING 134999 24289/Xtightvnc /tmp/.X11-unix/X0

unix 2 [ ACC ] STREAM LISTENING 135845 24423/pcmanfm /tmp/.pcmanfm-socket--0-ubuntu

unix 2 [ ACC ] STREAM LISTENING 135883 24431/menu-cached /tmp/.menu-cached-:0-ubuntu

unix 2 [ ACC ] STREAM LISTENING 135015 24298/dbus-daemon /var/run/dbus/system_bus_socket

As for the other input "ps ax|grep vnc", nothing happens. I just get the prompt.
[Android Software Development] barryflanagan:
Hmm, from the netstat output the vnc server is running and listening on all interfaces, so should be available at localhost

However, "ps ax|grep vnc" should have shown the server running.

Perhaps between the time you did the netstat and the ps vnc died.

Is there a log file /root/.vnc/localhost:0.log ? Post the last 10 lines or so.
[Android Software Development] Preacher1976:
Yep! The ps ax|grep vnc worked..:)

root@localhost:/# ps ax|grep vnc

27069 pts/0 S 0:00 Xtightvnc :0 -desktop X -auth /home/ubuntu/.Xauthority -geometry 1280x800 -depth 24 -rfbwait 120000 -rfbauth /home/ubuntu/.vnc/passwd -rfbport 5900 -fp /usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,/usr/share/fonts/X11/100dpi/ -co /etc/X11/rgb

27073 pts/0 S 0:00 /bin/sh /home/ubuntu/.vnc/xstartup

27233 pts/0 S+ 0:00 grep --color=auto vnc

Is there a log file /root/.vnc/localhost:0.log ? Post the last 10 lines or so.?

=> still in root@localhost, there is the .vnc folder, but the list only shows "passwd xstartup*"
[Android Software Development] barryflanagan:
..ok, well then the vnc server is running and is listening on the localhost interface. There is no reason you should not be able to connect to it.

What VNC client are you using? And are you putting in the password "ubuntu"?

Show us a screenshot of the config page for the vnc client.
[Android Software Development] Preacher1976:
The VNC is the one provided by the Ubuntu Installer.

I've used "localhost" or "127.0.0.1" for the address. The password is "ubuntu"

The screenshot is in french sorry, but the settings are:

User: ubuntu

Password: ubuntu

Address: localhost or 127.0.0.1

Port: 5900
[Android Software Development] barryflanagan:
There should be no username, just the password.

Your vnc log will be in /home/ubuntu/.vnc/localhost:0.log

Can you attempt some log ins using the vnc client and then port the last 10 lines or so of the log file?
[Android Software Development] Preacher1976:
root@localhost:/home/ubuntu/.vnc# cat localhost:0.log

09/05/12 17:16:45 Xvnc version TightVNC-1.3.9

09/05/12 17:16:45 Copyright (C) 2000-2007 TightVNC Group

09/05/12 17:16:45 Copyright (C) 1999 AT&T Laboratories Cambridge

09/05/12 17:16:45 All Rights Reserved.

09/05/12 17:16:45 See http://www.tightvnc.com/ for information on TightVNC

09/05/12 17:16:45 Desktop name 'X' (localhost:0)

09/05/12 17:16:45 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t

09/05/12 17:16:45 Listening for VNC connections on TCP port 5900

Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring

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'

root@localhost:/home/ubuntu/.vnc#
[Android Software Development] barryflanagan:
You've got me stumped. Everything looks fine to me.

Have you tried a different vnc client? 2X client or Remote VNC are good.
[Android Software Development] Preacher1976:
I've installed Remote VNC..reboot the Tab, just in case. And...same result, same answer after the netstat, localhost log etc...

I don't know where the issue is...reading the previous threads, everything seems straightforward.. Maybe it's the CM9 KANG ICS 4.0.4 ROM, those VNC apps might not work properly on ICS.
[Android Software Development] Preacher1976:
I tried with the 3rd VNC app..and it worked !! Same settings.. don't ask why.

Thanks for your help! :D
[Android Software Development] devwithzachary:
glad to hear it!
[Android Software Development] bryandrummer:
I had to edit the script to mount my external sd. I have an acer iconia a500. Located /mnt/external_sd. I don't know if adding this to your if/then statements might be helpful to anyone else. However it won't let me change the permissions to the folder and its contents. After the initial boot the sd is read only and I was able to change it to read and write for anyone but everytime I try to change my external card, I never get any errors but the permissions don't change. I tried using the terminal and by opening the file manager in root. I am using the small 12.04 image. Regular ubuntu user has no access what so ever and root is the only way to even browse my external card. Is there a way to fix this?
[Android Software Development] duchski:
On my Atrix CM9 i get a error message during boot (paid app - automated boot) to the effect of:

file missing in /etc/init.d/ssh

I checked the directory (my phone is obviously rooted) and it does not even exist. Any ideas how to get Ubuntu running? Do I need to install ssh and then how to get it installed to default Android folders???
[Android Software Development] devwithzachary:
this should not stop ubuntu from booting can you post a screen shoot of the full output of the boot script
[Android Software Development] duchski:
Here it is:

I obviously entered incorrect screen geometry settings but the message is persistent no matter what geometry settings I enter.

This is what I get from AndroidVNC @ 24bit color wht 1600x600 (same with all screen resolutions)

I pressed the info button on VNC to show the attributes...

Similar message about /etc/init.d/ssh appears when existing the session via exit command:

Any thoughts?
[Android Software Development] DarkhShadow:
Instead of "1600X600" try "1600x600"

Sent from my ice cream powered Nexus S
[Android Software Development] duchski:
Just did, this is what I am getting from VNC (as with all the configurations):
[Android Software Development] DarkhShadow:
Try a different VNC and if that doesn't work then you need to try another ROM

Sent from my ice cream powered Nexus S
[Android Software Development] barryflanagan:
The ssh daemon is not installed by default so this is why you get the error. As zacthespack said, it would not affect the "boot" process.

@zacthespack, on the whole question of sshd, it might be better to actually install the openssh-server but in the initial init.sh ask the user whether they want to enable sshd and save this setting to bootdefaults.txt.

As it is, with sshd not even installed but the init.sh trying to start it simply throws up an un-necessary error which makes people think something is broken.

I definitely think starting sshd without the user explicitly choosing to is a bad idea, but the present situation is not ideal either.

Probably the best overall solution is to include a preferences section in your App where the user can choose such things as their resolution, to run sshd or not, etc.
[Android Software Development] suntownlegend:
I seem to be having the exact same issues as you were. What VNC app did you get to work?
[Android Software Development] transceiver:
Is there a working browser for 12.04 yet? Firefox still crashes :(
[Android Software Development] bryandrummer:
Midori has been working for me. Can't import bookmarks or anything easy but it is light weight and does the job
[Android Software Development] transceiver:
How do I install that? Sorry for noob questions
[Android Software Development] wmadan:
I did it by using Android terminal and typing apt-get install midori.
[Android Software Development] zeipet:
chroot Problems with Gnome

Hello all!

First of all sorry of my bad english. I have following problem. I use the ubuntu10 V5 image with my sgs2. The boot script and the image work perfect with the lxde session. But I can't write in the gnome session. It always say read only... BUT on the shell ls -l say the directory is writeable. Properties under permission say owner: root, file access: --

What happed here?

Can anyone help me with this issue? I want gnome with ubuntu 10 with write access on the desktop.

Wishes zeipet
[Android Software Development] ch3mn3y:
hi. i did everything what Ubuntu Installer Free app said, but i got this in terminal:

it showed after sh ubuntu.sh

but ubuntu.sh is inside ubuntu folder.

what i did wrong?

Edit: how can i get my phone's ip adress? Is vnc using data?
[Android Software Development] DarkhShadow:
Try "/system/bin/busybox sh"

The problem is there's no shortcut to busybox to call "sh" so it won't work

Sent from my ice cream powered Nexus S
[Android Software Development] ch3mn3y:
Thanks. But "after /system/xbin/busybox sh" i got "applet not found" too (i have busybox in xbin folder)

Sent using r800i with DoomKernel v14 (1.21ghz)
[Android Software Development] DarkhShadow:
Then your busybox needs updating

Sent from my ice cream powered Nexus S
[Android Software Development] ch3mn3y:
I updated it to 1.20 (thr newest in busybox installer) before trying

Sent using r800i with DoomKernel v14 (1.21ghz)
[Android Software Development] DarkhShadow:
Try a different installer then

Sent from my ice cream powered Nexus S
[Android Software Development] ch3mn3y:
I tried another installer as u said and after installing 1.19.4-cm9 it work! Thanks!
[Android Software Development] DarkhShadow:
No problem

Sent from my ice cream powered Nexus S
[Android Software Development] lodk:
Ok first I would like to thank all that have had their hand in making it possible to put linux on phone's great work. I know I couldn't have done it, so with that said great job and thanks for your hard work.

Now I would like to ask maybe what seems like a dumb question, but the dumb one is the one never asked :cool:. I love using aircrack-ng with my ubuntu and not that I condone the cracking of anyones internet network :eek:. I do like knowing if I am out and about and there is a network I can use and I would like to to save my data limit :D. (I know call me a hack call me whatever, but I do it and if it offends you then sorry :confused: I don't ask anyone else to do it and I am sure I am not doing it to u.) as I was saying I don't go on someones wifi to steal their email or any of that crap :rolleyes:.

I am wondering if anyone has seen or thought of a way to install this and if so can the wireless card be put into monitor mode with injection support. I know I seen in this post that if your phone cant do it then you linux can't either. anyway I know the Dev's out there are very good at what they do :D they can read code like no other :cool: and if it can be done this would be the place where the great minds of XDA would figure it out :cool:.

ok enough rambling now sorry if I did :o long and short is did, is or can someone make aircrack work on any of the distro's available for our andriods.

Thank you :)
[Android Software Development] D_one:
Injection does not work on most hardware.
[Android Software Development] mscion:
Hi. Hope to root and try unbuntu installer later today. Has anyone done so on the rooted stock ICS on Galaxy Note that just came out . Seems like more memory is being used with ICS. Has anyone seen a decline in performance?

Thanks!
[Android Software Development] devwithzachary:
I am running the rooted stock ICS myself and do not really notice any change myself no
[Android Software Development] Preacher1976:
Hi,

After checking, the issue was not due to the VNC app but the "launch sequence":

1-reset the terminal

2-launch the boot sequence from the app install

3-enter the screen res if requested

4-then: don't type "exit", instead go to the VNC without terminating the terminal session and press connect - ubuntu starts
[Android Software Development] zeipet:
*push*

Can nobody help me?
[Android Software Development] mscion:
Thanks. I bought the complete installer and I think it is nicely set up but of course it is not completely noob proof as I shall demonstrate. I first tried the large debian file because it has open office. I put the .sh file and the image in the external_sd/debian directory but I forgot to set the path to debian during the initial set up. Instead the install was set to look for files in external_sd/linux. I guess this was just a generic thing and we were supposed to replace linux with debian in that path. Unfortunately this is a one time setup so I am unable to change it. Is there a file I can change a setting in to make the path have debian instead of linux. Anyways, for now I moved the image and .sh file to the same (external_sd/linux). I was able to start up debian and vnc seem to work. But will this cause any unforeseen problems?

While in the desktop environment I tried to fire up open office writer. The open office start up box shows up on the screen but after about 5-10 minutes it never opens to the editor. It shouldn't take more than about a minute or two so I wondering if this is a problem related to memory. Perhaps it is best to start with the smallest image and install what you like to use. Any thoughts here?

I was also having some problems with apt-get but will try again later. Does it work with this debian image?

I'm currently downloading the large ubuntu image as it must have libreoffice.

Will report on that later. Hopefully I set the path correctly this time!

Even though some things are not working it shows good potential and I was impressed with how responsive vnc was. I have a small bluetooth keyboard with touch pad. I will see how that works.
[Android Software Development] shadyr25:
Why do I need my data to be active? Does vnc use internet traffic? Will it cost me more as I have limited allowance? Thank you.
[Android Software Development] devwithzachary:
If you go into the app mangerment and go to the complete installer and wipe its cache that will wipe the settings and you can the change this, this should be changed the in the next release letting you change the settings 'on the fly'.

Yes apt-get should work

You will need to download the image files however you could download these via a computer. VNC does not use internet traffic no your connecting to a vnc server running in the ubuntu image on the 'local host' ie the phone.

But the image files are quite large so you should download these over wifi
[Android Software Development] shadyr25:
Oh okay, so let me get this straight, all I have to do is download any image file of my choice over wifi, then after that it won't require any internet connection? I understand the image file being on the sd card but vnc, does require my data to be active, if so, it won't be using traffic. Please correct me if I'm wrong. Thank you so much.
[Android Software Development] devwithzachary:
Yes once you have downloaded the image you will not need a internet connection to use it and to use vnc neither need it. Of cause if you want to go online within ubuntu or install new programs etc you will need the internet. But to use it no you dont