How to unlock bootloader on a brand new Rabbit r1

No idea what version of the OS mine came with. The script had issues in Distrobox. Too lazy to use my desktop, or setup a VM on my laptop.

You don’t need to email them and ask for permission, or even use the device following this method.

What you need:

frp.sh:

#!/bin/bash
LAST_BYTE=$(xxd -p -l 1 -s -1 frp.bin)
if [[ "$LAST_BYTE" == "00" ]]; then
    printf '\x01' | dd of=frp.bin bs=1 seek=$(($(stat -c%s frp.bin) - 1)) conv=notrunc
fi
read -p "[*] Unplug your device, press ENTER, plug it back in"

sudo ./mtkbootcmd.py FASTBOOT

echo "[*] Waiting for fastboot..."
while ! fastboot devices | grep -q "fastboot"; do
    sleep 1
done

fastboot flashing unlock
fastboot reboot

Copied and pasted the part of r1.sh for installing stuff, name it whatever, and run it, do it in the same folder as the other scripts:

#!/bin/bash

install_debian() {
    sudo apt update
    [[ -x "$(command -v git)" ]] || sudo apt install -y git
    [[ -x "$(command -v python3)" ]] || sudo apt install -y python3
    [[ -x "$(command -v pip3)" ]] || sudo apt install -y python3-pip
    [[ -x "$(command -v dos2unix)" ]] || sudo apt install -y dos2unix
    [[ -x "$(command -v curl)" ]] || sudo apt install -y curl
    [[ -x "$(command -v unzip)" ]] || sudo apt install -y unzip
}

install_arch() {
    sudo pacman -Sy --noconfirm
    [[ -x "$(command -v git)" ]] || sudo pacman -S --noconfirm git
    [[ -x "$(command -v python3)" ]] || sudo pacman -S --noconfirm python
    [[ -x "$(command -v dos2unix)" ]] || sudo pacman -S --noconfirm dos2unix
    [[ -x "$(command -v curl)" ]] || sudo pacman -S --noconfirm curl
    [[ -x "$(command -v unzip)" ]] || sudo pacman -S --noconfirm unzip
    [[ -x "$(command -v virtualenv)" ]] || sudo pacman -S --noconfirm python-virtualenv
}

install_fedora() {
    sudo dnf update -y
    [[ -x "$(command -v git)" ]] || sudo dnf install -y git
    [[ -x "$(command -v python3)" ]] || sudo dnf install -y python3
    [[ -x "$(command -v pip3)" ]] || sudo dnf install -y python3-pip
    [[ -x "$(command -v dos2unix)" ]] || sudo dnf install -y dos2unix
    [[ -x "$(command -v curl)" ]] || sudo dnf install -y curl
    [[ -x "$(command -v unzip)" ]] || sudo dnf install -y unzip
}

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
    if command -v apt-get &>/dev/null; then
        install_debian
    elif command -v pacman &>/dev/null; then
        install_arch
    elif command -v dnf &>/dev/null; then
        install_fedora
    else
        echo "Unsupported Linux distribution"
        exit 1
    fi
else
    echo "Unsupported OS"
    exit 1
fi

if [[ "$OSTYPE" != "linux-gnu"* || ! "$(command -v pacman)" ]]; then
    pip3 show virtualenv &>/dev/null || pip3 install virtualenv
fi

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
    if command -v apt-get &>/dev/null; then
        sudo apt install -y adb fastboot
    elif command -v pacman &>/dev/null; then
        sudo pacman -S --noconfirm android-tools
    elif command -v dnf &>/dev/null; then
        sudo dnf install -y android-tools
    fi
fi

# Setup virtualenv and install requirements
python3 -m venv venv
source venv/bin/activate

chmod +x mtkbootcmd.py

# Download mtkclient
REPO_URL="https://github.com/AgentFabulous/mtkclient"
REPO_NAME=$(basename "$REPO_URL" .git)
git clone "$REPO_URL"
cd "$REPO_NAME" || exit
pip3 install -r requirements.txt
  • Backup your device with mtkclient-gui, go to read partitions and select all, then uncheck userdata, unless you have userdata you want.
  • To get mtkclient-gui to see your phone, turn it off, and plug it in.
  • Copy frp.bin from your backup to the folder you put frp.sh and put mtkbootcmd.py in the same folder.
  • Run frp.sh and it should modify frp.bin, flash frp.bin using mtkclient-gui.
  • After it’s done flashing, unplug your phone, plug it back in and click enter.
  • Make sure you are looking at the phone, and click volume up when it asks.

Well, it’s not exactly a phone, but can be used as one with Ubuntu Touch.

If you don’t use Linux, I can’t help you. Probably can easily be made to work on macOS, if it doesn’t already.

The script could probably easily be fixed to do everything for you, but I’m lazy. There is a command line mtkclient too, you get both when you compile it.

The command for mtkclient-gui is mtk_gui.

If you need to get into fastboot, you can run ./mtkbootcmd.py FASTBOOT. Or put python3 in front of it. You may have to do chmod +x mtkbootcmd.py on it for the script. To run it, you may need to run . venv/bin/activate.

Currently trying to cross compile the kernel, so I can compile WireGuard. May or may not work. Don’t bother running arm64 in Linux using QEMU, too fucking slow. I could use my Mac mini, but I turned it off, and don’t plan on using it. It has an ARM CPU. Using pbuilder to cross compile now. Just type pbuilder login and do it manually. Works in Distrobox, using a root one.

If you are using Distrobox, you may need a root one.

My laptop has Fedora Kinoite, too lazy to install the needed stuff, and reboot. Already need to install updates and reboot.

No SIM card in it yet. Still trying to get WireGuard to actually work.