Skip to content

ultimateshadsform/Anycubic-Kobra-2-Series-Firmware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anycubic Kobra 2 Series Things

This repository contains things related to the Anycubic Kobra 2 Series 3D printer.

Custom Firmware?

Note

REAL Custom firmware is not yet available, as far as we know. But you can use the tools in this repository to create your own "custom" firmware. Which is really just a modified stock firmware.

Community Resources

Discussion Forums

Related Projects

  • Kobra2ProInsights: A collection of insights and findings about the Kobra 2 Pro and some other printers
  • Kobra Unleashed: A custom frontend/GUI for the Kobra 2 Series via MQTT

Prerequisites

Warning

For the python scripts to work, you will need to install pycryptodome

pip install pycryptodome

Firmware Update via USB

Caution

The K2 Pro firmware is NOT COMPATIBLE with the K2 Machine. These machines are completely different in firmware, so ensure you have the correct firmware for the correct machine.

To update the firmware via USB:

  1. Format a USB drive to FAT32 or exFAT.
  2. Create a folder called update on the USB drive.
  3. Copy the update.swu file to the update folder.
  4. Plug the USB drive into the printer.
  5. The printer should detect it, and you can update the firmware via USB.

Important

  • To update to version 3.0.5, you first need to update via 3.0.3.
  • The firmwares are uploaded using git-lfs, so you may need to download git-lfs to work with large files such as these.

Root Access

Note

Currently, the only way to get root access is through the serial console, available on the 4-pin header on the mainboard.

UART specifications: 5 Volt, 115200 baud rate.

Warning

If you can't see anything on the serial console, it's likely because you're running newer firmware. You need to downgrade to 2.3.9 first to get root access, as Anycubic disabled the serial console in newer firmware versions in the uboot binary.

To establish root access:

  1. Hold down the S key while powering on the printer.
  2. Enter these commands to change bootargs:
setenv init /bin/sh
saveenv
bootd
  1. Mount the overlay partition:
mount -t proc p /proc

. /lib/functions/preinit.sh

. /lib/preinit/80_mount_root

do_mount_root

. /etc/init.d/boot

link_by_name

. /lib/preinit/81_initramfs_config

do_initramfs_config
  1. Override the root password:
cp /etc/shadow /overlay/upper/etc/shadow
  1. Replace the password hash. You can use unix4lyfe.org website to generate a password hash.

  2. Reboot into U-Boot and change the bootargs back to normal:

setenv init /sbin/init
setenv bootdelay 3
saveenv
reset

Now you can login with the password you set.

Tip

Thanks to rol for providing these commands! 👏

For permanent SSH access:

wget http://bin.entware.net/armv7sf-k3.2/installer/generic.sh
chmod 755 generic.sh
./generic.sh
sed -i '$i\/opt/etc/init.d/rc.unslung start' /etc/rc.local
echo 'export PATH="$PATH:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' >> /etc/profile
reboot

opkg update
opkg install dropbear
reboot

Firmware Extraction

Tip

Thanks to Sineos for the firmware extraction commands! 👏

To extract update.swu:

cpio -idv < update.swu

To extract the rootfs:

unsquashfs rootfs

Encrypted Firmware? 🙄

Check out: Anycubic Kobra 2 SWU Decryption Script 😊

About

Firmwares and mods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published