checkARB is a self-extracting shell script designed to extract and examine the anti-rollback version stored in the xbl_config partition of Android devices. It leverages a built-in arb_inspector tool to parse the partition image and displays the result with intuitive colored output. The script adheres to the POSIX standard and runs reliably on common Android shells such as mksh and ash.
- Self‑Extracting: A ZIP archive containing
arb_inspectoris appended to the script; it automatically unpacks to a temporary directory at runtime, eliminating the need for manual tool preparation. - Dual‑Source Inspection: Choose to extract
xbl_configdirectly from the local partition or examine a user‑supplied external image file. - Anti‑Rollback Detection: Parses the
Anti-Rollback Versionvia a dedicated tool. Values > 0 are highlighted in red (“Anti‑rollback enabled”), while 0 is shown in green (“No anti‑rollback”). - MediaTek Dimensity Warning: Automatically detects MediaTek Dimensity chips and, if present, displays a yellow warning that the ARB value may be stored in hardware and potentially unreliable.
- Fallback busybox: Recursively searches
/data/adbfor an executablebusyboxto use when system commands are missing, improving compatibility across different environments. - POSIX‑Compliant: Written in pure POSIX shell, it runs flawlessly on
mkshandash. It also detectsbashand exits with an error message. - Clean‑up Guarantee: Regardless of success or failure, the script uses a
trapto automatically remove the working directory (/data/local/tmp/checkarb) on exit, leaving no residue. - Hash Verification: The embedded
bin.zipis validated against a SHA256 checksum to prevent tampering or corruption. - User‑Friendly Interface: Plain‑text menus guide the user through source selection, extraction confirmation, and external path input—no extra tools like
dialogare required.