Skip to content

Matt's Repository

Technology tidbits and other meandering thoughts.

Menu
  • Blog
  • About
  • YouTube
  • Contact
Menu

Using Bluestacks for Fast Android Emulation

Posted on August 20, 2015August 20, 2015 by Matt

Android DevelopmentTesting Android applications on PC or Mac without a physical device can be quite a burden. The configurable Android virtual machines in Eclipse/Android Studio are notably sluggish and don’t work well with many third party frameworks, especially those powered by C++. If your development machine has Intel-based hardware you can accelerate the emulation process by using Intel® HAXM technology, but AMD users are not yet so lucky.

The fastest and easiest way I’ve found to test Android applications is via the BlueStacks app player. BlueStacks is a free, ad-supported product for PC and Mac that enables you to download and run Android applications from your PC, as if using an Android device itself. BlueStacks isn’t the only product on the market of its kind, but it does boast higher compatibility and a greater feature set than the competitors. According to BlueStack’s feature chart, it supports up to 96% of all apps and 86% of all games on the Android market. Furthermore, BlueStacks offers streamlined emulation of the Android device’s camera, microphone, multitouch and more which makes it ideal for testing in-development apps.

Installing Android Debug Bridge (ADB)

To use BlueStacks for debugging Android apps, you’ll want to make sure you have the Android Debug Bridge (ADB) installed and operational. Some unofficial packages exist to get ADB in a hurry, but I have not tested said packages personally and it is easy enough to get it up and running through official means.

  1. If you haven’t already done so, download and install the Android SDK Tools package from Google. ZIP files are offered for Windows, Mac and Linux; extract the contents to a dedicated directory.
  2. From the extracted file location, launch SDK Manager.exe. Under Tools, check the box to install “Android SDK Platform-tools” and press the Install button. You will then have to click “Accept License” and then “Install” to download and install these components.
Android Debug Bridge (ADB)
Android Debug Bridge (ADB) is part of Android’s SDK Platform-Tools component.
  1. Once installed, you will find ADB.exe within the “platform-tools” subfolder of the location you extracted the original files to. You can run this file from the command prompt without any parameters, or visit its official page on Google, to review the multitude of available settings. I recommend that you also append the ADB location to the PATH environmental variable [assuming it is a Windows install] so that it can be ran from any command line prompt without having to navigate into the folder directly.
    1. Press Windows Key + Pause/Break on your keyboard to get to the System Information screen.
    2. Click on Advanced System Settings in the left menu.
    3. Click the Environment Variables button.
    4. Double click the Path entry under System Variables.
    5. Go to the end of the field and make sure there is a semicolon (;), then insert the full platform-tools path (i.e., C:\android-sdk\platform-tools\)
    6. Click OK three times to close out of the dialog windows.
  2. Now if you have a physical Android device attached to your computer (with USB Debugging enabled), you should be able to type ADB devices from the command prompt to see a list of available devices for testing [the ADB daemon will start automatically with this command if it is not already started].
Android Debug Bridge (ADB)
A list of connected Android devices accessible via ADB.

Installing BlueStacks App Player

Installing and configuring BlueStacks is as easy as installing any computer application.

  1. Head on over to http://www.bluestacks.com/ and click the Download button, which will match your target platform (Mac or Windows).
  2. Once downloaded, launch the EXE and follow standard install procedure on Windows, or double-click/drag the app file to your Applications folder on Mac.
  3. When you first launch BlueStacks, you will be taken through an initial configuration screen much like when booting a new Android tablet.
  4. You will want to sign-in using a Google account in order to access the Google Play store and synchronize app data and settings.
  5. When all is said and done, you’ll be at a landing page with easy access to your Android applications.
BlueStacks App Player
BlueStacks App Player

Running Development Apps Through BlueStacks

With ADB and BlueStacks installed, all that remains is to connect ADB to the BlueStacks player and send your Android app to it. Note that the free version of BlueStacks is ad/app supported so you may occasionally be prompted to install promoted apps before continuing. Alternatively, you can buy a year-long license for $24, the full version can also enhance performance.

  1. Launch BlueStacks so that the main dashboard screen is visible.
  2. Open a command prompt (or terminal on Mac) and enter: adb connect 127.0.0.1 then press Enter. This will connect the BlueStacks player as a device on port 5555 by default.  If the ADB command does not work, chances are you didn’t set your path variable correctly; you can navigate to the platform-tools folder and run the adb command from there instead.
  3. From within Eclipse or Android Studio, click the Run or Debug button. This should open up the Android Device Chooser window where you will see the BlueStacks player and any other physical devices connected to the computer. Select the correct option and hit OK. The app should transfer to BlueStacks very quickly and will run much more fluidly than the default virtual machines!
Android Device Chooser
Note that the BlueStacks player has been identified as a Samsung SM-G900F.

Happy coding!

13 thoughts on “Using Bluestacks for Fast Android Emulation”

  1. ajc says:
    October 15, 2015 at 9:10 am

    thank you very much men.
    the only tutorial that worked for me 🙂

    Reply
  2. Dennis says:
    November 30, 2015 at 1:09 am

    I followed the exact steps and adb.exe did say “connected to 127.0.0.1:5037” but after I click run, the running device list is still empty…

    Reply
  3. Dennis says:
    November 30, 2015 at 1:12 am

    Oh!…
    It used port 10001 instead of port 5555…
    That’s strange…
    Thanks though ><…

    Now I have a question of: Why it uses port 10001 instead of default port 5555?

    Reply
  4. Oti Mensah Frederick says:
    August 2, 2016 at 6:06 am

    Very interesting. It worked for me. Thank you.

    Reply
  5. Membres says:
    December 31, 2016 at 6:39 am

    Fondu Et Exemplaires par les Carabins

    Reply
  6. mike says:
    March 30, 2017 at 4:07 pm

    Thanks, I got output to logcat on my AMD putter

    Reply
  7. Leon says:
    May 8, 2017 at 7:24 pm

    I install a copy on my Window 10 yesterday and only see that it wait for the debugger to attach. It no longer works. Any replacement for that? Thanks

    Reply
  8. jacob says:
    October 4, 2017 at 9:37 pm

    Hey….Thanks a lot….Really helpful tutorial

    Reply
  9. Jesus says:
    September 6, 2018 at 10:03 am

    Thanks Buddy.

    Reply
  10. youngLatosha says:
    November 14, 2018 at 9:10 am

    I have noticed you don’t monetize your site, but you can earn additional
    bucks every day. It is very easy even for noobs, if you are interested simply search in gooogle: pandatsor’s
    tools

    Reply
  11. KurtBlissZ says:
    April 24, 2019 at 10:12 am

    I keep getting this on macos whenever I try to run through android studio
    com.android.ddmlib.SyncException: unknown command ‘SEND’ (444e4553)
    Error while Installing APK

    Android studio half the times sees bluestacks, with this i can make it see it using adb.
    For macos the adb directory is /users//Library/Android/sdk/platform-tools

    then to run adb while in that directory you have to do “./adb” then commands

    Idk I like how bluestacks doesn’t make my mac sound like a rocket ship when I run it, run the emulator that comes with android studio it sounds like a rocket.. if anyone has any ideas on fixing that errors i love to hears. Thanks!

    Reply
  12. OlsOlsen says:
    June 9, 2020 at 2:56 am

    Hi,
    I try to execute the command adb connect 127.0.0.1 via Terminal from within the folder /Users/ols/Library/Android/sdk/platform-tools on a Mac running MacOSX Catalina and Android Studio 4.0 and BlueStacks 4.160.10 installed, but I’m getting “zsh: command not found: adb” although the executable file is present in that folder. Any idea what the issue is here? Thanks!

    Reply
  13. OlsOlsen says:
    June 9, 2020 at 8:09 am

    o.k. found it out: you have to type: ./ adb connect 127.0.0.1

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Recent Posts

  • I Just Wanted Clean HDMI on a Note 10+ (Telephoto) February 4, 2023
  • Bally Arcade: Vintage Computing Christmas Challenge 2022 Breakdown January 26, 2023
  • Retro Fix: Montgomery Ward CyberVision 2001 (Work In Progress) January 18, 2023
  • GUIDE: Downgrade Google Suite to Free Edition for Personal Use (November 2022) November 11, 2022
  • Retro Fix: Packard Bell Platinum Pro 755 (1996-1997) October 20, 2022

Archives

  • February 2023
  • January 2023
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • May 2022
  • March 2022
  • February 2022
  • January 2022
  • November 2021
  • September 2021
  • July 2019
  • November 2018
  • June 2018
  • February 2018
  • December 2017
  • May 2017
  • December 2016
  • June 2016
  • May 2016
  • February 2016
  • December 2015
  • November 2015
  • September 2015
  • August 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015

Categories

  • Android
  • Announcements
  • Bally Astrocade
  • Competitions
  • Crowdfunding
  • DIY
  • Gaming
  • iOS
  • Mattel Aquarius
  • Mobile Development
  • Postmortem
  • Programming
  • Retro
  • Reviews
  • Scams
  • Spam
  • Thrifting
  • Tutorial
  • Web Development
© 2023 Matt's Repository | Powered by Minimalist Blog WordPress Theme
This site uses cookies to collect anonymous analytics. No personal information is collected unless manually provided (e.g., in comments). Accept Privacy Policy
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT