tags:

views:

258

answers:

1

Hello!

I would like to make an app that will manage some files on jailbroken devices like SMS, Notes .db, but I have problems with accessing such files. I've also made just to test my skills, similar application like your file manager and I could browse almost whole file system and access everything except some folders in /var/mobile/Library/. I get a list of contents of /var/mobile/Library but I get nothing in subdirectories like /var/mobile/Library/Notes/, /var/mobile/Library/SBSettings/, and btw what is most important in my case: /var/mobile/Library/SMS/ or /Notes/ displays nothing. Of course when I browse my device by SSH using Fugu I got everything and have access to everything (like chmod i.e.)

I would be great if you please give me some advices or source code what should I do to have, I guess the root's privileges, not only to access those files, but also change their permissions and names. I know how to make such operations using typically NSFileManager, but not on files from the directories above like /.../SMS/.

I've never developed an application that strictly need jailbroken device to perform the given tasks. I believe I will need some extra libraries? Is it true? Can I use Xcode or there is something else to develop such apps.

I would be very grateful!

A: 

Even when jailbroken, applications installed via Xcode or the App Store are still sandboxed. To get read-only access to the entire filesystem, an application has to be installed in /Applications/ instead of /var/mobile/Applications/. To get write access to the entire filesystem, the application would additionally have to be owned by root and be flagged with the setuid mode

rpetrich
Yes, but I'm not ging to distribute it in App Store but in Cydia only. So what do I have to do to make my App be owned by root and in setuid mode?
Kris
Upload your application to /Applications/ and then "chmod 6777 /Applications/YourApp.app/YourApp" and "chown root:admin /Applications/YourApp.app/YourApp" from SSH. Note: very few applications require root; bugs in your application could cause the device to be unbootable without a restore
rpetrich