How I got all of my 1345 opened tabs from my Android phone

Andreas Loizou
3 min readJan 3, 2018

I read a lot of articles. And I have a terrible habit of opening several tabs but rarely closing them. So, I ended up having 1345 open tabs on my Chrome on Android :) Quite a lot, isn’t it?

I wanted to get all those links on my computer to become more accessible for me to remove duplicates or delete websites I do not want. Regular Expressions and Chrome Developer tools came to the rescue.

Unfortunately, there isn’t any straightforward way to get all your websites on your computer. While Google allows you to synchronize tabs between your mobile, PC and cloud [1], there are cases when not all of your open tabs on your mobile are synchronized. And as I had many websites not synchronised, I decided to get all of my open websites using the Remote Devices feature of the Chrome Developer Tools.

Firstly, you must enable USB debugging on your phone and then connect your Android phone to your computer. You must select the remote devices tab from the Chrome developer tools on your PC. If anything goes as expected, you will see your device connected.

If you need more detailed instructions on how to use Remote Debugging, you can look at the official guide by googling [2].

Click on your device.

It will then display a couple of open tabs. Then, click on “View more tabs…”.

And you get something like the following:

This is a list of all of your tabs on your mobile! For me, that was 1345 tabs!

Each tab record begins with the tab’s title, followed by the link below and an Inspect button on the right. Copy everything and paste them into your favourite editor. I used Sublime.

In your editor, each tab will have this format:

What I’ll Take Into 2015 — Buffer Posts — Medium
Inspect
https://medium.com/buffer-posts/what-ill-take-into-2015-ca542c554db4

Go to the end of your file and check whether you also copied the:

View fewer tabs…

If yes, delete it.

Click CTRL+H to enable Find and Replace on Sublime (and several other text editors). Click on the regular expressions button to enable searching with regular expressions.

Click on the regular expressions button to enable searching with regular expressions.

To remove the Inspect and put both the title and link of a website in one line, you can do the following:

Find: \nInspect\n\nReplace: →

After this command, what we get for each website is something similar to the following:

What I’ll Take Into 2015 — Buffer Posts — Medium → https://medium.com/buffer-posts/what-ill-take-into-2015-ca542c554db4#.gybun0vrf

To reverse the title with the website and put the website before the title, you can use the following regex:

Find: (.*) → (.*)Replace: \2 → \1

The first command recognises the two parts in each row. The replacement regex simply puts the second part identified before the first one.

After running this command, our websites have the following format:

https://medium.com/buffer-posts/what-ill-take-into-2015-ca542c554db4#.gybun0vrf → What I’ll Take Into 2015 — Buffer Posts — Medium

Yay! We now have our websites in the format we want them.

Following that, you can sort all of your tabs to make it easier to find what’s useful. On sublime, you can do this by pressing F9.

I hope this guide has helped you.

[1] https://support.google.com/chrome/answer/165139?co=GENIE.Platform%3DAndroid&hl=en

[2] https://developers.google.com/web/tools/chrome-devtools/remote-debugging/

Picture: https://unsplash.com/photos/B6-8HwbRJz4

--

--

Andreas Loizou

Software Engineering Trainer | Director of Engineering @ https://www.qbeat.io | @UniofOxford alum. No limits. Dares the Unknown