Android emulation in virtual box in eclipse

I have Android running on a virtual box in order to use it as a second cell phone with a bluetooth usb stick to connect it to a real device.

I have 2 questions:

  • Is it possible to access using DDMS in eclipse, for example, a real device, a version of a virtual window?

  • How can I install the .apk package on the Android virtual kernel?

I hope something can help me.

Thanks!

+6
source share
1 answer
  • Press Alt + F1 , enter netcfg write down the IP address and press Alt + F7 .
  • Run adb connect <virtual_machine_ip> in the terminal on the host machine.

Then you should see the device in ADT and be able to run your applications on it.

Edit:. This will work if you are configured to use bridged or host adapters: for NAT, you must first configure port forwarding:

  • cd to your VirtualBox folder on Windows: (C: / Program Files / Oracle / VirtualBox)
  • configure the port forwarding rule through the command line as follows: VBoxManage modifyvm <name_of_your_android_vm> --natpf1 adb,tcp,*,5555,*,5555
  • Run vm
  • Connect to your virtual machine by typing adb connect localhost:5555
  • Launch the application in Eclipse and you will see localhost: 5555 as available AVD
+23
source

Source: https://habr.com/ru/post/893095/


All Articles