Skip to content

Instantly share code, notes, and snippets.

@mnixry
Last active March 12, 2024 05:49
Show Gist options
  • Save mnixry/d0fa5de3c1b42d2efa33f13f23197c20 to your computer and use it in GitHub Desktop.
Save mnixry/d0fa5de3c1b42d2efa33f13f23197c20 to your computer and use it in GitHub Desktop.
reMarkable2 国内用户自救指南

reMarkable2 国内用户自救指南

请在系统更新/出厂设置后食用。

将设备连接至电脑,打开Settings -> General -> About -> Copyrights and License, 翻到最底部可以看到系统root密码。

在电脑上使用 ssh root@10.11.99.1 进行连接,下列说明均基于已连接到的前提。

中文字体

推荐 Noto Sans CJK,因为它系统自带的西文字体就是这个系列的。

可以下好文件通过sftp之类的方式传过去,或者可以直接在设备上直接下载,喜欢哪个都可以。

下载 Language Specific OTFs Simplified Chinese,解压找到 NotoSansCJKsc-Regular.otf,复制到 /usr/share/fonts/ 下。

之后执行 fc-cache -fv,重启设备,文件名和电子书内的中文字体应该就能够正常展示了。

文档同步

配置代理程序

被墙了,登录不上去,可能要魔法上网。这里推荐v2rayA

分别下载v2ray-corev2rayA的 Release,选择编译给armv7的版本进行下载并解压,组织好文件目录,确保它看起来像下面这样:

22.7M   ./v2raya
4.0K    ./start.sh
1.5M    ./core/geosite.dat
8.0K    ./core/config.json
9.5M    ./core/geoip.dat
4.0K    ./core/vpoint_vmess_freedom.json
4.0K    ./core/vpoint_socks_vmess.json
168.0K  ./core/geoip-only-cn-private.dat
22.1M   ./core/v2ray
33.3M   ./core
4.0K    ./v2raya.service
56.5M   .

其中,start.shv2raya.service的文件内容分别如下:

#!/bin/bash -xve

cd $(realpath $(dirname "$0"))

./v2raya \
    --v2ray-bin $(realpath ./core/v2ray) \
    --v2ray-assetsdir $(realpath ./core) \
    --config $(realpath ./conf) \
    --lite
[Unit]
Description=v2rayA Service
Documentation=https://github.com/v2rayA/v2rayA/wiki
After=network.target nss-lookup.target iptables.service ip6tables.service nftables.service
Wants=network.target

[Service]
Type=simple
User=root
LimitNPROC=500
LimitNOFILE=1000000
ExecStart=/home/root/v2raya/start.sh
Environment=V2RAYA_LOG_FILE=/tmp/v2raya.log
Restart=on-failure

[Install]
WantedBy=multi-user.target

复制以上文件夹内所有内容到 /home/root/v2raya/ 中。

执行 chmod +x ./start.sh 给启动脚本加上可执行位。

执行 cp ~/v2raya/v2raya.service /etc/systemd/system/ 安装服务文件。

之后执行 systemctl enable --now v2raya.service 开启服务即可。

使用浏览器访问 http://10.11.99.1:2017 你应当能访问到v2rayA的配置界面并且正常使用。

应用代理

修改 /lib/systemd/system/xochitl.service/lib/systemd/system/rm-sync.service 文件(版本比较旧的系统没有这个就不用改了)

[Service]节添加一行Environment=http_proxy=http://127.0.0.1:20171。(此处20171)应为你在v2rayA中配置的HTTP代理端口。

此处以xochitl.service为例展示修改的结果

[Unit]
Description=reMarkable main application
StartLimitIntervalSec=600
StartLimitBurst=4
OnFailure=remarkable-fail.service
After=home.mount
Wants=rm-sync.service

[Service]
ExecStart=/usr/bin/xochitl --system
+ Environment=http_proxy=http://127.0.0.1:20171
Restart=on-failure
WatchdogSec=60

[Install]
WantedBy=multi-user.target

修改完成后重启设备,查看v2rayA日志你应当能看到一些访问日志。

时间同步

默认用的Google的时间同步,在国内不一定能用,改成time.windows.com应该就行

修改/etc/systemd/timesyncd.conf文件,遵循以下diff:

[Time]
- #NTP=
+ NTP=time.windows.com
#FallbackNTP=time1.google.com time2.google.com time3.google.com time4.google.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048
#SaveIntervalSec=60

执行 systemctl restart systemd-timesyncd 重启时间同步服务,即可使用新的NTP服务器。

可以通过 timedatectl show-timesync --all 查看同步状态。

@VG-Loda
Copy link

VG-Loda commented Mar 11, 2024

编程文盲,问一下v2ray-core和v2rayA的 Release怎么下载和安装?安装哪个版本?

@mnixry
Copy link
Author

mnixry commented Mar 11, 2024

编程文盲,问一下v2ray-core和v2rayA的 Release怎么下载和安装?安装哪个版本?

https://github.com/v2rayA/v2rayA/releases
https://github.com/v2fly/v2ray-core/releases
最新的版本选linux armv7就行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment