Skip to content

Instantly share code, notes, and snippets.

View wuhanstudio's full-sized avatar
🎯
Focusing

Han Wu wuhanstudio

🎯
Focusing
View GitHub Profile
@wuhanstudio
wuhanstudio / qemu_armbian.sh
Last active April 14, 2024 21:44
Armbian on QEMU
# Install QEMU-6.1.0
wget https://download.qemu.org/qemu-6.1.0.tar.xz
tar xvJf qemu-6.1.0.tar.xz
cd qemu-6.1.0
./configure
make
sudo make install
# Download Armbian (Ubuntu Focal 20.04) for OrangePi PC
wget https://mirrors.netix.net/armbian/dl/orangepipc/archive/Armbian_21.08.1_Orangepipc_focal_current_5.10.60.img.xz
@wuhanstudio
wuhanstudio / gist:a984b48778448734a70cec9d2c08adee
Created February 1, 2024 22:49
Mi Router 4C update firmware
telnet 192.168.1.1
wget http://192.168.1.208:8000/x-wrt-24.01-b202401270830-ramips-mt76x8-xiaomi_mi-router-4c-squashfs-sysupgrade
flash erase 0x160000 0xea0000
flash write 0x160000 0x80000000 0xea0000
adb shell getprop ro.build.version.sdk
aapt dump badging youbube.apk
adb shell pm list packages
adb shell monkey -p com.google.android.youtube 1
adb shell am start -n com.google.android.youtube/Main
@wuhanstudio
wuhanstudio / BCC0 incorrect, got 0x04, expected 0x00
Last active October 18, 2023 20:58
Fix Mifare Classic Gen2
hf 14a config --bcc ignore
hf mf wrbl --force --blk 0 -k FFFFFFFFFFFF -d 010203040408040000004A495256494E
hf 14a config --bcc std
@wuhanstudio
wuhanstudio / No Headphone
Last active July 22, 2023 18:49
Fix Ubuntu / Pop!OS Intel Sound Card
alsamixer
amixer --card=0 sset Headphone 100% unmute
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@wuhanstudio
wuhanstudio / ftdi_fixer.py
Last active June 30, 2022 19:21
Install Lattice Diamond on Ubuntu / PopOS
#!/usr/bin/python
# vim: set ts=4 sw=4 expandtab syntax=python:
"""
FTDI device permission fixer
Can be called from a udev rule to ensure connected FTDI devices have
world-writable permissions for use by user applications
J. Hipps <jacob@ycnrg.org>
@wuhanstudio
wuhanstudio / gist:a77fc07aaaef05730a4f51dbf83c41fc
Last active January 17, 2022 21:01
g_serial as USB serial console
#/bin/bash
# Enable kernel module
echo "g_serial" >> /etc/modules
nano /etc/inittab
```
::respawn:/sbin/getty -L ttyAM0 115200 vt100
::respawn:/sbin/getty -L ttyGS0 115200 vt100
```
@wuhanstudio
wuhanstudio / Client
Last active January 26, 2020 09:56
NFS
# Mount NFS Disk
sudo apt install nfs-common
sudo mkdir /mnt/data
sudo mount SERVER_IP:/mnt/data /mnt/data