README.md

Mon, 01 Aug 2022 11:29:27 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 01 Aug 2022 11:29:27 +0100
changeset 0
ed346ec34e2a
permissions
-rw-r--r--

Initial commit

0
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 This utility strips NUL bytes from Conversations backup (.ceb) files. For
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 unknown reasons, backups from certain Android versions/devices seem to end up
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 with these erroneous bytes, and then fail to import in the app.
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 ## Usage
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7 ### Run via docker
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 This option works on any system where docker is installed, and does not require
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 anything else to be installed on the host system.
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 ```
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 docker run --rm -v "$PWD:/data" mwild1/fix-ceb-nulls BACKUP_FILE_NAME BACKUP_FILE_PASSWORD
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 ```
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
15
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
16 The *BACKUP_FILE_NAME* should be in the current directory where you run the
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
17 command. The result will also be written to the current directory, with the
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
18 suffix `-fixed.ceb`.
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
19
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
20 ### Run manually
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
21
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
22 The script has a few dependencies, but they shouldn't be too hard to install
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
23 on most systems.
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
24
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
25 Dependencies:
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
26
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
27 - Lua 5.3
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
28 - lua-zlib (luarocks: lua-zlib, Debian/Ubuntu: lua-zlib)
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
29 - luaossl 2022 (luarocks: luaossl, Debian/Ubuntu: lua-luaossl (⚠️ at the time of
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
30 writing this, Debian/Ubuntu do not have the latest version available,
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
31 install via luarocks instead))
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
32
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
33 Run:
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
34
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
35 ```
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
36 lua5.3 fix-ceb-nulls.lua BACKUP_FILE_NAME BACKUP_FILE_PASSWORD
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
37 ```
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
38
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
39 The result will be written to a new file in the same location as the original
ed346ec34e2a Initial commit
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
40 file, but with a `-fixed.ceb` suffix.

mercurial