how to disable launch of default emulator on 'react-native run-android'? - adb

I don't want to run emulator at all. But 'react-native run-android' starts an emulator even though I have a physical device already connected ('adb devices' command shows it) and then 'react-native run-android' command fails with error 'error: more than one device/emulator'
info JS server already running.
'C:\Users\Wings' is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator...

I had to delete all emulators in ADB to disable automatic launch of emulators but I think that shouldn't be the perfect solution as I will have to recreate AVDs when I need to.

Related

I've installed Hbase but when I type a commmand in cmd "hbase shell" the it shows the following error

Here is the error when I type "hbase shell"
*:\hbase-2.5.0\hbase-config.cmd"' is not recognized as an internal or external command, operable program or batch file. \Java\jdk1.8.0_261\lib\tools.jar was unexpected at this time.
and here comes another error when I type "start-hbase.sh"
The file does not have an app associated with it for performing this action. please install and app or if already installed, create an association in the Default Apps setting page
Seems like you are on windows (correct me if I'm wrong).
Your first command seems to come from an installation issue. The shell can't seem to find hbase-config.cmd. Make sure you followed the installation instructions properly and everything is where it's supposed to be.
As for the second error, you can't run bourne shell files (.sh extension) on windows.
It would be best you link the tutorial/documentation you followed in your original question, and add more information about your directory structure.

how to start code server terminal with chroot?

I have a code server that runs on Android with termux, for university reasons, there are times when I must share my vscode environment and I would not like to expose my entire system and personal files through the terminal.
So I was wondering if it was possible to expose a terminal from an alpine distro with chroot (prrot in the case of termux) by default every time code server opens a terminal
After some time reading the vscode config, I realized that you can use the shell option to force it to start inside with alpine and not expose my files, nor my android system with termux
"terminal.integrated.shell.linux":"/data/data/com.termux/files/usr/bin/startalpine"

getting error while using logcat for checking logs of an app in linux

I want to know bugs of my android app so i tried to use logcat to see its log and followed these steps:-
You need to use adb server.
1. Connect your android with your laptop/pc
2. Go to developer options and turn on the stay awake and USB debugging options. (Your phone)
3. In your terminal, type "sudo adb kill-server" and then "sudo adb start-server".
4. Type "adb devices" (this should give list of devices connected)
List of devices attached
you_device_name device
5. "cd" to your folder where you have made your build.
6. Type "buildozer android debug deploy run logcat > logcat.txt"
this saves the logs (for the entire process) in a file logcat.txtx in the same folder and also deploys you app on the phone.
Go through it and find your error.
7. keep your phone awake.(do not lock it).
But when i run the 6th step, a time comes it says:-
error: device 'adb' not found
- waiting for device -
i have searched many times on the internet and when finally i am posting here to get solution
I actually initially misread the bulldozer error. It is complaining that a device adb doesn't exist. Which is strange. It should have picked up the device serial instead.
You could theoretically force adb commands to go to your device by executing
export ANDROID_SERIAL= <your device's serial number>
you could now repeat the steps and check if this works.
Also just for completeness just check if there exists an adb binary in the system partitin of your device.
Also make sure you haven't missed out any bulldozer init steps

Daydream View Controller Emulator won't work with Google VR SDK 1.1 and Unity 5.6 beta for Linux

I can't get the controller emulator to work with Google VR SDK 1.1 & Unity 5.6b3 under Arch Linux 64-bit. If I load the GVRDemo scene in Unit and click the play button to enter Play Mode, the console shows the following:
"Android Debug Bridge (adb) command not found.
Verify that the Android SDK is installed and that the directory containing adb is included in your PATH environment variable."
In Windows, you have to add the directory containing the Android Debug Bridge (adb) program to the PATH environment variable in Windows itself (not in the Unity program). Once you do that, the Controller Emulator works fine in Windows. You have to do the same in Linux, evidently, to get Unity to locate adb, and therefore get the Controller Emulator phone working for testing the game.
I've added the following line in my .bashrc and .profile files in my home directory:
"PATH=/home/jesse/Android/Sdk/platform-tools/:$PATH"
This, however, doesn't fix the issue.
I've also added the root directory of the Android SDK to my Unity Preferences > External Tools section.
I don't know how to get Unity and Google VR SDK to recognize the directory containing adb to the PATH environment variable that Unity needs to make the Controller Emulator work.
Is anyone else having this issue? Is there a fix or work-around?
I was able to locate the culprit and modify Google VR SDK scripts to make it work! Turns out there was an issue in the code of the script file titled "EmulatorClientSocket.cs" regarding non-Windows machines. Here's what I changed, and why:
Originally, in line 111 and 112 of this script, it read:
stringprocessFilename="bash";
stringprocessArguments = string.Format(" -l -c \"{0}\"", adbCommand);
The context is that when Windows is not present (forgive my layman's terms -- I've only started learning coding a month ago) the command to process is this: bash -l -c "adb forward tcp:7003 tcp:7003". The problem is when the -l option is used in the command, the command is interpreted as if coming from a login shell, which - I believe - means that bash isn't looking at the custom environment variables set in the user's .bashrc and .profile files in their home directory. Without looking at those files, bash can't locate the adb command (try running the bold command above in a terminal, and the result will be a prompt saying adb command not found).
To fix it, I simply removed the -l option from line 112, and, voila! Everything works like a charm! Lines 111 and 112 now look like this:
stringprocessFilename="bash";
stringprocessArguments = string.Format(" -c \"{0}\"", adbCommand);
The fix will work when running "unity-editor" or "unity-editor-beta" from the Terminal or Xterm, but running it from the application menu will still produce the adb error and Controller Emulator will not work.

Start/Stop adb daemon programmatically in android

I want to make an app.which can start and stop adb daemon which i want to run on Google Nexus 7(Android 5.0.1).
I downloaded the nexus 7 source code and created an app. in packages/app folder and built it in system/priv-app.
I am using following code for starting and stoping adb daemon :
Runtime.getRuntime().exec("setprop service.adb.tcp.port 5555");
Runtime.getRuntime().exec("stop adbd");
Runtime.getRuntime().exec("start adbd");
But its not working.
It works fine on an emulator(Android 4.4), but not on the device.
Can any one please suggest if anything more needs to be done for the above code to work on device.
I am having the
whole system code.
Thanks

Resources