From e1474fd048221a92ed91070cf00ac23f7e1edfa1 Mon Sep 17 00:00:00 2001 From: dantefff Date: Wed, 12 Mar 2025 14:11:41 +0100 Subject: [PATCH] Update get-android-wifi-passwords-2 Get rid of qpdf dependency --- get-android-wifi-passwords-2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/get-android-wifi-passwords-2 b/get-android-wifi-passwords-2 index ba26bf9..8b8e73d 100755 --- a/get-android-wifi-passwords-2 +++ b/get-android-wifi-passwords-2 @@ -1,7 +1,6 @@ #!/bin/sh command -v adb > /dev/null || { printf "%s\\n" "This script requires adb to be installed. Find it on the Internet and install it, then try again." >&2; exit 1; } -command -v zlib-flate > /dev/null || { printf "%s\\n" "This script requires zlib-flate (from package qpdf) to be installed. Install qpdf (e.g, using apt install or brew) and then try again." >&2; exit 1; } command -v awk > /dev/null || { printf "%s\\n" "This script requires awk to be installed. Try installing awk, then try again." >&2; exit 1; } set -e @@ -20,5 +19,5 @@ if [ ! -s settings.db ]; then exit 2 fi -dd if=settings.db bs=1 skip=24 2>/dev/null | zlib-flate -uncompress | tar -x +( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 settings.db ) | tar xfvz - || true 2> /dev/null awk '{gsub(/"/,"\"")}/"/{sub(/^"/,"");sub(/"<\/string>$/,"");SSID=$0}//{printf("SSID: %s\nNo Password\n\n",SSID)}/"/,"");sub(/"<\/string>$/,"");printf("SSID: %s\nPassword: %s\n\n",SSID,$0)}' apps/com.android.providers.settings/k/com.android.providers.settings.data