Skip to content

Instantly share code, notes, and snippets.

@vgmoose
Last active February 10, 2023 21:08
Show Gist options
  • Save vgmoose/fcfebcfe04da30e7d2bd50f5d1a6bc7a to your computer and use it in GitHub Desktop.
Save vgmoose/fcfebcfe04da30e7d2bd50f5d1a6bc7a to your computer and use it in GitHub Desktop.

Revisions

  1. vgmoose revised this gist Feb 10, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    **Unfinished tutorial: Sorry, I really wanted to get this working, but hit an issue getting the proper versions of the library to work on the remarkable itself. I ended up compiling knock on Linux and running it that way. But then, I hit other issues with the type of DRM and account limits, so it seems this is still a tortured area**

    This tutorial uses the [following method](https://superuser.com/a/1664172) to remove DRM from ebooks directly on the remarkable tablet (after installing [toltec](https://toltec-dev.org)):

    ## Download
  2. vgmoose revised this gist Feb 10, 2023. 1 changed file with 10 additions and 22 deletions.
    32 changes: 10 additions & 22 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -11,33 +11,21 @@ If you don't want to bother self-compiling, for the armv7l remarkable 2, here is

    ## Build Instructions

    It relies on some software that is available on the internet archive, as well as using [NixOS](https://nixos.org) to build, which should have a platform independent installation. It also uses QEMU instead of cross compiling.

    Dependencies (Ubuntu):
    ```
    sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
    ```

    NixOS installation:

    ```
    sh <(curl -L https://nixos.org/nix/install) --no-daemon
    ```

    If you get an error, try re-running as a non-root user. You may have to create the /nix directory as root however: `mkdir -m 0755 /nix && chown user /nix`

    After it finishes, log in again or run the command that it gives you to source new variables. For me, this command was: `. /home/user/.nix-profile/etc/profile.d/nix.sh`

    Dependencies:
    ```
    wget "https://web.archive.org/web/20221010074002if_/https://codeload.github.com/BentonEdmondson/knock/zip/refs/heads/main"
    unzip main
    cd knock-main
    opkg install git git-http
    ```

    Once in this folder, edit the `flake.nix` file, and replace: `[ "x86_64-linux" "aarch64-linux" ]` with `[ "armv7l-linux" ]`, to target the Remarkable's CPU type. Then continue:
    Building:

    ```
    nix build --extra-experimental-features nix-command --extra-experimental-features flakes . --option system armv7l-linux --extra-platforms armv7l-linux
    git clone https://github.com/MCTRACO/knock.git
    cd knock
    cd libgourou
    make
    cd ..
    make
    mv knock knock-drm-removal
    ```


  3. vgmoose revised this gist Feb 10, 2023. 1 changed file with 19 additions and 3 deletions.
    22 changes: 19 additions & 3 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -11,17 +11,33 @@ If you don't want to bother self-compiling, for the armv7l remarkable 2, here is

    ## Build Instructions

    It relies on some software that is available on the internet archive, as well as using [NixOS](https://nixos.org) to build, which should have a platform independent installation.
    It relies on some software that is available on the internet archive, as well as using [NixOS](https://nixos.org) to build, which should have a platform independent installation. It also uses QEMU instead of cross compiling.

    Dependencies (Ubuntu):
    ```
    sudo apt-get update -q -y && sudo apt-get install -q -y qemu-system-aarch64 qemu-efi binfmt-support qemu-user-static
    ```

    NixOS installation:

    ```
    sh <(curl -L https://nixos.org/nix/install) --no-daemon
    ```

    Then log in again or run the command that it gives you to source new variables. If you get an error, try re-running as a non-root user. For me, this command was: `. /home/user/.nix-profile/etc/profile.d/nix.sh`
    If you get an error, try re-running as a non-root user. You may have to create the /nix directory as root however: `mkdir -m 0755 /nix && chown user /nix`

    After it finishes, log in again or run the command that it gives you to source new variables. For me, this command was: `. /home/user/.nix-profile/etc/profile.d/nix.sh`

    ```
    wget "https://web.archive.org/web/20221010074002if_/https://codeload.github.com/BentonEdmondson/knock/zip/refs/heads/main"
    unzip main
    cd knock-main
    nix build --extra-experimental-features nix-command --extra-experimental-features flakes
    ```

    Once in this folder, edit the `flake.nix` file, and replace: `[ "x86_64-linux" "aarch64-linux" ]` with `[ "armv7l-linux" ]`, to target the Remarkable's CPU type. Then continue:

    ```
    nix build --extra-experimental-features nix-command --extra-experimental-features flakes . --option system armv7l-linux --extra-platforms armv7l-linux
    ```


  4. vgmoose created this gist Feb 10, 2023.
    27 changes: 27 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    This tutorial uses the [following method](https://superuser.com/a/1664172) to remove DRM from ebooks directly on the remarkable tablet (after installing [toltec](https://toltec-dev.org)):

    ## Download
    If you don't want to bother self-compiling, for the armv7l remarkable 2, here is a prebuilt binary!
    - [Download knock-drm-removal]() (armv7l)

    ## Usage
    ```
    ./knock-drm-removal [path to .acsm file]
    ```

    ## Build Instructions

    It relies on some software that is available on the internet archive, as well as using [NixOS](https://nixos.org) to build, which should have a platform independent installation.

    ```
    sh <(curl -L https://nixos.org/nix/install) --no-daemon
    ```

    Then log in again or run the command that it gives you to source new variables. If you get an error, try re-running as a non-root user. For me, this command was: `. /home/user/.nix-profile/etc/profile.d/nix.sh`

    ```
    wget "https://web.archive.org/web/20221010074002if_/https://codeload.github.com/BentonEdmondson/knock/zip/refs/heads/main"
    unzip main
    cd knock-main
    nix build --extra-experimental-features nix-command --extra-experimental-features flakes
    ```