2018年11月

莫名其妙出了错.
复杂的方式:
创建恢复U盘.还要官网下订单,特殊的客户端下载.下载完要14个G.压到U盘里.

简单的方式:
重启,
Enter,进入快速选择菜单.
F11,进入恢复模式.
RESET.

两种方式.

1,requests


#!/usr/bin/env python
# -- coding: utf-8 --
import requests
import ssl
requests.packages.urllib3.disable_warnings()
url = 'https://www.douban.com/'
c = requests.get(url,timeout=5,verify=False)
html = c.text
print html
#print html.encode("GBK", 'ignore'); 
exit()

如果是用cmd下面调试,要用encode gbk.

2,pycurl


#!/usr/bin/env python
# -- coding: utf-8 --
import pycurl
import certifi
url = 'https://202.55.9.30/'
c = pycurl.Curl()
c.setopt(c.URL, url)
c.setopt(pycurl.CAINFO, certifi.where())
# Follow redirect.
c.setopt(c.FOLLOWLOCATION, True)
c.setopt(c.SSL_VERIFYHOST,False);
c.setopt(c.SSL_VERIFYPEER,False);
html = c.perform()
c.close()
print html;
#print html.encode("GBK", 'ignore');
exit()

4,urllib2


#!/usr/bin/env python
# -- coding: utf-8 --
import urllib2
import ssl

ssl._create_default_https_context = ssl._create_unverified_context
f = urllib2.urlopen("https://202.55.9.30/")
html = f.read()
f.close()
print html

刷机的过程中.发现Google Pixel2存在两个slot A和B
但是我这里的fastboot不支持.
开始尝试用TWRP里面reboot下面的slot切换来弄.结果不行.
折腾半天,最终还是升级fastboot,搞定.