(OK)(OK) adb -s emulator-5554 shell - natpf1 - VirtualBox - NAT Port Forwarding


---------------------------------------------------------------------------------
//successful (natpf1, NAT Port Forwarding) OK OK OK
---------------------------------------------------------------------------------
tunctl -t tap_a_1
ip link set up dev tap_a_1
brctl addbr br_a_1
brctl addif br_a_1 tap_a_1
ip link set up dev br_a_1
ifconfig br_a_1 up

VBoxManage createvm --name android-x86_64-6.0-rc1-1 --ostype Linux_64 --register; VBoxManage modifyvm android-x86_64-6.0-rc1-1 --memory 1024 --vram 128 --usb off --audio pulse --audiocontroller sb16 --acpi on --rtcuseutc off --boot1 disk --boot2 dvd --nic2 none --nic3 none --nic4 none; VBoxManage modifyvm android-x86_64-6.0-rc1-1 --natpf1 adb,tcp,*,5555,*,5555; VBoxManage storagectl android-x86_64-6.0-rc1-1 --name "IDE Controller" --add ide --controller PIIX4; VBoxManage storageattach android-x86_64-6.0-rc1-1 --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/virtualbox-os/android-x86_64-6.0-rc1-1.vdi; VBoxManage startvm android-x86_64-6.0-rc1-1;

VBoxManage createvm --name android-x86_64-6.0-rc1-1 --ostype Linux_64 --register; VBoxManage modifyvm android-x86_64-6.0-rc1-1 --memory 1024 --vram 128 --usb off --audio pulse --audiocontroller sb16 --acpi on --rtcuseutc off --boot1 disk --boot2 dvd --nic2 bridged --bridgeadapter2 br_a_1 --nic3 none --nic4 none; VBoxManage modifyvm android-x86_64-6.0-rc1-1 --natpf1 adb,tcp,*,5555,*,5555; VBoxManage storagectl android-x86_64-6.0-rc1-1 --name "IDE Controller" --add ide --controller PIIX4; VBoxManage storageattach android-x86_64-6.0-rc1-1 --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /run/media/root/158a840e-63fa-4544-b0b8-dc0d40c79241/virtualbox-os/android-x86_64-6.0-rc1-1.vdi; VBoxManage startvm android-x86_64-6.0-rc1-1;

adb -s emulator-5554 shell
adb -s emulator-5554 shell ls /

---------------------------------------
The following commands are not used
---------------------------------------
adb connect 127.0.0.1:5555
adb devices
adb -s 127.0.0.1:5555 root
adb -s 127.0.0.1:5555 shell
adb disconnect 127.0.0.1:5555

adb connect 192.168.56.3
adb devices
adb -s 192.168.56.3 root
adb -s 192.168.56.3 shell
adb disconnect 192.168.56.3

stop adbd
start adbd
---------------------------------------

posted @ 2016-06-29 08:59  张同光  阅读(138)  评论(0编辑  收藏  举报