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. :)
Related
Screen of death; my version
I have 4 problems with this screen
1.) I have absolutely downloaded all the requirements
2.) my phone is on developer mode and connected to my laptop but isn't being read
3.) I can't create emulators in android studio
4.) I have added the paths to my env variables...
I'm running on an aspire one of with 2gb Ram...
what do I do different with these same PC specs to get coding?
Well First Of All Enable USB Debugging In Your Phone And See if It Shows Your Device Now.
Now In You Your Command Line Run This
flutter doctor --android --licenses
It will automatically install all the required License And You Are Good to go
AS for CommandLine Tools error Navigate to SDK Folder in your Command by entering
cd "Path of your sdk"
and After That hit this line
"--install cmdline-tools;latest"
I repeat navigate to your sdk folder and then hit this command and you are good to go.
And personally I won't suggest you to install the emulator as you said your ram is of 2gb Then it will Lag alot better turn on usb Debugging and try it on your phone !!
First of all, this is my first post here and I'm a beginner so my apologies if this ends up being a stupid question or my format is wrong, but any help is appreciated.
Essentially my problem is in trying to set up Unity Remote 5 for debugging in Unity. However, I believe I've finally narrowed it down. The error I'm getting now seems clear:
CommandInvokationFailure: Unity Remote requirements check failed
C:/Program Files/Unity/Hub/Editors/2019.4.17f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK\platform-tools\adb.exe forward tcp:7201 tcp:7201
stderr[ error: device offline]
stdout[]
exit code: 1
I've looked into this error and came upon this: https://stackoverflow.com/a/39031464/14948855 which seems like it might be useful to me, however the issue is I don't know how to run the commands he suggested and stack overflow made it clear it didn't want me posting a question as a response to that question and I don't have enough prestige to comment.
I'm trying to run "sudo adb kill-server" from an ubuntu linux terminal on windows from the directory abd is in (C:\Program Files\Unity\Hub\Editors\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools), but it won't run.
proof command not found
I've tried adding it to the path on my computer: I added the directory listed above to "Path" in my "Environment Variables".
My phone is plugged in, I've disabled and reenabled developer mode and usb debugging, and restarted Unity and my phone several times. Any help with running this command in ubuntu or cmd, or even the greater problem of Unity Remote 5 would be fabulous.
Thank you.
Edit: here's a better image showing my issue:
image showing how I've tried to add the folder to the path but it still can't be reached
Final Update:
All my problems have been solved, here's how I got unity remote 5 for android working for posterity:
step 1) Make sure phone is in developper mode (go to "about phone" in settings, tap build number 7 times).
step 2) Make sure "USB debugging" is turned on in developer options.
step 3) Make sure Unity is updated to the most recent supported version through Unity Hub (might not be required but I did this step).
step 3) Download android support module through Unity Hub.
note: if you downloaded current Unity version from the Unity website rather than through Unity Hub, it doesn't seem to let you add modules to it through Unity Hub.
step 4) The sdk path Unity specifies by default is wrong for some reason, so in preferences->external tools, disable the default path and paste in the right directory (should be something like: C:\Program Files\Unity\Hub\Editors\2019.4.17f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK) to be safe I did this for the JDK, NDK and Gradle too.
step 5) When you plug in phone, pull down your notifications, hit "tap to change USB options" and make sure phone is in "camera" mode or some variation. For me it was "Photo transfer".
Note: if you don't have the option to change USB options, try different usb ports/cables, if those don't work you might have debris in your charging port, clean it out with a dab of 91% or 99% rubbing alcohol and a tooth brush/tweezers (this will also make charger sit more snug in phone)
That might be enough to get it working for you, if not...
step 6) (Not sure if necessary) May need to update phone drivers in device manager on windows.
step 7) If Unity gives an adb error saying too many devices connected, it's possible you have a daemon running in the background which adb is picking up as an android emulator because it's using a port greater than 5555. It seems adb checks open ports above port 5555, and assumes anything it finds is an emulator. To check this, as indicated in my original question, and as stated here: https://stackoverflow.com/a/39031464/14948855, in cmd on windows use adb devices (if ur on linux may need to use sudo) to get a list of all devices being detected by adb. (Also use "adb kill-server" to reset it.) If there is an emulator being detected, it should include the port it's using in its name, in my case it was "emulator-5562" in port 5562, which was apparently actually NTKDaemon from Native Instuments, a random music production program I've only used once so far. I'd suggest googling the emulator port you find to try and narrow down the process taking that port. The only thing left to do is to kill the process running in the port. I found NTKDaemon in task manager and also disabled it activating on startup because that's just evil imo.
And that should be it. Hope that works for you if you're here for help.
(btw in terms of my original question, I was able to access adb.exe by changing the directory in cmd, but I still never found why adding the directory to the path didn't work, so if anyone has an answer to that I would be interested)
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
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.
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