Skip to content

Instantly share code, notes, and snippets.

@hangst
hangst / t480s_throttlestop.txt
Created April 7, 2024 03:43
T480s ThrottleStop
FIVR CPU Core Offset Voltage -100mV
FIVR CPU Cache Offset Voltage -100mV
TPL Long Power PL1 10W
TPL Long Power PL2 10W
@hangst
hangst / remove_bloatware_7plus.sh
Created May 1, 2021 13:16
Remove bloatware from Nokia 7 Plus
adb shell pm uninstall -k --user 0 com.evenwell.DbgCfgTool.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.SetupWizard.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.phone.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.pushagent.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.partnerbrowsercustomizations.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.factorywizard
adb shell pm uninstall -k --user 0 com.evenwell.retaildemoapp.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.PowerMonitor.overlay.base.s600ww
adb shell pm uninstall -k --user 0 com.evenwell.foxlauncher.partner
adb shell pm uninstall -k --user 0 com.evenwell.telecom.data.overlay.base.s600ww
@hangst
hangst / remove_bloatware_g10.sh
Last active October 11, 2024 23:56
Remove bloatware from Motorola G10
adb shell pm uninstall -k --user 0 android.autoinstalls.config.motorola.layout
adb shell pm uninstall -k --user 0 com.android.phone.overlay.motcommon
adb shell pm uninstall -k --user 0 com.android.wifi.resources.overlay.motCommon
adb shell pm uninstall -k --user 0 com.motorola.actions
adb shell pm uninstall -k --user 0 com.motorola.actions.overlay
adb shell pm uninstall -k --user 0 com.motorola.android.fmradio
adb shell pm uninstall -k --user 0 com.motorola.android.fota
adb shell pm uninstall -k --user 0 com.motorola.android.jvtcmd
adb shell pm uninstall -k --user 0 com.motorola.android.nativedropboxagent
adb shell pm uninstall -k --user 0 com.motorola.android.networkstack.tethering.overlay.motCommon
@hangst
hangst / nvidia_smi_minimal.sh
Created April 19, 2021 02:56
Minimal display with nvidia-smi
nvidia-smi -lms 500 | grep Default --line-buffered | cut -c36-70
@hangst
hangst / flutter_ubuntu_setup.sh
Last active October 16, 2020 03:34
Flutter Ubuntu without Android Studio
sudo apt-get remove openjdk-*
sudo apt-get install openjdk-8-jdk-headless
# Download from https://developer.android.com/studio#command-tools
wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
unzip commandlinetools-linux-*_latest.zip
mkdir ~/Android
mv tools ~/Android
echo "export ANDROID=$HOME/Android" >> ~/.bashrc
@hangst
hangst / patch_uvc_tk1_realsense.sh
Last active September 14, 2020 06:56
Patch UVC video driver for Jetson TK1 + Intel RealSense
wget http://developer.download.nvidia.com/embedded/L4T/r21_Release_v5.0/source/kernel_src.tbz2
tar -xpf kernel_src.tbz2
@hangst
hangst / cython_executable.sh
Last active July 8, 2020 15:41
Compile executable Python
cython3 --embed src.py --output-file dst.c
g++ dst.c -I/usr/include/python -L/usr/lib/x86_64-linux-gnu -lpython
@hangst
hangst / setup_m55.py
Last active July 7, 2020 17:08
Configure Corsair M55 without iCUE
#!/usr/bin/env python3
import argparse
import usb
def find_interface(dev):
for config in dev:
for iface in config:
ep_out, ep_in = None, None
for ep in iface:
@hangst
hangst / compile_kernel.sh
Last active October 21, 2023 14:40
Compile mainline Linux kernel and boot on Amlogic Meson S905 through USB
# linux-meson.com/doku.php#howto
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux-next -d arch/arm64/boot/Image ../uImage
cp arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dtb ../uImage BOOT_PARTITION
# ROOTFS_PARTITION can be any arm64 Linux root filesystem
@hangst
hangst / build_ros_neotic.sh
Last active April 24, 2020 06:08
Build ROS Neotic + Python3
export ROS_PYTHON_VERSION=3
sudo apt-get install python3-rosdep2 python3-rosinstall-generator python3-wstool
rosinstall_generator ros_comm --rosdistro noetic --deps --tar > ros.rosinstall
wstool init -j8 src ros.rosinstall
rosdep install -r -y --from-paths src --ignore-src --rosdistro noetic
catkin_make_isolated --install -DCATKIN_ENABLE_TESTING=0
# rosinstall_generator common_msgs geometry navigation --rosdistro noetic --deps --tar > extras.rosinstall
# wstool merge -t src extras.rosinstall
# wstool update -t src