Failed to connect to bus: Host is down - centos

There is an error when I use command 'systemctl' in centos in Termux.
The error goes like this
By the way, Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required.

Related

Virtual Box: Critical error while running the Android Emulator

I try to create Linux Kali on Mac with using VirtualBox. And I want to run android emulator on this Virtual Box.
My VirtualBox settings look like:
After all, I installed android-studio and I've tried to run android emulator but it gives error like:
A critical error has occurred while running the virtual machine and machine
execution has been stopped...
VirtualBox is not recommended.
it seems that android emulator inside vm's using VirtualBox has
historically had a lot of issues. It seems most of the recommendations
are to either use VMWare, Hypver-V, or just install the emulator
natively on your base machine.
Ring Zero Labs
Installed VMWare and solved.

Genymotion Android VM stuck at "starting virtual device"

I'm having problems starting an Android VM (Nexus 5X) on Genymotion 3.0.0 trial on a Windows 10 host, and also on Virtualbox. I tried reinstalling Genymotion, but still doesn't work. The "Starting virtual machine" window pops up and just gets stuck there.
In Genymotion, I get the following error message before it just hangs there
init: Failed to reload policy
init: /recovery not specified in fstab
Waiting for eth0 link..
IP Management : 192.168.160.101
init: cannot find '/system/bin/vinput_seamless', disabling 'vinput_seamless'
init: cannot find '/system/bin/debuggerd64', disabling 'debuggerd64'
init: cannot find '/system/bin/install-recovery.sh', disabling 'install-recovery.sh'
I tried installing a few other Android devices in Genymotion (Nexus 6P/Pixel 3) but got the same problem starting them in Genymotion. I also couldn't start them in VirtualBox.
Anyone know what might be the problem?

How to prevent launch Ionic app on emulator

