yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] lundahl:
thanks. got it running properly quite easily after that... =)

however, i too have problems unmounting. is there a way of checking if there's a process running, and kill/close it?

is there any text editor working in the android terminal?

@19arek93: have you tried replacing the img-file with a "new" one? i had some similar problems after fiddling around with the vnc, that disappeared after replacing...
[Galaxy S I9000 Android Development] azazin:
Sorry,

I must have misunderstood D:
[Galaxy S I9000 Android Development] 19arek93:
Yes, I was trying to replace system image on my phone. But it's not changing anything.
[Galaxy S I9000 Android Development] spook:
Hi, I'm trying to run this on a Captivate with SRE installed but I get a permission denied error. I know that it's because I am unable to run adb with root permissions. Does anyone know how i can resolve this issue on the Captivate?

"adb root" gives me an error that says it is not allowed on production builds and "su" in an adb shell gives me a permissions denied error.
[Galaxy S I9000 Android Development] chinedu40:
Is it possible for anyone to post a video or screenshots of this running on their phone?
[Galaxy S I9000 Android Development] daml:
so im a linux user. have been for years now. good thing (bad?) is that i haven't used the terminal much. im an ubuntu user and havent needed to.

anyway basically, i downloaded the 2 scripts and the image, copied them to /sdcard/ubuntu and checked for execute permissions.

I am rooted and i do have busybox. basically this is my output from the adb shell..

#su

# sh startA_ubuntu.sh ubuntu.img

[: not found

test: not found

mkdir failed for /data/local/mnt, File exists

mount: mounting ubuntu.img on /data/local/mnt failed: Block device required

mount: mounting proc on /data/local/mnt/proc failed: No such file or directory

mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory

chroot: not found

i seem to be missing some binaries. it also seems the script is broken? ([: not found) any ideas, im so confused.

BTW the failed mkdir is from a previous failed attempt.
[Galaxy S I9000 Android Development] daml:
(dont know why but editing is doing nothing)

just thought id ask. should i mount with loop or something?
[Galaxy S I9000 Android Development] daml:
apoligies the edit buttons not working??

but ok it is now i can edit this post.

should i be mounting the image using "mount -o loop file.img /mnt/somewhere"

ok. i just tried. it still asks for block device.

why would it be asking this. i assumed this was covered "-o loop file.img"
[Galaxy S I9000 Android Development] rav0r:
froyo, jp2 issue

I have a phone running Froyo, jp2 and I am havin trouble installing a chrooted ubuntu on my phone. I tried both this version, by mounting the image as well as creating a special ext partition and mounting it, but none of them seem to work because of some troublesome command issues.

mount: can't setup loop device: No such file or directory
chroot: can't execute '/bin/bash': No such file or directory

I reinstalled the firmware, tested both busybox 1.16.0 and 1.16.1 and still no luck.

I browsed the net for answers and I found a few people having the same issues but there seems to be no easy fix to this :(
[Galaxy S I9000 Android Development] alfrqan:
It could be crazy Q any way I will ask

can we run Win7 or XP using same method

i mean can win7 be able to launch on SGS
[Galaxy S I9000 Android Development] Darkstriker:
I would suggest simply trying it.
[Galaxy S I9000 Android Development] Omegavirus:
+1 for this:)
[Galaxy S I9000 Android Development] rav0r:
nexus one

The guy from nexusonehacks placed a video for nexus one. Too bad it ain't working on my Froyo :(

You can even find more videos out there, I belive.
[Galaxy S I9000 Android Development] Ibanez33:
Not through this method as neither xp or win 7 are compiled to run on anything appart from x86..

If you lucky you might get xp to boot through dos box but that'll be about all it'll do.. :)
[Galaxy S I9000 Android Development] alfrqan:
I am noop in these things so nothing to do
[Galaxy S I9000 Android Development] rav0r:
windows applications

Of course you could run windows applications using wine, they run even smoother than on windows, but the number of apps is limited by the processor architecture. But wine is continously updating the ARM port.
[Galaxy S I9000 Android Development] rav0r:
solved: running ubuntu on galaxy s

Ok, I belive some mod should make the thread sticky, because I digged for 2 days on the internet and haven't found the root of the problem.

So I begun dealing with the loop devices and, since I have previously installed One Click Lag Fix, it occupied my /dev/loop1 by mounting /dbdata/rfsdata/ext2/linux.ex2. It seems Android does not have other loop devices created by default so you have to create one. But the created loop device will, for some unknown reason point to /mnt/.lfs.

So, here's the whole fix for you!

umount /mnt/.lfs
losetup -f
#to find the next free loop
mknod /dev/loop1 b 7 1
#or the one shown by losetup -f, with the according minor number
losetup /dev/loop1 ubuntu.img
mount -o noatime /dev/loop1 /data/local/mnt

That's it, you're done!

I am not good at scripting, but creating a script to automatically do this would be no big pain. Too bad I already reinstalled my ROM, it was just a waste of time.
[Galaxy S I9000 Android Development] rav0r:
vnc problem

VNC viewer - installation failed.

I don't know how am I going to make it work.
[Galaxy S I9000 Android Development] mdalacu:
Please explain what is missing for us to boot directly into ubuntu (no android with vnc, the way hd2 does)? We have access to kernel source. Can we install grub?
[Galaxy S I9000 Android Development] rav0r:
ubuntu issues

We don't have any drivers for Ubuntu, it would be just a dull system with no connectivity, no phone, nothing.

----------------

I installed everything, but when I try to connect with VNC I get "vnc connection failed"

Maybe my vnc viewer is messed up?
[Galaxy S I9000 Android Development] daml:
native linux.

The sgs bootloader is taken up by android AND a recovery mode. I'm not sure a third mode (eg booting linux) can be added. First of all, this would need to be hacked.

You would also need x server video and input drivers. I am guessing most other drivers would work being linux kernel modules AND android using a the linux kernel (afaik... am I wrong?) .

This wouldn't actually be that hard of a job. Who is willing to help me? I would like to have a go at the bootloader, then writing some xserver drivers..

I would LOVE to run enlightenment 17 linux desktop. Illume is really well suited to this task.

http://nanl.de/blog/wp-content/illume.jpg

+1 for thread being stickied. Even if we are only doing this "because we can" the novelty value is endless. lol
[Galaxy S I9000 Android Development] rav0r:
working

Look out for the VNC port, I checked mine with mnap from another computer, everytime you run vnc server, it opens up a new display, a new port, starting with 5901. Mine is already 5904.

I do not know, how do I log in to Ubuntu as a normal user, not root..?
[Galaxy S I9000 Android Development] rav0r:
ubuntu start script

Here's my script, tested on my samsung and working. Of course, someone better at scripting could improve it. So, what it does new:

-umounts /mnt/.lfs

-check for next possible loop with busybox losetup -f

-creates the loop device with the accordingly minor number.

-mounts the image to the loop device

-mounts the loop device
[Galaxy S I9000 Android Development] rav0r:
sound

Right now, I am trying to make the sound work, although it might be a pain..
[Galaxy S I9000 Android Development] sirphunkee:
I edited the title of the thread a little bit and went ahead and made it a sticky. However, we already have a ton of those in this section, so expect to see this one rolled up in a single reference sticky with a bunch of the others very soon ;)
[Galaxy S I9000 Android Development] daml:
more progress on a native linux

