access to sms.db inside objective-c app (jailbrak iphone 2.2)
I'm developing a multilanguage SMS talker program. I've just porting multilanguage espeak TTS (text to speech) library to iphone.
I'll try to access to SMS.db to read sms (only read mode) inside my application (jailbreak Iphone 2.2).
I'm using sqlite3 library to access to SMS.db. To test my app I was copyed (by ssh access) sms.db in a bundle “documents” directory and then i can access sucesfully to the DB.
But, when I try to access direct to /var/mobile/Library/SMS/sms.db to open DB it could be not possible, because sqlite3_open return not OK !!?? (insuffcients permissions !?)
NSString *path = @”/var/mobile/Library/SMS/sms.db”;
// Open the database. The database was prepared outside the application.
if (sqlite3_open([path UTF8String], &database) == SQLITE_OK
Inside my application I had try, at startup, to copy sms.db in a bundle directory, and then access locally to it, but Filesystem “copy” operations return error to open original file….
In a jailbreak 2.2 iPhone is it possible execute inside an objective-c app a system Script or a system command as: cp, mv, etc with root credential?
Please help me!