局域网内搭建Android SDK更新源

工作杂记,后期有时间整理:


cd /var/www/nginx-default/android/repository

rsync -avP /home/gg/android-tools/143/sdksrc/html/android/repository/ ./
rsync -avP /home/gg/android-tools/198/sdksrc/html/android/repository/ ./

sed -e ‘s/https:/http:/g‘ -i  repository-10.xml
sed -e ‘s/https:/http:/g‘ -i  *.xml
sed -e ‘s/https:/http:/g‘ -i  sys-img/android/sys-img.xml
grep -RIi ‘https‘ *

exit 0
###############################  note for local dl-ssl.google.com
http://developer.android.com/sdk/index.html
wget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz

tools/android list sdk --extended
tools/android update sdk --no-ui -t android-21
cat cmd.txt | grep Fetching | grep -o ‘https:.*‘
wget ${XML} -O html/${FILE}   # get all xml from  https://dl-ssl.google.com
#https://dl-ssl.google.com/android/repository/tools_r23.0.5-windows.zip
grep -RIi ‘<sdk:url>.*‘ * | grep -o ‘[!>].*\.zip‘ | cut -c 2-

[ps] : you must download *.zip into currect folder .
echo 172.21.5.142 dl-ssl.google.com >> C:\WINDOWS\system32\drivers\etc\hosts
change https into http in SDK Manager
#############################################


本文出自 “莫阿甘” 博客,请务必保留此出处http://brucemj.blog.51cto.com/3319384/1572168

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。