Skip to content

Instantly share code, notes, and snippets.

@goisneto
goisneto / do_heimdall_flash.sh
Last active May 5, 2026 19:01
This script is for Linux users who need to use Heimdall via SSH and, without many alternatives, do everything manually. You're tired of updating your phone and forgetting to add a partition to the Heimdall command line, leading to your old Samsung phone crashing and bugging for a long time without you knowing it was because you only updated part…
#!/bin/bash
#ANSI escape codes:
#No Color 0
#Black 0;30 Dark Gray 1;30
#Red 0;31 Light Red 1;31
#Green 0;32 Light Green 1;32
#Brown/Orange 0;33 Yellow 1;33
#Blue 0;34 Light Blue 1;34
#Purple 0;35 Light Purple 1;35
#Cyan 0;36 Light Cyan 1;36
@goisneto
goisneto / run-as-termux.sh
Created April 21, 2022 15:17
Run Termux on ADB Shell like as on APP
#!/bin/sh
# Add this file on you /sdcard directory on you android Phone
# Enable Debug Mode and ADB, connect you phone on PC, Download ADB Tools
# Run "adb shell" and on adb shell run "sh /sdcard/run-as-termux.sh"
# Enjoy termux, but with restrictions to access some folders like /sdcard
TERMUX_PACKAGE=com.termux
TERMUX_PATH=$ANDROID_DATA/data/$TERMUX_PACKAGE
TERMUX_TMPDIR=$TERMUX_PATH/files/usr/tmp