I'm working on ionic App and I'm trying to run App on real Android device, But when I run ionic run android in terminal, I get the following error:
Running command: "C:\Program Files (x86)\nodejs\node.exe"
D:\wamp\www\pars-app\pars-app\hooks\after_prepare\010_add_platform_class.js
D:\wamp\www\pars-app\pars-app
add to body class: platform-android
ANDROID_HOME=D:\Sdk\android-sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_45
No target specified, deploying to emulator
ERROR running one or more of the platforms: No emulator images (avds)
found.
1. Download desired System Image by running: "D:\Sdk\android-sdk\tools\android.bat" sdk
2. Create an AVD by running: "D:\Sdk\android-sdk\tools\android.bat" avd HINT: For a faster emulator, use an Intel System Image and install
the HAXM device driver
You may not have the required environment or OS to run this project
How to prevent run app on windows emulator? I want to run app on real device that conected to my computer.
I am using windows 8 and Huawei with Android 4.2.2
::note
I have read these questions, But I didn't got the answer!
Why not work Ionic app testing on android real device?
Ionic run android does not run app on device
ionic run android - configurations not running app on device
As a complement to #OClyde answer, you could try :
adb kill-server
adb start-server
To have infos about these commands :
adb --help
Nb : Sometimes, for a reason i do not know, the connection between my phone and the computer break. Running this fixes it.
To make sure that your app is not installed to an emulator but to your device, take the following steps:
Open up your console and run adb devices. This should give you a list of all devices available (real devices as well as running emulators) to the Android Debug Bridge. If the adb command is not recognized check that you have installed the Android SDK correctly and that you've set all the necessary environment variables accordingly.
The adb devices command might give you output similar to this:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
This indicates that the ADB wasn't ready before, so in this case just try to un- and replug your device and run adb devices again to see if the device is listed afterwards.
If your device is still not showing, check that USB Debugging is enabled on your device. Therefore you first have to enable developer settings, which you can do by tapping the build number (Settings => About Phone) 7 times (no, that's not a joke ;) ). After that, you'll have the developer options in your settings menu. Open these and check "USB Debugging"
If still your device isn't recognized by the ADB, change the USB connection mode. You can either do this in the developer options as well or tap the notification shown when the phone is connected to your PC. Try MTP as well as PTP, on of those should do the job.
After these steps, it should be nearly impossible that the device is still not recognized by your PC. As soon as there is a phone available, Ionic will install the app on the phone automatically instead of launching an emulator.

Android App not runnig in Bluestacks

I'm using Eclipse to develop an Android application, and I want to use Bluestacks as my emulator. I tried adb 127.0.0.1 successfully. When I double click my project's APK, it says that my app has been installed, but when I try to run it in Bluestacks my app store it says "device could not find your app". Alternatively I also tried to run it by using Eclipse IDE, and it said "An established connection was aborted by the software in your host machine". How do I fix this?
Try restarting Bluestacks and following the procedure again. By following the procedure I mean running the command adb connect 127.0.0.1 and reinstalling the APK you want to test. It worked for me.

Android emulator and virtualbox cannot run at same time

Whenever I have Virtualbox running, I cannot start an Android emulator image (and vice versa). The error message in the AVD manager is
ioctl(KVM_CREATE_VM) failed: Device or resource busy
ko:failed to initialize KVM
How can I make both run at the same time?
That is a Ubuntu 64 bit, all involved software is of the latest released version.
Removing the kvm kernel modules (using 'sudo rmmod kvm_intel kvm') makes it possible to run the Virtualbox and the Android emulator at the same time but the performance of the Android emulator in such a setup is extremely bad. If possible it is better to shutdown the Virtualbox emulator and unload its driver (vboxdrv) by running 'sudo /etc/init.d/vboxdrv stop'. Google suggests this "solution" on its Android Emulator page in the section about Linux.
I got the same VirtualBox conflict.
Solved it by using ABI different from "x86" (armeabi-v7a in my case)
I stopped the virtual machines I had running with VirtualBox. This made the error disappear.
I had the same problem on Ubuntu 13.10.
Try to remove kvm and kvm_intel kernel modules.
To do this:
Stop all emulators.
Run command: 'sudo rmmod kvm_intel kvm'
Without these kernel modules Virtualbox and Android emulators can work at the same time.
BTW, I do not know why the modules are loaded.
There is finally a fix for this.
Follow these steps for macOS:
In Android Studio Go to Tools -> Android -> SDK Manager
Confirm you have the latest version of Intel Emulator Accelerator HAXM installed (v6.1.1) .
Go to the extras directory of the Android SDK location displayed in the preferences. On MacOS you can do this:
open ~/Library/Android/sdk/extras
Install the HAXM packing by opening IntelHAXM_6.1.1.dmg, then opening IntelHAXM_6.1.1.mpkg in the mounted folder, and following the installer instructions.
Follow these steps for Windows:
In Android Studio Go to Tools -> Android -> SDK Manager
Confirm you have the latest version of Intel Emulator Accelerator HAXM installed (v6.1.1) .
Go to the extras directory of the Android SDK location displayed in the preferences. Something like:
C:\Users\<username>\AppData\Local\Android\sdk\extras
In that directory is some kind of file like intelhaxm-android.exe. Run it.
You also can change CPT/ABI setting from x86 to arm in emulator settings.
I finally made this problem obsolete by using Genymotion instead of the standard Android emulator. Besides not having this conflict, it is several times faster than the normal emulator.
Another solution is to use libvirt backed vagrant using vagrant-libvirt plugin.
For those who are developing on Linux and are stuck with a host of back-end systems running inside virtualbox, a simple solution is simply to create a virtualbox X86 Android VM and expose the 5555 port on the NAT interface tunnelled from localhost through PAT.
No need for slow arm AVD, no need for libvirt/vagrant let alone killing kvm!
Then let adb know about it
$ adb tcpip 5555
restarting in TCP mode port: 5555
$ adb connect 127.0.0.1
connected to 127.0.0.1:5555
$ adb devices
List of devices attached adb server
* daemon started successfully
emulator-5554 device
Then, pressing run or debug, in Android Studio will deploy and execute on that VM.
You have complete control under Android Studio debugger.
Though it's a workaround either, but definitely better than disabling KVM as everyone suggesting.
Just run the virtualbox guest in KVM instead. For example (kvm here is just a script running a qemu-system-x86_64 -enable-kvm):
kvm Win7.vdi -boot c -m 2G -vga qxl
In some cases, we need to keep virtualbox machines up and running therefore let all the virtualbox machines keep running, switch to physical mobile device to test your application instead of emulator.
you can use expo if you are doing with react-native or your real android/ios device.
I resolved it by installing HAXM 6.1.2.
Please refer to the following link for details :- https://forums.docker.com/t/cant-using-docker-for-mac-with-android-emulator-haxm/8939/11
This might be out of topic, due to the fact that OP requested VirtualBox + KVM in the same time, but still, it might be the workaround:
I was looking for a way to launch Windows 7 and AVD on Ubuntu 18.10 x64. Turning off KVM is not an option due to the fact that performance of AVD is critical to me. I have installed Windows 7 via Virtual Machine Manager (virt-manager package) and now both the AVD and Windows 7 are hardware accelerated.
Here is how solved this issue, using vagrant and it's two plugins 'libvirt' and 'mutate':
Open terminal and set environment variables:
export VAGRANT_DEFAULT_PROVIDER=libvirt
export VAGRANT_HOME=/home/directoryToStoreVagrant/
VBoxManage list vms
Now copy the a the code obtained from last command like
"c1530713-aec2-4415-a6b5-b057928c7e5f" and use in the following:
vagrant package --base c1530713-aec2-4415-a6b5-b057928c7e5f
--output window7.box
vagrant init window7
vagrant up window7 --provider=libvirt
vagrant box list
You need to install some vagrant plugins like libvirt and
mutate. Mutate will convert .box to libvirt VM:
vagrant plugin install vagrant-libvirt
vagrant plugin install vagrant-mutate
Converting vagrant box to libvirt:
vagrant mutate window7_.box libvirt
Now you can initialise the vagrant VM. If any error persist move to
edit your Vagrant file. Like for me I uncomment the line starts with
config.vm.network and then run command below:
vagrant up --provider=libvirt
This is how I was able get rid of this error completely