iOS underlying basics-file directory structure

Source: Internet
Author: User

One: iOS sandbox knowledge

For security reasons, the iOS system puts each application and data into a sandbox, and the app can access only the files in its sandbox directory, network resources, etc. (with exceptions such as system contacts, cameras, photos, etc. that can be accessed by third-party apps if the user authorizes them)

1:myapp.app
The directory contains the data of the application itself, the resource files and some local files are stored in this directory when the program is packaged. The executable program and the plist file of the program are also in this directory.
This directory will not be synced by itunes

2:documents

Use this directory to save critical data. Key data refers to data that is not renewable for the application.

This directory will be synced by itunes

3:library

Used to save some configuration files and some other files. Settings data written using Nsuserdefaults are saved to a plist file in the Library/preferences directory. Library/caches can be used to store renewable data, such as network requests, and the user is responsible for deleting the corresponding files.
This directory (except Library/caches) will be synced by itunes

4:tmp
Use this directory to save temporary files that are no longer needed for the next launch of various applications. When the application no longer needs these files, you need to proactively delete them. (The system may empty this directory when the app is no longer running.) )
This directory will not be synced by itunes

the way to get the primary directory path sandbox directory NSLog (@"%@", Nshomedirectory ()); Myapp.appnslog (@"%@", [[NSBundle Mainbundle] bundlepath]); Tmpnslog (@"%@", Nstemporarydirectory ());D Ocumentsnsarray*paths =nssearchpathfordirectoriesindomains (NSDocumentDirectory, Nsuserdomainmask, YES); NSString*docpath = [Paths Objectatindex:0]; NSLog (@"%@", DocPath); Librarynsarray*paths =nssearchpathfordirectoriesindomains (Nslibrarydirectory, Nsuserdomainmask, YES); NSString*libpath = [Paths Objectatindex:0]; NSLog (@"%@", LibPath);

II:iPhone file directory Description:

1, "/applications"

installation directory of common software

2. "/private/var/mobile/media/iphone video Recorder"

iphone video Recorder video file storage directory

3, "/private/var/mobile/media/dcim"

Photo file storage directory for camera

4, "/private/var/mobile/media/itunes_control/music"

itunes uploaded multimedia files (such as MP3, MP4, etc.) are stored in the directory, the file has not been modified, but the file name has been modified, directly downloaded to the computer can be read.

5, "/private/var/root/media/ebooks"

Panda Book Storage Directory

6, "/library/ringtones"

The system comes with the call ringtone storage directory (using itunes to convert the file to ACC file, the suffix name to. m4r, with Iphone_pc_suite to/library/ringtones)

7, "/system/library/audio/uisounds"

SMS Note Other system default effect ringtones (m4r ringtone file extension. caf) SMS ringtone file named sms-received beginning with CAF file

8, "/private/var/mobile/library/addressbook"

Storage directory of the system phone book

"/private/var/mobile/library/sms"

SMS Storage Directory

9, "/private/var/mobile/media/iphone Recorder"

iphone recorder recording software file storage directory

10, "/applications/preferences.app/zh_cn.lproj"

Chinese and English file storage directory for software Preferences.app

11, "/library/wallpaper"

System Q1ang Paper Storage Directory

12, "/system/library/audio/uisounds"

Storage directory for System sound files

13, "/PRIVATE/VAR/ROOT/MEDIA/PXL"

Ibrickr a database built by the upload installer, which is estimated to be similar to the uninstall record for Windows.

14, "/bin"

Similar to the Linux system, it is the directory where the system executes instructions.

15, "/private/var/mobile/library/sms"

System SMS Storage Directory

16, "/private/var/run"

Temporary directory where the system process runs? (see here to see all the processes started by the system)

17, "/private/var/logs/crashreporter"

System error Log Report

Special Icon Storage Directory Description:

Charging icon:

System/library/coreservices/springboard.app/batterybg_1.png until Batterybg_17.png, Batteryfill.png

18 Icons for charging icons

Phone signal icon:

Systemlibrarycoreservicesspringboard.app down default_0_bars.png until Default_5_bars.png and fso_0_bars.png--fso_5_ Bars.png

10 Icons for signal icons

WiFi signal icon:

SystemLibraryCoreServicesSpringBoard.appDefault_0_AirPort.png---default_3_airport.png and fso_0_airport.png---fso_ 3_airport.png

8 Icons for WiFi signal icon

Edge signal icon:

Systemlibrarycoreservicesspringboard.app Default_edge_on.png and Fso_edge_on.png

2 Icons for edge signal

Date Landscaping Icons:

systemlibrarycoreservicesspringboard.app| Fso_lockicon.png

Standby player icon:

Systemlibrarycoreservicesspringboard.app|nexttrack.png, Pause.png, Play.png, prevtrack.png

4 icons for the stand-by player icon

ipod playback signal icon:

