ADB rejected shell command (getprop): closed - android-studio

Using Android Studio and when trying to run a simple demonstration app the emulator I selected starts up but never renders the app. In the event log I see stuff like the following:
2:59 PM Emulator: emulator: WARNING: Host CPU is missing the following
feature(s) required for x86 emulation: SSSE3
2:59 PM Emulator: Hardware-accelerated emulation may not work
properly!
2:59 PM Emulator: qemu-system-x86_64: warning: host doesn't support
requested feature: CPUID.01H:ECX.ssse3 [bit 9]
2:59 PM Emulator: qemu-system-x86_64: warning: host doesn't support
requested feature: CPUID.01H:ECX.sse4.1 [bit 19]
2:59 PM Emulator: qemu-system-x86_64: warning: host doesn't support
requested feature: CPUID.01H:ECX.sse4.2 [bit 20]
2:59 PM ADB rejected shell command (getprop): closed
2:59 PM Emulator: Process finished with exit code 0
Tried restarting Android Studio
Tried recreating the AVD image
Tried killing and restarting adb
Running Ubuntu 18.04 with Android Studio 3.4
I expected that the emulator would start up and render the app created so far. I'm following https://www.youtube.com/watch?v=dFlPARW5IX8 and at about 21:22.
It says to press play and the emulator should start and show the app we have coded so far. I never see this.

Related

Android Studio Windows 8.1 Emulator: Process finished with exit code -1073741819 (0xC0000005)

I am running Android Studio on Windows 8.1. When I try to run simple Hello World on a virtual device, it shows briefly then exits with dialog "The emulator process for AVD [device] has terminated.
Here is the output from the idea.log:
INFO - manager.EmulatorProcessHandler - Emulator: C:\Users\[my_username]\AppData\Local\Android\sdk\emulator\emulator.exe -netdelay none -netspeed full -avd Nexus_4_API_22
INFO - manager.EmulatorProcessHandler - Emulator: WARNING | encryption is off
INFO - manager.EmulatorProcessHandler - Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
INFO - manager.EmulatorProcessHandler - Emulator: WARNING | Not all modern X86 virtualization features supported, which introduces problems with slowdown when running Android on multicore vCPUs. Setting AVD to run with 1 vCPU core only.
INFO - manager.EmulatorProcessHandler - Emulator: WARNING | cannot add library vulkan-1.dll: failed
INFO - manager.EmulatorProcessHandler - Emulator: WARNING | cannot add library vulkan-1.dll: failed
INFO - manager.EmulatorProcessHandler - Emulator: INFO | configAndStartRenderer: setting vsync to 60 hz
INFO - manager.EmulatorProcessHandler - Emulator: INFO | added library C:\Users\[my_username]\AppData\Local\Android\sdk\emulator\lib64\vulkan\vulkan-1.dll
INFO - manager.EmulatorProcessHandler - Emulator: HAX is working and emulator runs in fast virt mode.
INFO - b.PhysicalDeviceChangeListener - emulator-5554 connected
INFO - manager.EmulatorProcessHandler - Emulator: INFO | Started GRPC server at 127.0.0.1:8554, security: Local
INFO - manager.EmulatorProcessHandler - Emulator: INFO | Advertising in: C:\Users\[my_username]\AppData\Local\Temp\avd\running\pid_1072.ini
INFO - b.PhysicalDeviceChangeListener - emulator-5554 state changed to ONLINE
INFO - b.PhysicalDeviceChangeListener - emulator-5554 state changed to OFFLINE
WARN - #com.android.ddmlib - Failed to start monitoring emulator-5554
INFO - manager.EmulatorProcessHandler - Emulator: INFO | Android emulator version 31.2.8.0 (build_id 8143646) (CL:N/A)
INFO - manager.EmulatorProcessHandler - Emulator: Process finished with exit code -1073741819 (0xC0000005)
WARN - manager.EmulatorProcessHandler - Emulator terminated with exit code -1073741819
INFO - b.PhysicalDeviceChangeListener - emulator-5554 disconnected
However, I am able to run it from the command line successfully. The log is nearly identical:
I have searched these forums and tried everything:
Change Graphics Performance option to "Software"
Cold Boot Now option
Wipe Data option
Delete .android folder
Delete, create multiple different virtual devices
Run as Administrator
Install, reinstall Android Emulator
Increase IDE memory to max (2GB)
Reboot machine
I am out of ideas. Has anyone been able to solve this?
Android Studio Bumblebee | 2021.1.1 Patch 2
Build #AI-211.7628.21.2111.8193401, built on February 16, 2022
Runtime version: 11.0.11+9-b1341.60 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 8.1 6.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: mobi.hsz.idea.gitignore (4.1.0), org.intellij.plugins.markdown (211.7142.37)

