Android Chrome remote debuging for VM - android

I am reading about remote debugging Android devices:
https://developer.chrome.com/devtools/docs/remote-debugging?csw=1
This sounds convenient, if you have an Android device, that is.
What I would like to know is whether it is possible to use this remote debugging feature with a virtual machine running Android.

Per comments on my earlier answer, it seems that an issue with the Android Emulator is its speed.
I've recently come across Genymotion (formerly AndroVM) which is described in more detail at Lifehacker. It appears that it's based on Virtualbox, which is an x86 virtualization software, so it's most likely using the X86 Android port which would be much faster than emulating ARM on X86. You can also install Android X86 from ISO in Virtualbox yourself (see howto).
Other options for speeding up Android emulators:
Intel HAXM: Hardware Accelerated eXecution Manager (article)
BlueStacks App Player (article)
Jar of Beans
Disclaimer: I'm not affiliated with any of these projects, nor have I tried any of them myself so I can't vouch for their quality or compatibility with the ARM-based Android distributions, but from reading about them, folks seem to really like the performance, and development/debugging on such devices should, in theory, easily transfer to ARM-based ones.

You can use remote debugging with the Android Emulator, which is essentially the Android VM you're looking for. If you have performance issues with the emulator, see answers to this question. Alternatively, since your goal is to debug and test mobile websites, consider using Chrome's mobile emulation.

To perform remote debugging of an Android VM (e.g. AVD from Android Studio) running Chrome you can connect from Chrome on your desktop - type in the following url:
chrome://inspect/#devices
There it will list any connected devices - the Chrome running on the Android VM will appear there - where you can control it. For example you can then get it open a specific url and then click on 'inpect' which provides for access to the web dev tools console - just like on desktop Chrome.

Related

Run Android Emulators from windows in a Hyper-V virtual machine

The Set Up
I have a personal (gaming) Windows 10 Pro PC and I want to use it for some home development work without loading up the gaming side with extra installs. Win10 Pro allows you to create virtual machines using Hyper-V and the Hyper-V Manager.
I used the quick start to create a Win11 Dev environment. When I logged in I downloaded and installed Visual Studio 2022 community, and Myql Workbench. I have a MySql Server on a separate box on my network and the Win11 VM can connect to it.
There is a program I wrote using VS2022 and Ximiran to learn Mobile App development and thar is what I want to work on again. It was written on a regular Dev box where I could launch android emulators and/or connect my mobile device to test.
I tried setting up the Android ADM with the standard emulator (Pixel 5 API 30), a more generic 6.7dpi (API 32) and while I was able to DL and install them, they failed.
The Issue
I did read many google and SO entries and I saw that the emulators would not work in Virtual Box, but I did not see anything with hyper-v. I did changes the windows features to use hyper-v, windows hypervisor, and set up the SDK > tools > Extras > intel x86 ... (HAXM accelerator).
When I start either emulator I get an error then when boiled down says "ERROR | x86-64 emulation currently requires hardware acceleration." ... "Android Emulator requires an intel processor with VT-x and NX support. (VT-x is not supported).
The Question
Is this just a situation where no matter what I try this combination of a PC running a VM running an Emulator will just not work?
If it can, what piece am I missing?
The VM knows I have a Intel(R) Core(TM) i7-4970K CPU # 4.00GHz and this is a 64bit OS. This also has a GeForce RTX 3060 gpu which the VM does not see.
Any thoughts would be welcomed. I would like to keep my two environments separate and though I can code almost anything else, I would like to work on my android app in VS2022.
(I may try plugging in my mobile device...hmmmm)

How can I run multiple Andy machines

I read that I can run multiple Andy machines in the following link
http://andysupport.s3.amazonaws.com/AndyOSFAQ44v1.pdf
but I cannot open Andy Launcher
I tried to double click HandyAndy's icon in the task bar but it doesn't work
On my windows 8 machine, in the bottom right corner (system tray?) there is an Andy Icon running down by the clock. It might be hidden under an arrow. I right clicked on it and choose "Andy Launcher". You can only run one VM at a time as far as I can figure out. so far.
I can offer:
Emulator as part of the Android SDK
you can download it here: http://developer.android.com/sdk/index.html
To use just open the console /path/to/sdk/tools/android avd
and create your AVD (Android Virtual Device) and run. Or open AVD Manager from Eclipse IDE. But no emulation Bluetooth, OTG, headphones and some other hard parameters. Has a plug-in for Eclipse, easy access via adb
Genymotion
you can download it here: http://www.genymotion.com/
When you create a device from the network pumped his image. APK can be installed by simply dragging them to the window with the virtual machine.
Has a plug-in for Eclipse, easy access via adb and many additional tools (charge control, an accelerometer, API for tests, etc.)
Manymo
Here's an interesting emulator, but slow. No installation required, runs directly in the browser. To use this emulator will require registration.
https://www.manymo.com/emulators
Bluestacks
you can download it here: http://www.bluestacks.com/
It is best to download it from the official site. Works stable than custom build. Easy to install, does not require any additional libraries and files.
Immediately have access to Google Play.
use Genymotion its best way to test your app
or direct run in your phone android device turn on the usb debugging
if you have the memory disk space, You can use Oracle VMware install download a live version of windows, then install andy on each one of your vm machines. I am able to run 10 andy emulators at the same time while using the setting the restrict cpu cores and threads and memory allocations.
I say live os version because in order to run live edition requires 1gb ram, or 2gb for most full desktop OS's

Android Studio: Hardware Acceleration

This is driving me absolutely crazy and I can't find any help. I'm fairly novice when it comes to emulators, and even more so when it comes to Android Studio. Here's my problem: I installed Android Studio. Downloaded the SDK updates, including the HAXM one, and set up my own AVD. Upon trying to start up my AVD, or even the starter AVD that was already there, I get an error stating that "emulator: ERROR: x86 emulation currently requires hardware acceleration!"
I've done some googling and tried to finish the install of HAXM using the install file in the Android/SDK folder. I was promptly told that the installation failed and that my CPU didn't allow for Intel Hardware Acceleration, or something like that. I read somewhere that the only way I can use Hardware Acceleration on AMD is if I were on Linux, with which I have no experience with. So I tried giving up. Now I can't figure out how to disable Hardware Acceleration entirely in Android Studio. I haven't even begun learning how to write in android because I can't get an AVD up and running.
Does anyone have any tips for a complete Android noob? I thought this would be something fun to try since I was at once point fairly good with C++ and I have always been a huge fan of android. However, I've avoided doing anything GUI related until now, and I'm not finding it very fun at the moment.
I'm running an AMD system with 8GB of ram. More specifically, I'm using an AMD FX-4130 Quad-Core Processor on a GIGABYTE GA-970A-DS3 Motherboard.
Unfortunately AMD's virtualization technology AMD-V is not compatible with Intel HAXM. Your only choices are to either get familiar with Linux or use a ARM-based AVD, which doesn't require virtualization.
You can find instructions for Linux on Android Developers' document on Using the Emulator.
You can use Genymotion instead of default one. Its faster than the default one. And this emulator is compatible with both Intel and AMD. Genymotion just uses Virtualbox to run Android in VM.
Here's a link to Genymotion .
Genymotion , Genymotion user guide
it may help you.
Take an android phone with its USB cord then follow these steps:
1. plug in phone to computer.
2. on the phone goto: settings>about device scroll to find build number
3. press build number 7x (this enables developer mode)
4. go back to settings press developers options select usb debugging, include bug reports, verify apps via usb, and GPU force rendering.
5. Check for device connection on the computer
6. add in build.gradle under "buildTypes{" write this
debug { debuggable true }
then when you run your project you should be able to see your phone in the avd selection then select it. Your phone will awaken automatically with your application running except it will be a little semi-efficient boot process.
Also do not forget to remove the debug code from your gradle file when you app is finished.

What emulator does Android Studio use?

This question has many parts.
Some info about my system:
64-bit Ubuntu Linux
I am wondering what the stock emulator is that comes with Android Studio (A.Studio) (if indeed it has a name).
A helpful answer would include comparing this emulator with other emulators. A list of pros and cons of using each different emulator would also be helpful.
Perhaps there is a more fundamental ~thing~ about using different emulators; information on that is welcome if anything comes to mind.
Finally, i have never used an emulator besides the one that has come with Eclipse or A.Studio. What do I need to know in order to plug any emulator into any IDE? I have had issues with IDEs being "fragile" and breaking frequently, FYI.
You can use genymotion, for fast speed the quality, both for the eclipse and Android studio, get it here.
Also you can set up the Google play service for using Google Maps and downloading apps from Google play store.
Get the package and how it use it , please refer to here.
The emulator used by Android Studio is the exact same one used with Eclipse. It is in fact included with the Android SDK (which is in turn included in Android Studio) and used by various development environments.
The way it works depends on what kind of system image you use it with. For most recent Android versions, there are 2-4 different system images - arm, arm 64-bit, x86, and x86 64-bit (the 64-bit ones are Lollipop only, and fairly experimental at this stage of the game [early 2015]).
There are also Google API versions of these images (they include various Google apps such as Google Play Services) which can be used if these components are needed by your app.
For development purposes, the x86 system images are your best bet as performance is vastly improved by the emulator not having to emulate the ARM architecture - you need to use HAXM (by intel, also available in the Android SDK) to get any real speed benefits with x86 images though. The emulator also provides GPU acceleration (it must be manually enabled for each emulator device) which allows it to use your physical GPU for rendering instead of emulating these operations in software.
The way the development environment (Android Studio) connects to the emulator is via ADB (Android Debug Bridge). This means that it can work with virtually any emulator (such as Genymotion, which runs via VirtualBox). However, there is native support for using the Android Emulator from within Android Studio (this is configured by selecting emulator in the Run/Debug configuration)...when using another emulator (such as Genymotion) you should select USB device (in Run/Debug configuration) and make sure that the ADB instance is connected to your emulator via TCP (Genymotion does this for you automatically at startup).
This should give you enough information and I will not re-post all the various instructions on how to do any of the above as they have been posted as answers to various questions here on SO.

Debugging a "remote" Android device with Xamarin?

So I am needing to do some debugging with Xamarin Android. This wouldn't be such a problem if the emulator wasn't so slow. So, I looked at setting up the x86 emulator, but because I'm running Xamarin within VMWare (host machine is Linux), that won't work. My best bet is to install either the x86 accelerated android, or use something like Android-x86 from my host machine.
How could I get Xamarin to connect to a device that not's running on the same machine though?
It's possible to configure ADB to debug over the network instead of USB. Check out Xamarin's document titled Setup Device for Development, and scroll down to the section titled Connect the Device to Computer for directions on how to do so.
This is pretty basic but have you enabled USB debugging on your Android phone?
http://www.wugfresh.com/faq/how-do-i-enable-usb-debugging-on-android-4-2-the-developer-options-menu-item-is-gone/
follow those instructions if you havent...

Categories

Resources