The iBoot command prompt is a command parser included in the iBoot bootloader. It can be used in recovery or upgrade mode to interact with the device's low-level components (e.g. the NAND, display using lib_paint, or with the NVRAM). The command prompt can be accessed by using nanokdp with a serial cable (you should prompt the device to enter recovery mode, such as setting the boot delay and aborting the boot), or prompting the device to enter recovery mode, and use iRecovery.
How It Works
The way of how the command prompt works is if the command line starts with a closed bracket, indicating that the command prompt is ready to be used. There are commands available for all build styles, with special ones only accessible to either DEVELOPMENT or DEBUG builds of iBoot.
Example
======================================= :: :: iBoot, Copyright 2007, Apple Inc. :: :: BUILD_TAG: iBoot-240.39 :: :: BUILD_STYLE: DEVELOPMENT :: ======================================= Boot Failure Count: 0 Panic Fail Count: 0 Delaying boot for 5 seconds, hit enter to break into the command prompt... aborting autoboot due to user intervention. Entering recovery mode, starting command prompt ] bgcolor 255 0 0 ] bootx 0x0 Permission Denied ] halt system halted, spinning forever...
Please note, the BUILD_TAG may not be real, this is just to clarify that this is an example and is not meant to represent the actual serial logs of an iPhone or other Apple device.
Errors
When using the command prompt, there may be some commands that might not be available to the user. This is typically because of the BUILD_STYLE being used.
Usually, commands would check if the build style is release, development, or debug.
#if RELEASE_BUILD // command code would go here or likely something else #endif
It could also check other variables of iBoot, such as if the WITH_RECOVERY_MODE variable is true, or if it has restore booting.
Commands will check for permissions before they're executed. This is usually as a safety precaution to prevent damage to a production device.