Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discovery] boot.img exceeds max size #305

Closed
ploth opened this issue Jan 20, 2019 · 21 comments
Closed

[Discovery] boot.img exceeds max size #305

ploth opened this issue Jan 20, 2019 · 21 comments

Comments

@ploth
Copy link

ploth commented Jan 20, 2019

Platform: Nile
Device: Discovery, XA2 Ultra, H3213
Kernel version: 4.9
Android version: android-9.0.0_r30

Description

fastboot flash boot boot.img results in:

target didn't report max-download-size
sending 'boot' (22549 KB)...
FAILED (remote: Requested download size is more than max allowed
)
finished. total time: 0.000s

How to reproduce

Build android-9.0.0_r30 branch for aosp_h3213-userdebug and try to flash boot.img

@jerpelea
Copy link
Collaborator

ls -l boot.img please

@jerpelea
Copy link
Collaborator

jerpelea commented Jan 20, 2019

I cant replicate on a clean build

@ploth
Copy link
Author

ploth commented Jan 20, 2019

$ ls -l boot.img  
-rw-r--r-- 1 ploth ploth 23090472 Jan 20 10:54 boot.img

EDIT: Removed entire out directory before build.

@stefanhh0
Copy link

I had the same problem. Reason was that I tried to flash while my notebook was on battery. As soon as I plugged in the power-cord and restarted the phone into bootloader it worked without any problems.

I've just retried that procedure and could reproduce it, maybe you have the same problem:

Failed attempt:
root@mars:/home/stefan/android-bin/2019_01_18# fastboot flash vendor vendor.img
target didn't report max-download-size
sending 'vendor' (50236 KB)...
FAILED (remote: Requested download size is more than max allowed
)
finished. total time: 0.000s

After re-plugging the power-cord and rebooting the phone into the bootloader again it worked:
root@mars:/home/stefan/android-bin/2019_01_18# fastboot flash vendor vendor.img
target reported max download size of 536870912 bytes
sending 'vendor' (50236 KB)...
OKAY [ 1.905s]
writing 'vendor'...
OKAY [ 0.003s]
finished. total time: 1.908s

@ploth
Copy link
Author

ploth commented Jan 20, 2019

Sounds like black magic ;)
I was on AC the entire time, I had to reenter the fastboot mode multiple times before I was able to flash again.

@ploth ploth closed this as completed Jan 20, 2019
@stefanhh0
Copy link

Good that it works now. Another reason could be an unstable usb connection... Next time you could also try using a different usb plug or cable.

When switching to battery, several power saving mechanisms kick in - that would be a better explanation than good old witchcraft :-)

@waltercool
Copy link

Sounds like black magic ;)
I was on AC the entire time, I had to reenter the fastboot mode multiple times before I was able to flash again.

How you finally made this work? Tried several times without solution. I even bought a new "Sony" cable, and still nothing.

By some reason, flashmode or adb works great, just fastboot seems to be quite buggy for me.

@MartinX3
Copy link

Sometimes it gets buggy for me too
Random throwing errors
But in the last time it worked again without these problems

@ploth
Copy link
Author

ploth commented Jan 31, 2019

Just to throw in more black magic :D I changed my workplace and put my laptop in standby for that. Then it worked using the same usb cable from before.

@MartinX3
Copy link

I got the same random errors again and need to restart my phone into fastboot after every "fastboot flash".
And sometimes while fastboot wants to flash the device just restarts. :D

@waltercool
Copy link

I got the same random errors again and need to restart my phone into fastboot after every "fastboot flash".
And sometimes while fastboot wants to flash the device just restarts. :D

Yeah, I can reproduce the same. No idea if this is a Linux specific issue or not, tried 3 different versions of fastboot, used different Linux distros (own Gentoo + Ubuntu 18.04 + Debian), even a different computer with Linux, and same problem.

For now I can't test myself with Windows because I don't have a partition for that, and doesn't work for me using QEMU, got usb connect/disconnect issues.

I will try today later using a borrowed Windows, I read somewhere at XDA about using Sony's fastboot drivers may solve the problem.

@waltercool
Copy link

Update:

Tried on a OSX and worked correctly. I would guess this is a Linux specific issue.

At Linux, it fails to me using fastboot version 28.0.1-4986621

@jamuir
Copy link

jamuir commented Jan 31, 2019

I've found communication with sony devices over fastboot to be quite flakey (and I have tested a number of different sony devices).

I started testing the connection by repeatedly running fastboot getvar product. About 5 or 6 times out of 10 that command would fail. I raised a ticket on this (outside of Sony Open Devices) but there was no resolution.

When I started using a usb hub, the problem went away for me. Maybe it has something to do with the voltage supplied by the usb connection.

I also found that the connection was stable when I tried on a mac.

@stefanhh0
Copy link

For yoshino, lilac it is pretty stable on my linux box, just when I switch from AC to battery it gets reproducable unstable.

I tried:
set -e; for i in {1..1000}; do fastboot getvar product; done; set +e
And the loop ran successful.

I am using fastboot version 1:8.1.0+r23-4
That is the version that comes with my debian distro (debian testing [kernel: 4.19.12-1]).

Dell made many bugfixes over the time for my notebook (a precision 7510). Many of them tackled firmware probs of the usb controller.

But maybe yoshino/lilac is just not affected from what you report...

@djselbeck
Copy link

I have problems with my Linux on a lenovo x240 and Yoshiko/lilac and tone/kagura when directly connected to the machine. It works when I disable USB3 in the BIOS.

It however works with USB3 and a hub between.

@waltercool
Copy link

I have problems with my Linux on a lenovo x240 and Yoshiko/lilac and tone/kagura when directly connected to the machine. It works when I disable USB3 in the BIOS.

It however works with USB3 and a hub between.

I can confirm the hub as solution. Thanks!

@MartinX3
Copy link

With my ThinkPad T460P Ultra Dock 90W and AC I get the weird errors at USB3 and USB2.
But at my Windows 10 PC with USB3 and USB2 it is stable.

@djselbeck
Copy link

djselbeck commented Feb 1, 2019

I also use the UltraDock and the ports are as unstable as the ones on the device itself for me. I have two Dell displays with integrated USB3 hubs, connected to the dock and if I use these for fastboot it will work 100% reliable.

@MartinX3
Copy link

MartinX3 commented Feb 1, 2019

Now I understand my bug in the past.
#240

@Haxk20
Copy link
Contributor

Haxk20 commented Sep 15, 2019

I have the exact same issue on my device (mermaid). Will try USB hub. Does it have to be powered one or just normal one ?

@waltercool
Copy link

I have the exact same issue on my device (mermaid). Will try USB hub. Does it have to be powered one or just normal one ?

Just a normal one. I assume USB hub distribute power supply independent from computer. I tried with USB 2.0 and USB 3.0 and works great. Just fails when directly connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants