Before starting ANY work , lets get you up to speed with the enviroment and what you will need ...
1. Some sort of linux device with at least 32Gb storage, that could be a : Spare laptop , Raspberry Pi , a PC etc...
> [!info]
> 1. for the sake of this guide we will be using my main computer running on CachyOS with the 6.19... kernel but you dont have to replicate my setup
> 2. This guide **requires** you have basic knowledge of the linux terminal
>[!Warning]
>I Throw around the word shofel , and i do mean the shofel version **SPECIFICALLY** in devsparx repo (using the improvements brach for now) i show later on how to clone it , if anything should change i will try my best to update this guide as fast as possible , but do note our build of shofel will be undergoing some updates!
> [!WARNING]
> # Please do inform yourself
> we are NOT liable for any damage caused to your device if you proceed with this guide , if you are not sure remotely on what youre doing i recommend either wait for the easier installation method , or find someone on the discord to guide you!!! (they arent liable for any damage either)
2. A micro usb cable ==**that you know is reliable**==
3. Like 4-5 Hours
4. A Jibo **(THAT IS SETUP TO YOUR NETWORK, AND YOU KNOW ITS IP)**
So first , go ahead and plug jibo in to your host device that you are going to dump the firmware into using your usb cable
Hold the RCM button and press the reset button (or the power button if yours is off), and you should see a red light at his face but he **wont boot normally**
![[Jibo RCM.jpg]]
in the terminal were gonna execute `lsusb` to check for `NVIDIA Corp. APX`
```shell
kevin lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1532:023f Uhhh no
Bus 001 Device 003: ID 0a12:0001 Ltd Bluetooth Dongle (HCI mode why tho)
Bus 001 Device 004: ID 08bb:2902 cant see me :)
Bus 001 Device 005: ID 1bcf:08b8 nope not me, its the guy below
Bus 001 Device 007: ID 0955:7740 NVIDIA Corp. APX <<<<<< LOOK FOR THIS ENTRY!!!!
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0644:800f TEAC Corp. US-144 yes i use a 144 deal with it
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 0951:1666 Kingston wanna be drive
kevin
```
- - -
# Part 2 | Now before building shofel , get your packages ready
this may crash due to that im not sure how large exactly each jibos storage is (they should be the same from what i have seen in the community)
But if it crashes like 98.9% or 99.9% in then you have most of the image cloned so you should be good (we can repair it later , or you might not need to since the last partition is basically empty space!)
>[!Info]
>Techically you dont need a full dump , BUT! I havent confirmed enough yet that all jibos have the same stuff stored in the same sectors , but its good to to have a back up to calculate your own sectors **and to most importantly , read below :**
>[!WARNING]
>Make sure you make a backup of the filesystem ... this is basically YOUR jibo , and it also contains YOUR jibos calibration data that might not be able to get restored by someone else... so keep a backup of the `.bin` in case of an emergency
# Part 4 | Modifying the /var partition
Now that you have your image `.bin` ready and backed up its time to edit the /var partition!, thats Partition 5 at around 500mb
we can use `fdisk` to list the partitions in our bin
```bash
fdisk -l jibo_full_dump.bin`
```
```shell
kevin fdisk -l jibo_full_dump.bin
GPT PMBR size mismatch (30777343 != 30777341) will be corrected by write.
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
The backup GPT table is not on the end of the device.
Disk jibo_full_dump.bin: 14,68 GiB, 15757999104 bytes, 30777342 sectors
Now lets make a "loop" device and mount the `var_partition.bin` to it!
```Bash
mkdir jibo_var
sudo mount -o loop var_partition.bin jibo_var/
```
you should see it appear as a mounted disk drive on your system!, now you have to navigate to `jibo_var/jibo/mode.json`
Open it with any text editor (like `vim` or `vscode` or notepad i dont care)
Find the line: `"mode": "normal"` (its legit the only line in there)
**Change it to:** `"mode": "int-developer"`
Save the file and exit
>[!IMPORTANT]
> **Unmount** the partition to save the changes to the `.bin` file!!!!
Now mode `int-developer` basically disables everything the robot runs (including firewall , so you can just ssh into it .. maybe in later guides you might be informed to change this value to something else , but currently its the simplest & easiest way to get root shell in the robot , and from there since you have root you can do everything you could by manually rewriting the entire dump)
Anyway you are free to mount the rest of the fs partitions to parouse the file system or if you want live editing , i will make a guide on how to connect to ftp...
but if you have legit reached this point you really should know by now how to setup ftp yourself :|
```Bash
sudo umount jibo_var
```
# Part 5 | Writing our modified var partition to jibo!
We are ready to put the modified chunk back into the robot. To do this, we must convert your **Start Sector** from a normal number (Decimal) to a computer number (Hexadecimal) because thats what shofel requires at this point of time.
### 1. The Conversion
Take your Start Sector (mine was `8294434`) and use an online converter or your Linux calculator to get the **Hex** value.
**My Hex was** `0x7E9022`
here is a quick calculator site i found on the web,