feat: low effort adb

This commit is contained in:
2025-12-23 23:10:18 +01:00
parent c4cc0244bd
commit 1384e0a46f
3 changed files with 34 additions and 0 deletions

14
android-udev.recipe.py Normal file
View File

@@ -0,0 +1,14 @@
pkgname = "android-udev"
pkgver = "1.0"
source = f"https://rocketleaguechatp.duckdns.org/pappalaugh.jpg"
builddir = f"/tmp/fempkg/build/{pkgname}/{pkgname}-{pkgver}"
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
deps = ["udev"]
build = [
f"wget https://raw.githubusercontent.com/M0Rf30/android-udev-rules/refs/heads/main/51-android.rules -O /usr/lib/udev/rules.d/51-android.rules",
]
triggers = [
f"groupadd adbusers || true && usermod -aG adbusers $(cat /var/lib/fempkg/username) || true"
]

View File

@@ -3,6 +3,7 @@ accountsservice.recipe.py
acl.recipe.py acl.recipe.py
adw-gtk3-theme.recipe.py adw-gtk3-theme.recipe.py
alsa-lib.recipe.py alsa-lib.recipe.py
android-udev.recipe.py
appstream-glib.recipe.py appstream-glib.recipe.py
appstream.recipe.py appstream.recipe.py
aspell.recipe.py aspell.recipe.py
@@ -331,6 +332,7 @@ pipewire.recipe.py
pixman.recipe.py pixman.recipe.py
pkgconf.recipe.py pkgconf.recipe.py
plasma-wayland-protocols.recipe.py plasma-wayland-protocols.recipe.py
platform-tools.recipe.py
plymouth.recipe.py plymouth.recipe.py
pm-utils.recipe.py pm-utils.recipe.py
pnpm.recipe.py pnpm.recipe.py

18
platform-tools.recipe.py Normal file
View File

@@ -0,0 +1,18 @@
pkgname = "platform-tools"
pkgver = "1.0"
source = f"https://dl.google.com/android/repository/platform-tools-latest-linux.zip"
builddir = f"/tmp/fempkg/build/{pkgname}/platform-tools"
fembuilddir = f"/tmp/fempkg/build/{pkgname}"
deps = ["udev", "android-udev"]
build = [
# Extract
f"mkdir -p {fembuilddir} && cd {fembuilddir} && unzip /var/lib/fempkg/pkgs/platform-tools-latest-linux.zip",
# 64-bit build
f"cd {builddir} && cp -pvra {{adb,fastboot}} /usr/bin/",
# Cleanup
f"rm -rf {fembuilddir}"
]