awesome,thanks!

I flashed to jm9 and before running any lag fix I tried again, and it works.

I had similar problems with the vncserver restarting and upping the port every time I typed a command. This is easily fixed by killing vncserver before issuing any commands. For example before the geometry command.

Good to know I can still get this thing working once I reinstall voodoo.

Now off to work on the bootloader and a native linux.

I HAVE successfully rewritten parts of the stock bootloader to attempt booting a minimal linux, which will then mount an image file and boot off it. Problem is i lost recovery. Hacking this to accept a third partition is a little beyond my knowledge. I'm sure I could chainload but I have NFI how to get it to see the patition I made.

Does the bootloader even see the internal sd? I am assuming so given that recovery mode sees it but then that could be booting recovery first THEN looking for SD?

Who knows about this stuff? I could really use the help..

I will upload my modified bootloader code soon.
[Galaxy S I9000 Android Development] daml:
sound is not possible through vnc. afaik. BUT what about a rdesktop client. wyse pocketcloud for android supports rdesktop. i also suggest using this for vnc, the mouse pointer is an awesome idea... makes things a hell of a lot easier.
[Galaxy S I9000 Android Development] rav0r:
thanks

Yes, thank you very much, I might as well use GIMP with wyse pocketcloud.
[Galaxy S I9000 Android Development] HateB:
I have little problem this. I have Samsung galaxy s, with XXJPK and root. I completely finished all steps but now i have problem. I pushed files to sdcard right and i checked that it's okay. I opened command line again because i failed something:P. I wrote

cd C:\\androidsdk/tools

adb shell

su

cd /sdcard/ubuntu

