Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Tutorial] Using BlueStacks [Mac] to test Android APK files

Discussion in 'Community Learning & Teaching' started by raiden, Feb 14, 2014.

  1. raiden

    raiden

    Joined:
    Feb 8, 2009
    Posts:
    333
    Hello my fellow unity friends.

    Recently I started building for Android, and found myself in a situation when I could not test because: 1. My android phone is very old, and would not accept any builds (I no longer use the phone, so the firmware version was out dated) 2. The emulators in Eclipse in the SDK, well I just couldn't get it to work.

    After a lot of research and trial and error, I found a handy little program called BlueStacks. This program will run apk files on your PC, and is great for testing your Android builds.

    Now the trick is installing your APK file in to BlueStacks so that is shows up in your "My Apps" section.

    Here is how I achieved this. NOTE: this is for Mac users, but I will provide some useful links for Windows users.

    1. Download BlueStacks from BlueStacks

    2. Install to your Applications directory.

    3. Build your APK file from Unity and note the location to the directory you saved the file to.

    4. Do not start BlueStacks, an open a Terminal window.

    5. Next you need to change directory to the Runtime folder of BlueStacks, in Terminal type:
    cd /Applications/BlueStacks.app/Contents/Runtime/

    Then hit enter.

    In Terminal you should see that your in the Runtime folder of Bluestacks.

    6. You need to install the apk file to BlueStacks, in Terminal type (this assumes you have saved the file in your Documents folder):
    ./uHD-Adb install /Users/"username"/Documents/APKFiles/"filename.apk"

    Hi Enter, and you should see Terminal output some information similar to:

    7. Once you see the Success, your good to go, just Start BlueStacks and look in MyApps, and you will see your game.

    Note: You might occasionally get a message in Terminal when doing this: "no device found", if you run in to this issue, a couple other things you can try are:

    1. With BlueStacks down, in Terminal type: ./uHD-Adb kill server

    Then try and install your application again in Terminal as shown above. What you want to see is a message similar to "Daemon not running", "Daemon started successfully". Once you get this, you should be good.

    2. You can also try and start the uHD-Adb server, by typing in Terminal: ./uHD-Adb start server.

    I found that i rarely have an issue that leads me to killing and restarting the server, but usually killing it does the trick.

    Some useful links for more information:
    http://appsonpc.com/install-apk-files-bluestacks/

    http://www.youtube.com/watch?v=GeQfsxtuk6s

    I hope that this has helped you out.

    -Raiden
     
  2. Udit-Makwana

    Udit-Makwana

    Joined:
    Jun 1, 2013
    Posts:
    4
    Superb dude ..ur the gewnius man ..Thanks it works perfectly.Now i can test my apk
     
  3. faraz

    faraz

    Joined:
    Aug 4, 2014
    Posts:
    46
    Giving me graphics api error so i use virtual box and it worked :)

    myfirstgame
     
  4. danielsmith04

    danielsmith04

    Joined:
    Aug 6, 2018
    Posts:
    1
    Apparently, it did not work in my pc. when i click the PLAY it says on top "it doesn't work on emulators" something like that . BluestacksGuides
     
  5. unity_X_RzwqVri0Btgw

    unity_X_RzwqVri0Btgw

    Joined:
    Oct 7, 2018
    Posts:
    1
    Bluestacks app player is safe for android device this website having few post about bluestacks app you can check here more
     
  6. brunomont

    brunomont

    Joined:
    Dec 20, 2017
    Posts:
    1
    Nice tutorial! Just a quick tip:
    If you are using newer versions, you can right click on your APK file (on Mac) and select "Open With" and select "Bluestacks" from that list. This will install your APK on Bluestacks without the need to use terminal :)
     
  7. andrepooran24

    andrepooran24

    Joined:
    Nov 26, 2019
    Posts:
    1
    Thank you for the post best tutorials about the bluestacks and runs apk on bluestacks emulator.
     
  8. tms_dev

    tms_dev

    Joined:
    Nov 26, 2018
    Posts:
    47
    But how do you log anything? I wanted to use Android LogCat with Bluestacks but it doesn't work...
     
  9. PariSsss

    PariSsss

    Joined:
    May 24, 2021
    Posts:
    2
    could you please tell me how does this work on windows?