From 07eaee7da0e94bf3e21ccdffede1a72a38633c87 Mon Sep 17 00:00:00 2001 From: Intergalactic Penguin Date: Wed, 23 Sep 2020 22:28:37 +0200 Subject: [PATCH 1/4] check telnet and ffmpeg dependencies --- android/aemulator | 4 +++- common_tools | 4 ++-- ios/igif | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/android/aemulator b/android/aemulator index 0b176650..913e762e 100755 --- a/android/aemulator +++ b/android/aemulator @@ -28,6 +28,7 @@ check_running_emulator(){ if [[ "$RESPONSE" == "y" || "$RESPONSE" == "Y" ]]; then launch_emulator + get_token fi exit fi @@ -68,6 +69,8 @@ launch_emulator(){ } get_token(){ + check_dependency "telnet" + [ -f ./emulator_console_auth_token ] || telnet localhost 5554 TOKEN=$(cat "$HOME"/.emulator_console_auth_token) } @@ -158,7 +161,6 @@ disable_network_delay(){ } check_for_update -get_token case $1 in 'start') diff --git a/common_tools b/common_tools index d05571c1..76ae9b52 100644 --- a/common_tools +++ b/common_tools @@ -395,8 +395,8 @@ check_adb_dependency(){ check_dependency(){ if ! [ -x "$(command -v "$1")" ]; then - echo "⚠️ \"$1\" required!" - should_proceed "🔄 Install via homebrew? (this may take a while)" + echo "💥 \"$1\" command required!" + should_proceed "🛒 Install via homebrew? (this may take a while)" brew install "$1" fi } diff --git a/ios/igif b/ios/igif index 2c1851f8..011a2145 100755 --- a/ios/igif +++ b/ios/igif @@ -1,6 +1,7 @@ #!/bin/bash LOCATION=$(dirname "$0") source "$LOCATION"/../common_tools +check_dependency "ffmpeg" ios_choose_device trap 'ctrlc $@' 1 2 3 6 15 From 3af73bf00bd818b46d963fa8453e9a07b0516f76 Mon Sep 17 00:00:00 2001 From: Intergalactic Penguin Date: Wed, 30 Sep 2020 13:50:24 +0200 Subject: [PATCH 2/4] fix iOS pairing request --- common_tools | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common_tools b/common_tools index 76ae9b52..3a64afc0 100644 --- a/common_tools +++ b/common_tools @@ -199,9 +199,9 @@ ios_wait_for_device(){ } ios_check_developer_image_and_pairing(){ - IS_MOUNTED=$(ideviceimagemounter -u "$1" -l) #Probably does not work on iOS 13 - if [[ $IS_MOUNTED == *"error code -21." ]] ; then - read -r -p "❌ Device is not paired properly - reconnect it (one at a time), unlock screen and press ENTER..." + IS_MOUNTED=$(ideviceimagemounter -u "$1" -l) + if [[ $IS_MOUNTED == *"Error"* ]] || [[ $IS_MOUNTED == *"error"* ]] ; then + read -r -p "❌ Device is not paired - reconnect it (one at a time), unlock screen and press ENTER..." echo "🤝 Requesting pairing..." idevicepair pair &> /dev/null read -r -p "❓ Tap \"Trust\" button on the device screen and press ENTER..." From ac73b7a2cb20ac4d9d6eb6948975a3382f86d27b Mon Sep 17 00:00:00 2001 From: Intergalactic Penguin Date: Wed, 7 Oct 2020 08:56:45 +0200 Subject: [PATCH 3/4] fix Android emulator authentication --- android/aemulator | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/aemulator b/android/aemulator index 913e762e..5b2c30f9 100755 --- a/android/aemulator +++ b/android/aemulator @@ -28,6 +28,7 @@ check_running_emulator(){ if [[ "$RESPONSE" == "y" || "$RESPONSE" == "Y" ]]; then launch_emulator + android_wait_for_device get_token fi exit @@ -70,11 +71,12 @@ launch_emulator(){ get_token(){ check_dependency "telnet" - [ -f ./emulator_console_auth_token ] || telnet localhost 5554 + [ -f ./emulator_console_auth_token ] || echo "localhost 5554" | telnet &> /dev/null TOKEN=$(cat "$HOME"/.emulator_console_auth_token) } telnet_command() { + get_token if [ -z "$1" ];then read -r -p "📝 Insert telnet command: " COMMAND else From 713d0014d0d8840fcb4b1814a87d33abbe2a8a8e Mon Sep 17 00:00:00 2001 From: Intergalactic Penguin Date: Wed, 7 Oct 2020 08:58:09 +0200 Subject: [PATCH 4/4] update changelog --- changelog.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 14f437a3..05075d95 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,2 +1,2 @@ - 🩹 fix alaunch installed package detection - 🩹 fix awipe on Android 11 \ No newline at end of file + 🩹 fix iOS device pairing + 🩹 fix Android emulator telnet authentication \ No newline at end of file