Thursday 16 August 2012

virtualbox android mount windows network share / drive

to build an android environment, I will use virtualbox
goto,
http://www.android-x86.org/download
get nightly build,
mariuz's site http://mariuz.android-dev.ro/
moonman's site http://android-x86.moonman.dk/
get the nightly build for x86 pc or vm (not really nightly :-< )

internet access,
setup nat of virtualbox if you use NAT http://www.virtualbox.org/manual/ch06.html#networkingmodes
 - or -
`route add ... ` in your command prompt for host-only adapter and use the IPEnableRouter registry, as well as a dhcp server in Files -> Preferences -> Network -> Dhcp Server
 - or -
some other else to route, software routing s/w like kerio wf, iptables and whatever

configure your virtualbox
I have a software router, and I use host-only adapter
(set up your own network type to have network access in your android virtual machine)


start your virtual machine,
start the installation,
Installation - Install Android-x86 to harddisk

Create / Modify partitions
New -> Primary -> [enter] -> [Bootable] + [enter] -> [Write] + [enter] -> yes + [enter] -> quit

sda1   Linux   VBOX HARDDISK
ext3
install GRUB
install /system as rw
Create a fake SD card
2047 [enter]

Remove the disk from virtual drive (by right clicking the cdrom icon)
Reboot


to send or receive (upload / download / transfer / access) files to a windows machine (a smb target),
first install AndSMB, from the website, grab the apk then execute it




hostname is the ip address or hostname of the SMB server, and need to be accessible form the virtual machine
 - on windows -
open command prompt by [winkey] + [r] -> cmd -> [enter]  or  start -> run -> cmd -> [enter]
enter the command `ipconfig` or `hostname` then you will get your ip and computer name
>ipconfig | find /i "ipv4"
   IPv4 Address. . . . . . . . . . . : 10.0.0.1
   IPv4 Address. . . . . . . . . . . : 192.168.0.2
   IPv4 Address. . . . . . . . . . . : 192.168.248.1
>hostname
WIN-U5XXXXXXXX9
 - on linux -
ifconfig

username and password,
 - on windows -
your account, admin account or any account has the privilege(permission of the sharing point) , password cannot be empty
`net share C$` to view your permission, `net user` to view all users on windows
`lusrmgr.msc` and `fsmgmt.msc` will help too, as well as `storagemgmt.msc` on server platform
`lusrmgr.msc` - Local Users and Groups
`fsmgmt.msc` - Shared Folders
`storagemgmt.msc` - Share and Storage Management
 - on linux -
specified in /etc/samba/smb.conf and passwd

Domain,
leave it blank, it is WORKGROUP as default in windows, not in a domain by default

Local dir,
where the files be placed when downloading it
don't confuse with mount point, not mount point

Remote dir,
 - windows -
there is "default share" in windows, which is C$ D$ E$ etc ... and the permission is always full (rw access)
use `net share` command to view or configure it, or right-click any drive icons in my computer or folders in else where, open its properties page, then you can configure sharing options in the sharing tab
 - linux -
specified in /etc/samba/smb.conf and can be various, https://help.ubuntu.com/12.04/serverguide/samba-fileserver.html



Server Message Block (SMB)
Common Internet File System (CIFS)






No comments:

Labels

Search This Blog