This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
#include <SDL.h> | |
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <sstream> | |
#include <ctime> | |
const int MAX_RECORDING_DEVICES = 10; |
#include <SDL.h> | |
#include <cstdio> | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <sstream> | |
#include <ctime> | |
const int MAX_RECORDING_DEVICES = 10; |
Hi All! | |
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future. | |
Feel free to request any features you'd like to see, and I'll prioritize them accordingly. | |
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it. | |
Here's the link to the repository: https://github.com/Pulimet/ADBugger | |
App Description: | |
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups. |
{ | |
"key_events": { | |
"key_unknown": "adb shell input keyevent 0", | |
"key_soft_left": "adb shell input keyevent 1", | |
"key_soft_right": "adb shell input keyevent 2", | |
"key_home": "adb shell input keyevent 3", | |
"key_back": "adb shell input keyevent 4", | |
"key_call": "adb shell input keyevent 5", | |
"key_endcall": "adb shell input keyevent 6", | |
"key_0": "adb shell input keyevent 7", |
#!/bin/bash -i | |
#using shebang with -i to enable interactive mode (auto load .bashrc) | |
set -e #stop immediately if any error happens | |
# Install Open SDK | |
apt update | |
apt install openjdk-8-jdk -y | |
update-java-alternatives --set java-1.8.0-openjdk-amd64 | |
java -version |
Implementation notes regarding ADB. | |
I. General Overview: | |
The Android Debug Bridge (ADB) is used to: | |
- keep track of all Android devices and emulators instances | |
connected to or running on a given host developer machine | |
- implement various control commands (e.g. "adb shell", "adb pull", etc.) |
# disable auto rotation | |
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0 | |
# force landscape | |
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1 | |
# back to portrait | |
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0 | |
# upside down |
# Without webcam access | |
sudo GDK_SCALE=1 qemu-system-x86_64 -enable-kvm -m 4096 -smp $(nproc) -cpu host -device ac97 -audiodev alsa,id=snd0,out.buffer-length=500000,out.period-length=726 -device virtio-mouse-pci -device virtio-keyboard-pci -net nic -net user -device virtio-vga,virgl=on -display gtk,gl=on -hda android-x86.img -cdrom android-x86.iso | |
# With webcam access (requires sudo; change hostbus=2,hostaddr=4 to match your webcam's USB address). | |
sudo pulseaudio -D --system | |
sudo GDK_SCALE=1 qemu-system-x86_64 -enable-kvm -m 4096 -smp $(nproc) -cpu host -device ac97 -audiodev alsa,id=snd0,out.buffer-length=500000,out.period-length=726 -device virtio-mouse-pci -device virtio-keyboard-pci -net nic -net user -device virtio-vga,virgl=on -usb -device usb-ehci,id=ehci -device usb-host,hostbus=2,hostaddr=4 -display gtk,gl=on -hda android-x86.img -cdrom android-x86.iso | |
# More information on changing things like the screen resolution: See https://web.archive.org/web/20210117124628/https://linuxhint.com/android_qem |