I'm trying to write a Tasker script for my (rooted) phone that uses the same Google credentials that are being used on my device (for Gmail, Drive, etc.).
Where can I find Google's OAuth (or other) authentication tokens on my device?
I checked inside /data/data/com.google.android.gms/databases
but couldn't find anything I could recognize as an authentication token.
sqlite3
):su -c 'uid="$(/system/bin/readlink -f /storage/self/primary | /system/bin/grep -E -o "[0-9]+")"; "${PREFIX}/bin/sqlite3" -readonly "/data/system_ce/${uid-0}/accounts_ce.db" '"\"SELECT authtoken FROM authtokens WHERE type LIKE 'com.google.android.gm:%:oauth2:%https://mail.google.com/ %https://www.googleapis.com/auth/drive %' ORDER BY _id DESC LIMIT 1;\""
– user541686 Sep 21 '19 at 23:15$uid
will always be0
ifsu
switches to root mount namesapce, depends on configuration in root manager app. Also debug builds (most custom ROMs) already have/system/bin/sqlite3
. – Irfan Latif Sep 22 '19 at 00:02/system/bin/readlink -f /storage/self/primary | /system/bin/grep -E -o \"[0-9]+\"
is faster so that's what I'm doing now. Sadly my ROM doesn't havesqlite3
so that one's not an option for me, but thanks! – user541686 Sep 22 '19 at 00:05