Jump to content
John Kouraklis

Android in VMWare

Recommended Posts

Today I installed Android Nougat in VMWare and then connected the IDE to the VM via adb and it shows as a device in the "Target" branch. 

 

When I run/debug an empty FMX project the IDE deploys everything correctly and then it launches the app. Here is where the problems appears. The app loads, I can see the splash screen and then it crashes. 

 

I have tried with different SDKs but the problem is there.

 

Anyone any ideas where to look at for the problem?

 

I am keen on making it working. The whole process is way much faster than with a physical device.

Share this post


Link to post

 

4 hours ago, John Kouraklis said:

The app loads, I can see the splash screen and then it crashes

If the IDE can "see" the device, are you able to use a logcat viewer to determine what the crash is?

Share this post


Link to post
Guest

@John Kouraklis

I was not aware that VMware can now emulate an ARM7 with NEON support.

 

Nice to hear that. Which version can do this?

 

Edited by Guest

Share this post


Link to post
9 hours ago, Dave Nottage said:

 

If the IDE can "see" the device, are you able to use a logcat viewer to determine what the crash is?

I am reading the website now. How do I add it to an FMX app? I can edit the manifest file but how do I launch the popup?

Share this post


Link to post

@Schokohase @Jacek Laskowski 

 

This https://techsviewer.com/install-android-in-virtual-machine-vmware-and-virtualbox/#tab-con-11 is the only guide that worked for me. I am sure other versions can be installed

 

The only issue is that there are not VMWare tools for Android and the screen does not occupy the whole window. The mouse move also is not very smooth but overall you can work.

 

Share this post


Link to post
14 minutes ago, John Kouraklis said:

How do I add it to an FMX app? I can edit the manifest file but how do I launch the popup?

You use a logcat viewer to view the logcat messages coming from the app. I have one called DeviceLens, which can be found here:

 

  https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/DeviceLens.zip

 

You may find that the Processes list does not populate (still bugs to iron out), however you should be able to press the "Play" button and watch the messages, as well as filter on text or the application package name (type it in to the package name edit and hit enter).

 

In the Android VM, if you go to settings, there may be an entry named Android x86 Options (just after the Sound option). Tap that, then enable the Enable native bridge option (i.e. bridge from x86 to ARM). Then run Terminal Emulator (still in the Android VM) and run the following commands:

 

su

/system/bin/enable_nativebridge

 

If you don't have the Android x86 options in Settings you may have to install a later Android x86 ISO. I used the latest available, from here:

 

  https://www.android-x86.org/

 

Sadly after doing all that, it still would not work for me. The app doesn't get past the splash screen, however it also does not crash. It might turn out different for you (I use VirtualBox)

 

 

Share this post


Link to post

I don't understand what are you trying here. Delphi does't emit x86 code for Android. Are you using an ARM emulator?

 

@John Kouraklis, Schokohase asked you if you have installed an ARM and not x86 Android. What exactly have you installed?

Edited by Cristian Peța

Share this post


Link to post
10 minutes ago, Cristian Peța said:

Are you using an ARM emulator?

I'm using a VirtualBox VM with Android x86 ISO installed on it, which has the ability to bridge to ARM (using libhoudini). See my earlier replies.

Share this post


Link to post

Has any of you tried using Bluestacks instead?

It's an all-in-one Android emulator which emulates an ARM processor.  I'm not using it for development but rather for running some Android apps that aren't available on Windows.

bluestacks.png

Edited by A.M. Hoornweg

Share this post


Link to post

Hi,

 

VMware, delphi standard instalation  with Android SDK/NDK... debugging working just fine (since Delphi Berlin).

 

image.png.7662a9a7688636cab0adf6dc7da79091.png

 

image.thumb.png.aff1e133ddd1a8b6af7073f1651b81ce.png

 

Regards,

M

Share this post


Link to post
On 9/22/2019 at 11:52 PM, A.M. Hoornweg said:

Has any of you tried using Bluestacks instead?

A long time ago, yes (amongst several others).  BlueStacks "worked", but it was pretty slow and unstable at the time, though.  Maybe that has changed over the years, I don't know.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×