Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

reclean.sh

Patrick Pedersen edited this page Nov 16, 2018 · 2 revisions

Source

A host sided script that removes unwanted junk on your reMarkable.

Dependencies

In order for this script to function as intended, the following software must be available on the host machine

Usage:

Usage: reclean.sh [-v | -h | ssh address]

Options:
-v			Display version and exit
-h			Display usage and exit
ip			SSH address of the device (default set to 10.11.99.1)

Example:

Clean with the device connected via USB

$ bash reclean.sh

Clean the device remotely (Where 192.168.42.255 is the ip of the device)

$ bash reclean.sh 192.168.42.255

Usage Guide

This guide attempts to describe an typical execution of this script

1. Downloading/Installing the script

To download this script, we will be using wget, an application present on most bash compatible systems by default

wget https://github.com/reHackable/scripts/raw/master/host/reclean.sh

From here on, you may opt to copy the script to a path defined in the $PATH variable so that it can be executed directly from the terminal

2. Executing the script

It is important to note, that the device must remain unlocked until the script has completed

Assuming our device is connected via USB, we may execute the script with no arguments provided

bash reclean.sh
Attempting to establish connection with the device...
Successfully established connection, please do not lock your device until the script has completed!

It will prompt the user whether to check for metadata of deleted documents

Search for metadata from deleted documents [y/N]: y

In this case, we're willing to delete metedata of deleted files, so we'll enter y for yes.

The script will now search for metadata with "deleted": true. Results are then listen and we'll be asked to confirm our actions.

The following deleted documents have been found:

    /home/root/.local/share/remarkable/xochitl/b5bd7837-09d6-47db-86b7-e431cb72930e.metadata

Proceed: [y/n]: y
Deleting files...

By entering y, the above listed metadata files will be removed

The script then asks whether to look for files that have no metadata assigned

Search for files and directories without metadata [y/N]:

Once again we agree by entering y. Shall the script find any documents, they'll be listed in similar manor as the metadata files have been above.

If however, no files have been found, the script will not attempt to delete anything and finish.

Searching for junk...

No deleted documents found, nothing to clean here...
Clone this wiki locally