Tuesday, January 11, 2022

Export or Bookmark all open tabs from Android to Windows

Here we will try 2 different methods to achieve export and bookmark of all open tabs respectively,

 Export All Open Tabs from Android Chrome to Windows Chrome

1. You'll need to download and install Android Dev Tools on your computer, as well as set your mobile device to Developer Mode. Android Dev Tools can be downloaded and installed here.

We will only require the adb application, but we will still need to install the entire toolbox. Personally, I found it easiest to download and install Android Studio.

2. Put your Android phone in Developer's Mode and connect with a cable to your desktop. 

Here is how to set Dev Mode.

It's best to connect using a USB, because sometimes the device cannot be discovered by adb. Here is an official instruction how to turn it on. Also, you may want to turn on MTP configuration in "Select USB Configuration" menu as described here, otherwise adb may not find your device.

3. Verify ADB can Connect ADB to your phone.

Open CMD, browse to where adb.exe is installed. Run the command:

adb devices:

You should see the output similar as follows:




4. Connect to Chrome Remote Debugger on Android:

Chrome mobile has a feature to expose remote debugger on tcp socket which you can access from your desktop. The so called "legacy" debugging workflow is described in Chrome developers documentation.

It is called "legacy" because now there is more fancy way of debugging mobile Chrome using Chrome Dev Tools.

For our purpose however the "legacy" way is more useful because we get access to a bare text interface in JSON format which gives easy way to extract open tabs URLs.

execute the following cmd:

adb forward tcp:9222 localabstract:chrome_devtools_remote

you should see output as follows::





5. Verify Chrome Remote Debugger connection:
Open Chrome, browse to following URL:

http://localhost:9222/json/list

Output should be similar as follows:













6. Parse the JSON & save to file:

If you have JQ tool installed you could parse this JSON, extract only URLs and save in txt file like that:

Install JQ if not already installed, using Chocolaty or preference:

e.g: 









7. Save JSON as list of links file:





8. Open file, copy and paste all urls as new tabs using Copy Urls or use export file as needed. "Bookmark All Tabs" can then be used to save all bookmarks at once.

 

 Open All Tabs from Android Chrome to Windows Chrome:

Ensure sync Open Tabs is ON in settings | Manage what you sync:

























– Open Chrome on your desktop (you must log into the same account as on your Android Phone/Tablet).
– In a new tab/window, press Ctrl+H.
– Click “Tabs from other devices” and you will see all your opened tabs.









– Click “Actions” or 3 dots.
– Click “Open All” and all your opened tabs from your Android Phone/Tablet should open on your Chrome desktop.
– Press Ctrl+Shift+D to “Bookmark all tabs”.
– Select a folder and click “Save”.