1BIO(1)                      General Commands Manual                     BIO(1)
2
3
4

NAME

6       bio - Barry Input / Output
7

SYNOPSIS

9       bio -i <input type> -o <output type> [-o <output type> ...]
10

DESCRIPTION

12       bio  is  a  command  line  tool  that treats devices, backups, and data
13       streams as input and output.  bio supports the following  types  of  IO
14       (actual type name shown in bold):
15
16
17              device
18
19              tar (backup files)
20
21              boost (serialization files and streams)
22
23              mime streams
24
25              ldif streams
26
27              human readable and hex text dump
28
29              sha1 sum output
30
31              cstore for extracting Content Store records
32
33
34       Each  command  line  consists  of at least one input and output option,
35       along with their switches.  More than one output can be used,  as  long
36       as they do not conflict with each other.  For example, it is not possi‐
37       ble to read and write from the same device PIN.
38
39
40       This tool combines a lot of the functionality of btool, btardump, brec‐
41       sum, and bs11nread, but does it more flexibly, and improves functional‐
42       ity in some cases, such as Boost archives being able  to  contain  more
43       than one database.
44
45

DEVICE TYPE OPTIONS

47       The  device  type  is used to read or write from a device connected via
48       USB.  Some of the options below are valid only in one input  or  output
49       mode, some in both.
50
51       -d db  Name  of  database to load, when using the device type as input.
52              Can be used multiple times.  See btool -t for a  list  of  data‐
53              bases on the device.
54
55       -A     Selects  all  databases  found  on the device, instead of adding
56              them manually via the -d option.
57
58       -p pin PIN of device to talk to.  Valid  for  both  input  and  output.
59              Only  needed  if  you have more than one Blackberry connected at
60              once.
61
62       -P password
63              Simplistic method to specify device password.  In a real  appli‐
64              cation, this would be done using a more secure prompt.
65
66       -w mode
67              Set  write mode when using the device type in output mode.  This
68              must be specified, or nothing will be written.  Can be  one  of:
69              erase, overwrite, addonly, addnew.
70
71
72

TAR TYPE OPTIONS

74       The  tar  type  is  used to read or write from a backup file created by
75       btool or the backup GUI.
76
77       -d db  Name of database to load, when using the tar type as input.  Can
78              be  used  multiple times.  Note that if no -d options are speci‐
79              fied, bio defaults to reading all available databases.
80
81       -f file
82              The tar backup file to read or write from.  Bio uses  gzip  com‐
83              pressed  tar  files,  so  suitable  extensions would be .tgz and
84              .tar.gz.  Unfortunately, due to internal limitations, an  actual
85              file must be specified here, and not - for stdin / stdout.
86
87

BOOST TYPE OPTIONS

89       The  boost  type  is  used  to read and write parsable records in Boost
90       Serialization format.  These files were historically written  and  read
91       by  btool  and bs11nread.  Bio is more flexible, in that it can contain
92       multiple databases in one serialization archive.
93
94       -f file
95              Filename to read from or write to.  Use - to  specify  stdin  or
96              stdout.   If  not  specified  for  input, defaults to stdin, but
97              since output can contain non-ASCII chars, you must use -f  -  if
98              you want to write to stdout.
99
100

LDIF TYPE OPTIONS

102       The  ldif type is used to read or write ldif output, like the output of
103       the LDAP command line tool ldapsearch.
104
105       -c dn  When using ldif as output, specify the base DN.
106
107       -C dnattr
108              Again, for output, specify the attribute name to use when build‐
109              ing the FQDN.
110
111

MIME TYPE OPTIONS

113       The  mime type is used to read or write VCARD, VEVENT, VTODO, or VJOUR‐
114       NAL records based on the Address Book, Calendar, Tasks, or Memos  data‐
115       bases respectively.
116
117       -f file
118              Filename  to  read from or write to.  Defaults to - for stdin or
119              stdout.
120
121

DUMP TYPE OPTIONS

123       The dump type is used only for output, and sends human readable  record
124       data  to  stdout.   Parsable  records  are  parsed; unknown records are
125       dumped in hex format.
126
127       -n     Use hex format for all records.
128
129

SHA1 TYPE OPTIONS

131       The sha1 type is used to mimic the behaviour of  the  brecsum  command.
132       It  calculates  a  SHA1 sum on the raw record data and sends the sum to
133       stdout.
134
135       -t     Include the DB Name, Type, and Unique record ID in the  checksum
136              for each record.
137
138

CSTORE TYPE OPTIONS

140       The cstore type is used to parse Content Store records.
141
142       -l     List  the filenames and folders found in the Content Store data‐
143              base.
144
145       -f file
146              Select a filename from  the  above  list  to  extract  and  save
147              locally.   Specify  the entire path as shown in the -l list.  If
148              the file is found in the device, it will be written to the  cur‐
149              rent  directory, using the base filename as the name.  If a file
150              by that name exists already, the filename will  be  modified  to
151              avoid overwriting local files.
152
153

STANDALONE OPTIONS

155       -h     Displays a detailed summary of command line options.
156
157       -I cs  Set  the  international  charset  for string conversions.  Valid
158              values here are available with iconv --list
159
160       -S     Show list of supported database parsers and builders.
161
162       -v     Dump verbose low level protocol data during USB  operations,  to
163              stdout.
164
165
166
167
168

EXAMPLES

170       1) Backup a full device to tar backup:
171
172              bio -i device -A -o tar -f mybackup.tar.gz
173
174       2) Read a backup file and convert the Address Book to MIME
175
176              bio -i tar -f mybackup.tar.gz -d "Address Book" -o mime
177
178       3) Copy the Calendar from one device to another, and dump
179              the records to stdout in human readable format at the same time
180
181              bio  -i  device -p 3009efe3 -d Calendar -o device -p 204062f3 -w
182              erase -o dump
183
184       4) Read LDIF input and convert the contacts to MIME format
185
186              ldapsearch -x | bio -i ldif -o mime
187
188       5) Test the record code by running the Tasks database through
189              the Boost storage and back to human readable
190
191              bio -i device -d Tasks -o dump
192
193              vs.
194
195              bio -i device -d Tasks -o boost -f - | bio -i boost -f - -o dump
196
197

AUTHOR

199       bio is part of the Barry project.
200

SEE ALSO

202       http://www.netdirect.ca/barry
203
204
205
206
207                               December 21, 2010                        BIO(1)
Impressum