Most firmware files distributed by the manufacturers are uploaded to Baidu, but I’ve found the service not to be always reliable, especially for larger files. In Windows, people are recommended to use Baidu software (BaiduYunGuanjia), but there’s not such tool in Linux, so instead I investigate for command lines tools to download files from Baidu, and this lead me to two interesting tools called Aria2, a “lightweight multi-protocol & multi-source command-line download utility
But let’s start with the first tool I found: pan-baidu-download, a Python script to download files from Baidu.
To install it:
1 2 |
git clone https://github.com/banbanchs/pan-baidu-download.git cd pan-baidu-download |
We also need to install some dependencies (assuming python 2.7.x is already installed):
1 |
sudo apt-get install python-pip aria2 |
and then you can start downloading files as follows:
1 |
python bddown_cli.py download http://pan.baidu.com/s/somerandomcharacters |
But after posting a bug about password-protected download, which was fixed in 2 minutes by the developers, I was informed the script does not support directories, and was recommended to use BaiduExporter add-on for Chrome or Firefox instead.
Everything is in Chinese, and after installing the add-on I was not clear how to use it but I figured it out eventually.
First you need to run aria2c:
1 2 3 4 5 |
aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all 01/14 11:01:42 [NOTICE] IPv4 RPC: listening on TCP port 6800 01/14 11:01:42 [NOTICE] IPv6 RPC: listening on TCP port 6800 |
The command line above is insecure if you plan to run it on a remote server, as anybody could access it, and start download on your server. But for testing, and local download this will do. If you stop aria2c, the downloads won’t restart with this command, but there are options that support this, but again, I have not looked into details for this quick test.
Now go to the Baidu download link, select the files and/or folders you want to download, and provided you’ll already installed Baidu Exporter add-on, a new menu will be shown, and all you have to do is click on ARIA2 RPC to start the download in aria2. The last options with two Chinese ideogram is the option, where you can change the IP of the aria2 server (localhost:6800) by default as well as other settings.

You can now close the Baidu window in your web browser. and should see the download as started in the terminal:
1 |
aria2c --enable-rpc --rpc-listen-all=true --rpc-allow-origin-all |
1 |
01/14 11:01:42 [NOTICE] IPv4 RPC: listening on TCP port 6800 |
1 2 3 4 5 |
01/14 11:01:42 [NOTICE] IPv6 RPC: listening on TCP port 6800 *** Download Progress Summary as of Wed Jan 14 11:07:30 2015 *** =============================================================================== [#af540e 0B/0B CN:1 DL:0B] FILE: /media/hdd/edev/sandbox/yaaw/binux-yaaw-ab09f92/update1201-android/update.zip |
This is all good, but in practise you’d probably want start aria2c when your computer boots and would not be able to monitor progress, especially if you use a remote server, and this is where YAAW comes into play.
To install it, check out the code from Github or download and extract the tar file. Now go to the directoty where you extract the file. and open index.html with your web browser. You can monitor download, or even add HTTP or Bittorrent Downloads. AFAIK, you can’t add Baidu links to YAAW directly, but you can monitor the downloads added via Baidu Exporter

The aria2c IP address and port can be changed in the settings directly from the main page. Some useful tips for YAAW:
- All your settings on web is temporary. Settings will be lost after aria2 restarted.
- Tasks (including those that are not finished) will be lost after aria2 is restarted. Use
--save-session=SOME/WHERE
and reload with--continue=true --input-file=SOME/WHERE
to continue.- Use
$HOME/.aria2/aria2.conf
to save your options.
I haven’t gone into details, but Aria2 and YAAW could be used with a NAS, a cheap board with a USB harddrive, or even USB Wireless flash drive such a Zsun SD111 (which is now hackable even without serial debug board, as the default root password has just been cracked) to make a downloader to handle large downloads instead of leaving your PC on at night, or 24/7.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress