a-yatta / amdh Goto Github PK
View Code? Open in Web Editor NEWAndroid Mobile Device Hardening
License: GNU General Public License v3.0
Android Mobile Device Hardening
License: GNU General Public License v3.0
File "amdh.py", line 1, in <module> from core.adb import ADB ImportError: No module named core.adb
Hi,
Which cis and android version match this project?
It was not mentioned in the description
Thank you
My adb bin is in /home/nicolas/Android/Sdk/platform-tools/adb
but it's resolved by my Linux PATH.
If I run the script, it search for /usr/bin/adb
by default, I need to provide it manually through -a
.
It'll great to have it resolved automatically by using the PATH
env var
When adb encounters an error, typically when the devices isn't authorised, the program fails with a Trackback.
It should be clearer if it prints the adb error message and stop gracefully.
The trackback in my case was :
➜ python amdh.py -sA -a /home/nicolas/Android/Sdk/platform-tools/adb
[-] INFO: List of devices:
[-] INFO: The device 97UAY124RZ will be used.
Traceback (most recent call last):
File "amdh.py", line 408, in <module>
amdh()
File "amdh.py", line 209, in amdh
packages = adb_instance.list_installed_packages(arguments.app_type)
File "/home/nicolas/Dev/playground/python/AMDH/core/adb.py", line 48, in list_installed_packages
output_command = self.adb_exec(adb_command)
File "/home/nicolas/Dev/playground/python/AMDH/core/adb.py", line 25, in adb_exec
result = run(commands_array,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/home/nicolas/Android/Sdk/platform-tools/adb', '-s', '97UAY124RZ', 'shell', 'pm', 'list', 'packages', '-3']' returned non-zero exit status 1.
And the adb message was:
➜ adb shell pm list packages -3
adb: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.