Coder Social home page Coder Social logo

codexctl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

codexctl's Issues

Always redownloads firmware

Just tried to use this using the latest windows release, and everytime I ran the install command, it told me that it could not find the firmware and downloaded it again, even though it already did.

image

Make usb network a private connection on windows

You can use the following to only run code if it's on windows:

import os

if os.name == 'nt':

You can then use powershell to check the status of a network, and mark is as private:

Get-NetConnectionProfile
Set-NetConnectionProfile -InterfaceIndex 13 -NetworkCategory Private

Python can run powershell in a subprocess, which is probably easiest. I've also written code in the past to use Python.NET to run powershell code within a .NET context that I could give you some pointers from, but that adds more dependencies to your code that you probably don't need.

Verify file after downloading

It would be a good idea to verify that the file contents match what is expected after downloading it, and before installing it. A simple hash of the file should be enough. You can then store that in the file version/id table. Maybe store it something like this:

self.id_lookups_rm1 = {
    "3.6.1.1894": ("CGaIOXfzAA", "HASH"),
}

You can then get the id and hash from it with the following:

id, hash = self.id_lookups_rm1[version]

Don't include beta versions

Since there is a separate EULA for the beta, that you can't confirm that the user has agreed to, you shouldn't include beta versions in the list.

"3.8.0.1944": [
"7eGpAv7sYB",
"b286ce36371687cbfc55ce2b269659b347f1daec6993058a35d569b91f4ec75d"
],

Add extract command

It would be nice to add an extract command that can pull the raw image from a downloaded upgrade file.

Disable automatic update after install

You'll need to disable the update-engine service on the other partition, which is possible by removing the symlink systemd creates.

This way you avoid the issue where someone downgrades, forgets to turn off auto update and then gets updated again.

Error When Running Main.py

I was asked by Eeems to submit an Issue request. I have never added anything to github, so my apologies. Running the main.py script was opening cmd prompt in Windows 10, displaying about 4 lines and then closing. Checking the code in IDLE I got this when running the code.
Getting latest toltec supported version Traceback (most recent call last): File "C:\Users\<USER>\Desktop\rm-update-helper-1.0.0\main.py", line 156, in <module> driver = updates_manager() #TODO: Delete file after its done File "C:\Users\<USER>\Desktop\rm-update-helper-1.0.0\main.py", line 42, in __init__ self.latest_toltec_version = self.get_latest_toltec_supported() File "C:\Users\<USER>\Desktop\rm-update-helper-1.0.0\main.py", line 62, in get_latest_toltec_supported return re.search('Toltec only supports OS builds up to and including OS(.*)\. You will soft-brick', site_body_html).group(1).strip() AttributeError: 'NoneType' object has no attribute 'group'
At this point the code would cease. I checked line 62 in the code and found the following:
return re.search('Toltec only supports OS builds up to and including OS(.*)\. You will soft-brick', site_body_html).group(1).strip()
As far as I could tell the .group(1).strip() did not appear to be used anywhere else (I know very little about Python, so I may have missed something). I removed that part of the code and the module ran correctly when running it again.

latest not set to actual latest

The current data structure for latest doesn't work properly when there is a stable release for one device, but not the other.

Ideally, you would just compare the listed version numbers and grab the highest one for latest. That way, there would be no need to keep the value updated.

The toltec value should allow splitting rm1/rm2 values out though, if there is ever another release only for one device.

SSH Key support

Currently this tool doesn't allow you to use a SSH key to connect to the device, only the SSH password.

Triggers Windows Defender when unzipped

Hello, thanks for the awesome software. It saved me several months ago when I wanted to go back to 2.x version :)
I downloaded the binary for windows today, and after unzipping it, Windows Defender gave me a notification that a threat was found. It's really weird because in Windows Defender main page, it would change to "no threat" in a matter of seconds without me doing anything. Every time the folder is unzipped, the notification pops again, only for the threat to disappear again.

Screenshot 2024-01-08 145121

  • The message I get is:
    "Threats found. Start the recommended actions.
    Trojan:Win32/Wacatc.B!ml
    1/8/2024 2:31PM (Active) Severe
    Start actions"
  • Windows 11

+after unzipping several times, it stopped giving me threat notification
+now the threat doesn't go away automatically
Screenshot 12345

Auto-detect device

Instead of requiring the user to pass the --rm1 flag, it would be preferable to auto-detect the device where possible.

Hanging when starting fake updater

I'm having an issue where the updater hangs when it tries to start the fake updater.
Screenshot 2023-07-27 120015

My remarkable 2 is currently running v3.5.1.1798 and I'm trying to roll it back to v2.15.1.1189.

Add mount command

It would be nice to have a command to bind mount an update file to allow exploring the contents. This would likely depend on #31

macOS binary issues

Thanks for the effort!
I have problems with the macOS binary (latest codexctl release, macOS 12.7 M1 mac)

  • binary needs chmod u+x to be executed; ok easy
  • still wont run even with sudo; it's killed by the OS with a security warning; maybe a code signing issue

Automatically get IDs for new versions

Currently, we have to manually add the update file IDs for each version, we should have a service to periodically check for new updates and then commit them to the repo

Failing to load private key

Enter path to SSH key: /home/eeems/.ssh/id_rsa
Unknown exception: q must be exactly 160, 224, or 256 bits long
Traceback (most recent call last):
  File "/tmp/onefile_30204_1695664194_667846/paramiko/transport.py", line 2185, in run
  File "/tmp/onefile_30204_1695664194_667846/paramiko/auth_handler.py", line 404, in _parse_service_accept
  File "/tmp/onefile_30204_1695664194_667846/paramiko/dsskey.py", line 112, in sign_ssh_data
  File "/tmp/onefile_30204_1695664194_667846/cryptography/hazmat/primitives/asymmetric/dsa.py", line 253, in private_key
  File "/tmp/onefile_30204_1695664194_667846/cryptography/hazmat/backends/openssl/backend.py", line 708, in load_dsa_private_numbers
  File "/tmp/onefile_30204_1695664194_667846/cryptography/hazmat/primitives/asymmetric/dsa.py", line 294, in _check_dsa_private_numbers
  File "/tmp/onefile_30204_1695664194_667846/cryptography/hazmat/primitives/asymmetric/dsa.py", line 286, in _check_dsa_parameters
ValueError: q must be exactly 160, 224, or 256 bits long

Error while connecting to device: {error}

Questions on updating after downgrade

First of all thanks a lot for the great work and collaboration I'm witnessing !

I just downgraded from 3.9.x to 3.8.x and I have a few questions :

  • I noticed the "Check for updates" button doesn't do anything now. Is this to be expected? (no logs are generated)
  • If I want to update the device normally in the future is it possible or am I "stuck" with using this tool?
  • If I "revert" using the switch shell script, am I back to normal or is there still information I should take into account?

Once again thanks a lot!

Add commands to explore contents

It would be interesting to have commands to let you quickly explore the contents of an update image. The couple I could think of would be cat and ls. This would depend on #31 and #32 most likely, but in this scenario, codexctl would automate extracting and mounting to a temporary location, and then cat/ls the output and unmount. The extracted image would be cleaned up at some point too, but probably not right away, unless that performs well.

Performance on a rM device would not be a good idea for mounting to tmpfs though due to the limited ram, so maybe only extract/mount to a specific location on disk under /opt on device?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.