前言
让你学会去掉对rocketbootstrap 的Depends依赖
- 本文的目的,是想在自己的deb 自带rocketbootstrapd,避免每次部署都从bigBoss 源更新。
1) 研究https://github.com/rpetrich/RocketBootstrap/blob/54cdad74cc532ceeb4e7239d201c218bb7dfe346/layout/DEBIAN/postinst
2) RocketBootstrap/layout/DEBIAN/prerm
3) RocketBootstrap/layout/Library/LaunchDaemons/
4) /Library/LaunchDaemons/
5) /layout/DEBIAN/prerm
将以上的内容移动copy 一份到自己的deb 包对应的位置
- ReportCrash
MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.dylib
正文
- 整体操作的文件清单
modified: .gitignore
Untracked files:
(use "git add <file>..." to include in what will be committed)
knPackage/Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist
knPackage/Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.dylib
knPackage/Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.plist
knPackage/usr/bin/reloadRocket
knPackage/usr/include/
knPackage/usr/lib/
knPackage/usr/libexec/
<!-- .gitignore-->
#knPackage
- dpkg -r com.rpetrich.rocketbootstrap 失败
<!-- 因为 rocketbootstrap还被依赖中,例如applist -->
iPhone:/var/mobile/Media root# dpkg -r com.rpetrich.rocketbootstrap
dpkg: dependency problems prevent removal of com.rpetrich.rocketbootstrap:
applist depends on com.rpetrich.rocketbootstrap (>= 1.0.3) ø firmware (<< 7.0); however:
Package com.rpetrich.rocketbootstrap is to be removed.
Version of firmware on system is 10.1.1.
dpkg: error processing package com.rpetrich.rocketbootstrap (--remove):
dependency problems - not removing
Errors were encountered while processing:
com.rpetrich.rocketbootstrap
<!-- 卸载app list 即可 -->
异常处理
- knPackage com.rpetrich.rocketbootstrap is not installed.
去掉对rocketbootstrap 的Depends依赖
- ssh usb2222 dpkg -r com.rpetrich.rocketbootstrap
trying to overwrite '/Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist', which is also in knPackage com.rpetrich.rocketbootstrap 1.0.6
<!-- 记得在安装脚本加上 -->
ssh usb2222 dpkg -r com.rpetrich.rocketbootstrap
rocketbootstrap 安装过程分析
- 一个简单的方式研究你刚刚安装一个tweak或者deb 包之后,系统最近访问的文件
<!-- rocketbootstrap 为例子-->
wl24:~ root# find / -amin -1
/Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist
/dev/oslog_stream
/dev/ptmx
/dev/bpf0
/dev/urandom
/dev/cu.debug
/dev/ttys000
/private/var/containers/Data/System/D214312C-5A63-41B1-893E-FF1501457C81/Library/Caches/com.apple.LaunchServices-175-v2.csstore
/private/var/containers/Shared/SystemGroup/C2ED0185-31C4-4C5F-BD27-10627A8D00C7/Library/BatteryLife/Archives/powerlog_2018-03-28_52A7D281.PLSQL.gz
/private/var/containers/Shared/SystemGroup/C2ED0185-31C4-4C5F-BD27-10627A8D00C7/Library/BatteryLife/CurrentPowerlog.PLSQL-wal
/private/var/containers/Shared/SystemGroup/C2ED0185-31C4-4C5F-BD27-10627A8D00C7/Library/Preferences/com.apple.powerlogd.plist
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/0291DE68-3C2E-33F2-BEC9-20F34CD8381D-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/07F6BEC5-F15C-3D4D-9301-7C5B7ABD9AD0-9840FA04-C8C7-313A-885E-42595B4945CA
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/0936CEE6-376B-3650-A05C-6A2CB98B67E7-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/0C975E23-63CE-34C2-92CA-857C75EF5ED1-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/0F866261-1830-3600-B48C-AFE9EF1F9431-76A7A024-ED67-302C-99CB-853DC8A4B35B
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/0F866261-1830-3600-B48C-AFE9EF1F9431-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/257CDD45-3EE4-3BD8-B8F5-AD207E29C7F6-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/257CDD45-3EE4-3BD8-B8F5-AD207E29C7F6-A7539826-D63D-3519-B350-243EC7B4BC42
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/2ECF0BFD-C205-351B-9FF4-8A6EF4DBA681-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/2ECF0BFD-C205-351B-9FF4-8A6EF4DBA681-A7539826-D63D-3519-B350-243EC7B4BC42
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/36C514D0-9DA6-30C7-B26F-CF9B432C05C2-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/3CE81B4D-39E1-3F96-8927-70693E7D7E6A-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/3E0A176A-37CA-3C69-8392-85BCAB5F4E95-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/3E5A81CE-6B99-3C95-A7C0-1EC4299F458D-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/3E5A81CE-6B99-3C95-A7C0-1EC4299F458D-A7539826-D63D-3519-B350-243EC7B4BC42
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/4E483263-5980-352A-8C90-43A64053285A-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/5CE0D6B0-F695-3DBA-BA55-87FD5838E0A5-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/62F61AF3-9250-365D-ACA6-DF673254617C-76A7A024-ED67-302C-99CB-853DC8A4B35B
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/62F61AF3-9250-365D-ACA6-DF673254617C-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/69F311B4-FD91-34A5-85AB-F026222E2548-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/6D305F5B-4918-39C2-A179-53ED85897900-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/6E0AD848-193A-3222-A048-735AC7397C23-4F7C894D-870B-3142-86A5-8CE25A9BDD99
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/6E0AD848-193A-3222-A048-735AC7397C23-E68CFC25-6FEF-3FF7-980D-D8F71DCFC073
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/6FE1688B-BF53-3818-BCED-158F02AE36A4-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/730DC1E2-8EBB-3FEF-9767-B35E1F7BBA1C-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/7774F507-FD09-38DA-9D10-CB1168AD445B-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/7BD8077B-62F8-3396-AEF1-DBB998EF675C-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/7D7D8128-8B41-3E2B-A941-BE6D4207D988-76A7A024-ED67-302C-99CB-853DC8A4B35B
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/7D7D8128-8B41-3E2B-A941-BE6D4207D988-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/84996FC6-3AC9-39F2-AE24-EC6CEB90273F-76A7A024-ED67-302C-99CB-853DC8A4B35B
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/84996FC6-3AC9-39F2-AE24-EC6CEB90273F-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/8A91E7CE-01B1-3051-9923-1A1E52915BA0-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/9313B6F9-24A3-333A-846A-F92EAD549A5B-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/B2A9F1D4-4597-3DD5-A0A5-A1BD66240949-A67D005D-547E-389F-8561-B072A52EF7A7
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/B6818B42-7DE6-3E8A-8351-F48A0A346D89-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/B6818B42-7DE6-3E8A-8351-F48A0A346D89-A7539826-D63D-3519-B350-243EC7B4BC42
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/B780FEA1-3804-334F-B2B5-220F9308061A-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/BB8EB171-6302-3C2D-8784-06282D268265-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/BB8EB171-6302-3C2D-8784-06282D268265-A7539826-D63D-3519-B350-243EC7B4BC42
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/C2076675-7271-3D95-8683-ECA4E0821F97-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/C6246A6A-CF24-37FB-9F99-C8D5560FC349-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/CDA20E99-ABAF-3C49-933C-B7A1F88369D7-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/E1B02885-AA5D-3DE5-9130-3EA54FD8DFFE-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/EA9F81E3-D11B-3D14-8E47-6EA49202F4D3-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/containers/Shared/SystemGroup/systemgroup.com.apple.lsd.iconscache/Library/Caches/com.apple.IconsCache/ECBEE005-F1C0-330D-AE43-8232AF78D31E-8C96354F-D66E-379A-A4D9-B3C2A1FBE01D
/private/var/db/dhcpclient/leases/en0-1,f8:27:93:73:eb:a4
/private/var/db/stash/_.EJ5lou/DynamicLibraries/RocketBootstrap.dylib
/private/var/db/stash/_.EJ5lou/DynamicLibraries/RocketBootstrap.plist
/private/var/db/uuidtext/06/0366E1C6C8316D8BB89B983B090472
/private/var/db/uuidtext/0A/12254A4F7F3639AC55044D87AE0D7C
/private/var/db/uuidtext/22/E4E7186EF5372ABDC7C474A570D845
/private/var/db/uuidtext/31/34CFB2F722310EA2C742AE4DC131AB
/private/var/db/uuidtext/33/C1D68D751E3A7E8CC20063E1FB9083
/private/var/db/uuidtext/52/B6EAF7633B325BA11E99D236209DD5
/private/var/db/uuidtext/54/645DC0321231D88A022FD67A793278
/private/var/db/uuidtext/5A/4D77F53E0936EB9FB5E8D852C93A7D
/private/var/db/uuidtext/66/3D6EA52B5E36CC83A23C62078CB195
/private/var/db/uuidtext/8E/9797D606EF34F5A0164E6A911E5285
/private/var/db/uuidtext/8E/9CC1CAE19E36CA8A0504A78316F467
/private/var/db/uuidtext/98/63B5F2468731989B8E3E2EE226E481
/private/var/db/uuidtext/99/AC1D150D043E8D89994A0479840498
/private/var/db/uuidtext/AD/AA3E3583673A6D9D8843647074220E
/private/var/db/uuidtext/BC/7923678D363929B043BE68B6F88FDE
/private/var/db/uuidtext/BF/D12AB4DFEB31129D50D440F6D6150D
/private/var/db/uuidtext/DB/842501613D37A283E54F9B345F87C9
/private/var/db/uuidtext/E1/C2EC52D25F3F7DB294C0FBA023AF81
/private/var/db/uuidtext/E3/08D17EA4CA3221BCEF57EE7E0B4EDB
/private/var/db/uuidtext/E6/157C38E26C35C892C642152ED25C62
/private/var/db/uuidtext/EE/EC218D579C35838DAD0FA5A678290C
/private/var/db/uuidtext/F6/E94E0F9F14383D948A6C21AC5730B4
/private/var/db/uuidtext/FF/A3562CE21D3FA1A2DF98D17214503E
/private/var/installd/Library/MobileInstallation/DiskImagesInfo.plist
/private/var/lib/apt/extended_states
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.list
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.md5sums
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.postinst
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.prerm
/private/var/lib/dpkg/status
/private/var/lib/dpkg/status-old
/private/var/mobile/Library/BulletinBoard/ClearedSections.plist
/private/var/mobile/Library/Caches/GeoServices/networkDefaults.plist
/private/var/mobile/Library/Caches/MappedImageCache/Persistent
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/2ad9906751b3f9e6bc2acd5e63545489ad253930.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/8ea40b714c2dce4228dbcd0e82def63e45265626.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/97a3c206c0967384f711975cfa8dc569b941eb78.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-AirDrop-ControlCenter-23.000000-23.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-ControlCenterGlyphAirPlay-18.000000-22.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-ControlCenterGlyphNight-27.000000-27.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-airplaneMode-17.000000-21.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-bluetooth-23.000000-13.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-com.apple.calculator-29.000000-21.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-com.apple.camera-23.000000-31.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-com.apple.mobiletimer-29.000000-29.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-doNotDisturb-18.000000-18.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-flashlight-36.000000-14.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-orientationLock-21.000000-25.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUIAlphaOnlyGlyph-wifi-17.000000-21.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-AirDrop-ControlCenter-23.000000-23.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-ControlCenterGlyphAirPlay-18.000000-22.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-ControlCenterGlyphNight-27.000000-27.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-airplaneMode-17.000000-21.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-bluetooth-23.000000-13.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-com.apple.calculator-29.000000-21.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-com.apple.camera-23.000000-31.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-com.apple.mobiletimer-29.000000-29.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-doNotDisturb-18.000000-18.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-flashlight-36.000000-14.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-orientationLock-21.000000-25.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/CCUISelectedAlphaOnlyGlyph-wifi-17.000000-21.000000.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/ControlCenterSliderThumb.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/ControlCenterSliderTrack.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/MPUMediaControlsTitlesView.initWithMediaControlsStyle.explicitImage.medium.white.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/MediaControlsTrackBlackNotRounded-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/MediaControlsTrackBlackRounded-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/MediaControlsTrackWhiteHalfAlphaRounded-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/MediaControlsTrackWhiteRounded-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/NowPlayingLiveWaves-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/SBIconBadgeView.BadgeBackground.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/ScrubberThumbLSNoScrubNoDuration-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/ScrubberThumbLSScrubNoDuration-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/ac8ee55190b64f83dd818ce9346460110179c4fb.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/highlight-0.05a-0.5h.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/nav-arrowDown-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/placeholder-artwork-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/volume-maximum-value-image.png-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Persistent/volume-minimum-value-image-center.png-3.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Session
/private/var/mobile/Library/Caches/MappedImageCache/Wallpaper
/private/var/mobile/Library/Caches/MappedImageCache/Wallpaper/shared-wallpaperController-(-2:0:0:0.0:0:0.0:0.0)-untinted.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Wallpaper/shared-wallpaperController-(2020:0:0:0.0:0:0.0:0.0)-tinted.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Wallpaper/shared-wallpaperController-(2020:1:0:0.0:0:0.0:0.0)-tinted.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Wallpaper/shared-wallpaperController-(2070:0:0:0.0:0:0.0:0.0)-tinted.cpbitmap
/private/var/mobile/Library/Caches/MappedImageCache/Wallpaper/shared-wallpaperController-sample-image.cpbitmap
/private/var/mobile/Library/Caches/com.apple.UIStatusBar/14C92/images/172013073450246116839726114382401557488
/private/var/mobile/Library/Caches/com.saurik.Cydia/CacheState.plist
/private/var/mobile/Library/Caches/com.saurik.Cydia/SDURLCache/5cf2a904a0d5e9e5ef530766d4d2c1c1
/private/var/mobile/Library/Caches/com.saurik.Cydia/SDURLCache/cacheInfo.plist
/private/var/mobile/Library/Caches/com.saurik.Cydia/extended_states
/private/var/mobile/Library/Caches/com.saurik.Cydia/pkgcache.bin
/private/var/mobile/Library/Caches/com.saurik.Cydia/sources.list
/private/var/mobile/Library/Caches/com.saurik.Cydia/srcpkgcache.bin
/private/var/mobile/Library/Logs/Cydia/eipp.log.xz
/private/var/mobile/Library/Preferences/com.apple.aggregated.plist
/private/var/mobile/Library/Preferences/com.apple.apsd.plist
/private/var/mobile/Library/Preferences/com.apple.purplebuddy.plist
/private/var/mobile/Library/Preferences/com.apple.textInput.keyboardServices.textReplacement.plist
/private/var/mobile/Library/SpringBoard/LockBackgroundThumbnail.jpg
/private/var/preferences/SystemConfiguration/com.apple.wifi.plist
/private/var/preferences/SystemConfiguration/preferences.plist
/private/var/preferences/com.apple.networkextension.plist
/private/var/root/Library/Caches/locationd/clients.plist
/private/var/root/Library/Preferences/com.apple.xpc.activity2.plist
/private/var/tmp/SBLastRestoreIdentifier.K3gPyz
/usr/include/rocketbootstrap.h
/usr/include/rocketbootstrap_dynamic.h
/usr/lib/librocketbootstrap.dylib
/usr/libexec/_rocketd_reenable
/usr/libexec/rocketd
- 从上面列表中刷选出我们要的文件
/Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist
/private/var/db/stash/_.EJ5lou/DynamicLibraries/RocketBootstrap.dylib
/private/var/db/stash/_.EJ5lou/DynamicLibraries/RocketBootstrap.plist
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.list
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.md5sums
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.postinst
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.prerm
/usr/include/rocketbootstrap.h
/usr/include/rocketbootstrap_dynamic.h
/usr/lib/librocketbootstrap.dylib
/usr/libexec/_rocketd_reenable
/usr/libexec/rocketd
- 以上分析,要新增两个头文件rocketbootstrap、rocketbootstrap_dynamic
<!-- rocketd 需要使用到这鞋头文件 -->
/usr/include/rocketbootstrap.h
/usr/include/rocketbootstrap_dynamic.h
<!-- wl24:/usr/include root# ls -lrt -->
lrwxr-xr-x 1 root staff 69 Sep 13 2016 substrate.h -> /Library/Frameworks/CydiaSubstrate.framework/Headers/CydiaSubstrate.h
-rw-r--r-- 1 mobile staff 2343 Feb 5 2017 rocketbootstrap.h
-rw-r--r-- 1 mobile staff 3889 Feb 12 2017 rocketbootstrap_dynamic.h
<!-- scp -->
devzkndeMacBook-Pro:Layout devzkn$ mkdir -p usr/include/
devzkndeMacBook-Pro:Layout devzkn$ scp usb2222:/usr/include/rocketbootstrap_dynamic.h usr/include/
- 从上面的内容可以看出deb包的脚本信息存放在/private/var/lib/dpkg/info 目录
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.list
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.md5sums
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.postinst
/private/var/lib/dpkg/info/com.rpetrich.rocketbootstrap.prerm
- 上面文件的改变也可以从RocketBootstrap/Makefile 找到对应的内容
stage::
mkdir -p "$(THEOS_STAGING_DIR)/usr/include"
<!-- Same as -pPR options. Preserves structure and attributes of files but not directory structure -->
cp -a rocketbootstrap.h rocketbootstrap_dynamic.h "$(THEOS_STAGING_DIR)/usr/include"
plutil -convert binary1 "$(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.plist"
<!-- 因此 你看到安装之后的RocketBootstrap.plist 是编码后的二进制格式 -->
此时你要Xcode打开它的话,会自动解析
<!--利用plutil 进行 XML 格式化 -->
把二进制文件转换为XML格式:plutil -c xml1 com.apple.SpringBoard.plist
<!-- 把XML格式的文件转换为二进制 -->
plutil -c binary1 com.apple.SpringBoard.plist
关键文件
- https://github.com/rpetrich/RocketBootstrap/blob/54cdad74cc532ceeb4e7239d201c218bb7dfe346/Makefile
LIBRARY_NAME = librocketbootstrap
librocketbootstrap_FILES = Tweak.x Shims.x
librocketbootstrap_LIBRARIES = substrate
librocketbootstrap_FRAMEWORKS = Foundation
TOOL_NAME = rocketd
rocketd_FILES = rocketd.c
rocketd_FRAMEWORKS = CoreFoundation
rocketd_INSTALL_PATH = /usr/libexec
rocketd_IPHONE_ARCHS = armv6 arm64
ADDITIONAL_CFLAGS = -std=c99
IPHONE_ARCHS = armv6 armv7 armv7s arm64
SDKVERSION_armv6 = 5.1
INCLUDE_SDKVERSION_armv6 = 7.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION = 4.0
TARGET_IPHONEOS_DEPLOYMENT_VERSION_armv6 = 3.0
THEOS_PLATFORM_SDK_ROOT_armv6 = /Applications/Xcode_Legacy.app/Contents/Developer
include framework/makefiles/common.mk
include framework/makefiles/library.mk
include framework/makefiles/tool.mk
stage::
mkdir -p "$(THEOS_STAGING_DIR)/usr/include"
cp -a rocketbootstrap.h rocketbootstrap_dynamic.h "$(THEOS_STAGING_DIR)/usr/include"
plutil -convert binary1 "$(THEOS_STAGING_DIR)/Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.plist"
- https://github.com/iOSHacking/RocketBootstrap/blob/ios7/layout/DEBIAN/control
<!-- 分析此文件的主要目的是查看RocketBootstrap 依赖性Depends -->
Depends: mobilesubstrate (>= 0.9.5000), firmware (>= 3.0)
- RocketBootstrap/layout/DEBIAN/postinst
<!-- 安装之后执行的脚本 -->
#!/bin/sh
<!-- 开启RocketBootstrap -->
launchctl load /Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist || true
launchctl stop com.apple.ReportCrash.SimulateCrash || true
mv /System/Library/LaunchDaemons{BAK,}/com.apple.ReportCrash.SimulateCrash.plist 2> /dev/null || true
launchctl load /System/Library/LaunchDaemons/com.apple.ReportCrash.SimulateCrash.plist 2> /dev/null || true
- RocketBootstrap/layout/DEBIAN/prerm
#!/bin/sh
<!-- 卸载的时候执行的脚本:停止 RocketBootstrap-->
launchctl unload /Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist || true
launchctl stop com.apple.ReportCrash.SimulateCrash || true
- /Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.plist
wl24:/Library/MobileSubstrate/DynamicLibraries root# ls -lrt *ocket*
lrwxr-xr-x 1 mobile staff 33 Nov 3 2015 RocketBootstrap.dylib -> /usr/lib/librocketbootstrap.dylib
-rw-r--r-- 1 mobile staff 125 Mar 8 03:29 RocketBootstrap.plist
<!-- 查看 RocketBootstrap的目标进程ReportCrash -->
<key>Executables</key>
<array>
<string>ReportCrash</string>
</array>
- /usr/lib/librocketbootstrap.dylib
wl24:/usr/lib root# ls -lrt *rocket*
-rwxr-xr-x 1 mobile staff 221792 Mar 8 03:28 librocketbootstrap.dylib
- /Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist
- /usr/libexec/rocketd
wl24:/usr/libexec root# ls -lrt /usr/libexec/rocketd
-rwxr-xr-x 1 mobile staff 133600 Mar 8 03:28 /usr/libexec/rocketd
- /usr/libexec/_rocketd_reenable
wl24:/usr/libexec root# ls -lrt /usr/libexec/_rocketd_reenable
-rwsr-sr-x 1 root wheel 132464 Mar 8 03:29 /usr/libexec/_rocketd_reenable
<!-- wl24:/usr/libexec root# ls -lrt *rocketd* -->
-rwxr-xr-x 1 mobile staff 133600 Mar 8 03:28 rocketd
-rwsr-sr-x 1 root wheel 132464 Mar 8 03:29 _rocketd_reenable
- /System/Library/LaunchDaemons/com.apple.ReportCrash.SimulateCrash.plist
wl24:/Library/MobileSubstrate/DynamicLibraries root# ls -lrt /System/Library/LaunchDaemons/com.apple.ReportCrash.SimulateCrash.plist
-rw-r--r-- 1 root wheel 260 Nov 30 2016 /System/Library/LaunchDaemons/com.apple.ReportCrash.SimulateCrash.plist
/System/Library/CoreServices/ReportCrash
other
- man dpkg
-r, --remove package...|-a|--pending
Remove an installed package. This removes everything except conffiles, which may avoid having to reconfigure the package if it is reinstalled later (conffiles are configuration files that are listed in the
DEBIAN/conffiles control file). If -a or --pending is given instead of a package name, then all packages unpacked, but marked to be removed in file /usr/local/var/lib/dpkg/status, are removed.
Removing of a package consists of the following steps:
1. Run prerm script
2. Remove the installed files
3. Run postrm script
dpkg -P来卸载软件。因为dpkg --remove只是删除安装的文件,但不删除配置文件。而dpkg --purge则安装文件和配置文件都删除。
- launchApplicationWithIdentifier
[[UIApplication sharedApplication] launchApplicationWithIdentifier:self.bundleidentifier suspended:0];
<!-- 例如设置 app -->
com.apple.Preferences
Preferences.app
<!-- Preferences -->
iPhone:/Library/MobileSubstrate/DynamicLibraries root# ps -e |grep Preferences
12608 ?? 0:01.18 /Applications/Preferences.app/Preferences
NSBundle* references = [NSBundle bundleWithPath:@"/System/Library/PreferenceBundles/VPNPreferences.bundle"];
NSBundle* references = [NSBundle bundleWithPath:@"/System/Library/PreferenceBundles/VPNPreferences.bundle"];
see also
https://github.com/HikariObfuscator/Hikari
https://love2.io/@gaolinjie/doc/ml-for-humans-zh/6.md
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadQueue downloads]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadManager downloads]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadManager _copyDownloads]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadQueue _sendDownloadStatusChangedAtIndex:]: 0
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadQueue _messageObserversWithFunction:context:]: 0x334c5d51: 0x2fe89de0
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadQueue downloads]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadManager downloads]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownloadManager _copyDownloads]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownload cachedApplicationIdentifier]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownload status]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [SSDownload cachedApplicationIdentifier]
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [CPDistributedNotificationCenter postNotificationName:userInfo:]: SBApplicationNotificationStateChanged: {
SBApplicationStateDisplayIDKey = "com.apple.AppStore";
SBApplicationStateKey = 2;
SBApplicationStateProcessIDKey = 5868;
SBMostElevatedStateForProcessID = 2;
}
Jan 21 11:12:58 unknown SpringBoard[5706] <Warning>: [itrace]: [3edc9d98]: [CPDistributedNotificationCenter postNotificationName:userInfo:toBundleIdentifier:]: SBApplicationNotificationStateChanged: {
SBApplicationStateDisplayIDKey = "com.apple.AppStore";
SBApplicationStateKey = 2;
SBApplicationStateProcessIDKey = 5868;
SBMostElevatedStateForProcessID = 2;
}: null
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownloadManager _handleMessage:fromServerConnection:]: 0xe6920b0: 0xe007040
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownloadManager _handleDownloadStatesChanged:]: 0xe6920b0
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownloadManager _copyDownloads]
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownload persistentIdentifier]
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownload _addCachedPropertyValues:]: {
I = SSDownloadPhaseDownloading;
}
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownload _applyPhase:toStatus:]: SSDownloadPhaseDownloading: <SSDownloadStatus: 0xe6b8e80>
Jan 21 11:12:59 unknown SpringBoard[5706] <Warning>: [itrace]: [105d7000]: [SSDownloadQueue downloadManager:downloadStatesDidChange:]: <SSDownloadManager: 0x41ea60>: (
"<SSDownload: 0xe6bd970>: -4085275246093726486"
)
<!-- itrace -->
🍰 Trace objc method call for ios and mac http://www.tboox.org
devzkndeMacBook-Pro:.git devzkn$ scp -r /Users/devzkn/Downloads/iTracer usb2222:/Library/MobileSubstrate/DynamicLibraries
lrwxr-xr-x 1 root wheel 36 Sep 3 2017 /Library/MobileSubstrate/DynamicLibraries -> /var/stash/_.UmC91h/DynamicLibraries/
<!-- /Library/MobileSubstrate/DynamicLibraries -->
再比如 我 trace iTunes-U的 一些log:
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore init]
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore activeAccount]
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore _reloadAccountsIfNeeded]
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore _setAccounts:]: (
"<SSAccount: 0x1108d780>: (1096041240, xxxxxx@gmail.com)",
"<SSAccount: 0x11091c40>: (1264698560, xxxxxx@gmail.com)"
)
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore activeAccount]
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore _reloadAccountsIfNeeded]
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore activeAccount]
Dec 11 11:03:56 unknown iTunesU[3393] <Warning>: [iTracer]: [SSAccountStore _reloadAccountsIfNeeded]
Dec 11 11:03:57 unknown wifid[22] <Error>: WiFi:[376887837.256361]: Client itunesstored is background application
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManager _loadDownloadKindsUsingNetwork]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManager _copyDownloadKindsUsingNetwork]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManager _sendObserverConnection]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManagerOptions downloadKinds]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManager _newOptionsDictionary]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManagerOptions persistenceIdentifier]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManagerOptions shouldFilterExternalOriginatedDownloads]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManagerOptions prefetchedDownloadProperties]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManagerOptions prefetchedDownloadExternalProperties]
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManager _handleMessage:fromServerConnection:]: <type(^v)>: <type(^{_xpc_connection_s=})>
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManagerOptions downloadKinds]
>
Dec 11 11:03:57 unknown iTunesU[3393] <Warning>: [iTracer]: [SSDownloadManager _handleMessage:fromServerConnection:]: <type(^v)>: <type(^{_xpc_connection_s=})>
Dec 11 11:04:00 unknown iTunesU[3393] <Warning>: [iTracer]: [SSSoftwareUpdatesRequest handleFinishResponse:error:]: {
0 = "238CA706-D2B3-4B99-9CDE-7589471CBF4E";
2 = (
{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/rocketd</string>
</array>
<key>OnDemand</key>
<true/>
<key>UserName</key>
<string>mobile</string>
<key>MachServices</key>
<dict>
<key>com.rpetrich.rocketbootstrapd</key>
<true/>
</dict>
<key>Label</key>
<string>com.rpetrich.rocketbootstrapd</string>
<key>JetsamProperties</key>
<dict>
<key>JetsamPriority</key>
<integer>18</integer>
</dict>
</dict>
</plist>
转载请注明:张坤楠的博客 > com.rpetrich.rocketbootstrapd
在操作过程或者文章有问题的话欢迎在 原文 里提问或指正。