If a device is jailbroken, the file system is unlocked and open for you to see and modify. If I wanted to write an app that wrote a file to the /private/var/mobile/Library/Preferences/ folder, do I have to use a command other than [fileManager copyItemAtURL:fileTempPathURL toURL:filePathURL error:NULL];? I’m using this command, but it is not working… Thanks for your help!
If a device is jailbroken, the file system is unlocked and open for you
Share
If you’re on a jailbroken device, you can write to any place in the system. You can do this in many different ways, from the C
FILEpointer to all kinds of iOS Foundation methods, like the one you mentioned in your question.The only thing you’ll have to mind is that your application has to be installed in the
/Applicationsdirectory and not in the~/Applicationsdirectory, what iTunes and Xcode will do by default. Only by putting them in that folder, along with the Apple base applications like MobileSafari, MobileMusicPlayer, etc. your app will launch from the springboard with those root privileges. You can put it in the/Applicationsfolder through SSH.If you do not manually put your app in the root application folder and your app resides in its own subfolder in
~/Applicationslike normal App Store applications do, your app will launch in a sandbox. This sandbox will then prevent you from accessing any file outside your application’s sandbox.