wangjianyu3
6b1062a64e
system/fastboot: Fix Out-of-bounds Write
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
caa47f282e
system/fastboot: Fix that total_chunks
of sparse_header maybe error
...
when size of image passed to command "fastboot flash" is not 4KB aligned.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
a413f6bcac
system/fastboot: Fix error that download_size always be zero
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
e6cedb8da7
system/fastboot: Init total_imgsize to zero
...
otherwise random value, sometimes zero
And, close file if flash failed.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
78c11c31e8
system/fastboot: Fix fd leak of fastboot_filedump_upload()
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
c3488c5b47
system/fastboot: Support upload & oem(memdump, filedump) command
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
22f055472c
system/fastboot: Retry if open EP failed
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wanggang26
e55666f90e
fastboot:enable O_CLOEXEC explicit
...
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
f1ce26162b
system/fastboot: Replace printf with syslog
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
anjiahao
53563b67e7
fastbootd:add delay ms for bootloader
...
usage in bootloader
if [flag == bootloader]
fastbootd
else
fastbootd 500
fi
host:
$fastboot flash app app.bin
< waiting for any device >
let board enter booloader,use <reboot bootloader> or hard reset
then will flash it.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-11 23:20:48 +08:00
dongjiuzhu1
95abb3628c
system/fastboot: fix crash when free invalid pointer
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
e3400b2555
Reduce the number of open() and close() to improve performance
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
6ac7cbf4d2
system/fastboot: fastboot flash - call fsync()
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
6b53e1fae9
system/fastboot: erase - add driver independent
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
4d0b9d61de
system/fastboot: Support USB boardctl
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
1752726479
system/fastboot: Complete the erase command
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
25ba30986f
fastboot tool: Status read failed while rebooting into bootloader
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
bf4d873985
system/fastboot: Fix command comparation
...
e.g. The command is "reboot-bootloader", but will match and break when
compared with "reboot"
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2023-09-12 16:26:09 +08:00
dinglongfei
5cced37a1b
system: support system fastbootd
...
Add the fastbootd program to support the flash, getvar, and reboot commands.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-09-06 17:27:26 +08:00