xbl xbl_config last_parti QFIL QPST

fdisk -l /dev/block/sdb

CN:/ # fdisk -l /dev/block/sdb
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT

Disk /dev/block/sdb: 8192 sectors, 32.0M
Logical sector size: 4096
Disk identifier (GUID): 6231a3fe-971e-e980-9a6a-ed770c389cac
Partition table holds up to 32 entries
First usable sector is 6, last usable sector is 1018

Number  Start (sector)    End (sector)  Size Name
     1               6             901 3584K xbl
     2             902             933  128K xbl_config
     3             934            1018  340K last_parti

 

(in Qualcomm terms) the. eXtensible Boot Loader (XBL)

 

PBL(Primary Bootloader)将加载XBL(Secondary Bootloader)

 

https://en.wikipedia.org/wiki/Booting_process_of_Android_devices

由于引导 ROM 中的空间有限,因此使用 eMMC 或 eUFS 上的辅助引导加载程序。 [7] 辅助引导加载程序初始化 TrustZone。 [7] [8]

SBL 现在被高通称为 XBL,并使用 UEFI 交叉兼容,以便在第二阶段启动 Android 以外的操作系统。

 

https://blog.quarkslab.com/analysis-of-qualcomm-secure-boot-chains.html

 

 

last_parti

last_parti意思可能是空闲的没有用到的,因为cat /proc/partitions里只有sdb1和sdb2,没有sdb3

 

 

xxd

CN:/ # file /dev/block/sdb1
/dev/block/sdb1: block special
CN:/ # xxd /dev/block/sdb3 | head -10
xxd: /dev/block/sdb3: No such file or directory
CN:/ # xxd /dev/block/sdb2 | head -10
00000000: 7f45 4c46 0201 0100 0000 0000 0000 0000  .ELF............
00000010: 0200 2800 0100 0000 0000 8d14 0000 0000  ..(.............
00000020: 4000 0000 0000 0000 0000 0000 0000 0000  @...............
00000030: 0500 0000 4000 3800 0b00 0000 0000 0000  ....@.8.........
00000040: 0000 0000 0000 0007 0000 0000 0000 0000  ................
00000050: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000060: a802 0000 0000 0000 0000 0000 0000 0000  ................
00000070: 0000 0000 0000 0000 0000 0000 0000 2002  .............. .
00000080: 0010 0000 0000 0000 00a0 8e14 0000 0000  ................
00000090: 00a0 8e14 0000 0000 881a 0000 0000 0000  ................

 

 

hexedit

hexedit /dev/block/sdb2

不太好用,有的键不管用。比如说End:    end of line 没法跳转到文件底部

Home:   beginning of line
End:    end of line

不管用

 

PUp:    page forward
PDown:  page backward

Ctrl+C - unconditional quit (without saving).

可以用

 

RMX1901CN:/ # hexedit
BusyBox v1.30.1-osm0sis (2019-02-28 17:35:07 AST) multi-call binary.

Usage: hexedit FILE

Edit FILE in hexadecimal

 

Qualcomm Product Support Tools (QPST)

 

Qualcomm Flash Image Loader (QFIL)

 

 

hexdump -s

RMX1901CN:/ # fdisk -l /dev/block/sde
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT

Disk /dev/block/sde: 6815744 sectors, 2048M
Logical sector size: 4096
Disk identifier (GUID): e0d6e66a-40ea-9cbc-1e79-9fa744f514f3
Partition table holds up to 64 entries
First usable sector is 6, last usable sector is 851962

Number  Start (sector)    End (sector)  Size Name
     7           41862           42117 1024K abl

 

abl大小1024K 即1024000(1024*1024)

所以-s后边不能超过1024000

RMX1901CN:/ # hexdump -C -n 1000 -s 1000000 /dev/block/by-name/abl
000f4240  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000f4620
RMX1901CN:/ # hexdump -C -n 1000 -s 2000000 /dev/block/by-name/abl
hexdump: /dev/block/by-name/abl: Invalid argument

 

posted @ 2024-02-17 23:15  hrdom  阅读(73)  评论(0编辑  收藏  举报