Open onehumankindness opened 3 weeks ago
Did you use sudo ./r1.sh
?
sudo
is necessary.
When I ran it with sudo it was missing python3-venv, here's the output:
(base) š¦[ericw@RabbitEscape r1_escape-main]$ sudo apt install python3.10-venv Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: python3-pip-whl python3-setuptools-whl The following NEW packages will be installed: python3-pip-whl python3-setuptools-whl python3.10-venv 0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded. Need to get 2,473 kB of archives. After this operation, 2,884 kB of additional disk space will be used. Do you want to continue? [Y/n] Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-pip-whl all 22.0.2+dfsg-1ubuntu0.4 [1,680 kB] Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3-setuptools-whl all 59.6.0-1.2ubuntu0.22.04.1 [788 kB] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 python3.10-venv amd64 3.10.12-1~22.04.3 [5,716 B] Fetched 2,473 kB in 1s (2,902 kB/s)
Selecting previously unselected package python3-pip-whl. (Reading database ... 44966 files and directories currently installed.) Preparing to unpack .../python3-pip-whl_22.0.2+dfsg-1ubuntu0.4_all.deb ... Unpacking python3-pip-whl (22.0.2+dfsg-1ubuntu0.4) ... Selecting previously unselected package python3-setuptools-whl. Preparing to unpack .../python3-setuptools-whl_59.6.0-1.2ubuntu0.22.04.1_all.deb ... Unpacking python3-setuptools-whl (59.6.0-1.2ubuntu0.22.04.1) ... Selecting previously unselected package python3.10-venv. Preparing to unpack .../python3.10-venv_3.10.12-1~22.04.3_amd64.deb ... Unpacking python3.10-venv (3.10.12-1~22.04.3) ... Setting up python3-setuptools-whl (59.6.0-1.2ubuntu0.22.04.1) ... Setting up python3-pip-whl (22.0.2+dfsg-1ubuntu0.4) ... Setting up python3.10-venv (3.10.12-1~22.04.3) ... (base) š¦[ericw@RabbitEscape r1_escape-main]$ sudo ./r1.sh Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease Hit:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease Hit:3 http://archive.ubuntu.com/ubuntu jammy-backports InRelease Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease Reading package lists... Done
Building dependency tree... Done Reading state information... Done 1 package can be upgraded. Run 'apt list --upgradable' to see it. Reading package lists... Done Building dependency tree... Done Reading state information... Done adb is already the newest version (1:10.0.0+r36-9). fastboot is already the newest version (1:10.0.0+r36-9). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Error: Command '['/var/home/ericw/r1_escape-main/venv/bin/python3', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. fatal: destination path 'mtkclient' already exists and is not an empty directory. Traceback (most recent call last): File "/var/home/ericw/r1_escape-main/venv/bin/pip3", line 5, infrom pip._internal.cli.main import main File "/var/home/ericw/r1_escape-main/venv/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 10, in from pip._internal.cli.autocompletion import autocomplete File "/var/home/ericw/r1_escape-main/venv/lib/python3.11/site-packages/pip/_internal/cli/autocompletion.py", line 10, in from pip._internal.cli.main_parser import create_main_parser File "/var/home/ericw/r1_escape-main/venv/lib/python3.11/site-packages/pip/_internal/cli/main_parser.py", line 5, in import subprocess File "/var/home/ericw/anaconda3/lib/python3.11/subprocess.py", line 104, in from _posixsubprocess import fork_exec as _fork_exec ModuleNotFoundError: No module named '_posixsubprocess' [] Power off your device, press ENTER plug it into your PC Traceback (most recent call last): File "/var/home/ericw/r1_escape-main/mtkclient/mtk", line 5, in from mtkclient.Library.mtk_main import Main, metamodes File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/mtk_main.py", line 10, in ] Unplug your device, press ENTER, plug it back in Traceback (most recent call last): File "/var/home/ericw/r1_escape-main/./mtkbootcmd.py", line 6, infrom mtkclient.Library.mtk_class import Mtk File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/mtk_class.py", line 9, in from mtkclient.Library.pltools import PLTools File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/pltools.py", line 7, in from mtkclient.Library.Exploit.amonet import Amonet File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/Exploit/amonet.py", line 8, in from mtkclient.Library.exploit_handler import Exploitation File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/exploit_handler.py", line 8, in from mtkclient.Library.Hardware.hwcrypto import hwcrypto, crypto_setup File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/Hardware/hwcrypto.py", line 7, in from mtkclient.Library.utils import LogBase, logsetup File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/utils.py", line 19, in import colorama ModuleNotFoundError: No module named 'colorama' chown: cannot access 'frp.bin': No such file or directory xxd: frp.bin: No such file or directory Traceback (most recent call last): File "/var/home/ericw/r1_escape-main/mtkclient/mtk", line 5, in from mtkclient.Library.mtk_main import Main, metamodes File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/mtk_main.py", line 10, in from mtkclient.Library.mtk_class import Mtk File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/mtk_class.py", line 9, in from mtkclient.Library.pltools import PLTools File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/pltools.py", line 7, in from mtkclient.Library.Exploit.amonet import Amonet File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/Exploit/amonet.py", line 8, in from mtkclient.Library.exploit_handler import Exploitation File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/exploit_handler.py", line 8, in from mtkclient.Library.Hardware.hwcrypto import hwcrypto, crypto_setup File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/Hardware/hwcrypto.py", line 7, in from mtkclient.Library.utils import LogBase, logsetup File "/var/home/ericw/r1_escape-main/mtkclient/mtkclient/Library/utils.py", line 19, in import colorama ModuleNotFoundError: No module named 'colorama' [ import serial ModuleNotFoundError: No module named 'serial' [*] Waiting for fastboot...
It doesn't seem to be seeing the r1 when I plug it in.
ADB is present
š¦[ericw@RabbitEscape r1_escape-main]$ which adb /usr/local/bin/adb
ADB Devices didn't seem to be started unless it starts during the script:
(base) š¦[ericw@RabbitEscape r1_escape-main]$ adb devices
Any ideas? Thanks again for your time and work on this. This reminds me of rooting my first device back in the day lol
I had to do some manual python module installations.
just google the error message and install the modules with pip e.g.
pip install pyserial
making some progress:
[] Power off your device, press ENTER plug it into your PC
Traceback (most recent call last):
File "/home/eric/Downloads/r1_escape-main/mtkclient/mtk", line 5, in
FAILED (remote: ' Unlock operation is not allowed ') fastboot: error: Command failed Erasing 'userdata' FAILED (remote: 'not allowed in locked state') fastboot: error: Command failed Rewriting vbmeta struct at offset: 0 Sending 'vbmeta_a' (4 KB) OKAY [ 0.005s] Writing 'vbmeta_a' FAILED (remote: 'not allowed in locked state') fastboot: error: Command failed Rebooting into fastboot OKAY [ 0.002s] < waiting for any device > Finished. Total time: 13.097s Invalid sparse file format at header magic Resizing 'system_a' FAILED (remote: 'Command not available on locked devices') fastboot: error: Command failed Rebooting OKAY [ 0.000s] Finished. Total time: 0.051s
I ran pip install colorama and it says it installs but keeps giving module not found error, arggghhh lol
I really don't know why on some distros, this does happen. Even though a pip module is installed, mtkclient scripts fail to recognise them. Regardless, in a few weeks time, a better solution is coming.
This is just a python path issue due to mtkclient having a lot of #!/usr/bin/python
in their scripts. I had a ton of import errors and just used VSCode search and replace to change all instances to point directly to my virtualenv python, which I made sure to activate and install all requirements in.
Python import path issues come from the following:
#!/usr/bin/env python3
and hopes you've activated the virtualenv#!/usr/bin/python
sudo
changes your path. You'd think it wouldn't, but it does.If for any reason these things don't agree, you will point to the wrong python somewhere, one without the requirements you wanted installed.
To overcome this, I'd recommend changing all shebang lines to point to specifically your virtualenv python.
keep getting the following error when running the script:
It just hangs there and does nothing as the r1 boots