访问iPhone SMS文件 [英] Accessing the iPhone SMS file

查看:485
本文介绍了访问iPhone SMS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在xcode中访问sms db文件但是失败了。
我知道它的路径是/private/var/mobile/Library/SMS/sms.db
当我尝试访问时。文件读取没有发生权限错误。

I try to access sms db file in xcode but fail. I know its path that is "/private/var/mobile/Library/SMS/sms.db" When i try to access. the file read no permission error occur.

是否可以访问sms db文件或更改其在xcode中的权限。提前致谢。
我在iphone jailbroken上试用的代码是

Is any way to access sms db file or change its permission in xcode. Thanks in advance. The code which i try on iphone jailbroken is

NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *path = @"/var/mobile/Library/SMS/sms.db";
NSError *error;
NSArray *content = [fileManager contentsOfDirectoryAtPath:path error:&error];
NSLog(@"%@", error);
NSLog(@"Content: %@", content);
if ([fileManager isReadableFileAtPath:path]) {
    NSLog(@"");
    NSLog(@"ReadAble");
}
else {
    NSLog(@"Not readable");
}
if ([fileManager fileExistsAtPath:path])
    NSLog(@"File Exist");
else
NSLog(@"No");

当我尝试call_history.db文件时。它是可访问的。但是sms.db没有。

further when i try to call_history.db file . it is accessible. but sms.db not.

推荐答案

不,目前没有办法在iOS库存上这样做。它受到框架本身的限制,因此不可能实现。

No, there is currently no way to do so on stock iOS. It is restricted by the framework itself, and thus not possible as it is.

在越狱的iPhone上这是可能的,但它可能只适用于同一个越狱相同的版本。

On a jailbroken iPhone this is possible, but it will perhaps only work on the same jailbreak of the very same version.

编辑:
另一个不会传递给AppStore的解决方案是在iOS中找到一些可利用的漏洞(必须在你的应用程序中获得root访问权限,了解如何完成越狱。然后,您就可以在非越狱的iPhone上访问您想要的数据。但它可能只适用于您开发它的版本。

One other solution, which won't pass to AppStore, is to find some exploitable bug in the iOS (there must be a lot, check out how jailbreaks are done) to gain root access in your app. Then you would be able to access the data you want on a non-jailbroken iPhone. But it will probably only work on the version on which you developed it.

这篇关于访问iPhone SMS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