SystemLibraryCoreServicesSpringBoard.appFSO_Play.png, Default_play.png

Alarm signal icon:

SystemLibraryCoreServicesSpringBoard.appDefault_AlarmClock.png, Fso_alarmclock.png

Vibration icon:

SystemLibraryCoreServicesSpringBoard.appsilent.png, Hud.png, ring.png

Slider icon:

Under the Systemlibraryprivateframeworkstelephonyui.framework directory:

Bottombarknobgray.png (Standby unlock slider icon)

Bottombarknobgreen.png (move slide in standby to answer the slider icon)

Bottombarknobred.png (Power off slider icon)

Standby time Font:

/system/library/fonts/cache/lockclock.ttf

Standby time Background:

System/library/frameworks/uikit.framework/other.artwork

The slider text becomes the flash Word:

Systemlibraryprivateframeworkstelephonyui.framework/bottombarlocktextmask.png

To unlock the slider path:

Systemlibraryprivateframeworkstelephonyui.framework/opbarbkgnd.png, Bottombarbkgndlock.png

Slider text path:

/system/library/coreservices/springboard.app/zh_cn.lproj

Move:

The changed color file name is: default_carrier_chinamobile.png

Black and White file name: fso_carrier_chinamobile.png

Unicom:

The changed color file name is: default_carrier_chinaunicom.png

Black and White file name: fso_carrier_chinaunicom.png

An introduction to the IPhone Special files directory:

1. "/private/var/mobile"

The newly finished machine, in this folder to build a documents directory.

2. "/private/var/mobile/applications"

The programs installed through AppStore and itunes are all inside.

3. "/private/var/stash" iPhone4 this one doesn't work.

This folder in the applications directory is all through the Cydia and app installed programs, ringtones directory is all the phone ring, home-made bell sound directly in the inside can be, themes directory is all Winterboard theme, can be manually modified.

4. "/var/mobile/media/roms/gba"

The directory where the Gpsphone simulator holds the ROM.

5. "/var/mobile/media/textreader"

TextReader reading software Read the storage path of the ebook.

6. "/system/library/fonts/cache"

System font directory, the font to be replaced is placed in the directory, the permissions 644 unchanged

7. "/private/var/mobile/media/maps"

Offline map directory, put the map folder in this directory, folder gives 777 permissions

8. "/private/var/mobile/library/downloads"

IPA file storage directory, installed with installous

9. "/private/var/mobile/library/keyboard"

system Pinyin font File location

10. "/var/stash/themes.xxxxxx" iPhone4 this one doesn't work.

Winterboard Theme File Storage path

11. "/private/var/mobile/media/dcim/999apple"

The system comes with a screenshot file storage path

iphone System common folder location

1, "/applications"

installation directory of common software

2. "/private/var/mobile/media/iphone video Recorder"

Video File storage Directory

3, "/private/var/mobile/media/dcim"

Photo file storage directory for camera

4, "/private/var/mobile/media/itunes_control/music"

itunes uploaded multimedia files (such as MP3, MP4, etc.) are stored in the directory, the file has not been modified, but the file name has been modified, directly downloaded to the computer can be read.

5, "/private/var/root/media/ebooks"

e-Book Storage directory

6, "/library/ringtones"

The system comes with the call ringtone storage directory (using itunes to convert the file to ACC file, the suffix name to. m4r, with Iphone_pc_suite to/library/ringtones)

7, "/private/var/mobile/library/addressbook"

The directory where the system phone book is stored.

8, "/private/var/mobile/media/iphone Recorder"

Recording File storage directory

9, "/applications/preferences.app/zh_cn.lproj"

Chinese and English file storage directory for software Preferences.app

10, "/library/wallpaper"

System Q1ang Paper Storage Directory

11, "/system/library/audio/uisounds"

Storage directory for System sound files

12, "/PRIVATE/VAR/ROOT/MEDIA/PXL"

Ibrickr a database built by the upload installer, which is estimated to be similar to the uninstall record for Windows.

13, "/bin"

Similar to the Linux system, it is the directory where the system executes instructions.

14, "/private/var/mobile/library/sms"

System SMS Storage Directory

15, "/private/var/run"

Temporary directory where the system process runs? (see here to see all the processes started by the system)

16, "/private/var/logs/crashreporter"

System error Logging Report

Phone interface

/applications/mobilephone.app/

Data path:

/private/var/mobile/library/addressbook Contact

/private/var/mobile/library/callhistory Call Log

/private/var/mobile/library/sms SMS

/private/var/mobile/library/notes Memorandum

/private/var/mobile/library/safari Safari Browser saved bookmarks, etc.

/private/var/mobile/library/mail Email

/private/var/mobile/media/dcim the film in the photo

/private/var/mobile/media/photos pictures inside the photo

/private/var/mobile/media/videos cycorder camera software capture File save path

/private/var/mobile/library/preferences Com.apple.mobilephone.speeddial.plist personal collection (Phone speed dial)

/private/var/mobile/media/recordings Voice Memo

Process optimization:

The "/system/library/launchdaemon" directory is the ". plist" file. The simplest way to start these processes is to delete the corresponding ". plist" file.

Be sure to back it up before you go! You can create a "backup" directory under "/private/var/" on your iphone or ipod and then cut and store the ". plist" file you want to delete with ifile directly into the "backup" directory, or simply back up the entire "/system/ Library/launchdaemon "Directory!

Processes that can be safely removed:

1. Com.apple.DumpPanic.plist-This is the Apple company used to evaluate the system crashes, and it is completely unnecessary to run.

2. Com.apple.DumpBasebandCrash.plist-This is Apple's use for the Apple baseband crash and no need to run.

3. Reportcrash-There are 5 ". plist" Files with "Reportcrash" that are used to collect information about system or System program crashes

4. Com.apple.CrashHouseKeeping.plist-related to program crashes, can be deleted.

5. Com.apple.powerlog.plist-Used to monitor third-party incompatible chargers, can be deleted.

6. Com.apple.tcpdump.server.plist-Appears to be used to dump network data after deletion without affecting the device.

7.com.apple.chud.chum.plist-This process should be related to Apple's Chud tool (Computer Hardware Protocol Development/computerhardware Understanding Developer). If you're not a software developer, This process should not be started.

8. Com.apple.chud.pilotfish.plist-also a process associated with the Apple Chud tool. If you don't develop Apple software, you can delete this.

1. com.apple.AddressBook.plist-If you do not start this process, your phone's address book will be loaded slightly slower. If you don't mind this, you can delete the process.

2. Com.apple.accessoryd.plist-Do not start this process will disable some of the auxiliary device features, such as: FM radio, iphone charger, AV data cable. Of course, even if this process is disabled, the iphone seat will charge or But it can only have the function of charging.

3. Com.apple.dataaccess.dataaccessd.plist-This process is disabled and cannot be synced through Exchange or Google.

4. Com.apple.datamigrator.plist-The role of this process is to upload contacts from your SIM card to your iphone. There's no need for ipod users to start it. Although I am an iphone, I did not start it because I never saved contacts in the SIM card.

5. Com.apple.racoon.plist-This is the process that vρn needs.

6. Com.apple***leinternetsharing.plist-This is a network sharing feature. ipod users can completely delete. iphone users will see if you need a network share.

7. Com.apple.aggregated.plist-This should be related to "audio input". The first generation of ipods does not require this process at all. The second-generation ipod can be decided according to its own needs. iphone users need this process.

8. Com.apple.AOSNotification.plist-This is used for synchronous mobileme. People who don't mobileme need it at all.

9.com.apple.adminlite.plist-the role of this process is that when a program starts or reacts too long, the iphone or ipod automatically terminates the program (that is, let the program crash), thereby transferring control to your hands. If you don't want to see the program crash all the time, , you can close the process, but the result is that you have to wait a little longer when a program starts or reacts too slowly. In general, it is not recommended to close this process.

Com.saurik.Cydia.Startup.plist-The process that is generated after installing Cydia should be used to perform automatic installation of the Deb software.

Three: iOS system directory

The 1:/applications/directory stores the system app and the app downloaded from Cydia, while the/var/mobile/containers/directory stores the Storeapp.

2:/var/mobile/containers, store Storeapp. It is important to note that the app's executable files are stored in different directories of/var/mobile/containers/bundle and/var/mobile/containers/data, respectively, in bundles and in the app's data directory.

3:/applicatons: Store all system apps and apps from Cydia, not including Storeapp. Such as.

4:/library: Store Some data that provides system support, as shown in the structure diagram. All plugins based on Cydiasubstrate (formerly Mobileesubstrare) are stored under/library/mobilesubstrate.

5:/devalop: If a device is designated as a debug machine after linking Xcode, Xcode generates this directory in iOS, which contains the tools and data needed for debugging, as shown in the directory structure.

One of the most important directories in the 6:/system/library:ios file system, which hosts a large number of system components, as shown in the directory structure.

For this directory, you need to focus on:

    • /system/library/frameworks and/system/library/privateframeworks: Store the various frameworks in iOS.
    • The SpringBoard.app:iOS Desktop Manager in/system/library/coreservices (similar to explore in Windows) is the most important intermediary for users to communicate with the system.

7:/user: User directory, which actually points to/var/mobile, as shown in the directory structure.

    • /VAR/MOBILE/MEDIA/DCIM Storage of photos;

    • /var/mobile/media/recordings storage of audio files;

    • /var/mobile/library/sms stored SMS database;

    • /var/mobile/library/mail storage of mail data;

iOS underlying basics-file directory structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.