I’m on Mac, working on Android development from the terminal. I have successfully created the HelloWorld project and now I’m trying to run it from the command line in the Android emulator. Which command runs the emulator for my HelloWorld project?
![How to run android studio emulator on mac How to run android studio emulator on mac](/uploads/1/2/5/8/125883875/992734094.jpg)
Out of the box, Google Android Emulators are prohibitively slow. If you are running Mac OS X 10.9 Mavericks or Windows 8.1, you will want the appropriate.
I already have the Android tools and platform-tools in my PATH.
Edit:
How do I tell the emulator to run my HelloWorld project from the command line? I’ve already built the project with ant.
Answers:
I assume that you have built your project and just need to launch it, but you don’t have any AVDs created and have to use command line for all the actions. You have to do the following.
- Create a new virtual device (AVD) for the platform you need. If you have to use command line for creating your AVD, you can call
android create avd -n <name> -t <targetID>
where targetID is the API level you need. If you can use GUI, just type inandroid avd
and it will launch the manager, where you can do the same. You can read more about AVD management through GUI and through command line. - Run the AVD either by using command
emulator -avd <name>
or through previously launched GUI. Wait until the emulator fully loads, it takes some time. You can read about additional options here. - Now you have to install the application to your AVD. Usually during development you just use the same Ant script you used to build the project, just select
install
target. However, you can install the application manually using commandadb install <path-to-your-APK>
. - Now switch to emulator and launch your application like on any normal device, through the launcher. Or, as an alternative, you can use the following command:
adb shell am start -a android.intent.action.MAIN -n <package>/<activity class>
. For example:adb shell am start -a android.intent.action.MAIN -n org.sample.helloworld/org.sample.helloworld.HelloWorld
. As a commenter suggested, you can also replaceorg.sample.helloworld.HelloWorld
in the line above with just.HelloWorld
, and it will work too.
Answers:
List all your emulators:
Run one of the listed emulators:
where
emulator
is under:Answers:
Just to add here, whenever you get “error: device offline” means that connection with emulator & adb bridge has been broken due to time taken in emulator startup.
Rather than re-starting emulator at this point try below two commands which stops & start adb bridge again.
adb kill-server
adb start-server
Answers:
Here you can check the options to execute this command via command-line:
For example, I use it like this below:
Answers:
If you are strictly trying to run the emulator from the command line try this in OSX.
You can simplify it by adding an alias to the .bash_profile, and sending it to a background job.
Let Bash know about the changes.
Answers:
I think the best way to reach it via terminal is :
To run a certain AVD directly:
To list your AVDs use :
Answers:
open CMD
- Open Command Prompt
- type the path of emulator in my case
C:adt-bundle-windows-x86_64-20140702sdktools
- write “emulator -avd emulatorname” in my case
emulator -avd AdilVD
Answers:
In here it is explained how you can start the emulator from the terminal.
There are many options you can use to personalize your emulator.
There are many options you can use to personalize your emulator.
I hope it helps
Answers:
Open command prompt and go to
<android-Home>sdktools>emulator -avd <AVD_NAME>
Here
'emulator'
is the command used to open your Android Virtual Device.Answers:
(Linux)
In you terminal Copy & Paste and changing the three fields in blue
In you terminal Copy & Paste and changing the three fields in blue
you can view the emulators in you folder home
cd /home/Youuser/.android/avd/
cd /home/Youuser/.android/avd/
Answers:
list of avd name available on
.android/avd
/SDK_PATH/tools/emulator -netdelay none -netspeed full -avd
“AVD_NAME”
“AVD_NAME”
Answers:
Nowadays asuming you have Android Studio installed (2.2) in my case and just 1 emulator you might use this one liner
If you do this often, make it easier:
Add an alias to
~.aliases
Recall to
source ~/.profile ~/.aliases
before testing itNext time just
$ androidup
Answers:
In windows, I use this PowerShell script to start it up.
Tags: android
Nox is an excellent Android emulator with full Android features. One of the most favored feature is running multiple Android instances at the same time.
Check this video out:
Or follow the below steps to learn how to do that:
1. You have two way to open the Multi-player management panel of Nox. One is by double clicking the Multi-drive shortcut on your desktop:
The other is to click the below icon on the side bar of a running Nox instance:
2. At the bottom of the multi-instance manager panel, Click on “Add emulator”, then select the Android version instance you want to create ( Android 4, 5 and 7 supported), and wait for a few seconds for it to download, then it is done.
3. In the Multi-instance manager, you can also duplicate an instance you already have. This will copy all the settings and data from an instance you are already using, to a new instance.
Click on the “Copy” icon from the instance you want to duplicate.
Wait for the copying process to complete. The time will varies depending on how heavy is the instance you are duplicating.
When it is completed, now you have two android instances with completely same settings, same games and same data.
4. You can rename an instance by clicking on the little pencil that appears when you fly the mouse over its name.
5. Click on the Start button to start running an instance from the multi instance manager.
Now you could play different games or different accounts of a same game concurrently. Please note that as long as your computer supports, you could run unlimited Nox Android instances.