Skip to content

Instantly share code, notes, and snippets.

@parkerlreed
parkerlreed / betteradbcopy
Last active March 14, 2024 18:28
betteradbcopy - Multi-threaded SCP to/from Android device over USB/WiFi with Termux
#!/bin/bash
# Make sure to have OpenSSH setup in Termux as well as setting a password with `passwd`
# Requires https://github.com/upa/mscp and adb platform tools on your local machine
init_sshd() {
adb shell -t "run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:$PATH; export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so; sshd'"
adb forward tcp:8022 tcp:8022;
}
stop_sshd() {
adb shell -t "run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:$PATH; export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so; killall sshd'"
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.5.0 present.
Table at 0x9AA81000.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: American Megatrends International, LLC.
Version: RC71L.333
Release Date: 11/06/2023
@parkerlreed
parkerlreed / wifi_microscope_dump.py
Created November 6, 2023 20:02 — forked from sspathak/wifi_microscope_dump.py
Modified version of czietz's code for capturing images from wifi microscope. Added compatibility with iwobac microscope
# Proof-of-concept code for reading data from a Wifi microscope.
# See https://www.chzsoft.de/site/hardware/reverse-engineering-a-wifi-microscope/.
# Copyright (c) 2020, Christian Zietz <czietz@gmx.net>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
[ 1607.865744] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1624.505179] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1639.012936] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1654.585264] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1654.588382] amdgpu: [VBLANK]:crtc:0, vupdate-vrr:0, planes:1
[ 1654.593953] [SCALER]:resource_build_scaling_params pipe 0:
Viewport: height:1440 width:2560 x:0 y:0 Recout: height:1440 width:2560 x:0 y:0 HACTIVE:2560 VACTIVE:1440
src_rect: height:1440 width:2560 x:0 y:0 dst_rect: height:1440 width:2560 x:0 y:0 clip_rect: height:1440 width:2560 x:0 y:0
[ 1654.594717] amdgpu: [PFLIP]:crtc:0[00000000bd7287f3], pflip_stat:AMDGPU_FLIP_NONE, vrr[0]-fp 0
[ 1654.596864] [BANDWIDTH_CALCS]:dce112_validate_bandwidth: start
[ 1256.303055] amdgpu: [PFLIP]:crtc:0[00000000bd7287f3], pflip_stat:AMDGPU_FLIP_NONE, vrr[0]-fp 0
[ 1256.305132] [BANDWIDTH_CALCS]:dce112_validate_bandwidth: start
[ 1256.305972] amdgpu: [VBLANK]:crtc:0, vupdate-vrr:0, planes:1
[ 1256.305993] amdgpu: [PFLIP]:crtc:0, pflip_stat:AMDGPU_FLIP_SUBMITTED
[ 1256.307964] [SCALER]:resource_build_scaling_params pipe 0:
Viewport: height:1440 width:2560 x:0 y:0 Recout: height:1440 width:2560 x:0 y:0 HACTIVE:2560 VACTIVE:1440
src_rect: height:1440 width:2560 x:0 y:0 dst_rect: height:1440 width:2560 x:0 y:0 clip_rect: height:1440 width:2560 x:0 y:0
[ 1256.309929] [BANDWIDTH_CALCS]:dce112_validate_bandwidth: start
[ 1256.310336] [SURFACE]:Pipe:0 00000000f252080a: addr hi:0xf5, addr low:0xfe000000, src: 0, 0, 2560, 1440; dst: 0, 0, 2560, 1440;clip: 0, 0, 2560, 1440
[ 1256.311647] [SURFACE]:Pipe 0: width, height, x, y
[ 917.734432] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 931.386643] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 961.680968] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 973.199800] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 990.267178] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1010.320797] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1021.840710] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1041.466381] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1058.533753] amdgpu 0000:09:00.0: [drm] *ERROR* [CRTC:60:crtc-0] flip_done timed out
[ 1058.536118] amdgpu: [VBLANK]:crtc:0, vupdate-vrr:0, planes:1
Oct 03 15:54:18 archlinux kernel: Linux version 6.6.0-rc2-1-git-00018-g2cf0f7156238 (linux-git@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #5 SMP PREEMPT_DYNAMIC Thu, 21 Sep 2023 19:48:11 +0000
Oct 03 15:54:18 archlinux kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-linux-git root=UUID=d34f4ad5-f0f4-40f8-bc57-c5d9af49c961 rw loglevel=3 quiet iomem=relaxed amdgpu.runpm=0 amdgpu.dc=1 amdgpu.ppfeaturemask=0xffffffff
Oct 03 15:54:18 archlinux kernel: BIOS-provided physical RAM map:
Oct 03 15:54:18 archlinux kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
Oct 03 15:54:18 archlinux kernel: BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
Oct 03 15:54:18 archlinux kernel: BIOS-e820: [mem 0x0000000000100000-0x0000000009a7efff] usable
Oct 03 15:54:18 archlinux kernel: BIOS-e820: [mem 0x0000000009a7f000-0x0000000009ffffff] reserved
Oct 03 15:54:18 archlinux kernel: BIOS-e820: [mem 0x000000000a000000-0x000000000a1fffff] usable
Oct 03 15:54:18 archlinux kernel
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_context_flush_control, GLX_ARB_create_context,
GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile,
GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float,
GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
[ 0.000000] Linux version 6.6.0-rc2-1-git-00018-g2cf0f7156238 (linux-git@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #5 SMP PREEMPT_DYNAMIC Thu, 21 Sep 2023 19:48:11 +0000
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux-git root=UUID=d34f4ad5-f0f4-40f8-bc57-c5d9af49c961 rw loglevel=3 quiet iomem=relaxed amdgpu.runpm=0 amdgpu.dc=1 amdgpu.ppfeaturemask=0xffffffff
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000009a7efff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000009a7f000-0x0000000009ffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x000000000a000000-0x000000000a1fffff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000a200000-0x000000000a23bfff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x000000000a23c000-0x000000008e2fefff] usable
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.5.0 present.
Table at 0x9AA82000.
Handle 0x0000, DMI type 0, 26 bytes
BIOS Information
Vendor: American Megatrends International, LLC.
Version: RC71L.323
Release Date: 07/07/2023