简体   繁体   English

如何将短信备份文件(CSV格式)从Android导入到iPhone

[英]How to import SMS backup file(CSV format) took from Android to iPhone

I have a SMS backup(CSV format) file exported from Android where each record is the text message. 我有一个从Android导出的SMS备份(CSV格式)文件,其中每个记录都是短信。 I want this file to be imported to iPhone programmatically. 我希望将此文件以编程方式导入到iPhone。 Could anyone help me how to do this in iOS. 谁能帮助我在iOS中执行此操作。 I'm not getting any resource for doing this so for. 为此,我没有获得任何资源。

Any help is appreciated. 任何帮助表示赞赏。

Recently, I succeeded extracting message records from iPhone backups. 最近,我成功地从iPhone备份中提取了消息记录。 I generally understand the mechanism/design of iPhone backups. 我通常了解iPhone备份的机制/设计。 So I hope I can give you some hints in theory to do it. 因此,我希望理论上可以给您一些提示。

The possible steps: 可能的步骤:

  1. Create a unencrypted backup from iPhone to your OS X devices through iTunes . 通过iTunes从iPhone到OS X设备创建未加密的备份。 But make sure DO NOT check the option "Encrypt iPhone backup" since you are going to update (import your SMS backup) the backup. 但是请确保不要选中“加密iPhone备份”选项,因为您将要更新(导入SMS备份)备份。

  2. Find the backup you just have done. 查找刚刚完成的备份。 My OS X is 10.12.6, the directory is /Users/your user/Library/Application Support/MobileSync/Backup/ 我的OS X是10.12.6,目录是/ Users /您的用户/ Library / Application Support / MobileSync / Backup /

  3. Then, go into the directory Backup/ and find the directory for iPhone Message. 然后,进入目录Backup /并找到iPhone Message的目录。 Mine is /Users/myusername/Library/Application Support/MobileSync/Backup/7aded5a6a493ac0b3c41cc930a5421ca035610b5/3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28 As I known, there is only one directory under Backup/, and the following path "3d/3d0d7e5fb2ce288813306e4d4636395e047a3d28" is all the same for every backup. 我的是/ Users / myusername / Library / Application Support / MobileSync / Backup / 7aded5a6a493ac0b3c41cc930a5421ca035610b5 / 3d / 3d0d7e5fb2ce288813306e4d4636395e047a3d28正如我所知道的,Backup //下有一个目录813d4e4d4e4e3d4e4d3d4d3d4d4d3d4d3d4d3d4d3d4d3d4d3d4d3d4b4b4d3b4c4b4c3b4b4b4b4b4bc3b4bc3bc4bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc 。 So hopefully you will find it without problems. 因此,希望您会发现它没有问题。

  4. The file 3d0d7e5fb2ce288813306e4d4636395e047a3d28 is a SQLite DB. 文件3d0d7e5fb2ce288813306e4d4636395e047a3d28是一个SQLite数据库。 Copy and paste it to somewhere easier to reach for a SQLite visual tool called "DB Browser for SQLite". 将其复制并粘贴到易于使用的SQLite可视工具“ DB Browser for SQLite”中。 (If you prefer using command line just type sqlite to enter and use command ".open 3d0d7e5fb2ce288813306e4d4636395e047a3d28" to enter the DB) (如果您更喜欢使用命令行,只需键入sqlite即可输入并使用命令“ .open 3d0d7e5fb2ce288813306e4d4636395e047a3d28”进入数据库)

  5. After you open 3d0d7e5fb2ce288813306e4d4636395e047a3d28 with SQLite you should see: 使用SQLite打开3d0d7e5fb2ce288813306e4d4636395e047a3d28之后,您应该看到: 在此处输入图片说明 Here are 10 database tables. 这是10个数据库表。 The key tables are message (text, date, handle_id etc.) and handle (contact list). 关键表是消息(文本,日期,handle_id等)和句柄(联系人列表)。

  6. Now it's the time to use your SMS CSV file to import into the SQLite DB. 现在是时候使用您的SMS CSV文件导入SQLite DB了。 To do this, you need the knowledge of inserting data to db from csv files, and the backup database schema by understanding the tables showing in the pic. 为此,您需要具备从csv文件向db插入数据的知识,并需要通过了解图片中显示的表来了解备份数据库架构。

  7. After inserting your SMS CSV file, replace the 3d0d7e5fb2ce288813306e4d4636395e047a3d28 in the iPhone backup. 插入SMS CSV文件后,在iPhone备份中替换3d0d7e5fb2ce288813306e4d4636395e047a3d28。 Finally you can use iTunes to recover your iPhone from this backup. 最后,您可以使用iTunes从此备份中恢复iPhone。

Hope all above will give you some ideas. 希望以上所有内容都能给您一些想法。 Cheers! 干杯!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM