Compare commits

...

6 Commits
v1.1 ... master

Author SHA1 Message Date
Kevin Rode
55538aba6a
Merge pull request #5 from kevroded/dependabot/npm_and_yarn/platform-tools/systrace/catapult/common/node_runner/node_runner/handlebars-4.5.3
Bump handlebars from 4.1.2 to 4.5.3 in /platform-tools/systrace/catapult/common/node_runner/node_runner
2019-12-30 00:09:05 -05:00
dependabot[bot]
0d66d5b79e
Bump handlebars
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.5.3.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.1.2...v4.5.3)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-30 02:21:46 +00:00
Kevin Rode
4ed01b60ae
Update README.md 2019-11-19 14:55:50 -05:00
Kevin Rode
c8e9845954
Merge pull request #4 from kevroded/Testing
Error prevention mechanisms added
2019-10-30 16:06:40 -04:00
Kevin Rode
2680ddca0a Error prevention mechanisms added 2019-10-03 13:36:02 -04:00
Kevin Rode
71f67b709a Bug fix 2019-10-03 13:15:57 -04:00
5 changed files with 57 additions and 46 deletions

View File

@ -1,3 +1,4 @@
# This Code is undergoing a rewrite and is currently not functioning correctly. Check back soon for the updated version
# Android-Mobile-Toolkit # Android-Mobile-Toolkit
This is a python based program to root and extract data from android devices using adb This is a python based program to root and extract data from android devices using adb

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

@ -12,7 +12,6 @@ def recovery_boot():
else: else:
device = root.adb_connect() device = root.adb_connect()
root.twrp_download(device) root.twrp_download(device)
root.push_files(device)
root.reboot_bootloader() root.reboot_bootloader()
adb = "platform-tools\\adb.exe" adb = "platform-tools\\adb.exe"
fastboot = "platform-tools\\fastboot.exe" fastboot = "platform-tools\\fastboot.exe"
@ -20,6 +19,15 @@ def recovery_boot():
for file in files: for file in files:
if "twrp" in file: if "twrp" in file:
twrp = file twrp = file
else:
twrploc = 0
while twrploc == 0:
input("TWRP not found. Please ensure it is in the correct location and press enter to continue. ")
files = os.listdir(os.curdir)
for file in files:
if "twrp" in file:
twrp = file
twrploc = 1
os.system(fastboot + " boot "+twrp) os.system(fastboot + " boot "+twrp)
input("Press Enter when TWRP has booted") input("Press Enter when TWRP has booted")
@ -44,7 +52,8 @@ def download_app(o=None):
else: else:
os.system(adb+" pull /sdcard/"+app) os.system(adb+" pull /sdcard/"+app)
else: else:
os.makedirs(o) if os.path.isdir(o) == False:
os.makedirs(o)
os.system(adb+" pull /sdcard/"+app+" "+o) os.system(adb+" pull /sdcard/"+app+" "+o)

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')
@ -38,24 +36,28 @@ def twrp_download(d):
for i in urls: for i in urls:
if "img" in i: if "img" in i:
downloads.append(i) downloads.append(i)
url_to_download = "https://dl.twrp.me"+downloads[0] url_to_download = "https://dl.twrp.me"+downloads[0]
url_to_download = url_to_download.replace('.html', '') url_to_download = url_to_download.replace('.html', '')
s = requests.Session() s = requests.Session()
s.headers.update({'referer':url_to_download}) s.headers.update({'referer':url_to_download})
img = s.get(url_to_download) img = s.get(url_to_download)
with open("twrp.img",'wb') as f: with open("twrp.img",'wb') as f:
f.write(img.content) f.write(img.content)
files = os.listdir(os.curdir) files = os.listdir(os.curdir)
for file in files: for file in files:
if "twrp" in file: if "twrp" in file:
found = 1 found = 1
while found != 1: while found != 1:
print("File not found. Please confirm it has been moved to the correct directory") print("File not found. Please confirm it has been moved to the correct directory")
input("Press Enter to continue...") input("Press Enter to continue...")
files = os.listdir(os.curdir) files = os.listdir(os.curdir)
for file in files: for file in files:
if "twrp" in file: if "twrp" in file:
found = 1 found = 1
else:
print("Error. Returning to the main menu")
time.sleep(2)
else: else:
print("twrp already downloaded") print("twrp already downloaded")

View File

@ -3539,32 +3539,14 @@
"integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4=" "integrity": "sha1-8nNdwig2dPpnR4sQGBBZNVw2nl4="
}, },
"handlebars": { "handlebars": {
"version": "4.1.2", "version": "4.5.3",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz",
"integrity": "sha1-trN8HO0DBrIh4JT8eso+wjsTG2c=", "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==",
"requires": { "requires": {
"neo-async": "^2.6.0", "neo-async": "^2.6.0",
"optimist": "^0.6.1", "optimist": "^0.6.1",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"uglify-js": "^3.1.4" "uglify-js": "^3.1.4"
},
"dependencies": {
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
"optional": true
},
"uglify-js": {
"version": "3.5.9",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.9.tgz",
"integrity": "sha512-WpT0RqsDtAWPNJK955DEnb6xjymR8Fn0OlK4TT4pS0ASYsVPqr5ELhgwOwLCP5J5vHeJ4xmMmz3DEgdqC10JeQ==",
"optional": true,
"requires": {
"commander": "~2.20.0",
"source-map": "~0.6.1"
}
}
} }
}, },
"has": { "has": {
@ -5688,7 +5670,7 @@
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
} }
} }
@ -6643,6 +6625,24 @@
"source-map": "~0.6.1" "source-map": "~0.6.1"
} }
}, },
"uglify-js": {
"version": "3.7.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.3.tgz",
"integrity": "sha512-7tINm46/3puUA4hCkKYo4Xdts+JDaVC9ZPRcG8Xw9R4nhO/gZgUM3TENq8IF4Vatk8qCig4MzP/c8G4u2BkVQg==",
"optional": true,
"requires": {
"commander": "~2.20.3",
"source-map": "~0.6.1"
},
"dependencies": {
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"optional": true
}
}
},
"uglifyjs-webpack-plugin": { "uglifyjs-webpack-plugin": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz",