Home

Awesome

reMarkable command-line utils

Clone this repo

git clone --recursive https://github.com/lucasrla/remarkable-utils.git
# --recursive in order to include the remarkable_entware submodule

# if you need a refresher, see: https://www.vogella.com/tutorials/GitSubmodules/article.html

SSH setup

  1. On your reMarkable tablet, go to Menu > Settings > Help, then under About tap on Copyrights and licenses. In General information, right after the section titled "GPLv3 Compliance", there will be the username (root), password and IP addresses needed for SSH.

  2. Add the following lines to your ~/.ssh/config

Host remarkable
  Hostname IP_ADDRESS_YOU_HAVE_JUST_FOUND
  User root
  ForwardX11 no
  ForwardAgent no
  # reMarkable's SSH is an old version of Dropbear (v2019.78), which seems to use an algorithm considered weak nowadays (Oct 2022)
  # https://matt.ucc.asn.au/dropbear/dropbear.html
  PubkeyAcceptedAlgorithms +ssh-rsa
  HostkeyAlgorithms +ssh-rsa  
  # h/t: https://stackoverflow.com/questions/69875520/unable-to-negotiate-with-40-74-28-9-port-22-no-matching-host-key-type-found-th
  1. Have a public key ready at ~/.ssh/

  2. Run ssh-copy-id remarkable

  3. Type your device password. You should see an output similar to:

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/$USER/.ssh/id_rsa.pub"
...
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
...
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.XXX.XXX\'s password:

Number of key(s) added:        1.

Now try logging into the machine, with:   "ssh 'remarkable'"
and check to make sure that only the key(s) you wanted were added.

Note: For some reason, ssh-copy-id is not working with my reMarkable 2 (2.15.0.1067). I had to add my public key to /home/root/.ssh/authorized_keys manually.

  1. Let's test it out. Type ssh remarkable:
ssh remarkable
  reMarkable
  ╺━┓┏━╸┏━┓┏━┓   ┏━╸┏━┓┏━┓╻ ╻╻╺┳╸┏━┓┏━┓
  ┏━┛┣╸ ┣┳┛┃ ┃   ┃╺┓┣┳┛┣━┫┃┏┛┃ ┃ ┣━┫┗━┓
  ┗━╸┗━╸╹┗╸┗━┛   ┗━┛╹┗╸╹ ╹┗┛ ╹ ╹ ╹ ╹┗━┛
  reMarkable: ~/

Voilà! We're in.

(Type exit to get out.)

Tweak: auto sleep off

On your device, navigate to Menu > Settings > Battery and then turn Auto sleep off to prevent the device from sleeping unintentedly while we're SSH'ing into it.

Install remarkable_entware

Use the awesome reMarkable Entware scripts to install rsync and other utilities to your reMarkable device:

# On your computer's shell
scp remarkable_entware/install.sh remarkable:

ssh remarkable

./install.sh
  ...
  Configuring entware-upgrade.
  Upgrade operations are not required.
  Configuring opkg.
  Configuring zoneinfo-europe.
  Configuring zoneinfo-asia.
  Configuring libstdcpp.
  Configuring entware-release.
  Configuring findutils.
  Configuring entware-opt.

  Info: Congratulations! Entware has been installed.
  ...

# Add /opt/bin & /opt/sbin to PATH
echo PATH=$PATH:/opt/bin:/opt/sbin >> ~/.bashrc

# Check
cat ~/.bashrc
  ...
  PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin:/opt/sbin

# Double check
source ~/.bashrc
echo $PATH
  /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bin:/opt/sbin

# Feel free to exit now
exit

Install rsync via opkg

# On your computer
ssh remarkable

# Inside your reMarkable
opkg install rsync
  ...

rsync --version
  rsync  version 3.1.3  protocol version 31
  Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
  Web site: http://rsync.samba.org/
  Capabilities:
      64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
      no socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
      append, ACLs, xattrs, iconv, symtimes, prealloc

  rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
  are welcome to redistribute it under certain conditions.  See the GNU
  General Public Licence for details.

Here are the packages that are available via opkg: http://bin.entware.net/armv7sf-k3.2/Packages.html.

For a collection of community-maintained, reMarkable-specific opkg packages, check out toltec-dev.org/stable and github.com/toltec-dev/toltec.

Use rsync and crontab to run backups automatically (from reMarkable device to computer)

First, make sure you have rsync installed on your computer and that its protocol version is compatible with the one you have just installed in your reMarkable.

# On your computer

# Edit rsync-remarkable.TEMPLATE.sh according to your needs

# Save it as rsync-remarkable.sh

# Test it out
# You might need to `mkdir` and `touch` some dirs and files
source rsync-remarkable.sh

Then, add it to your crontab:

# On your computer
crontab -e

# Add a new line, like
0 9 * * * source /PATH/TO/rsync-remarkable.sh >> /PATH/TO/rsync-remarkable.log 2>&1

# If you need a refresher: https://crontab.guru

Re-enable remarkable_entware after a reMarkable software update

# On your computer
scp remarkable_entware/reenable.sh remarkable:

ssh remarkable

./reenable.sh
  Created symlink /etc/systemd/system/local-fs.target.wants/opt.mount → /etc/systemd/system/opt.mount.

  Info: Entware has been re-enabled.

# Double check if rsync is still there
rsync --version
  rsync  version 3.1.3  protocol version 31
  Copyright (C) 1996-2018 by Andrew Tridgell, Wayne Davison, and others.
  Web site: http://rsync.samba.org/
  Capabilities:
      64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
      no socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
      append, ACLs, xattrs, iconv, symtimes, prealloc

  rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
  are welcome to redistribute it under certain conditions.  See the GNU
  General Public Licence for details.

Credits and Acknowledgements

For more reMarkable resources, check out the great awesome-reMarkable and remarkablewiki.com.

Disclaimers

This is free open source software from hobby project of an enthusiastic reMarkable user.

There is no warranty whatsoever. Use it at your own risk.

The author(s) and contributor(s) are not associated with reMarkable AS, Norway. reMarkable is a registered trademark of reMarkable AS in some countries. Please see https://remarkable.com for their products.