Cannot set up the virtual device in android studio

I am new to android studio. And i am trying to set up a virtual device for my project. One the virtual device is created and when i run it virtual device is not displaying and it gives me following errors.How can i resolve this in order to run the virtual device.
Errors as follows
10:06 AM Emulator: Warning: Quick Boot / Snapshots not supported on this machine. A CPU with EPT + UG features is currently needed. We will address this in a future release.
10:06 AM Emulator: init: Could not find wglGetExtensionsStringARB!
10:06 AM Emulator: getGLES2ExtensionString: Could not find GLES 2.x config!
10:06 AM Emulator: Failed to obtain GLES 2.x extensions string!
10:06 AM Emulator: Could not initialize emulated framebuffer
10:06 AM Emulator: emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
10:06 AM Emulator: Process finished with exit code -1073741819 (0xC0000005)

Unable to launch weston on linux yocto from ssh

I have the error "no drm device found" as shown below.
I thinks the mail error is fatal: failed to create compoitor backend.
I have the following in my lib
desktop-shell.so drm-backend.so fbdev-backend.so fullscreen-shell.so gl-renderer.so hmi-controller.so ivi-shell.so wayland-backend.so x11-backend.so
root#salvator-x:/etc/systemd/system/multi-user.target.wants# /usr/bin/weston-launch \
-u root -- --idle-time=0 --config=/etc/xdg/weston/weston-drm-hdmi.ini $OPTARGS
Date: 2018-02-26 UTC
[21:29:08.949] weston 1.11.0
http://wayland.freedesktop.org
Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.11.0
Build: a9df8430-dirty v4l2-renderer: Fix calcluation of clip region (2017-04-13 18:25:00 +0900)
[21:29:08.949] OS: Linux, 4.9.0-yocto-standard, #1 SMP PREEMPT Mon Feb 26 17:46:03 EST 2018, aarch64
[21:29:08.949] Using config file '/etc/xdg/weston/weston-drm-hdmi.ini'
[21:29:08.950] Output repaint window is 34 ms maximum.
[21:29:08.950] Loading module '/usr/lib/weston/drm-backend.so'
[21:29:08.954] initializing drm backend
[21:29:08.954] logind: failed to get session seat
[21:29:08.954] logind: cannot setup systemd-logind helper (-61), using legacy fallback
[21:29:08.955] no drm device found
[21:29:08.955] fatal: failed to create compositor backend
failed to restore keyboard mode: Bad file descriptor
failed to set KD_TEXT mode on tty: Bad file descriptor
could not reset vt handling
How do I launch weston on linux yocto?
Here is the image:
So.. I found the answer to my question
it has three errors logind (systemd) was having trouble access the input keyboard type
second one is drm device is not found which implies that you have trouble accesing your output port. try to troubleshoot the port make it accessible to the board and then try to launch weston with correct config.
NOTE: Weston wayland wont launch if you dont have keyboard or a mouse connected preferably a usb

Android Studio 2.3 using emulator from console, "/dev/kvm device: permission denied" for root user

I'm trying to start a virtual android device which I created with the avdmanager of Android Studio 2.3 (via command line)
all commands are performed as root user
when i try to start the emulator via $ ~/Android/Sdk/tools/./emulator #Nexus_5X_Api_23_x86 the output is:
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn't have permissions to use KVM (/dev/kvm)
I'm using an Ubuntu 16.04 server with 64-Bit, Android Studio is started via x11 forwarding so my desktop environment is used (which is an ubuntu 16.04, 64-Bit too!)
when i'm typing $ kvm-ok it gives me:
INFO: /dev/kvm exists
KVM acceleration can be used
To proof that the .avd I'm trying to access exists:
$ ~/Android/Sdk/tools/bin/./avdmanager list avd
gives the output:
März 15, 2017 4:30:53 NACHM. sun.util.PropertyResourceBundleCharset$PropertiesFileDecoder decodeLoop
INFO: Invalid or unmappable UTF-8 sequence detected. Switching encoding from UTF-8 to ISO-8859-1
Available Android Virtual Devices:
Name: Nexus_5X_Api_23_x86
Device: Nexus 5X (Google)
Path: /root/.android/avd/Nexus_5X_Api_23_x86.avd
Target: Google APIs (Google Inc.)
Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86_64
Sdcard: 800M
further the permissions for /dev/kvm are:
root#h2627852:~# ls -l /dev/kvm
crwxrwxrwx 1 root kvm 10, 232 Mär 15 10:48 /dev/kvm
root#h2627852:~# groups root
root : root kvm libvirtd libvirt
performing emulator-check gives me:
root#h2627852:~# ~/Android/Sdk/tools/./emulator-check accel hyper-v cpu-info window-mgr desktop-env
accel:
11
This user doesn't have permissions to use KVM (/dev/kvm)
accel
hyper-v:
0
Hyper-V runs only on Windows
hyper-v
cpu-info:
146
Intel CPU|Virtualization is supported|64-bit CPU|
cpu-info
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from ::1 36346
debug1: channel 1: new [x11]
debug1: confirm x11
debug1: channel 1: FORCE input drain
window-mgr:
0
GNOME Shell
window-mgr
desktop-env:
0
mate
desktop-env
I really don't know what to do anymore, searched all over the forum but didn't found a replicate of this problem for my system, the fixes for the same problem on other systems doesn't worked for me, already tried to completely purge and reinstall all qemu, libvirt, libvirtd and kvm packages without success.
Any help is appreciated!!
edit:
~/Android/Sdk/tools/./emulator #Nexus_5X_Api_23_x86 -verbose givese me,
following output:
emulator:Android emulator version 25.3.0.0 (build_id 3394391)
emulator:Found AVD name 'Nexus_5X_Api_23_x86'
emulator:Found AVD target architecture: x86_64
emulator:argv[0]: '/root/Android/Sdk/tools/./emulator'; program directory: '/root/Android/Sdk/tools'
emulator: Found directory: /root/Android/Sdk/system-images/android-23/google_apis/x86_64/
emulator:Probing for /root/Android/Sdk/system-images/android-23/google_apis/x86_64//kernel-ranchu: file exists
emulator:Auto-config: -engine qemu2 (based on configuration)
emulator: Found directory: /root/Android/Sdk/system-images/android-23/google_apis/x86_64/
emulator:try dir /root/Android/Sdk/tools
emulator:try dir /root/Android/Sdk/tools/./
emulator:try dir /root/Android/Sdk/emulator
emulator:Found target-specific 64-bit emulator binary: /root/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64
emulator:Adding library search path: '/root/Android/Sdk/emulator/lib64'
emulator:Adding library search path: '/root/Android/Sdk/emulator/lib64/libstdc++'
emulator: Found directory: /root/Android/Sdk/system-images/android-23/google_apis/x86_64/
emulator: Found directory: /root/Android/Sdk/system-images/android-23/google_apis/x86_64/
emulator:GPU emulation is disabled
emulator: Adding library search path for Qt: '/root/Android/Sdk/emulator/lib64/qt/lib'
emulator: Setting Qt plugin search path: QT_QPA_PLATFORM_PLUGIN_PATH=/root/Android/Sdk/emulator/lib64/qt/plugins
emulator: Running :/root/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64
emulator: qemu backend: argv[00] = "/root/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64"
emulator: qemu backend: argv[01] = "#Nexus_5X_Api_23_x86"
emulator: qemu backend: argv[02] = "-verbose"
emulator: Concatenated backend parameters:
/root/Android/Sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 #Nexus_5X_Api_23_x86 -verbose
emulator: Android virtual device file at: /root/.android/avd/Nexus_5X_Api_23_x86.ini
emulator: virtual device content at /root/.android/avd/Nexus_5X_Api_23_x86.avd
emulator: virtual device config file: /root/.android/avd/Nexus_5X_Api_23_x86.avd/config.ini
emulator: using core hw config path: /root/.android/avd/Nexus_5X_Api_23_x86.avd/hardware-qemu.ini
emulator: Found AVD target API level: 23
emulator: Read property file at /root/Android/Sdk/system-images/android-23/google_apis/x86_64//build.prop
emulator: No boot.prop property file found.
emulator: Warning: config.ini contains invalid skin.path entry: (null)
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel /root/Android/Sdk/system-images/android-23/google_apis/x86_64//kernel-ranchu
emulator: Target arch = 'x86_64'
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /root/Android/Sdk/system-images/android-23/google_apis/x86_64//ramdisk.img
emulator: Using initial system image: /root/Android/Sdk/system-images/android-23/google_apis/x86_64//system.img
emulator: autoconfig: -data /root/.android/avd/Nexus_5X_Api_23_x86.avd/userdata-qemu.img
emulator: autoconfig: -initdata /root/.android/avd/Nexus_5X_Api_23_x86.avd/userdata.img
emulator: autoconfig: -cache /root/.android/avd/Nexus_5X_Api_23_x86.avd/cache.img
emulator: autoconfig: -sdcard /root/.android/avd/Nexus_5X_Api_23_x86.avd/sdcard.img
emulator: Increasing RAM size to 1024MB
emulator: VM heap size 0MB is below hardware specified minimum of 256MB,setting it to that value
emulator: System image is read only
emulator: GPU emulation is disabled
emulator: Found 2 DNS servers: 85.214.7.22 81.169.163.106
emulator: skin name 'HVGA' aliased to '320x480'
emulator: found magic skin width=320 height=480 bpp=16
emulator: CPU Acceleration: DISABLED
emulator: CPU Acceleration status: This user doesn't have permissions to use KVM (/dev/kvm)
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: This user doesn't have permissions to use KVM (/dev/kvm)
Simply try this.
this was work for me
$ sudo chown username -R /dev/kvm
sometimes you need to run this code also
$ cd Android/Sdk/emulator/lib64/libstdc++
$ mv libstdc++.so.6 libstdc++.so.6.bak
$ ln -s /usr/lib64/libstdc++.so.6
Try these steps:
Install qemu-kvm like following
sudo apt install qemu-kvm
Add user to kvm group using the following command:
sudo adduser <username> kvm
If you are getting permission denied, try following command
sudo chown <username> /dev/kvm
It worked for me in Ubuntu 18.04
Assuming that you want to apply this change of ownership using the current OS user, use the following:
sudo chown $(whoami) -R /dev/kvm
I solved the problem running
sudo apt install qemu-kvm
sudo chown username -R /dev/kvm
Check nano /etc/group contains a line begins with kvm and ends with your user name. If not then run:
sudo gpasswd -a $USER kvm

Unknown connection error with adb.exe in Android Studio

I was trying to test project on a device but got Error:Unable to locate adb within SDK. Using this guide I've tried to reinstall [platform-tools] in SDK manager and added path to SDK library (Windows 7). But that didn't work. Now, after lunching project on a device I have following:
File adb.exe just disappears from the [platform-tools] folder
I get this notification in Event Log:
14:19 Unable to obtain result of 'adb version' 14:25 Executing tasks:
[:app:assembleDebug] 14:25 Adb connection Error:????????? ????
????????????? ???????? ???????????? ??????????? 14:25 Connection
attempts: 1 14:25 Connection attempts: 2 ...
Thanks in advance.

Resources