{"id":868,"date":"2015-09-23T19:38:21","date_gmt":"2015-09-24T02:38:21","guid":{"rendered":"http:\/\/visualgdb.com\/w\/?p=868"},"modified":"2015-09-23T19:38:21","modified_gmt":"2015-09-24T02:38:21","slug":"accelerating-android-app-debugging-with-virtualbox","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/tutorials\/android\/virtualbox\/","title":{"rendered":"Accelerating Android App debugging with VirtualBox"},"content":{"rendered":"<p>This tutorial shows how to use <a href=\"http:\/\/virtualbox.org\/\">VirtualBox<\/a> to accelerate debugging of Android apps with native components. We will show how to create an Android VirtualBox VM, configure it for debugging and use VisualGDB to debug the San-Angeles project. Before you begin, download the latest VirtualBox and get an x86 Android ISO from the <a href=\"http:\/\/www.android-x86.org\/download\">android-x86.org<\/a> website.<\/p>\n<ol>\n<li>Install and run VirtualBox. Click the &#8220;New&#8221; button to create a new VM:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/01-virtualbox.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-869\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/01-virtualbox.png\" alt=\"01-virtualbox\" width=\"678\" height=\"511\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/01-virtualbox.png 678w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/01-virtualbox-300x226.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/a><\/li>\n<li>Select &#8220;Linux -&gt; Other Linux (32-bit)&#8221; as the machine type:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/02-android.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-870\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/02-android.png\" alt=\"02-android\" width=\"438\" height=\"382\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/02-android.png 438w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/02-android-300x262.png 300w\" sizes=\"(max-width: 438px) 100vw, 438px\" \/><\/a><\/li>\n<li>Proceed with the default memory size:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/03-memory.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-871\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/03-memory.png\" alt=\"03-memory\" width=\"438\" height=\"382\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/03-memory.png 438w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/03-memory-300x262.png 300w\" sizes=\"(max-width: 438px) 100vw, 438px\" \/><\/a><\/li>\n<li>Select &#8220;Create a virtual hard disk now&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/04-makedisk.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-872\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/04-makedisk.png\" alt=\"04-makedisk\" width=\"438\" height=\"382\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/04-makedisk.png 438w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/04-makedisk-300x262.png 300w\" sizes=\"(max-width: 438px) 100vw, 438px\" \/><\/a><\/li>\n<li>Proceed with the default virtual disk format:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/05-disktype.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-873\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/05-disktype.png\" alt=\"05-disktype\" width=\"503\" height=\"424\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/05-disktype.png 503w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/05-disktype-300x253.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/a><\/li>\n<li>On the next page select &#8220;dynamically allocated&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/06-dynamic.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-874\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/06-dynamic.png\" alt=\"06-dynamic\" width=\"503\" height=\"424\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/06-dynamic.png 503w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/06-dynamic-300x253.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/a><\/li>\n<li>Finally you can customize the disk size. The default value of 8GB should be enough for most cases:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/07-makedisk.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-875\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/07-makedisk.png\" alt=\"07-makedisk\" width=\"503\" height=\"424\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/07-makedisk.png 503w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/07-makedisk-300x253.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/a><\/li>\n<li>Before you can start installing the Android OS into your VM, you need to mount the ISO file in it. Click &#8220;Settings&#8221; to open the VM settings:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/08-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-876\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/08-settings.png\" alt=\"08-settings\" width=\"678\" height=\"511\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/08-settings.png 678w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/08-settings-300x226.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/a><\/li>\n<li>Go to the &#8220;Storage&#8221; tab, select the empty CD-ROM device and click the disc icon to browse for a disc image:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/09-disk.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-877\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/09-disk.png\" alt=\"09-disk\" width=\"665\" height=\"434\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/09-disk.png 665w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/09-disk-300x196.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><\/li>\n<li>Specify the path to the Android image you downloaded. It will appear in the Settings window:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10-androidimg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-878\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10-androidimg.png\" alt=\"10-androidimg\" width=\"665\" height=\"434\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10-androidimg.png 665w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10-androidimg-300x196.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><\/li>\n<li>Go to the network settings and select either Host-only adapter (if you don&#8217;t have a local DHCP server) or Bridged mode (if your network has a DHCP server):<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10a-network.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-879\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10a-network.png\" alt=\"10a-network\" width=\"665\" height=\"434\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10a-network.png 665w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/10a-network-300x196.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><\/li>\n<li>Finally press OK to save the settings and start the VM:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/11-start.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-880\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/11-start.png\" alt=\"11-start\" width=\"678\" height=\"511\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/11-start.png 678w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/11-start-300x226.png 300w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><\/a><\/li>\n<li>In the boot menu select &#8220;Installation&#8221; and press Enter:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/12-bootmenu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-881\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/12-bootmenu.png\" alt=\"12-bootmenu\" width=\"656\" height=\"560\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/12-bootmenu.png 656w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/12-bootmenu-300x256.png 300w\" sizes=\"(max-width: 656px) 100vw, 656px\" \/><\/a><\/li>\n<li>Wait until the Android OS boots:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/13-boot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-882\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/13-boot.png\" alt=\"13-boot\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/13-boot.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/13-boot-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Select &#8220;Create\/modify partitions&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/14-partition.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-883\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/14-partition.png\" alt=\"14-partition\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/14-partition.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/14-partition-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Select &#8220;New&#8221; to create a new partition:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/15-new.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-884\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/15-new.png\" alt=\"15-new\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/15-new.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/15-new-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Select &#8220;Primary&#8221; to create a partition that can be used to store a bootable OS:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/16-primary.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-885\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/16-primary.png\" alt=\"16-primary\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/16-primary.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/16-primary-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Proceed with the size suggested by the partition utility. By default the new partition will cover the entire disk:\u00a0 <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-size.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-887\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-size.png\" alt=\"17-size\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-size.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-size-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Select the &#8220;Bootable&#8221; button and press Enter to mark the partition as bootable:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/18-boot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-888\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/18-boot.png\" alt=\"18-boot\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/18-boot.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/18-boot-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Finally select &#8220;Write&#8221; and press Enter to save the partition table to the disk:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/19-write.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-889\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/19-write.png\" alt=\"19-write\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/19-write.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/19-write-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Type &#8220;yes&#8221; and press Enter to confirm the write:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/20-yes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-890\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/20-yes.png\" alt=\"20-yes\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/20-yes.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/20-yes-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Now you can select the newly created partition in the partition list and press OK:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/21-sda1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-891\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/21-sda1.png\" alt=\"21-sda1\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/21-sda1.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/21-sda1-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Choose to format it with the ext3 filesystem:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/22-ext3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-892\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/22-ext3.png\" alt=\"22-ext3\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/22-ext3.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/22-ext3-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Confirm the format operation:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/23-format.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-893\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/23-format.png\" alt=\"23-format\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/23-format.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/23-format-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Choose &#8220;Yes&#8221; to install the boot loader so that you can boot into the operating system:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/24-grub.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-894\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/24-grub.png\" alt=\"24-grub\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/24-grub.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/24-grub-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>Choose to make the system directory writable as this will allow fixing permission bug described later:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/25-rw.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-895\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/25-rw.png\" alt=\"25-rw\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/25-rw.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/25-rw-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>The Android OS will now be installed. Once the installation completes, choose &#8220;Reboot&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/26-reboot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-896\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/26-reboot.png\" alt=\"26-reboot\" width=\"736\" height=\"480\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/26-reboot.png 736w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/26-reboot-300x196.png 300w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/a><\/li>\n<li>To avoid booting into the installer again, open VM properties and remove the virtual CD-ROM device:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-remove.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-886\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-remove.png\" alt=\"17-remove\" width=\"665\" height=\"434\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-remove.png 665w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/17-remove-300x196.png 300w\" sizes=\"(max-width: 665px) 100vw, 665px\" \/><\/a><\/li>\n<li>Once the OS boots, select your language and press the button to the right to continue:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/27-english.png\"> <img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-897\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/27-english.png\" alt=\"27-english\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/27-english.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/27-english-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>If you cannot see the mouse pointer, try toggling the mouse integration in the Input menu:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/28-mouseint.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-898\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/28-mouseint.png\" alt=\"28-mouseint\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/28-mouseint.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/28-mouseint-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>Skip the WiFi selection as we will be using a virtual network adapter anyway:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/29-skipwifi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-899\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/29-skipwifi.png\" alt=\"29-skipwifi\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/29-skipwifi.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/29-skipwifi-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>Enter the user name that will be associated with your virtual OS installation:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/30-demouser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-900\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/30-demouser.png\" alt=\"30-demouser\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/30-demouser.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/30-demouser-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>Now the installation is complete and you can finally start using your OS. It is recommended to create a VM snapshot at this point so that you can return to it later if something breaks:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/31-desktop.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-901\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/31-desktop.png\" alt=\"31-desktop\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/31-desktop.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/31-desktop-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>Open the Terminal app from the apps list and run the following commands to fix the run-as permission bug and determine the current IP address:\n<pre class=\"\">ifconfig eth0\r\nsu\r\nchmod 4750 \/system\/bin\/run-as<\/pre>\n<p><a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/32-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-902\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/32-config.png\" alt=\"32-config\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/32-config.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/32-config-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a>Unless you update the permission on the run-as tool, you won&#8217;t be able to debug native Android code, as the Android system won&#8217;t be able to launch the gdbserver under the correct user account.<\/li>\n<li>Open a command prompt window on your Windows machine and run the &#8220;adb connect &lt;IP ADDRESS&gt;:5555&#8221; command followed by &#8220;adb shell&#8221;. You should see the Android shell of your virtual device:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/33-shell.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-903\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/33-shell.png\" alt=\"33-shell\" width=\"677\" height=\"342\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/33-shell.png 677w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/33-shell-300x152.png 300w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/a>You can close the shell by pressing Ctrl-D and exit the command prompt window.<\/li>\n<li>Now we will show how to create and debug a basic OpenGL app with Visual Studio and VisualGDB. Start Visual Studio and launch the VisualGDB Android Project Wizard:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/34-androidprj.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-904\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/34-androidprj.png\" alt=\"34-androidprj\" width=\"800\" height=\"450\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/34-androidprj.png 800w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/34-androidprj-300x169.png 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/li>\n<li>Select &#8220;Clone a sample from NDK&#8221;:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/35-clone.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-905\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/35-clone.png\" alt=\"35-clone\" width=\"649\" height=\"616\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/35-clone.png 649w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/35-clone-300x285.png 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/a><\/li>\n<li>Select the san-angeles project from the sample list:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/36-sanangeles.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-906\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/36-sanangeles.png\" alt=\"36-sanangeles\" width=\"649\" height=\"616\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/36-sanangeles.png 649w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/36-sanangeles-300x285.png 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/a><\/li>\n<li>Select the Android OS version that matches the version you installed into VirtualBox and select &#8220;x86&#8221; as the hardware platform:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/37-x86.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-907\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/37-x86.png\" alt=\"37-x86\" width=\"649\" height=\"616\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/37-x86.png 649w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/37-x86-300x285.png 300w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/a><\/li>\n<li>Once the project is created, remove the <strong>app-linux.c<\/strong> and <strong>app-win32.c<\/strong> files:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/38-remove.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-908\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/38-remove.png\" alt=\"38-remove\" width=\"904\" height=\"800\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/38-remove.png 904w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/38-remove-300x265.png 300w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/a><\/li>\n<li>Build the project with Ctrl-Shift-B:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/39-build.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-909\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/39-build.png\" alt=\"39-build\" width=\"902\" height=\"798\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/39-build.png 902w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/39-build-300x265.png 300w\" sizes=\"(max-width: 902px) 100vw, 902px\" \/><\/a><\/li>\n<li>If your Android VM screen appears blank, the Android OS has most likely gone into the sleep mode and won&#8217;t react on keyboard and mouse events. Use the Machine-&gt;ACPI shutdown command to wake it up by emulating the power button press: <a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/40-wakeup.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-910\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/40-wakeup.png\" alt=\"40-wakeup\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/40-wakeup.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/40-wakeup-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>Hit F5 in Visual Studio to start debugging. You will see the san-angeles demo being rendered in the VirtualBox window:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/41-demo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-911\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/41-demo.png\" alt=\"41-demo\" width=\"816\" height=\"680\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/41-demo.png 816w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/41-demo-300x250.png 300w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><\/a><\/li>\n<li>Set a breakpoint somewhere in the code (e.g. in the camTrack() function). It should hit as soon as the function gets executed:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/42-break.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-912\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/42-break.png\" alt=\"42-break\" width=\"902\" height=\"798\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/42-break.png 902w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/42-break-300x265.png 300w\" sizes=\"(max-width: 902px) 100vw, 902px\" \/><\/a><\/li>\n<li>You can now use the normal Visual Studio debugging techniques to debug your application. If you are using the Clang-based IntelliSense that comes with VisualGDB, you can also use advanced features like Preprocessor Lens and C++ Code Map:<a href=\"http:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/43-codemap.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-913\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/43-codemap.png\" alt=\"43-codemap\" width=\"902\" height=\"798\" srcset=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/43-codemap.png 902w, https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2015\/09\/43-codemap-300x265.png 300w\" sizes=\"(max-width: 902px) 100vw, 902px\" \/><\/a><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows how to use VirtualBox to accelerate debugging of Android apps with native components. We will show how<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[31,80,106],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/868"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=868"}],"version-history":[{"count":3,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/868\/revisions"}],"predecessor-version":[{"id":917,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/868\/revisions\/917"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}