[Galaxy S I9000 Android Development] Arise:
ssh, samba, alter configuration for virtualbox

First thing first, the connection to the VM box over ssh (putty) can easily be achieved following the steps described here:

http://xdaforums.com/showpost.php?p=8868634&postcount=54

###########################################################

Let's continue with setting up some sort of file sharing between host and guest.

Note: to make things easy, login as root.

Now, we can ssh nicely into guest OS, so what about sharing?

Well, we can share files over "Shared folders" feature, but this sucks cause we can't see symlinks in Windows.

So, the best choice would be to install Samba.

Note: People might get better speeds if instead of Samba would try NFS, but tbh, I wasn't able to get a damn working NFS client on Windows.

So, for now, Samba FTW!

apt-get install samba smbfs

You need to configure the samba share to be able to see it inside the Windows host machine.

edit /etc/samba/smb.conf in your favorite editor and add the following lines:

inside [global] section you should have something like:

[global]
workgroup = kernelcompiler
security = user
browseable = yes
guest ok = yes
guest only = no
encrypt password = yes

then add a new section, called [kernel-compiler]:

[kernel-compiler]
#in order to make the files touched on windows not executables add map archive = no
map archive = no
path=/home/kernel
read only = no
writable = yes
browseable = yes
public = no
valid users = kernel

restart the samba daemon:

/etc/init.d/samba restart

###########################################################

Great, now shut down the Guest (I think the previous restart was not necesary).

On Virtual Box window, all VMs stoped, select File > Preferences.

On the network tab, add a new Host Only network (you can reuse the existing one if you wish and you understand what are you doing).

Alter settings, the IP should be something like: 192.168.134.1 and mask: 255.255.255.0

Disable DHCP server.

Ok. Ok.

The new network interface should be installed.

Right click on the Debian machine, Settings > Network.

On the tab Adapter 2, check Enable Network Adapter, Host Only Adapter, select (the Name field) the network card that we created above and click ok.

The first interface (Adapter 1) NAT is for internet access of the guest os.

The second interface (Adapter 2) Host Only is for communication between guest os and host os. You need that to be able to access Samba. If I think a little that could be used to access also the ssh port... :)

###########################################################

If we have something left to do is to configure the network settings inside the guest os.

Start virtual box.

Note: Inside /etc/udev/rules.d/ there is a file like: 70-persistent-net.rules Just delete this file if you run into problems while configuring the network interfaces inside guest os.

To enable the second interface (Host Only) do something like:

ifconfig eth1 192.168.134.1 netmask 255.255.255.0 up

Also, do your stuff (I assume you kinda know how to config the linux box) inside the file:

/etc/network/interfaces

Reboot.

###########################################################

Now you should be able to map the /home/kernel folder in Windows to something like Z: drive.

Ask for help if you don't understand/run into troubles.