Skip to content

Latest commit

 

History

History
54 lines (44 loc) · 4.45 KB

README.md

File metadata and controls

54 lines (44 loc) · 4.45 KB

Temporarily lock files and folders on your reMarkable

I often "forget" the time when reading a great book. In the past there was nothing that could be done about that. In the time of e-readers however, we can. Book safe hides the content of one or more folders from the reMarkable UI within a given time period, and adds a pdf that lists what has been blocked. While folders are blocked, the cloud sync is disabled by default. This prevents the sync from treating hidden files as deleted, and from re-uploading them when they re-appear.

Be sure to have a backup of all your documents before you try this!

Even if this code contains zero bugs (we wish) in the future, reMarkable might decide to "clean up" files moved by this application. That would delete any locked files. Note that the reMarkable cloud is not a backup! The reMarkable cloud simply mirrors what is on the device, if it loses your files and it syncs, they will be gone from the cloud too.

Usage

On the reMarkable, run the book-safe binary with one of the following subcommands:

help         Print this message or the help of the given subcommand(s)
install      Create and enable book-safe system service, locking and unlocking at those times. This command requires additional arguments, call it with --help to see them
list-tz      List supported timezones
run          Lock or unlock right now depending on the time
uninstall    Remove book-safe service and unlock all files. This command requires additional arguments, call it with --help to see them
unlock       Unlock all files

The install and run command take additional arguments:

    --allow-sync             Do not block sync when locking books, the sync will delete and re-upload books when locking and unlocking!
-e, --end <END>              When to release folders, format: 23:59
-h, --help                   Print help information
-p, --path <PATH>            Path of a folder to be locked (as seen in the ui), pass multiple times to block multiple folders
-s, --start <START>          When to hide folders, format: 23:59
-z, --timezone <TIMEZONE>    Timezone, needed as remarkable resets the device's timezone to UTC on every update

Example: set up the book-safe service to lock the folders Books and hobby (which is inside the Articles folder), between 11pm and 8am:

book-safe install --start 23:00 --end 8:00 --path Books --path Articles/hobby --timezone Europe/Amsterdam

Safety

No data is ever removed or copied to ensure data integrity if the tablet unexpectedly shuts down. To hide folders in the GUI, their content is moved to a different directory. The GUI app that runs the reMarkable interface is shut down during the moving of files. This is the only way to be sure the reMarkable GUI does not disrupt the move.

The cloud sync is disabled while files are blocked, unless Book safe is installed with the --allow-sync flag. If the cloud sync is not disabled, all blocked files will be deleted from and re-uploaded to the cloud with every block and unblock.

To disable the cloud sync, Book safe blocks network to the reMarkable server by changing the Linux firewall. These changes are lost on reboot. If anything goes wrong, sync can thus be re-enabled by rebooting the device. It is also strongly recommended to disable auto power-off in settings->battery, because the auto power-off will re-enable the sync while the files are still blocked.

In case anything goes wrong, you can run book-safe unlock to move the hidden files back to their original location. Hidden content can also be restored manually by moving the entire content of /root/home/locked_books back to /home/root/.local/share/xochitl.

Setup

  • Download the latest stable release binary.
  • Move it to any folder of your choice on your reMarkable. I usually place it in /home/root.
  • [optional] Turn off auto power-off on the reMarkable.
  • Run the binary with the install subcommand. Note: each time reMarkable updates, you will need to install Book safe again, or it will either not run or activate at old times (from two updates ago).

Dev Setup

Requires a Unix OS.

  • As always, make a backup.
  • Setup cargo cross.
  • [optional] Turn off auto power-off on the reMarkable.
  • Use deploy.sh to move the binary to the device (set the SERVER_ADDR in deploy.sh or ensure you have an ssh config entry called remarkable).`
  • Run book-safe on the device.