HacknDroid
Last updated
Last updated
script is used for the automation of some MAPT activities and the interaction with the mobile Android device. The script was created to solve many problems:
the command adb root
is not enabled after device rooting on many production mobile devices;
the files need to be shared before on the external SD Card and then on the device;
the retrieving of the application data (APKs, Shared preferences, Stored data) needs to be found and retrieved with several commands;
the unpacking process of the application APK need a merge phase for application with multiple APKs in /data/app/{app_id}_{base64_unique_id}
for efficency purpouses
management of invisible proxy setup
The script runs two different type of tasks:
Daemon tasks this type of tasks run in background. For example, the following tasks are daemon tasks:
logcat
mirroring
proxy with dns spoofing
video recoding
Sequential tasks
apk: Several APKs related operations (apk analysis for root detection/certificate pinning hints, apk decompiling/compiling, JADX-GUI launch, etc.)
apk_analysis: Analysis of the APKs related to the application
certificate_pinning_hints: Search for common Certificate Pinning strings or SHA1-SHA256 hash string in smali files
from_apk_on_pc
from_mobile_device
root_detection_hints: Search for common Root Detection strings in smali files
from_apk_on_pc
from_mobile_device
signature_scheme: Signature scheme verifier
from_apk_on_pc
from_mobile_device
full_analysis: Full Analysis of the APKs related to the application, including:
from_apk_on_pc
from_mobile_device
get_apk_from_mobile: Get APK of an application on your mobile device
app_info: App info from the APK
from_apk_on_pc
from_mobile_device
compiling: Compile an apk file from the folder with decompiled and modified code
compile: Compile an apk file from the folder with decompiled and modified code
compile_and_sign: Compile and sign an apk file from the folder with decompiled and modified code
decompiling: Decompile an apk file
from_apk_on_pc
from_mobile_device
jadx_run_on_apk: Open an APK in JADX-GUI
jadx_create_and_open_file: Open the reversed apk in JADX-GUI.
from_mobile_device
jar_from_apk: Convert an apk file from the mobile device to a jar file
from_apk_on_pc
from_mobile_device
merge_apks: Merge several APKs
from_directory
from_list
sign_apk: Sign an apk on your PC.
app_data_and_logs: Access to app data (e.g. backups) and logs
backup_and_data: Backup/Reset data of an application
backup_device: Backup the mobile device
backup_specific_app: Backup a specific app
backup_restore: Restore a backup file on your mobile device
backup_to_folder: Extract a backup file on your system
reset_app_data: Reset App data
dump_mem_info: Dump the memory information for an application
run_app_meminfo: Run and dump the memory information for an application.
running_app_meminfo: Dump the memory information for a running application
force_app_stop: Force the stop of a running application
track_logs: Process for logs gathering:
run_and_log: Run the app and logs it using the tool
normal_logs: Launch an application and log all the events
crash_logs: Launch an application and log its crash events
running_app_log: Log a running app
normal_logs: Log all the events of a running application
crash_logs: Log the crash events of a running application
log_sessions: List logging sessions
device_info: Get mobile device information
apps_list: Get list of all the installed apps
3rd_party_apps: Get list of all the installed 3rd-party apps
system_apps: Get list of all the installed system apps
battery_status: Battery Status
cpu_info: Get CPU information
general_info: Get mobile device general information
network_info: Get Network information
ram_info: Get RAM information
storage_info: Get Storage information
devices: Select one of the available mobile devices
file_transfer: Transfer files from/to mobile devices
download_from_mobile: Doenload a file/folder from the mobile device
upload_to_mobile: Upload a file/folder to the mobile device
install_uninstall: Install/Uninstall an app on the mobile device.
install_from_apk: Install an APK file on the mobile device
install_from_playstore: Install an app from the Play Store
uninstall: Uninstall an app from the mobile device
interactive_shell: Interactive shell for the mobile device
mirroring: Mirroring management (screenshot, video recording and scren mirroring)
mirroring: Launch scrcpy for mobile device mirroring
stop_mirroring: Stop scrcpy session for mobile device mirroring
screenshot_video: Screenshot/Video on the mobile device
screenshot: Screenshot
video_record: Start Video Recording
stop_video_record: Stop Video recording
mobile_settings: Management of mobile device modes (battery saver, do not disturb, connectivity)
battery_saver: Battery Saver mode
off: Turn off battery saver mode
on: Turn on battery saver mode
do_not_disturb_mode: Do Not Disturb mode
off: Turn off Do Not Disturb mode
alarms_only: Turn on Do Not Disturb mode with alarms only
priority_only: Turn on Do Not Disturb mode with priority only
total_silence: Turn on Do Not Disturb mode with total silence
connectivity: Connectivity options management (Wifi, airplane mode)
wifi_off: Turn off Wifi option
wifi_on: Turn on Wifi option
airplane_off: Turn off Airplane mode
airplane_on: Turn on Airplane mode
processes_list: List all the processes
proxy: Set proxy on the mobile device using the current PC IP or another IP (e.g. regular proxy, invisible proxy via iptables or dns spoofing)
dns: Set proxy routes using a DNS server
get_current_proxy: List current DNS proxy settings
set_proxy_with_current_ip: Start the DNS spoofing with the current PC IP (on the same Wi-fi network of the mobile device)
set_proxy_with_other_ip: Start the DNS spoofing with a specific IP address
del_proxy: Reset current DNS Proxy configurationPress ENTER to continue...
invisible_proxy: Set global proxy on the mobile device:
get_current_proxy: See the current invisible proxy settings
set_proxy_with_current_ip: Set the current PC IP as invisible proxy
set_proxy_with_other_ip: Set an IP address as invisible proxy
del_proxy: Reset current invisible proxy configuration
system_proxy: Set global proxy on the mobile device:
get_current_proxy: Press ENTER to see current proxy settings
set_proxy_with_current_ip: Set the current PC IP as proxy
set_proxy_with_other_ip: Set the remote IP address to be used as proxy
del_proxy: Reset current proxy configuration
shutdown_reboot: Reboot/shutdown the device with several options
shutdown: Shutdown the mobile device
reboot: Reboot the mobile device
reboot_recovery: Reboot the mobile device in recovery mode
reboot_bootloader: Reboot the mobile device in bootloader mode