mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
5b9f641c06
1. dumpf2fs.sh : to see internal device with hexdump 2. spo_test.sh : to run SPOR 3. tracepoint.sh : to turn on tracepoints Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
62 lines
1.2 KiB
Bash
Executable File
62 lines
1.2 KiB
Bash
Executable File
#!/system/bin/sh
|
|
DEV=/dev/block/mmcblk0p16
|
|
|
|
CMD=$1
|
|
BASE=0x200000
|
|
BASE_MAIN=0xac00000
|
|
|
|
case $CMD in
|
|
cp1)
|
|
echo dump cp1
|
|
let addr=$BASE
|
|
echo $addr
|
|
hexdump -s $addr -n 4096 $DEV;;
|
|
cp2)
|
|
echo dump cp2
|
|
let addr=$BASE+0x200000
|
|
hexdump -s $addr -n 4096 $DEV;;
|
|
cp)
|
|
echo dump cp1 and cp2
|
|
let addr=$BASE
|
|
hexdump -s $addr -n 409 $DEV
|
|
let addr=$BASE+0x200000
|
|
hexdump -s $addr -n 4096 $DEV;;
|
|
cp1_all)
|
|
echo dump cp1 all
|
|
let addr=$BASE
|
|
hexdump -s $addr -n 20480 $DEV;;
|
|
cp2_all)
|
|
echo dump cp2 all
|
|
let addr=$BASE+0x200000
|
|
hexdump -s $addr -n 20480 $DEV;;
|
|
cp_all)
|
|
echo dump cp1 and cp2 all
|
|
let addr=$BASE
|
|
hexdump -s $addr -n 20480 $DEV
|
|
let addr=$BASE+0x200000
|
|
hexdump -s $addr -n 20480 $DEV;;
|
|
blk)
|
|
let addr=$BASE_MAIN+$2*0x200000+$3*0x1000
|
|
hexdump -s $addr -n 4096 $DEV
|
|
echo ;;
|
|
inode)
|
|
let addr=$BASE_MAIN+$2*0x200000+$3*0x1000
|
|
for i in `seq $3 511`
|
|
do
|
|
hexdump -s $addr -n 8 $DEV
|
|
let end=$addr+0x0ff0
|
|
hexdump -s $end -n 16 $DEV
|
|
let addr=$addr+0x1000
|
|
done
|
|
echo ;;
|
|
*)
|
|
let addr=$1*0x1000
|
|
let segno=$addr-$BASE_MAIN
|
|
let segno=$segno/0x200000
|
|
let off=$addr-$BASE_MAIN
|
|
let off=$off%0x200000/0x1000
|
|
echo $segno, $off
|
|
hexdump -s $addr -n 4096 $DEV
|
|
echo ;;
|
|
esac
|