|Home » Learning Curve » Developers Workshop
iPhone OS X System Architecture
A first look.
The OSX86 people have published preliminary information on iPhone system architecture. This is a first look.
- It's not Carbon but it is - a bit. Although Carbon doesn't seem supported there are vestiges of the 'beige box' inside the device's 'OS X'. The file system used is HFS.
/sbin/fsck_hfsNeither of the above 'fstyp' files are part of the standard Darwin/FreeBSD distribution. Other Unix distros have fstyp but fstyp_hfs is an Apple original.
PkgInfo is still found in Cocoa bundles even though it's not necessary for Cocoa. [The same eight bytes are already found in Info.plist.]
- New optimised Cocoa bundle architecture. Basically the bundle subdirectory Contents is eliminated. This cannot be done with existing Tiger bundles: the launcher won't find things unless it's rewritten so this is a comprehensive change (and improvement). The idea seems to be to conserve disk space - a directory with a single entry still takes 4 KB on disk - but it's counteracted by the continued existence of PkgInfo which is not needed. But every little helps.
- SpringBoard replaces Finder. SpringBoard seems to be used to launch applications. Several crash dumps cite the SpringBoard process as the parent process.
- A minimum of kernel extensions. To wit: AppleMultitouchSPI, IOHIDFamily, IOUSBDeviceFamily, L2TP, and PPTP. The latter two seem to be about private networking.
- Meagre bin. /bin has a single file: launchctl. This in contrast to the Tiger setup with 38 files.
- Device files. According to the OSX86 list this directory is empty. Stay tuned.
- Not much 'et cetera'. /etc is sparse as well. Has bluetool and racoon subdirectories, a master.passwd file, the passwd program, ttys, services, group, hosts, networks, and ppp. There is no shadowed password storage.
- Log files. Four files in /var/log: lastlog, ppp, sa, and wtmp.
- Root config but no user config. /var/root has the customary .GlobalPreferences.plist in Library/Preferences but there's no evidence of other preferences files in user account locations or of /Users or of user 'home areas'.
- Meagre sbin. Even /sbin is dieted down: fsck, fsck_hfs, fstyp, fstyp_hfs, kextload, launchd, mount, mount_hfs. This in contrast to the Tiger setup with 61 files.
- Lots of usr. A lot more here because this is a hive for both binaries and libraries. It also contains a share hive with countless zoneinfo files. There's only one file in /usr/bin (simulatecrash) as opposed to 734 on Tiger; there are 60 dynamic libraries in /usr/lib in addition to the dynamic loader; and libexec has BackupAgent, CrashReportCopyAgent, crashdump, crashreporterd; /usr/sbin has 15 binaries (as opposed to 197 on Tiger) including mDNSResponder (which can't even be used at the moment) as well as what appears to be the periodic 'daily' script, a config daemon, a VPN daemon, the syslog daemon, and system_profiler. zoneinfo's a monster with 663 items.
- Private frameworks. Five in number: AppleJPEG, Bom, CrashReporterSupport, SPSupport, and vmutils.
- Internet plugins. Only one: QuickTime.
- Launch daemons. BTServer, CommCenter, configd, coreaudiod, crashreporterd, daily, DumpPanic, iapd, mDNSResponder, mobile.lockdown, notifyd, SpringBoard, syslogd, update, usbptpd.
- Preferences bundles. AirPort, Bluetooth, Carrier, EDGE, iPod, MobileCal, MobileMail, MobilePhone, MobileSafari, MobileSlideShow, VPNPreferences, Wallpaper.
- Applications. Calculator, DemoApp, FieldTest, Maps, MobileCal, MobileMail, MobileMusicPlayer, MobileNotes, MobilePhone, MobileSMS, MobileSafari, MobileSlideShow, MobileTimer, Preferences, Stocks, Weather, YouTube. All Cocoa bundles.
- No TIFF or ICNS files. Not in the entire system. But over 1,000 PNGs instead. Including Default_CARRIER_ATT.png, Default_CARRIER_CINGULAR.png, Default_CARRIER_TMOBILE.png, and Default_CARRIER_VODAFONE.png. [Yes. In the SpringBoard bundle. Time to go figure.]
- TrueType exclusively. 45 fonts.
- GradientFill.png in UIKit. Even though this can be done programmatically they've evidently resorted to an image dependent algorithm.
- There are 15 'UIButtonBarGarbageClose' and 15 'UIButtonBarGarbageOpen' image files in UIKit. Fancy trash disposal? The framework smacks of fancy effects not yet integrated into Cocoa classes programmatically or otherwise. There are obviously more economical ways to both store and fetch application images; the question is why they're not using them as they're so aware of the severely limited secondary storage.
- 32 AIFF files.
- mDNSResponder.bundle is essentially empty.
- Weather.app seems to work through Accuweather like the Tiger widget. It has 60 PNGs for depicting wind conditions, 131 PNG image files all told including two for Yahoo.
- The (system) preferences app has categories for Brightness, Date & Time, General, Keyboard, Localizable, Network, Passcode Lock, Reset, Settings, Sounds, Touch, Usage Statistics, and Volume Limit. It also contains a disclaimer in HTML format. [Contents as yet unknown.]
- There is neither a su nor a sudo meaning the system is built with presumably no need for privilege escalation. Meaning the iPhone user is presumably already running as root.
First off, thank you for clicking the link