Then i got permission denied. If i tried to continue i wrote this:

sh startA_ubuntu.sh ubuntu.img

Then i got:

/data/local/mnt

mount: can't setup loop device: No such file or directory

mount: mounting proc on /data/local/mnt/proc failed: No such file or directory

mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct

ory

chroot: can't change root directory to /data/local/mnt: Operation not permitted

Well, what i failed? I tried this without writing su(only adb shell) and nothing new. Thanks you guys if you help:)
[Galaxy S I9000 Android Development] imazighen:
I get the same .. its says also loop /0 doesnt exist bla bla

anybody has a solution for this, over a week and I am still trying...

do we have to make an ext2 partition in the internal/external sdcard ?
[Galaxy S I9000 Android Development] rav0r:
my script

Just use the script I created, read my previous posts involving the creation of loop devices and download my script that includes all the commands needed.

You sometimes have to make sure everithing is mounted rw. to do this, just use the mount command, and remount everything that is mounted read only. Like this

mount -o rw,remount -t <filesystem type> /<stuff to mount> /<place to mount>

Making the ext 2 parition is not necessary if you use the method detailed in this thread. It is however possible to install ubuntu on an ext2 partition, that you can mount afterwards. Though I don't know what advantages you would get.

But you need to create a tarball on an Ubuntu mashine using rootstock. I have such a tarball that I could eventually seed via torrent. Though I don't know if I am already allowed to post links. And, as I already said, I don't see what advantages you would get.

Just use the method detailed here, I use it with success.

---------------------------------------------------------------------------------------

edit:

I just created a torrent file with the ubuntu img and another one with the tarball, since I have plenty of bandwidth. So spread the word (and torrent ;) ) and seed.

Instructions for using the tarball are here: http://burningbroccoli.se/post/949205350/chrootd-ubuntu-on-samsung-galaxy-s-android

Please note that I have not installed it that way.
[Galaxy S I9000 Android Development] imazighen:
Hi ravOr,

thanx for the answer but I still get the same error :

./adb shell
$ su
# cd sdcard
# cd ubuntu
# sh startA_ubuntu.sh ubuntu.img
/data/local/mnt
failed.
mknod: /dev/loop/0: No such file or directory
losetup: /dev/loop/0: No such file or directory
Usage: mount [-r] [-w] [-o options] [-t type] device directory
mount: No such file or directory
mount: No such file or directory
chroot: can't execute '/bin/bash': No such file or directory

I couldnt figure out how to fix this.. :confused:
[Galaxy S I9000 Android Development] Aanze:
This is truly awesome BUT (there's always a but) it would be more usefull to be able to choose booting ubuntu or android from the device itself...
[Galaxy S I9000 Android Development] rav0r:
It ssems you have a weird allocation style on your device. Just try running the commands manually, type

mknod: /dev/loop0 instead of mknod: /dev/loop/0

or just create a folder /dev/loop and the script should run just fine.
[Galaxy S I9000 Android Development] DeiphoneaAndroid:
Nice job.

Now we only need drivers to put wifi in monitor mode :cool: and the first thing i will install is the aircrack suite :eek:
[Galaxy S I9000 Android Development] rav0r:
Another cool stuff when using a image, is the posibility to expand it as you need more space. detailed info here: http://www.stacklet.com/doc/filesystem/image_resize

I now found a stuff that you can do in this Ubuntu, but not in Android: upload large files. You always get hang-ups in android browsers. You just need to mount the image somewhere or just browse to /data/local/mnt if it's already mounted and copy your file.

Here you have it: my destop with 2 instances of Gimp running, just rendered something, but it's true, after a fresh restart.
[Galaxy S I9000 Android Development] AllGamer:
unstickied

feel free to add a highlight on the SGS wiki

http://xdaforums.com/wiki/index.php?title=Samsung_Galaxy_S_Series#Good_Forum_Topic_Index

or perhaps add all the important info and steps to the SGS wiki
[Galaxy S I9000 Android Development] pelinoos:
!!!

i got this error :

[/URL][/IMG]

what can i do?
[Galaxy S I9000 Android Development] AlCaTrAz86:
Chroot

I did all the prep work … (just copy/paste on sdcard because I run win7 on my laptop) I started the terminal emulator with SU permission (on sgs)and after I run the command “sh startA_ubuntu.sh ubuntu.img” hire is the error message I got :

# sh startA_ubuntu.sh ubuntu.img

/data/local/mnt

ioctl LOOP_SET_FD failed: device or resource busy

mount : no such file or directory

mount : no such file or directory

chroot: can`t execute ‘/bin/bash’: no such file or directory

What`s the problem ?

LE : come on ppl .. nobody takes care of this post ?
[Galaxy S I9000 Android Development] mobilx:
[YOUTUBE]3wQ9XogfjRU[/YOUTUBE]

Check the 1:49 and how did he open the keybord :confused: He pressed the menu button. That doesnt work with my sgs.
[Galaxy S I9000 Android Development] iScream^:
This isn't a real Ubuntu running on Nexus, this is a remote app for a running Ubuntu on a PC.
[Galaxy S I9000 Android Development] mobilx:
Noup:) this is ubuntu running on N1 and now it is running on my SGS too. I found the solution for the keybord. OpenCloudFree (VNC client from market ) It has the keybourd and mouse with buttons.
[Galaxy S I9000 Android Development] xrayA4T:
Has Anyone had success running Ubuntu with oclf installed and using the loop device for mounting the data partition?
[Galaxy S I9000 Android Development] bassM:
Not working

