From 71f67b709a56a85aa7b17fece0d646c2658f0477 Mon Sep 17 00:00:00 2001 From: Kevin Rode Date: Thu, 3 Oct 2019 13:15:57 -0400 Subject: [PATCH] Bug fix --- amt.py | 1 - helpers/root.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/amt.py b/amt.py index bd57cf7..7d2de77 100644 --- a/amt.py +++ b/amt.py @@ -2,7 +2,6 @@ """ Code to interact with an android device using ADB Written by Kevin Rode -Last Updated Sep 28 2019 """ import sys from helpers import root diff --git a/helpers/root.py b/helpers/root.py index 5ea3f4a..0d8598c 100644 --- a/helpers/root.py +++ b/helpers/root.py @@ -28,9 +28,7 @@ def twrp_download(d): if "twrp" in file: found = 1 if found != 1: - cpu = d.shell('cat /proc/cpuinfo | grep Hardware') - cpu = cpu.replace(" ", "") - cpu = re.sub(r'(.+:)', '', cpu) + cpu = d.shell('getprop ro.product.board') r = requests.get('https://dl.twrp.me/'+cpu) tree = html.fromstring(r.text) urls = tree.xpath('//a/@href')