Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
55538aba6a | ||
|
0d66d5b79e | ||
|
4ed01b60ae | ||
|
c8e9845954 | ||
|
2680ddca0a | ||
|
71f67b709a |
|
@ -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
1
amt.py
|
@ -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
|
||||||
|
|
|
@ -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,6 +52,7 @@ def download_app(o=None):
|
||||||
else:
|
else:
|
||||||
os.system(adb+" pull /sdcard/"+app)
|
os.system(adb+" pull /sdcard/"+app)
|
||||||
else:
|
else:
|
||||||
|
if os.path.isdir(o) == False:
|
||||||
os.makedirs(o)
|
os.makedirs(o)
|
||||||
os.system(adb+" pull /sdcard/"+app+" "+o)
|
os.system(adb+" pull /sdcard/"+app+" "+o)
|
||||||
|
|
||||||
|
|
|
@ -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')
|
||||||
|
@ -56,6 +54,10 @@ def twrp_download(d):
|
||||||
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")
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Reference in New Issue
Block a user