Menu
![](/uploads/1/2/5/8/125837470/639750155.jpg)
How do I launch the Android emulator from the command line? Ask Question Asked 8 years. If you are strictly trying to run the emulator from the command line try this in OSX. If you have Git Bash you can open your emulator with a double-click, with some initial setup.
Linux users who want to run Windows applications without switching operating systems have been able to do so for years with Wine, software that lets apps designed for Windows run on Unix-like systems.
There has been no robust equivalent allowing Mac applications to run on Linux, perhaps no surprise given that Windows is far and away the world's most widely used desktop operating system. A developer from Prague named Luboš Doležel is trying to change that with 'Darling,' an emulation layer for OS X.
'The aim is to achieve binary compatible support for Darwin/OS X applications on Linux, plus provide useful tools that will aid especially in application installation,' Doležel's project page states. Darwin is Apple's open source operating system, which provides some of the backend technology in OS X and iOS. The name 'Darling' combines Darwin and Linux. Darling works by 'pars[ing] executable files for the Darwin kernel... load[ing] them into the memory... and execut[ing] them.'
But there is a ways to go. 'Darling needs to provide an ABI-compatible [application binary interface] set of libraries and frameworks as available on OS X... by either directly mapping functions to those available on Linux, wrapping native functions to bridge the ABI incompatibility, or providing a re-implementation on top of other native APIs,' the project page notes.
Doležel, who started Darling a year ago, described the project and its progress in an e-mail interview with Ars. Darling is in the early stages, able to run numerous console applications but not much else. 'These are indeed the easiest ones to get working, albeit 'easy' is not the right word to describe the amount of work required to achieve that,' Doležel said. 'Such applications include: Midnight Commander, Bash, VIM, or Apple's GCC [GNU Compiler Collection]. I know it doesn't sound all that great, but it proves that Darling provides a solid base for further work.'
Users must compile Darling from the source code and then 'use the 'dyld' command to run an OS X executable,' Doležel said. One roadblock is actually getting Mac .dmg and .pkg application files working on a Linux system. Because doing so isn't that straightforward, Doležel said, 'I've written a FUSE module that enables users to mount .dmg files under Linux directly and without root privileges. An installer for .pkg files is underway.'
Unix/Linux synergy
The fact that OS X is a Unix operating system provides advantages in the development process. 'This saved me a lot of work,' Doležel explained. 'Instead of implementing all the 'system' APIs, it was sufficient to create simple wrappers around the ones available on Linux. I had to check every function for ABI compatibility and then test whether my wrapper works, so it wasn't as easy as it may sound.'
Another lucky break not available to Wine developers is that Apple releases some of the low-level components of OS X as open source code, 'which helped a lot with the dynamic loader and Objective-C runtime support code,' Doležel noted.
But of course, the project is an extremely difficult one. Doležel isn't the first to try it, as Darling was initially based on a separate project called 'maloader.' Doležel said he heard from another group of people 'who started a similar project before but abandoned the idea due to lack of time.'
Doležel was actually a novice to OS X development when he started Darling, being more familiar with OS X from a user's perspective than a developer's perspective. 'I have personally looked for something like Darling before, before I realized I would have to start working on it myself,' he said.
Darling relies heavily on GNUstep, an open source implementation of Apple's Cocoa API. GNUstep provides several core frameworks to Darling, and 'the answer to 'can it run this GUI app?' heavily depends on GNUstep,' Doležel said. Doležel is the only developer of Darling, using up all his spare time on the project.
No reverse-engineering
Doležel isn't reverse-engineering Apple code, noting that it could be problematic in terms of licensing and also that 'disassembling Apple's frameworks wouldn't be helpful at all because Darling and the environment it's running in is layered differently than OS X.'
The development process is a painstaking one, done one application at a time. Doležel explains:
To improve Darling, I first take or write an application I'd like to have running. If it is someone else's application, I first examine it with one of the tools that come with Darling to see what frameworks and APIs it requires. I look up the APIs that are missing in Apple's documentation; then I create stub functions for them and possibly for the rest of the framework, too. (Stub functions only print a warning when they are called but don't do any real work.)
The next step is to implement all the APIs according to the documentation and then see how the application reacts. I also add trace statements into important functions to have an insight into what's happening. I believe this is very much like what Wine developers do.
When things go wrong, I have to use GDB [GNU Debugger] to debug the original application.
It is rather unfortunate that Apple's documentation is often so poorly written; sometimes I have to experiment to figure out what the function really does. Many OS X applications seem to contain complete pieces of example code from Apple's documentation, presumably because one would have to spend a lot of time getting to understand how the APIs interact. This is why I appreciate open source so much—when the documentation is sketchy, you can always look into the code.
![Open a dmg on windows Open a dmg on windows](/uploads/1/2/5/8/125837470/275869153.jpg)
Years of development are needed. Similar to Wine, 'Having a list of applications known to be working is probably the best way to go,' Doležel said.
Darling should work on all Linux distributions, he said, with the catch that 'many apps for OS X are 32-bit only, and installing 32-bit packages on a 64-bit Linux system could be tricky depending on your distribution. I personally use Gentoo Linux, so I'm gradually creating a Portage overlay that would compile Darling and all dependencies for both 32-bit and 64-bit applications.'
Doležel would like to bring Angry Birds, other games, and multimedia applications to Linux. Darling could potentially 'be used to run applications compiled for iOS,' he writes on the project site. This will also be a challenge. 'The intention is to support the ARM platform on the lowest levels (the dynamic loader and the Objective-C runtime),' he writes. 'Rewriting the frameworks used on iOS is a whole different story, though.'
Part 2. Top 3 Android Emulator for Mac
- • BlueStacks
- • Genymotion
- • Andy
1. BlueStacks
BlueStacks App Player is probably the most popular emulator for running Android apps on Mac. It is available for both Mac and Windows. It creates a virtual copy of Android OS apps on the guest OS. It uses the unique 'LayerCake' technology that allows you to run android apps on your PC without any external Virtual Desktop Application. Once install user can enjoy Android games and apps such as News Feeds, Social Network on a large screen.
BlueStacks maintain an internal search manager that allows any apk, the package file format that is used to distribute and install application and middleware on any Android device, to install within it. It can be
Advantage
- • .apk files can be installed into BlueStacks from Mac simply by double clicking.
- • It can also sync between the apps on Mac and the android phone or tablet by installing BlueStacks Cloud Connect app on Android Device.
- • Apps can be launched directly from Mac dashboard.
- • No need to configure additional Internet connection as it automatically gets the Internet connection of host computer.
- • BlueStacks App Player is available for both Windows and Mac.
Disadvantage
- When running complex graphic apps it fails to respond to the input in a timely fashion.
- It does not provide any mechanism to uninstall cleanly from the host computer.
Download
- • It can be downloaded from the official website of BlueStacks. It is absolutely free.
How to use
Download BlueStacks for Mac OS X from the official website of BlueStacks and install it like any other software on your PC. Once installed, it will boot up to its Home Screen. From there you can find the installed apps, find new apps in the 'Top Charts', search apps, play games and change settings. Mouse will be the basic touch controller. To access Google Play you will have to associate a Google Account with BlueStacks.
2. Genymotion
Genymotion is a fast and wonderful third party emulator that can be used to create a virtual environment for Android. It is the fastest Android emulator on the earth. It can be used to develop, test and run Android apps on Mac PC. It is available for Windows, Mac, and Linux machine. It is easy to install and can create a customized android device. You can start multiple virtual devices at the same time. It has the pixel perfect functionality so you can be precise to your UI development. By using the OpenGL acceleration it can achieve the best 3D performance. It directly commands the virtual devices sensors with Genymotion sensors. It is evolution of the Android open source project and already trusted by about 300,000 developers around the globe.
Advantage
- • Best 3D performance is achieved through OpenGL acceleration.
- • Support full screen option.
- • Can start multiple virtual devices at the same time.
- • Fully compatible with ADB.
- • Available for Mac, Windows and Linux machine.
Disadvantage
- • Require virtual Box to run Genymotion.
- • Cannot deploy Android machine offline.
Download
- Genymotion can be downloaded from the official website of Genymotion. The latest version of Genymotion is 2.2.2. You have to choose a package that meets your requirements.
How to use
- 1. Download Genymotion. You have to create an account to download it.
- 2. Open the .dmg installer. It will also install Oracle VM Virtual Box on your computer.
- 3. Move the Genymotion and Genymotion Shell to application directory.
- 4. Click the icon from Application directory and the following window will appear.
- 5. To add virtual device click on the add button.
- 6. Click on the connect button.
- 7. Enter your user name and password to connect to the Genymotion Cloud and click on the connect button. After connecting with the Genymotion cloud the following screen will appear.
- 8. Select a virtual machine and click on Next.
- 9. Give a name for the Virtual machine like below and click on Next.
- 10. Your virtual device will be now be downloaded and deployed. Click on the Finish button after successful deployment of your virtual machine.
- 11. Click on the Play button to start the new virtual machine and enjoy.
3. Andy
Andy is an open source emulator that allows developers and users to enjoy more robust apps, to experience them in multiple device environments, and to stop being constraint by the limits of device storage, screen size or separate OS. User can update their Android through Andy. It provides seamless sync between desktop and mobile device. User can use their phone as joystick while playing games.
Advantage
- • It provides a seamless sync between desktop and mobile device.
- • Enable Android OS update.
- • Enable app download from any desktop browser to Andy OS.
- • Phones can be used as joystick while playing games.
- • Unlimited storage expansion.
Disadvantage
- • Increase CPU usage.
- • Consumes a lot of physical memory.
Download
- • You can download Andy from www.andyroid.net.
How to Use
- 1. Download and install Andy.
- 2. Launch Andy. It will take about a minute to boot and then it should see a welcome screen.
- 3. Sign into your Google Account and complete the rest of the setup screen. You will be asked to provide your Google Account Information to 1ClickSync, the app that let's you sync between Andy and the mobile device
![](/uploads/1/2/5/8/125837470/639750155.jpg)