I know to install apk file on emulator you type,
adb install [apk file name]
So, I followed and I have received this error,
antz#antz-90X3A:~/Android/androidmalware$ adb install 01_AngryBirdsRiov110.apk
error: device not found
- waiting for device -
when i checked android android virtual device, I have an device.
Do I have to something else to link?
Command for running emulator is:
emulator -avd <youravd.avd>
Sounds like you don't have an emulator or device connected to your computer. You can check if you have a device available by typing:
adb devices
Just because you created an AVD doesn't mean it is running. You need to start an emulator using the AVD you created.
Related
I am running macOS Catalina, and have one Android emulator set up in the Android Virtual Device Manager.
Before starting the emulator, on a freshly rebooted system, if I run adb devices I get:
List of devices attached
emulator-5562 offline
After starting the emulator, adb devices returns:
List of devices attached
emulator-5554 device
emulator-5562 offline
If I fire up Expo and try to run on the Android emulator, I get this error:
Couldn't start project on Android: Error running adb: more than one device/emulator
It looks like the offline emulator-5562 is the problem here? But it's still there even after rebooting my computer. All the advice I've read (i.e. adb kill-server and adb restart-server) makes no difference. There are no Android devices connected via USB.
How can I delete the "offline" device? Or alternatively, how can I point Expo to the one actual Android emulator I have running?
Try this:adb -s emulator-5554 <command>
I'd like to connect to android emulator on bluestacks 4 with adb.
but I've got an error with adb.exe -s emulator-5554 shell
checking devices.
$ adb.exe devices
List of devices attached
BH901... device
CB512... unauthorized
emulator-5554 device
once I shutdown bluestacks window, the emulator-5554 will be hidden from above command's result. thus I think emulator-5554 means bluestacks.
then commnad as below to use adb.
$ adb.exe -s emulator-5554 shell
error: closed
but as you know, an error occured.
First, in Bluestacks, go to Settings -> Preferences -> Enable Android Debug Bridge (ADB). Like this:
At this point, Bluestacks enables its adb functionality and exposes itself to the localhost at port 5555 (the default port)
So, in your command line, type adb connect localhost:5555 and you should be good to go.
I did exactly as the chosen approved answer but i still could not connect my android studio to Bluestack 4. Hence i think the problem both of us are encountering could be due to bluestack device ip has changed. (Even if you had detect the device using adb devices command earlier on). Each time i open up my bluestack emulator, i notice that its ip is always different. Hence that could be one of the reason why you could not add adb to bluestack4.
The following step works for me. I am using windows 10, Android Studio 4.0.1, Bluestacks 4.200.
find your android studio sdk platform tool folder. For me its is
custom installed in my D drive. for example->
D:\AppData\Local\Android\Sdk\platform-tools
right click on adb.exe and run as administrator. (click on yes if
a pop up ask if you would like to make changes to your devices.
After that you would only see another pop up that suddenly
disappear.)
open Bluestacks. Run your selected emulator (samsung/pixel etc).
Ensure that you have enable "Enable Android Debug Bridge (ADB) in
the emulator preferences.
open platform tools folder path: Click on address bar, alternatively press Alt + D. Now when address bar is highlighted, type cmd in the bar. Press Enter key.
enter the following command->adb connect xxxxxxxxxxx
where xxxxxx is your device localhost ip. (see attach pic. My device ip is
127.0.0.1:xxxxx hence my command is ->adb connect 127.0.0.1:xxxxx
continue with the following command->adb devices
you would see your bluestack emulator device. same ip listed.
open your andriod studio. you would be able to see your bluestack
emulator
[
And I have test bluestack 4 in windows 10 and enable the adb permission in bluestacks 4 settings. It works for me.
After enabling adb in blue stack
go to platform-tools folder
e.g. "C:\Users\Your Username\AppData\Local\Android\Sdk\platform-tools"
run this in cmd "adb connect localhost:5555" or whatever port given by bluestack.
or just run directly from Win+R
"C:\Users\Your
Username\AppData\Local\Android\Sdk\platform-tools\adb connect
localhost:5555"
n.b. localhost = 127.0.0.1
On BlueStack 5 it should be in Advanced -> Android Debug Bridge
Hello I want to deploy an apk to my physical mobile device using this command:
adb install android-debug.apk
And I got this error :
adb install android-debug.apk
[100%] /data/local/tmp/android-debug.apk
pkg: /data/local/tmp/android-debug.apk
android.os.TransactionTooLargeException
Error: Could not access the Package Manager. Is the system running?
You have to physically unlock your device's lockscreen and make sure you have usb debugging enabled. Here to where I read the answer, remember, search before you post.
I have found a lot of threads on physical devices connected via USB, but I have a gennymotion virtual machine running in Ubuntu. Just installed Ubuntu and 1st time ever using linux, but I remember the days of dos 6.2 and the command prompt. For the life of me cannot get adb reboot to work. I drop the Arm Translation Installer file to the android\gennymotion window and it installs. Then I can't figure out how to reboot. I installed abd tools twice in the 2 directories:
/home/db/.Genymobile/Genymotion/deployed/
/home/db/.Genymobile/Genymotion/deployed/Custom\ Tablet\ -\ 4.3\ -\ API\ 18\ -\ 2560x1600/
I try to run from the ubuntu terminal:
adb reboot
adb reboot /home/db/.Genymobile/Genymotion/deployed/Custom\ Tablet\ -\ 4.3\ -\ API\ 18\ -\ 2560x1600/
Each time I get no device found. What am I doing wrong? I am trying to run the new sling.tv apk and a few other thinkgs and I think I'm getting error messages because I'm not rebooting properly after I install the ARM translator and before I install the Google Play Services GApps file.
I have a htc wildfire phone and i have developed one application in android 2.1 using eclipse IDE now its time to run it on the actual device.
so far i have done following.
i have set my application as "debuggable" in my Android Manifest.
i have download the driver that is setup_3.0.5511.exe (HTC Sync)
i have connect my device via usb to my pc.
i tried running abd devices and its giving me 'HTXXXXXXXX device'
apart form these when i operate something in my phone i can see the log information in my eclips LogCat section.
Moreover when i open Android SDK and AVD Manager all i can see the Virtual devices listed ; there is not actual physical device is shown over here.
I am using Windows XP operating system and HTC Wildfire phone.
The physical device will not be listed in the AVD manager. I'm not sure how things work in Eclipse but from the command line you can run the following command to install an APK on your phone:
adb -d install -r yourapp.apk
The -d specifies that you want to install on a device rather than the emulator. The -r just means that the app will be reinstalled if it already exists.
Maybe you need to enable USB debugging in the phone settings, see this link