在Wind下面有很多有关blackberry的软件。可是在L下面没有找到几个可以用的。所以在这里也介绍一下。有关在Linux下使用软件。下面的信息来自。
首先,我们需要的软件有如下一些:
app-pda/msynctool # 用于同步
app-pda/libopensync-0.22 # 同步需要的 lib 包
app-pda/libopensync-plugin-evolution2 # 用于同步通讯录,日历,任务。
app-pda/libopensync-plugin-sunbird # 用于同步日历
上 面五个软件,后四个可以直接安装 Portage 里面的,至于第一个 barry , Portage 不但只有0.11版本,而且里面的 ebuild 写得实在是很烂,完全没有把 barry 的功能展现出来,个人建议下载最新的 0.12 版本来编译安装,或者可以自己用 Portage 里的 ebuild 拿出来改改放到自己的 overlay 里再装。
安装 barry
$ cd barry-0.12
$ ./configure –enable-opensync-plugin –with-boost=/usr –enable-gui
# 第一个参数是打开 opensync 支持,需先安装 libopensync,会有依赖。
# 第二个参数是指定 boost path,不加入它就没办法把备份的东西导出成文件。
# 第三个参数是安装 gui 界面,我个人是没有加这个参数,因为依赖实在太多了,有装了的朋友可以反馈一下。
# 这三个参数 Portage 里的 barry-0.11.ebuild 都没有,装出来基本就不能用,所以最好单独编译安装,不要装 Portage 里的。
$ make
$ sudo make install
这里我只说了关键的几个依赖,如果 configure 不成功,可以到 barry 的官网上看看它的依赖。
软件都安装好之后,首先我们来完成第一步,充电。
其实只要你装好 barry 之后,再把 BB 连接到电脑上后,BB 一般会提示如下一个警告,不过直接别理它,看你的 BB ,是不是已经开始充电了啊。
如果你还是不放心,可以执行命令 bcharge 看看,提示你已经在工作了,这下放心了吧。
Found device #012…already at 500mA…already in desired Pearl mode…no change
第二步,我们可以用命令来看看电脑是否识别出了 BB 。
输出类似下面的结果就表示你的 BB 被识别出来了。
Device ID: 0xXXXXXXX. PIN: YYYYYYYY, Description: RIM 8300 Series Colour GPRS Handheld
# 0xXXXXXXX 和 YYYYYYYY 分别对应 BB 的 Device ID 和 PIN 码
第三步干嘛呢?看看数据库吧
Database: 0×0 ‘Location Based Services’ (records: 0)
Database: 0×1 ‘AutoText’ (records: 108)
Database: 0×2 ‘AutoText Data Version’ (records: 1)
Database: 0×3 ‘Pinyin IM options’ (records: 1)
Database: 0×4 ‘Pinyin Learning Data’ (records: 1)
Database: 0×5 ‘Trusted Key Store’ (records: 41)
Database: 0×6 ‘Handheld Configuration’ (records: 0)
Database: 0×7 ‘Handheld Agent’ (records: 209)
Database: 0×8 ‘Service Book’ (records: 0)
Database: 0×9 ‘Time Zones’ (records: 85)
Database: 0xa ‘PGP Key Store’ (records: 0)
Database: 0xb ‘Default Service Selector’ (records: 3)
Database: 0xc ‘Handheld Key Store’ (records: 41)
Database: 0xd ‘KeyStoreManager’ (records: 1)
Database: 0xe ‘Policy’ (records: 1)
Database: 0xf ‘Device Options’ (records: 0)
Database: 0×10 ‘Options’ (records: 13)
Database: 0×11 ‘Key Store Options’ (records: 1)
Database: 0×12 ‘TLS Options’ (records: 1)
Database: 0×13 ‘Certificate Options’ (records: 0)
Database: 0×14 ‘Smart Card Options’ (records: 1)
Database: 0×15 ‘Random Pool’ (records: 1)
Database: 0×16 ‘RMS Databases’ (records: 5)
Database: 0×17 ‘WTLS Options’ (records: 1)
Database: 0×18 ‘Firewall Options’ (records: 1)
Database: 0×19 ‘Content Store’ (records: 35)
Database: 0x1a ‘Application Permissions’ (records: 5)
Database: 0x1b ‘ChCustomWordsCollection’ (records: 157)
Database: 0x1c ‘CustomWordsCollection’ (records: 0)
Database: 0x1d ‘Input Method Switcher Option’ (records: 1)
Database: 0x1e ‘MemoPad Options’ (records: 1)
Database: 0x1f ‘Memos’ (records: 1)
Database: 0×20 ‘Browser Bookmarks’ (records: 0)
Database: 0×21 ‘Browser Messages’ (records: 0)
Database: 0×22 ‘Browser Data Cache’ (records: 0)
Database: 0×23 ‘Browser Channels’ (records: 0)
Database: 0×24 ‘Browser Folders’ (records: 2)
Database: 0×25 ‘Setup Wizard Options’ (records: 1)
Database: 0×26 ‘File Explorer Options’ (records: 1)
Database: 0×27 ‘Browser Options’ (records: 1)
Database: 0×28 ‘WAP Push Messages’ (records: 0)
Database: 0×29 ‘Browser Urls’ (records: 0)
Database: 0x2a ‘Memory Cleaner Options’ (records: 1)
Database: 0x2b ‘Profiles Options’ (records: 1)
Database: 0x2c ‘Profiles’ (records: 6)
Database: 0x2d ‘Bluetooth Options’ (records: 1)
Database: 0x2e ‘Categories’ (records: 2)
Database: 0x2f ‘Message List Options’ (records: 1)
Database: 0×30 ‘Searches’ (records: 6)
Database: 0×31 ‘Calendar Options’ (records: 1)
Database: 0×32 ‘Address Book Options’ (records: 1)
Database: 0×33 ‘Voice Activated Dialing Options’ (records: 1)
Database: 0×34 ‘Address Book’ (records: 91)
Database: 0×35 ‘Alarm Options’ (records: 1)
Database: 0×36 ‘Messages’ (records: 0)
Database: 0×37 ‘PIN Messages’ (records: 0)
Database: 0×38 ‘Saved Email Messages’ (records: 0)
Database: 0×39 ‘Calendar’ (records: 4)
Database: 0x3a ‘Phone Options’ (records: 1)
Database: 0x3b ‘Folder Id’ (records: 1)
Database: 0x3c ‘Folders’ (records: 0)
Database: 0x3d ‘Purged Messages’ (records: 0)
Database: 0x3e ‘Recipient Cache’ (records: 1)
Database: 0x3f ‘Theme Settings’ (records: 1)
Database: 0×40 ‘SMS Messages’ (records: 234)
Database: 0×41 ‘Phone Call Logs’ (records: 16)
Database: 0×42 ‘Phone Hotlist’ (records:
Database: 0×43 ‘Attachment Options’ (records: 1)
Database: 0×44 ‘Tasks Options’ (records: 1)
Database: 0×45 ‘Attachment Data’ (records: 0)
Database: 0×46 ‘Tasks’ (records: 13)
Database: 0×47 ‘MMS Options’ (records: 1)
Database: 0×48 ‘Browser Push Options’ (records: 1)
Database: 0×49 ‘MMS Messages’ (records: 0)
Database: 0x4a ‘Camera Options’ (records: 1)
Database: 0x4b ‘BlackBerry Messenger’ (records: 1)
Database: 0x4c ‘Map Locations’ (records: 0)
Database: 0x4d ‘MDS Applications & Data’ (records: 0)
Database: 0x4e ‘Quick Contacts’ (records: 1)
用过 Windows 下 BB 官方的 DM 的朋友看到这些应该不陌生吧。
第四步,最重要的了,备份。(老实说,我在这里出了一些问题,还没解决,不过我觉得方法是对的,发上来也可以有更多的朋友来研究一下。)
example:
用此命令就可以导出 Database Address Book 为文件 address.backup 。
不 过我这里有个严重问题未解决,在第三步的时候,可以看到读取数据库的时候可以看到 Database: 0×34 ‘Address Book’ (records: 91) ,记录是 91 条,可是轮到 -d 备份的时候,会发现 Store counted 0 records. 这个问题未解决,其实就等于备份没成功,不过我还是把这个日志发上来,我觉得命令是没错的,至于为什么在备份的时候记录会为 0 ,没想通。
备份基本上就是这样了, btool 的其他参数可以 man 一下看看。
下面来说说同步。
app-pda/libopensync-0.22
app-pda/libopensync-plugin-evolution2
app-pda/libopensync-plugin-sunbird
这 四个包,很明显,后面两个包要依赖 evolution2 和 sunbird ,一个跟通讯录(Address),任务(Tasks)有关,一个跟日历(Calendar)有关。同步日历,其实用 evo 也可以,而且还可以装 app-pda/libopensync-plugin-google-calendar 来和 google-calendar 同步,不过我不用这个,有用 google-calendar 的朋友可以试试。
关于 msynctool 的用法,可以 man 查看,十分简单。
1. 建立一个组。
2. 把 barry-sync 、sunbird-sync 、 evo2-sync 三个 member 加入 BlackBerry 这个 group。
$ sudo msynctool –addmember BlackBerry sunbird-sync
$ sudo msynctool –addmember BlackBerry evo2-sync
3. 可以查看一下是否添加准确
4. 编辑配置文件。
# Comments are preceded by a ‘#’ mark at the beginning of a line.
# The config format is a set of lines of .
#
# Keywords available:
#
# DebugMode - If present, verbose USB debug output will be enabled
#
# Device – If present, it is followed by the following values:
# PIN number - PIN number of the device to sync with (in hex)
# sync calendar – 1 to sync calendar, 0 to skip
# sync contacts – 1 to sync contacts, 0 to skip
#
#DebugMode
Device XXXXXXXX 1 1
# 注意上面的 XXXXXXXX 代表你的 PIN 码, 别再问 PIN 码在哪里哦?我会抓狂的。
# 后面的两个 1 代表什么,上面的注释已经有了,自己看吧。
配置 sunbird-sync 、evo2-sync ,略……………………
(别丢鸡蛋哦,人懒,没办法,重复第4步吧。多看看帮助,有益身心啊。)
对 了,这里提示一下,其实 msynctool 这个命令是可以不用 sudo 执行的,但是这里我还是用了 sudo ,所以配置文件都到 /root 下去了,这是因为连接 BB 必须要有 root 权限,所以不得已,只要 sudo 了 msynctool 这个命令,要想研究的,看配置文件就去 /root/.opensync 下去看吧。
5.同步。
看到类似下面的东东,哈哈,成功了吧。
Member 2 of type sunbird-sync just connected
Member 1 of type barry-sync just connected
All clients connected or error
Member 2 of type sunbird-sync just sent all changes
Received an entry calendar-4 with data of size 4 from member 1 (barry-sync). Changetype ADDED
Member 1 of type barry-sync just sent all changes
All clients sent changes or error
All conflicts have been reported
Sent an entry calendar-4 of size 234 to member 2 (sunbird-sync). Changetype ADDED
Member 1 of type barry-sync committed all changes.
Member 2 of type sunbird-sync committed all changes.
All clients have written
Member 2 of type sunbird-sync just disconnected
Member 1 of type barry-sync just disconnected
All clients have disconnected
The sync was successful
OK,差不多了,就写到这里了,不容易写一篇这么长的文章啊,大家顶一顶啊。
对了,备份其实还是有问题,各位 BB 的 Linux fans 再看看,有条件的 configure barry 的时候 enable-gui 看看,gui 工具应该好用一些吧,不过我看着那依赖就怕,有兄弟试了上来报告一下啊。
参考:
http://www.linux.com/feature/123251
http://www.opensync.org
http://www.netdirect.ca/software/packages/barry/
来自:http://www.oceanboo.cn/read.php/264.htm
原创文章,转载请注明: 转载自PT Ubuntu Blog