xerub/img4lib
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Some WIP code to deal with img4 files in a decent manner.
Prereq: either libcompression or liblzfse; or build one in-tree (has precedence)
git submodule init && git submodule update && make -C lzfse [CC="cross-cc"] [LD="cross-ld"]
Build:
make [CC="cross-cc"] [LD="cross-ld"] [CORECRYPTO=1] [COMMONCRYPTO=1]
COMMONCRYPTO=1 use Apple CommonCrypto instead of OpenSSL (Darwin-only)
CORECRYPTO=1 use the included corecrypto sources (has precedence)
Examples:
./img4 \
-i DeviceTree.n51ap.im4p \
-o dtre.img4 \
-M manifest.im4m \
-N 0x1122334455667788 \
-T rdtr
./img4 \
-i kc_iPhone6,1_9.0_13A344.im4p \
-o krnl.img4 \
-k a6ff60f2fcf3cdcaaf735e1683418ff56828540cd92ac15f3144ed4dc9d5bcb34c01cc8154bc22c3658d82b6c439340b \
-M manifest.im4m \
-N 0x1122334455667788 \
-P kc_iPhone6,1_9.0_13A344.bpatch \
-D \
-T rkrn
Patches for kc_iPhone6,1_9.0_13A344:
# AMFI
0x006AF484 0xF6 0xE0
0x006AF485 0x57 0x03
0x006AF486 0xBD 0x00
0x006AF487 0xA9 0x32
0x006AF488 0xF4 0xC0
0x006AF489 0x4F 0x03
0x006AF48A 0x01 0x5F
0x006AF48B 0xA9 0xD6
# MAC
0x004823CC 0x00 0x00
0x004823CD 0x05 0x00
0x004823CE 0x40 0x80
0x004823CF 0xF9 0x52
#0x00F5595C 0xB2 0x00
#0x00F5595D 0x3E 0x00
#0x00F5595E 0x00 0x80
#0x00F5595F 0x94 0x52
-xerub