Created
January 5, 2020 20:04
-
-
Save u1735067/64f3a5136d7ddb177853db0d726a013e to your computer and use it in GitHub Desktop.
Script to extract opened tabs from Android (Chromium-based browsers)
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
@echo off | |
:: https://android.stackexchange.com/questions/56635/how-can-i-export-the-list-of-open-chrome-tabs | |
echo Waiting for device .. | |
Z:\Dev\Android\adb.exe wait-for-device | |
echo Connected to device, open Chrome and wait a bit | |
pause | |
Z:\Dev\Android\adb.exe forward tcp:9222 localabstract:chrome_devtools_remote | |
chcp 65001 > nul | |
Z:\Utils\curl.exe -s http://127.0.0.1:9222/json/list | Z:\Utils\jq.exe -r "sort_by(.id) | .[] | ""-" [\(if (.title ^| length) ^> 0 then .title ^| gsub(""^'""";"""'""")" else .url end)](\(.url))""" | |
Z:\Dev\Android\adb.exe kill-server | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment