codexctl 0.3.0__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codexctl-1.0.0/PKG-INFO +97 -0
- codexctl-1.0.0/README.md +77 -0
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/__init__.py +49 -39
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/analysis.py +3 -0
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/device.py +7 -4
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/sync.py +1 -1
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/updates.py +12 -8
- {codexctl-0.3.0 → codexctl-1.0.0}/pyproject.toml +2 -2
- codexctl-0.3.0/PKG-INFO +0 -105
- codexctl-0.3.0/README.md +0 -86
- {codexctl-0.3.0 → codexctl-1.0.0}/LICENSE +0 -0
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/__main__.py +0 -0
- {codexctl-0.3.0 → codexctl-1.0.0}/codexctl/server.py +0 -0
codexctl-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: codexctl
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Automated update managment for the ReMarkable tablet
|
|
5
|
+
License: GPLv3
|
|
6
|
+
Author: Jayy001
|
|
7
|
+
Author-email: github@skii.dev
|
|
8
|
+
Requires-Python: >=3.12,<4.0
|
|
9
|
+
Classifier: License :: Other/Proprietary License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Dist: loguru (==0.7.2)
|
|
13
|
+
Requires-Dist: paramiko (==3.4.1)
|
|
14
|
+
Requires-Dist: psutil (==6.0.0)
|
|
15
|
+
Requires-Dist: remarkable-update-fuse (==1.1.2) ; sys_platform == "linux"
|
|
16
|
+
Requires-Dist: remarkable-update-image (==1.1.3) ; sys_platform != "linux"
|
|
17
|
+
Requires-Dist: requests (==2.31.0)
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<img src="media/demoLocal.gif">
|
|
22
|
+
|
|
23
|
+
# Codexctl
|
|
24
|
+
A utility program that helps to manage the remarkable device version utilizing [ddvks update server](https://github.com/ddvk/remarkable-update)
|
|
25
|
+
|
|
26
|
+
## Caveat for downgrading to a version below 3.11
|
|
27
|
+
|
|
28
|
+
If your reMarkable device is above 3.11 and you want to downgrade to a version below 3.11, codexctl cannot do this currently. Please refer to #71 for manual instructions.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
You can find pre-compiled binaries on the [releases](https://github.com/Jayy001/codexctl/releases/) page. This includes a build for the reMarkable itself, as well as well as builds for linux, macOS, and Windows. Alternatively, you can install directly from pypi with `pip install codexctl`. Codexctl currently only has support for a **command line interfaces** but a graphical interface is soon to come.
|
|
33
|
+
|
|
34
|
+
Finally, if you want to build it yourself, you can run `make executable` which requires python 3.11 or newer, python-venv and pip. Linux also requires libfuse-dev.
|
|
35
|
+
|
|
36
|
+
## General useage
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
❯ codexctl --help
|
|
40
|
+
usage: Codexctl [-h] [--verbose] [--address ADDRESS] [--password PASSWORD]
|
|
41
|
+
{install,download,backup,cat,ls,extract,mount,upload,status,restore,list} ...
|
|
42
|
+
|
|
43
|
+
positional arguments:
|
|
44
|
+
{install,download,backup,cat,ls,extract,mount,upload,status,restore,list}
|
|
45
|
+
install Install the specified version (will download if not available on the device)
|
|
46
|
+
download Download the specified version firmware file
|
|
47
|
+
backup Download remote files to local directory
|
|
48
|
+
cat Cat the contents of a file inside a firmware image
|
|
49
|
+
ls List files inside a firmware image
|
|
50
|
+
extract Extract the specified version firmware file
|
|
51
|
+
mount Mount the specified version firmware filesystem
|
|
52
|
+
upload Upload folder/files to device (pdf only)
|
|
53
|
+
status Get the current version of the device and other information
|
|
54
|
+
restore Restores to previous version installed on device
|
|
55
|
+
list List all available versions
|
|
56
|
+
|
|
57
|
+
options:
|
|
58
|
+
-h, --help show this help message and exit
|
|
59
|
+
--verbose, -v Enable verbose logging
|
|
60
|
+
--address ADDRESS, -a ADDRESS
|
|
61
|
+
Specify the address of the device
|
|
62
|
+
--password PASSWORD, -p PASSWORD
|
|
63
|
+
Specify password or path to SSH key for remote access
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
- Installing the latest for device (will automatically figure out the version)
|
|
68
|
+
```
|
|
69
|
+
codexctl install latest
|
|
70
|
+
```
|
|
71
|
+
- Downloading rmpp version 3.15.4.2 to a folder named `out` and then installing it
|
|
72
|
+
```
|
|
73
|
+
codexctl download 3.0.4.1305 -hw rmpp -o out
|
|
74
|
+
codexctl install ./out/remarkable-ct-prototype-image-3.15.4.2-ferrari-public.swu
|
|
75
|
+
```
|
|
76
|
+
- Backing up all documents to the cwd
|
|
77
|
+
```
|
|
78
|
+
codexctl backup
|
|
79
|
+
```
|
|
80
|
+
- Backing up only documents in a folder named "FM" to cwd, without overwriting any current files
|
|
81
|
+
```
|
|
82
|
+
codexctl backup -l root -r FM --no-recursion --no-overwrite
|
|
83
|
+
```
|
|
84
|
+
- Getting the version of the device and then switching to previous version (restore only for rm1/rm2)
|
|
85
|
+
```
|
|
86
|
+
codexctl status
|
|
87
|
+
codexctl restore
|
|
88
|
+
```
|
|
89
|
+
- Download 3.8.0.1944 for rm2, then cat the /etc/version file from it
|
|
90
|
+
```
|
|
91
|
+
codexctl download 3.8.0.1944 --hardware rm2
|
|
92
|
+
codexctl cat 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed /etc/version
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
codexctl-1.0.0/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="media/demoLocal.gif">
|
|
3
|
+
|
|
4
|
+
# Codexctl
|
|
5
|
+
A utility program that helps to manage the remarkable device version utilizing [ddvks update server](https://github.com/ddvk/remarkable-update)
|
|
6
|
+
|
|
7
|
+
## Caveat for downgrading to a version below 3.11
|
|
8
|
+
|
|
9
|
+
If your reMarkable device is above 3.11 and you want to downgrade to a version below 3.11, codexctl cannot do this currently. Please refer to #71 for manual instructions.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
You can find pre-compiled binaries on the [releases](https://github.com/Jayy001/codexctl/releases/) page. This includes a build for the reMarkable itself, as well as well as builds for linux, macOS, and Windows. Alternatively, you can install directly from pypi with `pip install codexctl`. Codexctl currently only has support for a **command line interfaces** but a graphical interface is soon to come.
|
|
14
|
+
|
|
15
|
+
Finally, if you want to build it yourself, you can run `make executable` which requires python 3.11 or newer, python-venv and pip. Linux also requires libfuse-dev.
|
|
16
|
+
|
|
17
|
+
## General useage
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
❯ codexctl --help
|
|
21
|
+
usage: Codexctl [-h] [--verbose] [--address ADDRESS] [--password PASSWORD]
|
|
22
|
+
{install,download,backup,cat,ls,extract,mount,upload,status,restore,list} ...
|
|
23
|
+
|
|
24
|
+
positional arguments:
|
|
25
|
+
{install,download,backup,cat,ls,extract,mount,upload,status,restore,list}
|
|
26
|
+
install Install the specified version (will download if not available on the device)
|
|
27
|
+
download Download the specified version firmware file
|
|
28
|
+
backup Download remote files to local directory
|
|
29
|
+
cat Cat the contents of a file inside a firmware image
|
|
30
|
+
ls List files inside a firmware image
|
|
31
|
+
extract Extract the specified version firmware file
|
|
32
|
+
mount Mount the specified version firmware filesystem
|
|
33
|
+
upload Upload folder/files to device (pdf only)
|
|
34
|
+
status Get the current version of the device and other information
|
|
35
|
+
restore Restores to previous version installed on device
|
|
36
|
+
list List all available versions
|
|
37
|
+
|
|
38
|
+
options:
|
|
39
|
+
-h, --help show this help message and exit
|
|
40
|
+
--verbose, -v Enable verbose logging
|
|
41
|
+
--address ADDRESS, -a ADDRESS
|
|
42
|
+
Specify the address of the device
|
|
43
|
+
--password PASSWORD, -p PASSWORD
|
|
44
|
+
Specify password or path to SSH key for remote access
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Examples
|
|
48
|
+
- Installing the latest for device (will automatically figure out the version)
|
|
49
|
+
```
|
|
50
|
+
codexctl install latest
|
|
51
|
+
```
|
|
52
|
+
- Downloading rmpp version 3.15.4.2 to a folder named `out` and then installing it
|
|
53
|
+
```
|
|
54
|
+
codexctl download 3.0.4.1305 -hw rmpp -o out
|
|
55
|
+
codexctl install ./out/remarkable-ct-prototype-image-3.15.4.2-ferrari-public.swu
|
|
56
|
+
```
|
|
57
|
+
- Backing up all documents to the cwd
|
|
58
|
+
```
|
|
59
|
+
codexctl backup
|
|
60
|
+
```
|
|
61
|
+
- Backing up only documents in a folder named "FM" to cwd, without overwriting any current files
|
|
62
|
+
```
|
|
63
|
+
codexctl backup -l root -r FM --no-recursion --no-overwrite
|
|
64
|
+
```
|
|
65
|
+
- Getting the version of the device and then switching to previous version (restore only for rm1/rm2)
|
|
66
|
+
```
|
|
67
|
+
codexctl status
|
|
68
|
+
codexctl restore
|
|
69
|
+
```
|
|
70
|
+
- Download 3.8.0.1944 for rm2, then cat the /etc/version file from it
|
|
71
|
+
```
|
|
72
|
+
codexctl download 3.8.0.1944 --hardware rm2
|
|
73
|
+
codexctl cat 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed /etc/version
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
@@ -56,24 +56,20 @@ class Manager:
|
|
|
56
56
|
|
|
57
57
|
version = args.get("version", None)
|
|
58
58
|
|
|
59
|
-
if
|
|
60
|
-
version
|
|
61
|
-
|
|
62
|
-
version
|
|
59
|
+
if remarkable_version:
|
|
60
|
+
if version == "latest":
|
|
61
|
+
version = self.updater.get_latest_version(remarkable_version)
|
|
62
|
+
elif version == "toltec":
|
|
63
|
+
version = self.updater.get_toltec_version(remarkable_version)
|
|
63
64
|
|
|
64
65
|
### Download functionalities
|
|
65
66
|
if function == "list":
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{'\n'.join(list(self.updater.remarkablepp_versions.keys()))}
|
|
70
|
-
|
|
71
|
-
ReMarkable 2:
|
|
72
|
-
{'\n'.join(list(self.updater.remarkable2_versions.keys()))}
|
|
67
|
+
remarkable_pp_versions = "\n".join(self.updater.remarkablepp_versions.keys())
|
|
68
|
+
remarkable_2_versions = "\n".join(self.updater.remarkable2_versions.keys())
|
|
69
|
+
remarkable_1_versions = "\n".join(self.updater.remarkable1_versions.keys())
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
"""
|
|
71
|
+
print(
|
|
72
|
+
f"ReMarkable Paper Pro:\n{remarkable_pp_versions}\n\nReMarkable 2:\n{remarkable_2_versions}\n\nReMarkable 1:\n{remarkable_1_versions}"
|
|
77
73
|
)
|
|
78
74
|
|
|
79
75
|
elif function == "download":
|
|
@@ -95,9 +91,6 @@ ReMarkable 1:
|
|
|
95
91
|
)
|
|
96
92
|
|
|
97
93
|
if function == "extract":
|
|
98
|
-
if sys.platform != "linux":
|
|
99
|
-
raise NotImplementedError
|
|
100
|
-
|
|
101
94
|
if not args["out"]:
|
|
102
95
|
args["out"] = os.getcwd() + "/extracted"
|
|
103
96
|
|
|
@@ -135,15 +128,15 @@ ReMarkable 1:
|
|
|
135
128
|
)
|
|
136
129
|
|
|
137
130
|
try:
|
|
138
|
-
image, volume = get_update_image(args
|
|
139
|
-
inode = volume.inode_at(args
|
|
131
|
+
image, volume = get_update_image(args["file"])
|
|
132
|
+
inode = volume.inode_at(args["target_path"])
|
|
140
133
|
|
|
141
134
|
except FileNotFoundError:
|
|
142
|
-
print(f"
|
|
135
|
+
print(f"{args['target_path']}: No such file or directory")
|
|
143
136
|
raise FileNotFoundError
|
|
144
137
|
|
|
145
|
-
except OSError:
|
|
146
|
-
print(f"
|
|
138
|
+
except OSError as e:
|
|
139
|
+
print(f"{args['target_path']}: {os.strerror(e.errno)}")
|
|
147
140
|
sys.exit(e.errno)
|
|
148
141
|
|
|
149
142
|
if function == "cat":
|
|
@@ -197,6 +190,11 @@ ReMarkable 1:
|
|
|
197
190
|
authentication=args["password"],
|
|
198
191
|
)
|
|
199
192
|
|
|
193
|
+
if version == "latest":
|
|
194
|
+
version = self.updater.get_latest_version(remarkable.hardware)
|
|
195
|
+
elif version == "toltec":
|
|
196
|
+
version = self.updater.get_toltec_version(remarkable.hardware)
|
|
197
|
+
|
|
200
198
|
if function == "status":
|
|
201
199
|
beta, prev, current, version_id = remarkable.get_device_status()
|
|
202
200
|
print(
|
|
@@ -204,6 +202,8 @@ ReMarkable 1:
|
|
|
204
202
|
)
|
|
205
203
|
|
|
206
204
|
elif function == "restore":
|
|
205
|
+
if remarkable.hardware == "ferrari":
|
|
206
|
+
raise SystemError("Restore not available for rmpro.")
|
|
207
207
|
remarkable.restore_previous_version()
|
|
208
208
|
print(
|
|
209
209
|
f"Device restored to previous version [{remarkable.get_device_status()[1]}]"
|
|
@@ -239,25 +239,35 @@ ReMarkable 1:
|
|
|
239
239
|
|
|
240
240
|
#### PREVENT USERS FROM INSTALLING NON-COMPATIBLE IMAGES ####
|
|
241
241
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
if device_version_uses_new_engine:
|
|
243
|
+
if not update_file_requires_new_engine:
|
|
244
|
+
raise SystemError("Cannot downgrade to this version as it uses the old update engine, please manually downgrade.")
|
|
245
|
+
# TODO: Implement manual downgrading.
|
|
246
|
+
# `codexctl download --out . 3.11.2.5`
|
|
247
|
+
# `codexctl extract --out 3.11.2.5.img 3.11.2.5_reMarkable2-qLFGoqPtPL.signed`
|
|
248
|
+
# `codexctl transfer 3.11.2.5.img ~/root`
|
|
249
|
+
# `dd if=/home/root/3.11.2.5.img of=/dev/mmcblk2p2` (depending on fallback partition)
|
|
250
|
+
# `codexctl restore`
|
|
251
|
+
|
|
252
|
+
else:
|
|
253
|
+
if update_file_requires_new_engine:
|
|
254
|
+
raise SystemError("This version requires the new update engine, please upgrade your device to version 3.11.2.5 first.")
|
|
249
255
|
|
|
250
256
|
#############################################################
|
|
251
257
|
|
|
258
|
+
update_file_requires_new_engine = False
|
|
259
|
+
device_version_uses_new_engine = False
|
|
260
|
+
|
|
252
261
|
if not update_file_requires_new_engine:
|
|
253
|
-
if
|
|
254
|
-
os.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
262
|
+
if update_file: # Check if file exists
|
|
263
|
+
if not (os.path.dirname(os.path.abspath(update_file)) == os.path.abspath("updates")):
|
|
264
|
+
if not os.path.exists("updates"):
|
|
265
|
+
os.mkdir("updates")
|
|
266
|
+
shutil.move(update_file, "updates")
|
|
267
|
+
update_file = get_available_version(version)
|
|
268
|
+
made_update_folder = True # Delete at end
|
|
259
269
|
|
|
260
|
-
# If version was a valid location file, update_file will be the location
|
|
270
|
+
# If version was a valid location file, update_file will be the location else it'll be a version number
|
|
261
271
|
|
|
262
272
|
if not update_file:
|
|
263
273
|
temp_path = tempfile.mkdtemp()
|
|
@@ -342,7 +352,7 @@ def main() -> None:
|
|
|
342
352
|
download.add_argument("version", help="Version to download")
|
|
343
353
|
download.add_argument("--out", "-o", help="Folder to download to", default=None)
|
|
344
354
|
download.add_argument(
|
|
345
|
-
"--hardware", "
|
|
355
|
+
"--hardware", "-hd", help="Hardware to download for", required=True
|
|
346
356
|
)
|
|
347
357
|
|
|
348
358
|
### Backup subcommand
|
|
@@ -373,13 +383,13 @@ def main() -> None:
|
|
|
373
383
|
|
|
374
384
|
### Cat subcommand
|
|
375
385
|
cat = subparsers.add_parser(
|
|
376
|
-
"cat", help="Cat the contents of a file inside
|
|
386
|
+
"cat", help="Cat the contents of a file inside a firmwareimage"
|
|
377
387
|
)
|
|
378
388
|
cat.add_argument("file", help="Path to update file to cat", default=None)
|
|
379
389
|
cat.add_argument("target_path", help="Path inside the image to list", default=None)
|
|
380
390
|
|
|
381
391
|
### Ls subcommand
|
|
382
|
-
ls = subparsers.add_parser("ls", help="List files inside
|
|
392
|
+
ls = subparsers.add_parser("ls", help="List files inside a firmware image")
|
|
383
393
|
ls.add_argument("file", help="Path to update file to extract", default=None)
|
|
384
394
|
ls.add_argument("target_path", help="Path inside the image to list", default=None)
|
|
385
395
|
|
|
@@ -47,8 +47,11 @@ class DeviceManager:
|
|
|
47
47
|
with ftp.file("/sys/devices/soc0/machine") as file:
|
|
48
48
|
machine_contents = file.read().decode("utf-8").strip("\n")
|
|
49
49
|
else:
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
try:
|
|
51
|
+
with open("/sys/devices/soc0/machine") as file:
|
|
52
|
+
machine_contents = file.read().decode("utf-8").strip("\n")
|
|
53
|
+
except FileNotFoundError:
|
|
54
|
+
machine_contents = "tests"
|
|
52
55
|
|
|
53
56
|
if "reMarkable Ferrari" in machine_contents:
|
|
54
57
|
self.hardware = "ferrari"
|
|
@@ -589,11 +592,11 @@ echo "fallback: ${OLDPART}"
|
|
|
589
592
|
|
|
590
593
|
print("Trying to connect to device")
|
|
591
594
|
|
|
592
|
-
while not self.check_is_address_reachable(address):
|
|
595
|
+
while not self.check_is_address_reachable(self.address):
|
|
593
596
|
time.sleep(1)
|
|
594
597
|
|
|
595
598
|
self.client = self.connect_to_device(
|
|
596
|
-
remote_address=address, authentication=authentication
|
|
599
|
+
remote_address=self.address, authentication=self.authentication
|
|
597
600
|
)
|
|
598
601
|
self.client.exec_command("systemctl stop update-engine")
|
|
599
602
|
|
|
@@ -153,7 +153,7 @@ class RmWebInterfaceAPI: # TODO: Add docstrings
|
|
|
153
153
|
folderId = self.__get_folder_id(remoteFolder)
|
|
154
154
|
|
|
155
155
|
if folderId is None:
|
|
156
|
-
raise
|
|
156
|
+
raise SystemError(f"Error: Folder {remoteFolder} does not exist!")
|
|
157
157
|
|
|
158
158
|
self.__POST(f"documents/{folderId}") # Setting up for upload...
|
|
159
159
|
|
|
@@ -22,7 +22,7 @@ class UpdateManager:
|
|
|
22
22
|
|
|
23
23
|
self.logger = logger
|
|
24
24
|
|
|
25
|
-
if
|
|
25
|
+
if self.logger is None:
|
|
26
26
|
self.logger = logging
|
|
27
27
|
|
|
28
28
|
(
|
|
@@ -47,7 +47,7 @@ class UpdateManager:
|
|
|
47
47
|
else:
|
|
48
48
|
if os.name == "nt": # Windows
|
|
49
49
|
folder_location = os.getenv("APPDATA") + "/codexctl"
|
|
50
|
-
elif os.name
|
|
50
|
+
elif os.name in ("posix", "darwin"): # Linux or MacOS
|
|
51
51
|
folder_location = os.path.expanduser("~/.config/codexctl")
|
|
52
52
|
else:
|
|
53
53
|
raise SystemError("Unsupported OS")
|
|
@@ -145,6 +145,10 @@ class UpdateManager:
|
|
|
145
145
|
|
|
146
146
|
if "ferrari" in device_type:
|
|
147
147
|
raise SystemExit("ReMarkable Paper Pro does not support toltec")
|
|
148
|
+
elif "1" in device_type:
|
|
149
|
+
device_type = "rm1"
|
|
150
|
+
else:
|
|
151
|
+
device_type = "rm2"
|
|
148
152
|
|
|
149
153
|
response = requests.get("https://toltec-dev.org/stable/Compatibility")
|
|
150
154
|
if response.status_code != 200:
|
|
@@ -349,6 +353,11 @@ class UpdateManager:
|
|
|
349
353
|
|
|
350
354
|
return filename
|
|
351
355
|
|
|
356
|
+
@staticmethod
|
|
357
|
+
def __max_version(versions: list) -> str:
|
|
358
|
+
"""Returns the highest avaliable version from a list with semantic versioning"""
|
|
359
|
+
return sorted(versions, key=lambda v: tuple(map(int, v.split("."))))[-1]
|
|
360
|
+
|
|
352
361
|
@staticmethod
|
|
353
362
|
def uses_new_update_engine(version: str) -> bool:
|
|
354
363
|
"""
|
|
@@ -360,9 +369,4 @@ class UpdateManager:
|
|
|
360
369
|
Returns:
|
|
361
370
|
bool: If it uses the new update engine or not
|
|
362
371
|
"""
|
|
363
|
-
return int(version.split(".")[0]) >= 3 and int(version.split(".")[1]) >= 11
|
|
364
|
-
|
|
365
|
-
@staticmethod
|
|
366
|
-
def __max_version(versions: list) -> str:
|
|
367
|
-
"""Returns the highest avaliable version from a list with semantic versioning"""
|
|
368
|
-
return sorted(versions, key=lambda v: tuple(map(int, v.split("."))))[-1]
|
|
372
|
+
return int(version.split(".")[0]) >= 3 and int(version.split(".")[1]) >= 11
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "codexctl"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "1.0.0"
|
|
4
4
|
description = "Automated update managment for the ReMarkable tablet"
|
|
5
5
|
authors = ["Jayy001 <github@skii.dev>"]
|
|
6
6
|
license = "GPLv3"
|
|
@@ -21,4 +21,4 @@ build-backend = "poetry.core.masonry.api"
|
|
|
21
21
|
|
|
22
22
|
[tool.poetry.scripts]
|
|
23
23
|
codexctl = "codexctl.__main__:main"
|
|
24
|
-
cxtl = "codexctl.__main__:main"
|
|
24
|
+
cxtl = "codexctl.__main__:main"
|
codexctl-0.3.0/PKG-INFO
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: codexctl
|
|
3
|
-
Version: 0.3.0
|
|
4
|
-
Summary: Automated update managment for the ReMarkable tablet
|
|
5
|
-
License: GPLv3
|
|
6
|
-
Author: Jayy001
|
|
7
|
-
Author-email: github@skii.dev
|
|
8
|
-
Requires-Python: >=3.12,<4.0
|
|
9
|
-
Classifier: License :: Other/Proprietary License
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
-
Requires-Dist: loguru (==0.7.2)
|
|
13
|
-
Requires-Dist: paramiko (==3.4.1)
|
|
14
|
-
Requires-Dist: psutil (==6.0.0)
|
|
15
|
-
Requires-Dist: remarkable-update-fuse (==1.1.2) ; sys_platform == "linux"
|
|
16
|
-
Requires-Dist: remarkable-update-image (==1.1.3) ; sys_platform != "linux"
|
|
17
|
-
Requires-Dist: requests (==2.31.0)
|
|
18
|
-
Description-Content-Type: text/markdown
|
|
19
|
-
|
|
20
|
-
<p align="center">
|
|
21
|
-
<img src="media/demoLocal.gif">
|
|
22
|
-
|
|
23
|
-
# Codexctl
|
|
24
|
-
A utility program that helps to manage the remarkable device version utilizing [ddvks update server](https://github.com/ddvk/remarkable-update)
|
|
25
|
-
|
|
26
|
-
### Installation & Use
|
|
27
|
-
|
|
28
|
-
You can find pre-compiled binaries on the [releases](https://github.com/Jayy001/codexctl/releases/) page. This includes a build for the reMarkable itself, as well as well as builds for linux, macOS, and Windows. It currently only has support for **command line interfaces** but a graphical interface is soon to come.
|
|
29
|
-
|
|
30
|
-
## Running from source
|
|
31
|
-
|
|
32
|
-
Codexctl can be run from source on both the reMarkable, as well as on a remote device.
|
|
33
|
-
|
|
34
|
-
### Running on reMarkable
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
git clone https://github.com/Jayy001/codexctl.git
|
|
38
|
-
cd codexctl
|
|
39
|
-
pip install -r requirements.txt
|
|
40
|
-
python codexctl.py --help
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Running on a remote device
|
|
44
|
-
|
|
45
|
-
This requires python 3.11 or newer.
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
git clone https://github.com/Jayy001/codexctl.git
|
|
49
|
-
cd codexctl
|
|
50
|
-
pip install wheel
|
|
51
|
-
pip install -r requirements.remote.txt
|
|
52
|
-
python codexctl.py --help
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Building executables from source
|
|
56
|
-
|
|
57
|
-
This requires python 3.11 or newer, python-venv, pip. Linux also requires libfuse-dev.
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
make executable
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Usage
|
|
64
|
-
|
|
65
|
-
The script is designed to have as little interactivity as possible, meaning arguments are directly taken from the command to run the script.
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
❯ codexctl --help
|
|
69
|
-
usage: Codexctl app [-h] [--debug] [--rm1] [--auth AUTH] [--verbose] {install,download,backup,extract,mount,status,restore,list} ...
|
|
70
|
-
|
|
71
|
-
positional arguments:
|
|
72
|
-
{install,download,backup,extract,mount,status,restore,list}
|
|
73
|
-
install Install the specified version (will download if not available on the device)
|
|
74
|
-
download Download the specified version firmware file
|
|
75
|
-
backup Download remote files to local directory
|
|
76
|
-
extract Extract the specified version update file
|
|
77
|
-
mount Mount the specified version firmware filesystem
|
|
78
|
-
status Get the current version of the device and other information
|
|
79
|
-
restore Restores to previous version installed on device
|
|
80
|
-
list List all versions available for use
|
|
81
|
-
|
|
82
|
-
options:
|
|
83
|
-
-h, --help show this help message and exit
|
|
84
|
-
--debug Print debug info
|
|
85
|
-
--rm1 Use rm1
|
|
86
|
-
--auth AUTH Specify password or SSH key for SSH
|
|
87
|
-
--verbose Enable verbose logging
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
# Examples
|
|
91
|
-
```
|
|
92
|
-
codexctl install latest # Downloads and installs latest version
|
|
93
|
-
codexctl download toltec # Downloads latest version that has full support for toltec
|
|
94
|
-
codexctl download 3.0.4.1305 --rm1 # Downloads 3.0.4.1305 firmware file for remarkable 1
|
|
95
|
-
codexctl status # Prints current & previous version (can only be used when running on device itself)
|
|
96
|
-
codexctl list # Lists all available versions
|
|
97
|
-
codexctl restore # Restores previous version
|
|
98
|
-
codexctl --verbose # Enables logging
|
|
99
|
-
codexctl --backup # Exports all files to local directory
|
|
100
|
-
codexctl --backup -l root -r FM --no-recursion --no-overwrite # Exports all files from FM directory to root folder on localhost
|
|
101
|
-
codexctl extract 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed # Extracts contents to filesystem named "extracted"
|
|
102
|
-
codexctl mount extracted /opt/remarkable # Mounts extracted filesystem to /opt/remarkable
|
|
103
|
-
codexctl ls 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed / # Lists the root directory of the update image
|
|
104
|
-
codexctl cat 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed /etc/version # Outputs the contents of /etc/version from the update image
|
|
105
|
-
```
|
codexctl-0.3.0/README.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="media/demoLocal.gif">
|
|
3
|
-
|
|
4
|
-
# Codexctl
|
|
5
|
-
A utility program that helps to manage the remarkable device version utilizing [ddvks update server](https://github.com/ddvk/remarkable-update)
|
|
6
|
-
|
|
7
|
-
### Installation & Use
|
|
8
|
-
|
|
9
|
-
You can find pre-compiled binaries on the [releases](https://github.com/Jayy001/codexctl/releases/) page. This includes a build for the reMarkable itself, as well as well as builds for linux, macOS, and Windows. It currently only has support for **command line interfaces** but a graphical interface is soon to come.
|
|
10
|
-
|
|
11
|
-
## Running from source
|
|
12
|
-
|
|
13
|
-
Codexctl can be run from source on both the reMarkable, as well as on a remote device.
|
|
14
|
-
|
|
15
|
-
### Running on reMarkable
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
git clone https://github.com/Jayy001/codexctl.git
|
|
19
|
-
cd codexctl
|
|
20
|
-
pip install -r requirements.txt
|
|
21
|
-
python codexctl.py --help
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Running on a remote device
|
|
25
|
-
|
|
26
|
-
This requires python 3.11 or newer.
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
git clone https://github.com/Jayy001/codexctl.git
|
|
30
|
-
cd codexctl
|
|
31
|
-
pip install wheel
|
|
32
|
-
pip install -r requirements.remote.txt
|
|
33
|
-
python codexctl.py --help
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Building executables from source
|
|
37
|
-
|
|
38
|
-
This requires python 3.11 or newer, python-venv, pip. Linux also requires libfuse-dev.
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
make executable
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Usage
|
|
45
|
-
|
|
46
|
-
The script is designed to have as little interactivity as possible, meaning arguments are directly taken from the command to run the script.
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
❯ codexctl --help
|
|
50
|
-
usage: Codexctl app [-h] [--debug] [--rm1] [--auth AUTH] [--verbose] {install,download,backup,extract,mount,status,restore,list} ...
|
|
51
|
-
|
|
52
|
-
positional arguments:
|
|
53
|
-
{install,download,backup,extract,mount,status,restore,list}
|
|
54
|
-
install Install the specified version (will download if not available on the device)
|
|
55
|
-
download Download the specified version firmware file
|
|
56
|
-
backup Download remote files to local directory
|
|
57
|
-
extract Extract the specified version update file
|
|
58
|
-
mount Mount the specified version firmware filesystem
|
|
59
|
-
status Get the current version of the device and other information
|
|
60
|
-
restore Restores to previous version installed on device
|
|
61
|
-
list List all versions available for use
|
|
62
|
-
|
|
63
|
-
options:
|
|
64
|
-
-h, --help show this help message and exit
|
|
65
|
-
--debug Print debug info
|
|
66
|
-
--rm1 Use rm1
|
|
67
|
-
--auth AUTH Specify password or SSH key for SSH
|
|
68
|
-
--verbose Enable verbose logging
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
# Examples
|
|
72
|
-
```
|
|
73
|
-
codexctl install latest # Downloads and installs latest version
|
|
74
|
-
codexctl download toltec # Downloads latest version that has full support for toltec
|
|
75
|
-
codexctl download 3.0.4.1305 --rm1 # Downloads 3.0.4.1305 firmware file for remarkable 1
|
|
76
|
-
codexctl status # Prints current & previous version (can only be used when running on device itself)
|
|
77
|
-
codexctl list # Lists all available versions
|
|
78
|
-
codexctl restore # Restores previous version
|
|
79
|
-
codexctl --verbose # Enables logging
|
|
80
|
-
codexctl --backup # Exports all files to local directory
|
|
81
|
-
codexctl --backup -l root -r FM --no-recursion --no-overwrite # Exports all files from FM directory to root folder on localhost
|
|
82
|
-
codexctl extract 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed # Extracts contents to filesystem named "extracted"
|
|
83
|
-
codexctl mount extracted /opt/remarkable # Mounts extracted filesystem to /opt/remarkable
|
|
84
|
-
codexctl ls 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed / # Lists the root directory of the update image
|
|
85
|
-
codexctl cat 3.8.0.1944_reMarkable2-7eGpAv7sYB.signed /etc/version # Outputs the contents of /etc/version from the update image
|
|
86
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|