I have read a few articles that BlueStacks App Player can be used to debug android apps via Eclipse, instead of the default android emulator.
Example article
But I think this refers to the Windows version, I was unable to get to it work on MacOS. Does anyone know how to debug using BlueStacks/eclipse on MAC?
adb connect localhost:10001
should do the trick.
Well, you can try another way:
1) First, open the DDMS via Window->Open Perspective->DDMS under Eclipse.
2) Then open BlueStacks App Player.(leave it opens)
3) After that switch back to Eclipse and you should notice there're two emulator under the Device tab.
Then click Reset adb under the small triangle at the Device tab.
After a few seconds, the another one emulator will disappear and you can proceed to the next step.
4) Then return back through Window->Open Perspective->Java under Eclipse.
5) Select your project and right click on it, choose Debug As->Debug Configurations
6) Under Android Application select your configuration or create a new one. On the Target tab choose Always prompt to pick deviceAfter this, select Apply then Debug.
7) Then select BlueStacks emulator in the prompt window, and finally select OK.
Alternatively, you can also open the BlueStacks App Player before Eclipse using the above steps(with minor changes).
For more info, visit the below links.(However, in Chinese...)
http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746950.html
http://www.cnblogs.com/hbbbs/archive/2012/10/30/2746979.html
Hopefully this will help you.
C:\>cd Program Files (x86)\Android\android-sdk\platform-tools
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb connect 127.0.0.1:5555
connected to 127.0.0.1:5555
C:\Program Files (x86)\Android\android-sdk\platform-tools>
Run Bluestacks.
open Command Prompt in Windows.
Go to Platform-tools using following command.
cd C:\Users\<username>\AppData\Local\Android\sdk\platform-tools
then write:
adb devices
With SDK tools 27 and later!
You get a list of devices detected by adb .. if BlueStacks-4 is installed you should see the device listed (emulator-555x).
For Mac users: localhost:5037 worked for me
BlueStacks bundles its own copy of adb, %PROGRAMFILES(x86)%\BlueStacks\HD-adb.exe. You can connect localhost with it, or any other command. BlueStacks 3 uses the default port 5555.
Related
I need to set nox emulator as my default emulator, but I need to set first adb connection, but I don't know where I can find the directory of nox app player.
Fortunately, as a Mac user, you don't have to worry too much about the directory of the Nox app player, because you don't have to use the executable nox_adb.exe, as do Windows users. Instead, you can, with a slight change, follow the steps in the Nox connection guide, but just look out, as a Mac user, for step 6, (according to vandebergz) :
Download & install Nox.
Start a project in Android Studio.
Start Nox App Player, and in Nox go to Nox system settings and turn
root mode to on, then save changes and restart Nox.
In Nox, go to Android settings and scroll down to About Tablet. Keep clicking on Build number until it shows that, "You are now a developer". In Android settings the Developer options will now be visible.
In Developer options, tick USB debugging.
(Mac only) Depending on whether or not adb and other tools are in your PATH (see below), type
adb connect 127.0.0.1:62001
from a suitable location. (This will connect localhost through port 62001 to the Android Debug Bridge.)
Android Studio should now detect Nox Player as a connectable device (although it may not appear named as Nox).
Please bear in mind that for this to work, if you're using Android Studio with default installation settings, you should either do step 6 from the directory of adb , which is usually ~/Library/Android/sdk/platform-tools ; or else you can do this from any location if you have adb and the other platform tools on your PATH. To add them to your PATH, if not done already, you'll need to open your hidden ~/.bash_profile file and add the lines:
export PATH=~/Library/Android/sdk/tools:$PATH
export PATH=~/Library/Android/sdk/platform-tools:$PATH
as described here.
Worked ok for me. :)
I've tried for days and failed to run AVD on my PC. So I decided to look for an alternative and found out that Youwave can be used as an emulator. Here is my question: How can I run Android source (apps not finished so they are not .apk) on Youwave?
You can't run Android Source which is not finished to become .apk.
The best alternative of emulator is Genymotion.
hopefully it would be useful for others that reach this page through googling,
run command prompt in windows by typing "cmd" in the search field of the start menu
change the directory to "platform-tools" in your sdk folder. For example, suppose that your sdk is located in "c:\android\source\sdk\" use the command "cd\android\source\sdk\platform-tools" for changing the current directory.
Run the following command for connecting YouWave to AndroidStudio:
"adb connect 127.0.0.1:5558"
Enjoy it!
I known there is lots of answers about this question, but still my mobile device not connected to eclipse IDE.
The following is what I already did:
1. restart adb or type command in cmd "adb kill-server/adb restart-server", eclipse find nothing in the devices.
2. execute netstat -aon|findstr "5037", finding there is only one process "adb" occupy the port
3. check the phone driver in device management, finding the phone is install correctly.
4. execute "adb devices":
List of devices attach
1f06cbba device
I thought may it's my phone's problem, so i remove it, and create a virtual device avd, the eclipse still don't work.
My Operating System is Windows 7 and Eclipse IDE Kepler.
can any body help me to successful run my first android helloworld?
Thanks a lot!!
additional explanation
debug mode is in phone is ON
adb is in the variable %path%(maybe some should answered)
try the latest adt-bunble in adroid website, it still don't work.
Try turning "developer options" on in your device. (Option you haven't tried).
To access these settings, open the Developer options in the system Settings. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
Have you added adb in your class path variables? If not , you should append the class path with following paths :
path-to-sdk/android-sdk/platform-tools
path-to-sdk/android-sdk/tools
Try re-installing ADT Plugin. Worked for me last time.
Install your current mobile Adb USB driver and update Google USB driver
Check the MTP/PTP mode for your device:
http://lh3.ggpht.com/-8UMNs7Vg_dY/UVC6_6PnbDI/AAAAAAAAAIg/NjKOvAp9cDs/02-select-camera-ptp-mode_thumb%25255B1%25255D.png%3Fimgmax%3D800
In some devices you can find this under Settings->Storage->Menu Options(three vertical bullet squares).
When you say->the phone debug mode is open, i assume your developer options usb debugging is already enabled
When i enter "adb install asdasd.apk" to cmd returns "error:device not found". How can I fix this?
Just copy that apk file into ( D:\android-sdk\platform-tools ) android sdk platform tools.
and then open the cmd prompt.
then, come into that platform tools path in cmd prompt.
then, give like this in cmd -- adb install (appName).apk
wait few minutes and get success respomse in cmd prompt..
First, familiarize yourself with a concept of AVD. That's basically an instance of the emulator - it has a bunch of settings, like the Android version to use and screen size and an SD card image.
You cannot install stuff "in the emulator" - you can only install stuff into a specific AVD. For that, you need to create and run an AVD first. For that, use "AVD Manager" from Eclipse or standalone.
Under the Android SDK folder in Explorer, run "AVD Manager". Choose an AVD (or create a new one if you don't have any). Select, click "Start".
Does the emulator show up when you run the following command?
adb devices
If not, you might have to boot up the AVD first, but if I remember correctly it should be starting it up by itself.
Have you created a new emulator for your project? And are you using Eclipse? Eclipse has an ADT plugin which is useful as it allows you to open the AVD manager through it. This plugin will give you this option in the Windows tool bar of Eclipse: Windows>AVD manager.
Create a new project based on the emulator and click the run button which will install your project onto the emulator. If you have an Android device I recommend turning USB development mode in your phones settings and running your project straight onto your device as it will be a lot faster. Hope this helps
this is what i did :
first run the "AVD Manager"-> choose an AVD -> click "Start"
immediately after
you click on "Start"
use command on cmd as,
adb install asdasd.apk
then in my case (Windows), asked to place .apk file in data/local/tmp/
what i did was copy and paste .apk file into data/local/tmp
and again use command
adb install asdasd.apk
then cmd prompted-> Success
You can also use command
adb devices
command for check whether emulator is in the list
Actually you may need to run AVD several times
I developed an application. Now I want to deploy it on real device. Can any body please tell me the steps and the requirements to deploy it on a real device.
Thanks
Deepak
There are multiple ways:
If you don't use eclipse, you can use adb tool. adb -d install PATH_TO_YOUR_APK_FILE
If you use eclipse, you can click run application in eclipse's launch menu. If this doesn't work, make sure you have "USB Debugging Mode" checked on your android phone. It's in the application menu.
You can export your package and sign it! And then browse to it to install.
I just copy the APK for my project out of the /workspace/project/bin folder, and use Dropbox to send it to my device. Then I install the APK from Dropbox client on the device. (No need for cables!)
Hook up your SmartPhone through USB-cable and set your phone i debug mode found in Settings > Applications > Development > USB debugging. Next - run your project in eclipse and chose your device.
make sure 'Run configurations' is set to manual, or this will fail if set to automatic and the target is a emulator. To change this behaviour, go to 'Run > Run configurations > Target' and set 'Deployment Target Selection Mode' to manual. Click 'Close' and try again.
FYI, if you're on a Galaxy Nexus, you need to fish around Samsung's website to find the driver installer. Here it is : http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW
Note: If you're using adb -d install PATH_TO_YOUR_APK_FILE to install the apk on to your device,
you will need to run it from the adt-bundle-[magic]/sdk/platform-tools/ folder.
Better yet, add adb.exe to your $PATH, and you can run adb from your windows command line/ terminal.
Also, you have to set up your system to detect your device.
If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
If you're developing on Mac OS X, it just works. Skip this step.
If you're developing on Linux see official Android guide here