I wrote a bash file to start an emulator and install apk with the commands,
emulator -avd emulatorName
adb wait-for-device
adb install OpenManager.apk
but when i run the file from terminal it starts the emulator and it hangs there it doesn't execute the command to install the apk. But when i close the emulator then it execute the install command. Please, can someone help on how to do that.
Add an & to run the emulator process in the background:
emulator -avd emulatorName & adb wait-for-device && sleep 5 && adb install OpenManager.apk
and the && to run the following command if the previous succeeded.
Related
I want to run appium program and see appium process running in terminal automatically on startup
I have created a simple bash script to run the appium command using gnome-terminal.
appium.sh
#!/bin/sh
gnome-terminal -- appium
and when I run the command by terminal ./appium.sh it works.
(Use `node --trace-deprecation ...` to show where the warning was created)
[Appium] Welcome to Appium v1.21.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
but when I put in sudo nano /etc/xdg/lxsession/LXDE-pi/autostart to run the program automatically at startup.
#lxpanel --profile LXDE-pi
#pcmanfm --desktop --profile LXDE-pi
#lxterminal -e bash /home/pi/appium.sh
#xscreensaver -no-splash
gnome-terminal opens successfully, but the appium command fails to run.
There was an error creating the child process for this terminal
Failed to execute child process “appium” (No such file or directory)
Is there something wrong ? please help
I just start learning laravel, and follow the tutorial from https://laravel.com/docs/8.x/installation "Getting started on Windows" .
I manage to install Docker Desktop and COnfigured to use WSL2 Backend.
When I run the command curl -s https://laravel.build/example-app | bash to create laravel application directory from cmd, this warning come out Docker is not running.
I run curl using command prompt. (cmd).
Update:
So, I run the command in Windows Terminal:.
PS E:\Play> curl -s https://laravel.build/example-app | bash
Here is the response I get:
cmdlet Invoke-WebRequest at command pipeline position 1
Supply values for the following parameters:
Uri:
Any Idea what to do?
Try to explicitly enable integration with your distro in Docker settings:
After that relaunch your WSL2 terminal & try again. That should help.
You can also open https://laravel.build/example-app in a browser & check what commands the script is running: and run them manually to check the output for any errors.
For those who are using Ubuntu or Debian can check this guide out on how to install and configure Docker.
sudo snap install docker
sudo usermod -aG docker $(whoami)
sudo chmod 666 /var/run/docker.sock
You need to install a linux distro, and then in Windows Terminal create a new tab for the linux distro and run the command there, not in a windows powershell tab.
Make sure that you are running curl command on your distro. Use Windows Terminal app and open a new tab as WSL2 (your distro).
sudo chmod 666 /var/run/docker.sock
I guess you are using ubuntu or debian.
chmod will do the trick here.
trynig to install an apk app using Adb prompt cmd :
C:\adb\platform-tools> .\adb install "C:\adb\platform-tools\myapp.apk"
Performing Streamed Install
and than it says :
adb: failed to install C:\adb\platform-tools\myapp.apk: Failure [INSTALL_FAILED_BLOCKED_CROSS_DOWN: INSTALL_FAILED_BLOCKED_CROSS_DOWN]
PS : i used the adb cmd because the app won't install in normal methode (incompatible device)
my device is samsung A20 .
In my case, I had an incorrectly signed application.
I cleared the project and generated the signed application again and the problem was gone
I have a nativescript application in windows that deploys to the emulator just fine, but when I git clone onto the MacBook Pro and run the same process, I get:
new-host:nativescript jbaird$ tns run android
Searching for devices...
Starting Android emulator with image Nexus_5X_API_26
Waiting for emulator device initialization...
Executing before-liveSync hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-liveSync/nativescript-angular-sync.js
Executing before-prepare hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.4.2
Preparing project...
Project successfully prepared (Android)
Building project...
Unable to apply changes on device: emulator-5554. Error is: spawn EACCES.
Executing after-watch hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/after-watch/nativescript-dev-typescript.js
Any ideas? Thanks in advance.
The error is a permission error. Therefore, all you need to do is give access to the the folder you are running your apps from. The process involves you to copy and paste the command below into your terminal.
sudo chmod -R a+rwx /AppFolder
The command is an administrator command, therefore, you may have to insert your system password.
PS: Definitely, you hit enter and there will be a prompt for you to insert your password.
Let me know if you have any challenges with this solution!
emulator-5554. Error is: spawn EACCES.emulator-5554. Error is: spawn EACCES.
Seems a permission error. You could solve it by:
sudo,
Or, by giving +x permision to your hooks folder?
I am trying to connect Android Wear emulator to my Android phone through USB cable. I am enterying the command:
adb -d forward tcp:5601 tcp:5601
And I get the following error:
adb server is out of date. killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:
error:
Adb version:
Android Debug Bridge version 1.0.32
I also have installed these addition things:
$ sudo apt-get install lib64stdc++6 (if it is not installed)
$ cd ~/Android/Sdk/tools/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.original
$ ln -s /usr/lib64/libstdc++.so.6 ~/Android/Sdk/tools/lib64/libstdc++
$ sudo apt-get install mesa-utils (if it is not installed)
But still, even when I enter the commands below, all I see in Android Wear is "trying to connect..."
adb kill-server
adb start-server
adb -d forward tcp:5601 tcp:5601