Last reviewed

Advanced

NetHunter Helper Script

Use helper scripts as an audited convenience layer only. The authoritative flow remains manual verification of device codename, bootloader state, recovery image, ROM, NetHunter ZIP, and checksums.

Do Not Blind-Run Mobile Flashing Scripts

A stale helper can download the wrong recovery, flash the wrong partition, or follow an outdated ROM requirement. Read the script, verify every upstream filename, and keep a stock recovery path ready before connecting the device.

Lab Runbook

Use this page as a controlled lab build, not a production hardening guide. Validate isolation before running exercises and write down the cleanup command before starting.

Critical risk Intermediate 2-4 hr

Plan

Linux host plus supported phone; 4 GB downloads plus backups. Device dependent. Isolation: Use only owned devices and authorized wireless targets.

Build

  • - Model verified
  • - Backups complete
  • - Matched ROM/recovery/NetHunter files

Validate

  • - adb and flashing tool detect device
  • - Downloaded files match codename
  • - First boot completes

Exercise

Run only the exercises tied to this lab and save screenshots, command output, logs, and timestamps outside disposable VMs.

Clean Up

  • - Keep stock firmware/recovery links
  • - Document Knox/warranty state
  • - Remove unauthorized test profiles

Audit Before Running

Device Checks

  • Confirm model and codename with upstream LineageOS and NetHunter pages.
  • Confirm bootloader unlock status and expected data wipe behavior.
  • Confirm TWRP or recovery support for the exact model variant.
  • Confirm whether the device needs stock firmware, LineageOS, or another base.

Script Checks

  • Review every URL, API endpoint, mirror, and filename pattern.
  • Verify hashes from upstream sources before flashing.
  • Run download-only first; do not combine download and flash on the first pass.
  • Keep logs, terminal output, and downloaded file hashes in the lab notes folder.

Safer Execution Pattern

bash
# Run helper scripts in an empty working directory
mkdir -p ~/nethunter-audit && cd ~/nethunter-audit

# Log everything
script -a nethunter-helper.log

# Prefer download-only or dry-run mode when the script supports it
bash ./nethunter-helper.sh --download-only

# Record hashes before any flash step
sha256sum * | tee SHA256SUMS.local.txt

# Compare against upstream checksums where provided
# Only continue if model, codename, file names, and hashes match.
# Run helper scripts in an empty working directory
mkdir -p ~/nethunter-audit && cd ~/nethunter-audit

# Log everything
script -a nethunter-helper.log

# Prefer download-only or dry-run mode when the script supports it
bash ./nethunter-helper.sh --download-only

# Record hashes before any flash step
sha256sum * | tee SHA256SUMS.local.txt

# Compare against upstream checksums where provided
# Only continue if model, codename, file names, and hashes match.

Rollback Plan

  • Download stock firmware or factory images before starting.
  • Keep the original USB cable and a known-good USB port available.
  • Document the exact recovery key combo and download mode key combo for the model.
  • Do not proceed if battery is low, USB disconnects intermittently, or device detection is unstable.

Main Installation Flow

Return to the main NetHunter setup guide for the manual installation sequence and device-specific decision points.

Back to NetHunter setup