[SOLVED] Fastboot flash Boot shows uncaught exception of type std::out_of_range: basic_string

Hi there,

i read long time here and want to switch to e/os for a GS290. So overall a very good describtion of the how to page. Unfortunately this command

"fastboot flash --disable-verity --disable-verification boot “C:\Program Files (x86)\WindowsPhone\Neuer Ordner\boot(1).img”

leads to
terminating with uncaught exception of type std::out_of_range: basic_string

Runing flash command without the parameters --disable-verity --disable-verification throws no error message, but cause a boot loop (state orange, untrustet, restart after 5 sec)

Can you help me please?

Thanks in aadvance
Detlef

Hi Detlef, welcome to the forum.

The command required is actually:

fastboot flash --disable-verity --disable-verification boot boot.img

But the command with --disable-verity --disable-verification missing is quite different.

Is your issue that you cannot get out of the boot lop?

Hi aibd,

thanks for your answer, i would need help first in the problem why “fastboot flash --disable-verity --disable-verification boot boot.img” causes “terminating with uncaught exception of type std::out_of_range: basic_string”

The boot loop is the second issue, but (i think) caused by flashing boot.img without the parameters “-disable-verity --disable-verification”

So what cause this “terminating with uncaught exception of type std::out_of_range: basic_string”, any idea? Using the boot.img and all other images from the instruction page /e/ documentation | Welcome to /e/ documentation! Download, install and compile /e/OS for your android smartphone Main website Community forums

I am not sure where we are here?

fastboot flash --disable-verity --disable-verification boot #would be wrong syntax

fastboot flash --disable-verity --disable-verification boot boot.img # correct syntax

Even without path to boot.img as you wrote above fastboot flash --disable-verity --disable-verification boot boot.img

raises this error, so guess no error in syntax. any other ideas?

on XDA found this:
Disable AVB by flashing stock vbmeta.img with the following command: “fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img”.

Where can i find this vbmeta.img here? Suppose with that command above and running astboot flash boot boot.img
i will not get a boot loop? And btw. running the easy installer wont work, if decvice is in fastboot mode? Unfortunaltey recovery or normal mode runs in boot loop, therefore no usb detection possible.

Solved the error “terminating with uncaught exception of type std::out_of_range: basic_string” by using the correct (latest) version of platform tools adb and fastboot.

Hope this helps other users running into this error too… :slight_smile:

4 Likes

Which fastboot version did you use?
I use fastboot 31.0.2 from Android SDK (Linux) but the error “terminating with uncaught exception of type std::out_of_range: basic_string” raises with this version.

1 Like

Hi Jürgen,

to be honest, don’t know exactly which version i used, i installed several versions:
30.0.5
31.0.1
31.0.2

suggest to donwlad these in different folders and try again, so i did…

Hope this helps.
BR
Detlef

1 Like

Hi Detlef.

Thank you.

Will trying to downgrade to 31.0.1 or 30.0.5 again.
Had also tried to downgrade this morning, with SDK manager by removing SDK 31, reinstalling SDK 30 / platform tools. But it always installs platform tools with version 31, nevertheless only SDK 30 is installed.

Edit: With Platform Tools 30.0.5 (separately installed) it works.

3 Likes

Hi Juergen and Detlef,

I had the same issue with 31.0.1. The downgrade to 30.0.5 does the trick for me, too!

Thanks a lot, each of you!

1 Like

Direct download links for SDK Platform Tools 30.0.5 :
https://dl.google.com/android/repository/platform-tools_r30.0.5-linux.zip
https://dl.google.com/android/repository/platform-tools_r30.0.5-windows.zip

3 Likes

I have the same problem as the op with a GS290. I used an up-to-date version of adb/fastboot (31.0.0-x instead of 30.0.5) and due to the error went with fastboot flash boot boot.img without the --disable-verity --disable verification options, got an OK exit status and rebooted. Now I’m in a bootloop and can’t get fastboot mode to recognise my device. Tried adb devices adb reconnect and adb usb. No devices found. I’m on linux. What are my options now?

With volume up I can boot into e recovery v0.14, because system.img and recovery.img flashing (to v0.17) was error-free. From the recovery screen with ‘enabled adb’ (from advanced options) the fastboot flash --disable-verity --disable-verification boot boot.img command didn’t work. I don’t want to brick the phone so I’ve stopped here.

Will the new eOS 0.19 stabile release be applicable with updated versions of the Android tools? I have downloaded the linked Android-tools v30.0.5 in the post above.

idem for me . with linux android tool 31.0.2

fastboot flash --disable-verity --disable-verification boot boot.img

error
terminate called after throwing an instance of ‘std::out_of_range’
what(): basic_string::compare: __pos (which is 33554368) > this->size() (which is 0)
Annullato (core dump creato)

Hi @Rsunlight welcome to the forum

Will the new eOS 0.19 stabile release be applicable with updated versions of the Android tools?

I don’t think there is any evidence that platform-tools v30.0.5 is sensitive to /e /version. As it happens it was used when GS290 was first introduced. I see no clear explanation for the reason, but it would seem that more recent versions of platform-tools have introduced some issue that is a bug in some environments with this device.

An explanation for why we must apply

--disable-verity --disable-verification

early

In order to boot a custom boot-partition or custom recovery, you have to disable verified boot, otherwise you can’t boot to the OS.

Good luck :slight_smile:

1 Like

Still the same error with android-tools 31.0.3

I have tried with 30.0.5 - works without any issues. :exploding_head:

got into boot-loop after trying to ignore verified boot (beginner’s mistake), had to use the SP Flash Tool to unbrick that device. (volume down & power = force shutdown) then follow this guide Installing /e/OS after removing UbuntuTouch on the GS290 maybe this will help someone else with the same problem
btw if you’re using opensuse, you can also use Yast to add the user to the group

Hi @Xenthos on the basis that this platform-tools version issue applies to #gs290 it would be great if someone affected might try to raise a bug against Platform tools.

If platform-tools worked once, it should be reported where it has stopped working in recent versions.

The reporting system seems to work though Google groups, so it would require someone with some Google login to make any progress! This might be a starting point accessible to all.

https://source.android.com/setup/contribute/report-bugs

Should such a bug be found already exists, perhaps we could share it here. :slight_smile: