Valet is a decentralized test automation network where developers run tests on real devices (iOS or Android), and device owners get paid for executing them. Using Nostr for discovery, Lightning for payments, and Raspberry Pi nodes for execution, it’s less expensive, more open, and more scalable than traditional test clouds. Built by Jason Huggins (Selenium, Appium, Sauce Labs), Valet is an experiment in P2P testing at scale. 🚀
#!/bin/bash | |
# Requirements: | |
# - macOS | |
# - qemu - `brew install qemu` | |
# - A raw 64-bit Raspberry Pi system image to boot (Usually a .img) | |
set -e | |
if [[ -z "$1" ]]; then |
Just a quick update before we dive in: what we're actually doing here is running Raspberry Pi OS (64-bit) on a QEMU virtual ARM setup. This isn't full-blown hardware emulation of the Raspberry Pi 4, but more about creating a virtual environment for the OS. It doesn't mimic all the specific hardware features of the Pi 4, but it's pretty useful and great for general testing. I turned to this solution mainly to extract a modified sysroot from the Raspberry Pi OS, something not readily available in other resources. For those looking into detailed emulation of the actual Raspberry Pi 4's hardware in QEMU, check out this link for the latest updates: https://gitlab.com/qemu-project/qemu/-/issues/1208.
Hope it helps! :D
Shortcomings: No GUI yet, only console.
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
Nim is a (pretty obscure) "statically typed compiled systems programming language". It's unique because the syntax is very reminiscent of Python, while being a compiled language (;
anyone?), hence making it accessible to Python devs. Now let's cut to the chase - how to install this:
(Powershell only)
- Install chocolatey
choco install nim
import usb_hid | |
# https://stackoverflow.com/questions/36750287/two-byte-report-count-for-hid-report-descriptor | |
absolute_mouse = usb_hid.Device( | |
report_descriptor=bytes( | |
# Absolute mouse | |
(0x05, 0x01) # Usage Page (Generic Desktop) | |
+ (0x09, 0x02) # Usage (Mouse) | |
+ (0xA1, 0x01) # Collection (Application) | |
+ (0x09, 0x01) # Usage (Pointer) |
// Leaflet JS - note the *className* attribute
// [...]
L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
className: 'map-tiles'
}).addTo(map);
// [...]
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker
. This will install the whole docker suite, left only Tini to be compiled manually.
#include "Touch.h" | |
#if defined(_USING_HID) | |
#define CONTACT_COUNT_MAXIMUM 10 | |
#define REPORTID_TOUCH 0x04 | |
#define LSB(v) ((v >> 8) & 0xff) | |
#define MSB(v) (v & 0xff) |
# nim c -r --threads:on --gc:orc | |
import cpuinfo, os, random, locks, deques | |
type | |
WorkReq = ref object | |
id: int | |
WorkRes = ref object | |
id: int |