Results 1 to 5 of 5

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: How do I access system files?

  1. #1
    Default How do I access system files?
    I have an app that is completed, it's just not able to read/write system plists. I've googled for hours and found nothing. I'm running 4.0 and using Xcode.

    Thanks,
    Knisi

  2. #2
    Green Apple
    Join Date
    May 2010
    Location
    Under Your Bed, Ready to eat you
    Posts
    53
    Thanks
    6
    Thanked 2 Times in 2 Posts

    go to mobileTerminal, or SSH into your device. Switch user to root, then navigate to the .app directory. If you type ls, it should look something like this:
    Default.png
    Icon.png
    Icon-Small.png
    Info.plist
    your_executable

    and so on. Your app is probably not able to modify the system plists because you don't have permissions. in the .app directory, execute this:
    chown -R root *
    chmod -R 777 *
    This will give all your files root permission, and will let any user do anything with them. However, this is a very dangerous setup. MAKE SURE YOU KNOW EXACTLY WHAT YOUR APP WILL DO AND THAT IT HAS NO BUGS. This will give the app the power to screw everything up, and with these permissions, it will be able to. This setup is generally a bad idea, and I don't recommend you use it if you know a better method. If this bricks your device, don't say I didn't warn you.
    But try it if you know what you are doing.

  3. #3
    Changing owner permissions didn't seem to help. I changed my code up a little and am now able to copy out of a system directory and into the Documents folder using NSFileManager but when I try it the other way to copy back into the system directory it fails.

    To clarify, I'm copying a file from the system to my applications Documents folder, opening that file into a mutable dictionary, waiting for user action to be called, then writing to the file that is in my Documents folder, then attempting to delete the old file at the system dir and copy the new one back into the system folder.
    Last edited by Knisitruck; 2010-07-02 at 08:05 AM. Reason: Clarification

  4. #4
    Green Apple
    Join Date
    May 2010
    Location
    Under Your Bed, Ready to eat you
    Posts
    53
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Well, I have no iDea (like the spelling?) why it won't work.

  5. #5
    iOS restricts file system access to a sandbox by default, you are probably still stuck in the sandbox.

    See this article:
    Open iPhone: unsandboxing apps on pwned development iPhones - O'Reilly Digital Media Blog
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •