CD to a folder like:
mkdir $HOME/Desktop/Backup_Arduino
cd $HOME/Desktop/Backup_Arduino
Set these variables
Arduino Nano Old Bootloader:
CD to a folder like:
mkdir $HOME/Desktop/Backup_Arduino
cd $HOME/Desktop/Backup_Arduino
Set these variables
Arduino Nano Old Bootloader:
blueprint: | |
name: Aquara remote switch single rocker | |
description: Automate the Aquara remote switch single rocker with zha | |
domain: automation | |
input: | |
aquara_remote_switch_single_rocker: | |
name: Aquara remote switch single rocker | |
selector: | |
device: | |
integration: zha |
function logPackageName() { | |
adb shell dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1 | |
} | |
function logpref() { | |
APP_ID=$(logPackageName) | |
echo "current packageName:$APP_ID" | |
SHARED_PREF_FILES=$(adb shell "run-as $APP_ID ls /data/data/${APP_ID}/shared_prefs/") | |
SHARED_PREF_FILE=${SHARED_PREF_FILE[0]} | |
echo "current preference file:$SHARED_PREF_FILE" |
function replaceDas(){ | |
file_list=( | |
/c/Users/UserName/.leptonrc | |
) | |
search=${1} | |
replace=${2} | |
echo "replace $search to $replace" | |
echo "in" | |
for filename in "${file_list[@]}"; | |
do |
#plugin
#configuration ide
#adb shell getprop gsm.baseband.imei | |
#adb shell "service call iphonesubinfo 1 | cut -c 52-66 | tr -d '.[:space:]'" | |
#!/bin/bash | |
# Get the device properties | |
adb shell getprop | grep "model\|version.sdk\|manufacturer\|ro.serialno\|product.name\|brand\|version.release\|build.id\|security_patch" | sed 's/ro\.//g' | |
# get the device ime | |
echo "[device.imei]: [$(adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]" | |
# get the device phone number | |
echo "[device.phonenumber]: [$(adb shell service call iphonesubinfo 19 | awk -F "'" '{print $2}' | sed '1 d'| tr -d '\n' | tr -d '.' | tr -d ' ')]" |
.pv : instantiate private val | |
ANY → $expr$ $expr$= new $expr$(); |
adb shell am broadcast -a com.whereismywifeserver.intent.TEST | |
[-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...] | |
[--esn <EXTRA_KEY> ...] | |
[--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...] | |
[--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...] | |
[--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...] | |
[--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...] | |
[--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...] | |
[--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>] |
https://technastic.com/adb-shell-commands-list/ | |
#Insert text (obs: %s means SPACE) | |
adb shell input text "insert%syour%stext%shere" | |
#Event codes (82 ---> MENU_BUTTON) | |
adb shell input keyevent 82 | |
#Tap X,Y position (Settings > Developer Options > Check the option POINTER SLOCATION) | |
adb shell input tap 500 1450 |
Generate Keystores | |
To generate keystores for signing Android apps at the command line, use: | |
$ keytool -genkey -v -keystore my-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 | |
A debug keystore which is used to sign an Android app during development needs a specific alias and password combination as dictated by Google. To create a debug keystore, use: | |
$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 | |
Keystore name: "debug.keystore" |