9

In Android, if you have root, you can access a folder /data/data/<package name>

In this folder you can find databases or other files for your project.

Is this folder available on iOS if you have Jailbreak?

I did find some root explorers for iOS but I was not able to find that folder.

Nate
  • 31,017
  • 13
  • 83
  • 207
Andrei Ciuca
  • 165
  • 1
  • 3
  • 17

4 Answers4

12

Android and iOS are completely different operating systems, so you shouldn't expect them to have the same file system layout.

In iOS, typically, apps store their data in a folder named Documents, that is saved in a location next to where the app itself is installed (†).

For example, for 3rd-party (App Store) apps, the app is installed under /var/mobile/Applications/ (†) and then a folder that's named with a unique identifier string. Under that folder, you will find the app at MyAppName.app. On the same level, you'll see a Documents folder, that is automatically created for you. So, a complete folder hierarchy might look like this:

iPhone5:/var/mobile/Applications root# find . -name Netflix.app
./882F75CD-F42D-4532-8C77-D0992192606B/Netflix.app
iPhone5:/var/mobile/Applications root# cd ./882F75CD-F42D-4532-8C77-D0992192606B/
iPhone5:/var/mobile/Applications/882F75CD-F42D-4532-8C77-D0992192606B root# ls
Documents/  Library/  Netflix.app/  StoreKit/  iTunesArtwork  iTunesMetadata.plist  tmp/

It is important to note that you do not need a jailbroken phone to access this folder. You can install a tool like iBrowse on your computer, and use that to browse the Documents folder of your 3rd-party apps.

enter image description here However, if you want to be able to browse any folder on the filesystem, you would have to jailbreak the phone, and then could use iBrowse, or just ssh, to get into wherever you like.

Another note is that if you are building a "system" application for a jailbroken device, that will be installed under /Applications/, instead of /var/mobile/Applications/ (†), then you actually do need to manually create a documents folder for your app. See this tutorial for more about that (see bottom of page), or read this answer.

Update (†)

In recent versions of iOS (8+, I believe), the 3rd-party data folders have moved. What was in /var/mobile/Applications/ is now under /var/mobile/Containers/Data/Application/. App bundles and their data/documents folders have been separated on the filesystem.

Community
  • 1
  • 1
Nate
  • 31,017
  • 13
  • 83
  • 207
  • 1
    Note that the unique identifier string of your app which is part of the folder path changes every time the app is installed or updated. So if you're saving file system paths of files you create in a SQLite DB or something similar, make sure you don't store the full absolute path to those files. – alsed42 Oct 11 '19 at 14:48
0

iOS apps store data locally in different ways like plist(similar to shared_pref in android), NSUserDefaults, Core data(sqlite), Keychain.

Theses files can be found using any file explorer utility under the application folder.

Shree Harsha S
  • 665
  • 7
  • 14
0

Is this folder available on iOS if you have Jailbreak?

yes. Actually:

  • if no jailbreak: you could still check it using some file browser tool, like iBrowse
  • if jailbreak: you can find the app folder more easily
    • using many tools
      • eg
        • ls after ssh
        • GUI file manage tool
          • Chinese 爱思助手
          • Filza
          • iFile

eg:

  • Chinese app 抖音 (package id: com.ss.iphone.ugc.Aweme)'s data folder
    • /private/var/mobile/Containers/Data/Application
      • 6A9AE298-87E8-4C94-8F85-863CA0904022
        • screenshot
        • folder structure
          • Documents/
            • screenshot
              • folder structure
                • Aweme.db
                • AwemeIM.db
          • Library/
          • StoreKit/
          • SystemData/
          • tmp/
    • /private/var/containers/Bundle/Application/F4E9C01C-9B7F-492F-A024-5045F5C26D4C
      • screenshot
      • folder structure
        • Aweme.app
          • Aweme
        • BundleMetadata.plist
crifan
  • 12,947
  • 1
  • 71
  • 56
-3

No, that folder doesn't exist by default under iOS unless you (or somebody else) created it.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215