How To Download Android SDK For Offline Installation

How To Download Android SDK For Offline Installation

I use SDK Manager.exe (Windows) and android_dir/tool/android (Linux) when download android SDK from android repository. But, the problem are my connection is slow and I can not resume when the last download is not complete. So, I am try to solve this problem with create list of android SDK file and using download manager to download that.

I get google save address for SDK library in two file repository-6.xml and addon.xml. You can download this two file in this address :

http://dl-ssl.google.com/android/repository/repository-6.xml
https://dl-ssl.google.com/android/repository/addon.xml

 

Please download that two file and save in your computer. I am create a python script to parsing that two XML and create a list address to Download Android SDK For Offline Installation. Please copy this Python Code :

#!/usr/bin/python
# -*- coding: utf-8 -*-
#code by : Toto
#http://toto-share.com

import string
import re

def parsing_android_sdk(str):
  match = re.search('([\w.-]+).zip', str)
  if match:
    return match.group()
  else:
    return ""

inpfile = 'repository-6.xml'
#inpfile= 'addon.xml'

fid = open(inpfile,'r')
android_address = "http://dl-ssl.google.com/android/repository/"

for line in fid.readlines():
  newstr = parsing_android_sdk(line)
  if(len(newstr)>0):
    print android_address + newstr

fid.close()

 

Save this Python code in same directory with repository-6.xml and addon.xml and try to running this code. This is the sample output from this python Download Android SDK For Offline Installation :

http://dl-ssl.google.com/android/repository/android-2.0.1_r01-windows.zip
http://dl-ssl.google.com/android/repository/android-2.1_r03-linux.zip
http://dl-ssl.google.com/android/repository/android-2.2_r03-linux.zip
http://dl-ssl.google.com/android/repository/android-2.3.1_r02-linux.zip
http://dl-ssl.google.com/android/repository/android-2.3.3_r02-linux.zip
http://dl-ssl.google.com/android/repository/android-3.0_r02-linux.zip
http://dl-ssl.google.com/android/repository/android-3.1_r03-linux.zip
http://dl-ssl.google.com/android/repository/android-3.2_r01-linux.zip
http://dl-ssl.google.com/android/repository/android-14_r03.zip
http://dl-ssl.google.com/android/repository/android-15_r03.zip

If you want to get the complete  list of Download Android SDK For Offline Installation address, you can get at here.

Add a Comment

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.