Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


scripts:oowow-dump2xz

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scripts:oowow-dump2xz [2024/11/06 21:52]
hyphop
scripts:oowow-dump2xz [2024/12/16 10:40] (current)
hyphop
Line 1: Line 1:
 ====== oowow-dump2xz ====== ====== oowow-dump2xz ======
  
-http://docs.khadas.com/_export/code/scripts/oowow-dump2xz?codeblock=0+  - https://docs.khadas.com/_export/code/scripts/oowow-dump2xz?codeblock=0 
 +  - https://github.com/khadas-oowow/oowow-tools/blob/main/oowow-dump2xz 
  
 ===== Online usage examples ===== ===== Online usage examples =====
Line 11: Line 13:
  
 <WRAP tip > <WRAP tip >
-''export BOOT=1'' - copy boot-loader from special eMMC area - this is actual for VIM4 Ardroid 14, this feature works start from oowow version 241000 +''export BOOT=1'' - copy boot-loader from special eMMC area - this is actual for VIM4 Ardroid 14, this feature works start **from oowow version 241000 up**
  
 </WRAP> </WRAP>
Line 46: Line 48:
 for D in *-dump.img.zst; do for D in *-dump.img.zst; do
     O=${D%.*}     O=${D%.*}
 +    [ -s "$D" ] || continue
     CMD zstd -d "$D" || CMD rm "$O"     CMD zstd -d "$D" || CMD rm "$O"
 done done
Line 72: Line 75:
 echo -- echo --
 USER_DATA=userdata USER_DATA=userdata
-grep $USER_DATA $T | while read a b c d e; do+grep $USER_DATA $T || ssh root@$REMOTE /opt/aml_partitions >>$T # | tee $T 
 +grep $USER_DATA $T | while read a b c d e f g h j k l m ; do
 [ "$d" ] || DIE "partition $USER_DATA not found" [ "$d" ] || DIE "partition $USER_DATA not found"
-echo $d $e +echo "${d%,*} or $l" 
-echo ${d%,*} > $T.userdata+echo ${l:-${d%,*}} > $T.userdata
 done done
 +
 read USER_START < $T.userdata read USER_START < $T.userdata
 BS=512 BS=512
Line 83: Line 88:
 DUMP=$BOARD-emmc-dump.img DUMP=$BOARD-emmc-dump.img
 echo "Dump image from $BOARD > $DUMP $BYTES bytes ...wait..." echo "Dump image from $BOARD > $DUMP $BYTES bytes ...wait..."
-[ -s ./xze ] || curl "$XZE" -O 
 CMD curl -L "$REMOTE"/api/disk/rdz/mmc.zst:$((BYTES)) -o$DUMP.zst CMD curl -L "$REMOTE"/api/disk/rdz/mmc.zst:$((BYTES)) -o$DUMP.zst
 CMD zstd -d $DUMP.zst CMD zstd -d $DUMP.zst
Line 90: Line 94:
  
 BOARD=${D%%-*} BOARD=${D%%-*}
-board=vim4n 
 board=${board-$(lowcase $BOARD)} board=${board-$(lowcase $BOARD)}
 LABEL=${LABEL:-Android} LABEL=${LABEL:-Android}
Line 116: Line 119:
 } }
  
-CMD sh ./xze "$OUT" \+xze=$(which xze) 
 +xze=${xze:-./xze} 
 +[ -s "$xze" ] || curl "$XZE" -o"$xze" 
 + 
 +CMD sh $xze "$OUT" \
     --meta \     --meta \
     label="$LABEL" \     label="$LABEL" \
     builder="Khadas" \     builder="Khadas" \
-    date="$(TZ=GMT+0 date)" \+    date="$(LANG=C TZ=GMT+0 date)" \
     match=BOARD=$BOARD \     match=BOARD=$BOARD \
     $(bootloader) \     $(bootloader) \
Line 126: Line 133:
     desc="$BOARD $LABEL $OSVER $VER"     desc="$BOARD $LABEL $OSVER $VER"
 ``` ```
- 
  
 ```shell logs ```shell logs
Line 195: Line 201:
 [i] padded to 4096 from 308 + 3788 [i] padded to 4096 from 308 + 3788
 ``` ```
 +
 +==== HowTo Check meta ====
 +
 +```shell
 +khadas@localhost:/images/vim4$  xze vim4n-android-14-v240820.raw.img.xz 
 +Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
 +    2      46    839.1 MiB  4,019.3 MiB  0.209  CRC64   vim4n-android-14-v240820.raw.img.xz
 +[i] blocks: 46 // 839.1*MiB // 4,019.3*MiB
 +##META_FILE##
 +FILE: vim4n-android-14-v240820.raw.img.xz
 +UNPACKED_SIZE: 4214509060
 +PACKED_SIZE: 879849472
 +FILE_SIZE: 879853568
 +##META-FILE##
 +
 +##KRESCUE_META##
 +type:xz
 +label: Android
 +builder: Khadas
 +date: Wed Sep 18 05:43:57 AM GMT 2024
 +match: BOARD=VIM4
 +bootloader: 4212129792
 +vim4n-android-14-v240820.raw.img: vim4n-android-14-v240820.raw.img
 +duration: 90
 +desc: VIM4 Android 14 v240820
 +image: vim4n-android-14-v240820.raw.img
 +##KRESCUE-META##
 +##KRESCUE##END
 +```
 +
 +<WRAP tip >
 +**bootloader: 4212129792** - showing us this image has additional special bootloader
 +
 +</WRAP>
 +
 +
 +==== VIM4 Android 11 ====
 +
 +<WRAP important >
 +''OSVER'' and ''VER'' must be setup properly and related with installed eMMC system
 +</WRAP>
 +
 +```sh VIM4 Android 11
 +unset BOOT
 +export OSVER=11-64bit
 +export VER=v240620
 +curl http://docs.khadas.com/_export/code/scripts/oowow-dump2xz?codeblock=0 | sh -s -
 +```
 +
 +==== VIM4 Android 14 ====
 +
 +<WRAP important >
 +''OSVER'' and ''VER'' must be setup properly and related with installed eMMC system
 +</WRAP>
 +
 +```sh VIM4 Android 14
 +export OSVER=14
 +export VER=v240820
 +export BOOT=1
 +curl http://docs.khadas.com/_export/code/scripts/oowow-dump2xz?codeblock=0 | sh -s -
 +```
 +
 +==== Edge2 Anrdoid 14 ====
 +```sh
 +unset BOOT
 +export OSVER=14
 +export VER=v240820
 +curl http://docs.khadas.com/_export/code/scripts/oowow-dump2xz?codeblock=0 | sh -s -
 +```
 +
 +==== VIM1S Anrdoid 11 ====
 +```sh
 +unset BOOT
 +export OSVER=11
 +export VER=v240820
 +curl http://docs.khadas.com/_export/code/scripts/oowow-dump2xz?codeblock=0 | sh -s -
 +```
 +
Last modified: 2024/11/06 21:52 by hyphop