This commit is contained in:
Kevin Rode 2019-10-03 13:15:57 -04:00
parent 87ea90c8bf
commit 71f67b709a
2 changed files with 1 additions and 4 deletions

1
amt.py
View File

@ -2,7 +2,6 @@
""" """
Code to interact with an android device using ADB Code to interact with an android device using ADB
Written by Kevin Rode Written by Kevin Rode
Last Updated Sep 28 2019
""" """
import sys import sys
from helpers import root from helpers import root

View File

@ -28,9 +28,7 @@ def twrp_download(d):
if "twrp" in file: if "twrp" in file:
found = 1 found = 1
if found != 1: if found != 1:
cpu = d.shell('cat /proc/cpuinfo | grep Hardware') cpu = d.shell('getprop ro.product.board')
cpu = cpu.replace(" ", "")
cpu = re.sub(r'(.+:)', '', cpu)
r = requests.get('https://dl.twrp.me/'+cpu) r = requests.get('https://dl.twrp.me/'+cpu)
tree = html.fromstring(r.text) tree = html.fromstring(r.text)
urls = tree.xpath('//a/@href') urls = tree.xpath('//a/@href')