ubuntu phonegap run android error 1 - android

I'm trying to run the Hello-World app of Phonegap on Ubuntu 16.
"/my-app# phonegap --verbose run android"
But no matter what it always takes very long and finishes with an error:
"Running adb shell command "getprop dev.bootcomplete" on target emulator-5584..."
"Running command: adb -s emulator-5584 shell getprop dev.bootcomplete"
"Command finished with error code 1: adb -s,emulator-5584,shell,getprop,dev.bootcomplete"
I've creating different avds and running everything as root user but no change.
Any suggestion what this "error code 1" means would be highly appreciated - I could only find other error codes with the search.

Try running adb kill-server and restart doing all the process again.
EDIT:
Try starting emulator with ubuntu cmd:
LD_PRELOAD='/usr/lib/x8stdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_API_21
where Nexus_5X_API_21 is your emulator name
~/Android/Sdk/tools/emulator is your path where emulator is stored
Do this after adb kill-server, then on another cmd tab, try running
phonegap emulate android --verbose

Related

android studio emulator process exit with code 1 linux mint

I am having issue with android emulator and it is not starting the device. i am using linux mint. this error is shown
5:49 PM Emulator: emulator: ERROR: Unknown AVD name [Pixel_2_API_29], use -list-avds to see valid list.
5:49 PM Emulator: Process finished with exit code 1
i dont know how to list avds .
i was able to run it from the command by using
sudo ./emulator -avd Nexus_5X_API_29_x86 -use-system-libs
BUT not working in avd managers window.
Please run following commands step by step..
1.adb kill-server (To kil adb server)
2.adb start-server (To start adb server)
3.adb devices (To list avds)

Cordova not launching android app to emulator

Hi everyone,
I am running an example cordova app on platform android with command:
cordova run android
The command line gets stuck on
"........................." and keeps continuing.
When I run with:
cordova run android --verbose
I get the following:
Running adb shell command "ps" on target emulator-5554... Running
command: D:\android-sdk\android-sdk\sdk\platform-tools\adb.exe -s
emulator-5554 shell ps Command finished with error code 0:
D:\android-sdk\android-sdk\sdk\platform-tools\adb.exe
-s,emulator-5554,shell,ps
As you can see my emulator is already up and running. What can I do to solve this issue, I have tried answers from other slackoverflow similar questions, but it's not working.
Thanks

Adb shell command ocassionally hangs from command line

We have a Xamarin test application, that we run automatically from command line on macOS Sierra. Before it we automatically launch Android emulator from command line. As Android emulator we use x86 emulator, accelerated with Intel HAXM. The script for emulator launching looks in the following way:
function isEmulatorReady {
pathToSDK=$1
#Check that emulator is booted by checking that boot animation is stopped
$pathToSDK/platform-tools/adb wait-for-device shell getprop init.svc.bootanim | grep -m 1 stopped
}
androidSDK=~/Library/Developer/Xamarin/android-sdk-macosx
$androidSDK/platform-tools/adb kill-server
$androidSDK/platform-tools/adb start-server
$androidSDK/tools/emulator -avd Android_Accelerated_x86 -wipe-data -partition-size 512 &
emulatorPID=$!
until isEmulatorReady $androidSDK; do
sleep 1
done
#launch application and wait for end
kill $emulatorPID
Ocassionally adb wait-for-device shell getprop command hangs and script can't detect that emulator is booted, while Android emulator is successfully booted and works. I don't know how to deal with it. The restart of adb server at the beginning doesn't help actually.

BlueStack Android Emulator device not found after running adb root command

I installed bluestacks version 0.10.0 on my PC.
When i run adb shell this command work fine,
But when i run adb root command and then run adb shell command it give error:device not found.
If i run adb kill-server and then adb shell it work fine.
Any Help?

Android Studio Error: Adb refused a command

I just changed my PC, and now I have a problem with Android Studio, every time i try to run or compile an app it install it correctly, but then it cannot start the main activity of the app, if you need it this is the full Android studio output:
Waiting for device.
Target device: samsung-gt_i9000-3733E37B1ACB00EC
Uploading file
local path: C:\Users\Federico\swagmasta\TurnarioConapo1.0\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/feddycapdev.conapo.turnario
Installing feddycapdev.conapo.turnario
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/feddycapdev.conapo.turnario"
pkg: /data/local/tmp/feddycapdev.conapo.turnario
Launching application: feddycapdev.conapo.turnario/feddycapdev.conapo.turnario.MainActivity.
DEVICE SHELL COMMAND: am start -D -n "feddycapdev.conapo.turnario/feddycapdev.conapo.turnario.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error: Adb refused a command
I tried to manually run am start -D -n "feddycapdev.conapo.turnario/feddycapdev.conapo.turnario.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER from the adb shell, and it work correctly, some ideas on how could i fix it?
UPDATE : I tried running as admin, rebooting PC, reconnecting cable, killing all the adb.exe processes, killing the adb server and restarting it, noone of this worked.
Maybe it's a problem of driver? I'm using a Samsung Galaxy S for debugging, at the beginning the PC didn't recognized it, so I installed samsung USB driver, so maybe that's the real problem, but if i can install app to my device via adb the driver should be working right?
Please kill and start adb server from console or terminal using following commands:
adb kill-server
adb start-server
If it does not help try to restart your computer.
If you are getting
adb command not found
error then you have to go in platform-tools directory in Android SDK.
hope it helps!
It could be blocked by some other instance of adb.
Look into your task manager if you are not running another instance of adb.

Categories

Resources