It didn't work quite as expected on XXJP6 with voodoo-pre6 :(

Help is greately appreciated! For the record, neither did the original script..
[Galaxy S I9000 Android Development] ravi84m:
not working with oclf

i tryed a new loop and everything but i still get the error

/data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
mount: No such file or directory
mount: No such file or directory
chroot: can't execute '/bin/bash': No such file or directory
[Galaxy S I9000 Android Development] Aanze:
Hi !

I was able to get it working the first time I tried to start. Using VNC to run the gui.

Then I tried to stop but I was unable to umount:

# sh stopA_ubuntu.sh

failed

failed

failed

Now, even after phone reboot I still can't umount nor mount by the way:

# sh startA_ubuntu.sh ubuntu.img

/data/local/mnt

ioctl LOOP_SET_FD failed: device or resource busy

mount : no such file or directory

mount : no such file or directory

chroot: can`t execute ‘/bin/bash’: no such file or directory

And of course I always fail to connect using VNC..

What should I do to get it work again ?
[Galaxy S I9000 Android Development] Tusnal:
what about aircrack anybody have tried it?
[Galaxy S I9000 Android Development] agentfusion:
i don't know if you guys are aware of this or not, but there are a whole bunch of tools for mobile phones running debian. WMs meant to run on phones. Dialers, etc.

If those packages are compatible with ubuntu, or ubuntu has them in their repos, you can install ubuntu on a Galaxy S *and* use it as an actual phone.

For more information, google "Debian4FreeRunner".. that should take you to the Debian Wiki for the Openmoko Freerunner version of Debian. DO NOT TRY TO INSTALL ON YOUR SGS. I'm just telling you about it so you can find the names of applications meant to use debian on mobile phones so you can check the ubuntu repos for them.
[Galaxy S I9000 Android Development] fire314:
This only makes sense if you're booting into Linux *natively* - which I don't think has been achieved on the Galaxy S yet. Otherwise, you can just access Linux using a VNC app from your android, and just access it from android when you need it, leaving android still there to use.

Anyway - head to http://xdaforums.com/showthread.php?t=962023 for the latest Ubuntu (10.10) image with loads of tweaks and apps already installed!
[Galaxy S I9000 Android Development] pcboyy:
I have error msg

mount: mounting ubuntu.img on /data/local/mnt failed: Block Device Required

This happen after I type command 'sh startA_ubuntu.sh ubuntu.img'

can anyone please help me?
[Galaxy S I9000 Android Development] Robertozzz:
Ubuntu on Framebuffer with mouse+keyboard

Gents,

For those interested in running ubuntu on Galaxy S with a working bluetooth mouse AND bluetooth keyboard, and using the FRAMEBUFFER of the Galaxy instead of VNC..

MODS: hope this is the right place to put this. If not, feel free to remove/move/alter or whatever necessary.

All credits go to all the gentlemen who have worked hard to figure out all this wonderfull stuff. I just put some things from here and there together and got this as result.

Bear in mind that your configuration might be different, and you might have to make some changes in things I described below. This is what worked for me and just wanted to share. Feel free to modify, comment, alter or whatever you like.

I got this working on a 1st gen Galaxy S with Cyanogenmod 9's ICS running on it.

With this thread I got Ubuntu running on my Galaxy in the first place. But I wanted something else than VNC...

With work of Thomas Polek ( h t t p://thomaspolasek.blogspot.com/2012/04/arch-linux-lxde-w-xorg-mouse-keyboard_16.html ) I managed to get UBUNTU running on the framebuffer with BLUETOOTH keyboard and mouse support with the following steps. I used SSHdroid for my commands in shell.

1.In Android, connect to a bluetooth mouse and keyboard. I connected mouse first, then keyboard. Connecting in different order might cause trouble later in setting xorg.conf.

2. fire up your ubuntu chroot as described in the first post in this thread using SSHdroid (at least this is what I did and was most convenient)

3. type exit to go back to Android shell and mount the required /dev section to the chrooted dir.

mount -o bind /dev /data/local/mnt/dev

4. Kill the media + zygote service using the commands on Thomas's site from PIKPOK

setprop ctl.stop media & setprop ctl.stop zygote

Also kill the bootanimation:

This worked for me but might be different in other builds.

killall bootanimation

5. go back to the ubuntu environment by just using the startA_ubuntu.sh again.

6. install lxde, as GDM is too heavy. Also Nano might be handy to edit the xorg.conf later (personal flavour)

apt-get install lxde nano

7. Modify your xorg.conf in /etc/X11. I used the one described on the site of Thomas Polek, (available for download with WGET) and modified the mouse and keyboard "events"

Found out that my bluetooth mouse has event9, bluetooth keyboard has event10. This probably changes order if you connect keyboard first instead of mouse.

8. Start the lxde desktop on the framebuffer using the command on the site of Thomas :

Start LXDE session (starts Xorg Server)

xinit /usr/bin/lxsession &

9. Enjoy! You should have a fully working LXDE desktop with working keyboard + mouse.

Again, this is what worked for me, and might not necessarily work for you. Before trying these steps, please read the instructions on this thread and the thread of Thomas Polek first, so you understand what I did.

Also sorry for my misspellings/miswordings etc. I am not an expert in linux/android so please feel free to correct any mistakes.
[Galaxy S I9000 Android Development] moorkai:
Sorry for bumping a year-old thread!

Could you please share the image file you used with the scripts from the first post? The NexusOneHacks.net version shared in the thread doesn't play well with the scripts from this thread, but unfortunately neither with the script that comes with it (at least for me), and as far as I can see, download link for the original image is down too. TIA.

EDIT: rav0r's torrent seems pretty dead too (no seeders).
[EVO 4G Q&A, Help & Troubleshooting] munsterrr:
Im assuming just do a full data/system wipe and just restore but i wanted to make sure first.

Kernels and me arent getting along and I just want to go back to my standard unmodified Fresh rom.

Thanks ahead for your help
[EVO 4G Q&A, Help & Troubleshooting] SharkUW:
You will need to flash the kernel you want. You shouldn't need to wipe nor will wiping change your kernel.
[EVO 4G Q&A, Help & Troubleshooting] chandlerw88:
Flash stock kernel
[EVO 4G Q&A, Help & Troubleshooting] nebenezer:
Yeah, wiping alone wont help. Actually wiping wont help regardless.

You can either flash a different kernel over the one you have now or you can just reflash whatever ROM you are using without wiping.
[EVO 4G Q&A, Help & Troubleshooting] munsterrr:
appreciate your help ladies/gents.

im loving the dead flash sig btw
[Galaxy S I9000 Themes and Apps] varunrai:
Ok, so I'm using Launcher pro Plus along with Smooth Calendar and The LPP Calendar widget on another home screen.

For some reason, my SGS totally hung and I got the low memory warning. I checked my applications list and I see 'calendar storage' taking nearly 97 mb. I cleared the data and re-started my phone, got my calendar synched again and I see that it's 1.57 mb. Is that memory leak because of LPP? Or smooth calendar? I'm using the latest version of LPP in which the known Calendar memory usage problem has been fixed.

Any help?
[Galaxy S I9000 Themes and Apps] gaspernemec:
i guess thats from calendar
[Galaxy S I9000 Themes and Apps] greg330:
in case it helps; if it does reocure; do look at the bat usage see if you can figure out which is runing the most ; maybe it can help seek out the faulty soft.

ps; i use LPP and only its widgets.. i dont have any memory leeks.. but start ups are usually acompanied by a FC and relaunch of LPP.

hope you find your prob.
[EVO 4G General] eric70123:
Damn you Sprint. I appreciate the hassle free replacement but why did you have to send an unrootable froyo updated one. I was so happy with my Rom and theme arghhhh!
[EVO 4G General] m3latino:
I received a replacement but it was not updated to Froyo. Rooted it and now running Fresh. Much better than the stock Froyo for sure.
[EVO 4G General] eric70123:
Lucky