Skip to content

Commit

Permalink
Add wrapper script to list all files specific to a firmware ID
Browse files Browse the repository at this point in the history
  • Loading branch information
razvand committed Dec 24, 2017
1 parent 854f6a9 commit e78e494
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ cd scripts/
Or you can create your own custom script based on `run_all` or `run_no_pack_no_fs_no_dyld`. Read more below.
If you want to check all files and folders corresponding to a given firmware ID, use the `list_files` wrapper script. It gives you information about the existence and basic properties of those files (IPSW input file, kernelcache, reversed sandbox profiles etc.):
```
./list_files iPhone5,1_9.3_13E237
```
## Internals
External tools are located in the `tools/` subfolder. They are to be run through two layers of scripts: a lower-layer set of scripts located in the `bin/` subfolder and a higher-layer set of scripts in the `scripts/` subfolder. The scripts in the `scripts/` subfolder are the ones you will work with.
Expand Down
68 changes: 68 additions & 0 deletions list_files
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash

source config

if test $# -ne 1; then
echo "Usage: $0 <firmware-identifier>" 1>&2
echo "" 1>&2
echo "Argument is firmware identifier (e.g iPhone5,1_9.3_13E237)" 1>&2
exit 1
fi

firmware_id="$1"

ipsw="$IPSW_STORE"/"$firmware_id"_Restore.ipsw

out_dir="$OUT_STORE"/"$firmware_id"
decrypted="$out_dir"/decrypted.dmg
rootfs_img="$out_dir"/rootfs.img
fs_archive="$out_dir"/fs.tar.gz
sandboxd="$out_dir"/sandboxd
dyld_shared_cache="$out_dir"/dyld_shared_cache
kernelcache_decrypted="$out_dir"/kernelcache.decrypted
kernelcache="$out_dir"/kernelcache.mach.arm
sandbox_kext="$out_dir"/com.apple.security.sandbox.kext
sb_ops="$out_dir"/sb_ops
sandbox_profiles="$out_dir"/sandbox_profiles
sandbox_bundle="$out_dir"/sandbox_bundle
reversed_profiles="$out_dir"/reversed_profiles

echo "* ipsw file $ipsw"
ls -l "$ipsw"
file "$ipsw"
echo "* decrypted disk image file $decrypted"
ls -l "$decrypted"
file "$decrypted"
echo "* root filesystem image file $rootfs_img"
ls -l "$rootfs_img"
file "$rootfs_img"
echo "* filesystem archive file $fs_archive"
ls -l "$fs_archive"
file "$fs_archive"
echo "* sandboxd file $sandboxd"
ls -l "$sandboxd"
file "$sandboxd"
echo "* dyld_shared_cache folder $dyld_shared_cache"
ls -ld "$dyld_shared_cache"
ls "$dyld_shared_cache"
echo "* decrypted kernelcache file $kernelcache_decrypted"
ls -l "$kernelcache_decrypted"
file "$kernelcache_decrypted"
echo "* kernelcache file $kernelcache"
ls -l "$kernelcache"
file "$kernelcache"
echo "* sandbox extension file $sandbox_kext"
ls -l "$sandbox_kext"
file "$sandbox_kext"
echo "* sandbox operations file $sb_ops"
ls -l "$sb_ops"
file "$sb_ops"
echo "* sandbox profiles folder $sandbox_profiles"
ls -ld "$sandbox_profiles"
ls "$sandbox_profiles"
echo "* sandbox bundle file $sandbox_bundle"
ls -ld "$sandbox_bundle"
file "$sandbox_bundle"
echo "* reversed profiles folder $reversed_profiles"
ls -ld "$reversed_profiles"
ls "$reversed_profiles"

0 comments on commit e78e494

Please sign in to comment.