开发者

App with access to directories outside the SandBox. Root access

I'm creating an app for the iPhone (Jailbreak). Said app modifies this directory (among others) "/Ringtones.PQNYRJ/", trying to create a ringtone file. The thing is that I've tried it every possible way and I can't get it to work. I've followed the Cydia's documentation and I've made a file with the same name as the app but with a shell script to execute the binary (renamed with an underscore).

dir=$(dirname "$0")
exec "${dir}"/MyTones_ "$@" 2>>/tmp/MyTones.log

I've set the proper permissions (or so I think)... I've base开发者_如何学JAVAd them off of Cydia.app permissions and all I got back is:

AVAssetExportSessionStatusFailed: Error Domain=NSURLErrorDomain Code=-3000 "Cannot create file" UserInfo=0xa79750 {NSUnderlyingError=0xa79860 "The operation couldn’t be completed. (OSStatus error -12115.)", NSLocalizedDescription=Cannot create file}

Any suggestion?


I don't about the error, but i'll just list everything i did, successfully.

  • chmod the run script to 755 (obvious)

  • chmod the app binary to 4755 and chown to 0:0 (root)

  • Setup the Info.plist to launch the run script, not app binary (again, obvious)

  • Try changing your script to just: (log file not strictly necessary) dir=$(dirname "$0") exec "${dir}"/AppBinary

That's everything i did, and it works perfectly.

Of course, we're talking Jailbroken here, Apple would never allow this in the AppStore.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