This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to install or uninstall USB 2.0 compatibility mode for Xiaomi devices | |
# | |
# Usage: ./script.sh [install|uninstall] | |
# | |
# Function to install the USB 2.0 compatibility mode | |
install_usb_compatibility() { | |
# Read USB details from lsusb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if filename argument was provided | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <filename>" # Print usage message | |
exit 1 # Exit with error code | |
fi | |
# Upload file to PixelDrain | |
response=$(curl -s -X PUT https://pixeldrain.com/api/file/ -T "$1" -H 'Content-Type: application/zip') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################################################# | |
#Changelog # | |
############################################################################################################# | |
#Added prompts for user input to configure script instead of relying on hardcoded settings. | |
#Added a lot of errorchecking | |
#The script is now optionally compatible with dash (this is the reason for there being a sed command at the end of every echo -e instance, dash liked to print the -e part when I was testing.) | |
#Vastly improved compatibility across distributions | |
#Special thanks to everyone who contributed here: https://gist.github.com/i3v/99f8ef6c757a5b8e9046b8a47f3a9d5b | |
#Also extra special thanks to BAGELreflex on github for this: https://gist.github.com/BAGELreflex/c04e7a25d64e989cbd9376a9134b8f6d it made a huge difference to this improved version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -eq "0" ]; then | |
echo "No arguments supplied" | |
exit 1 | |
elif [ $# -eq 1 ]; then | |
if test -f "$1.pk8"; then | |
checkPass=$(grep "ENCRYPTED" "$1.pem" &>/dev/null) | |
if [ $? -eq 0 ]; then | |
openssl pkcs8 -in $1.pk8 -inform DER -outform PEM -out $1.priv.pem | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": null, | |
"response": [ | |
{ | |
"incremental": "eng.root.20240319.121924", | |
"api_level": "33", | |
"url": "https://pixeldrain.com/api/file/tsWtmHwA?download", | |
"timestamp": 1710850687, | |
"md5sum": "0b64c33f0e20abc36c7c69e917744be6", | |
"changes": "", |