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

repetitive "[[: not found" error from scriptpatcher.sh #17

Open
spookyahell opened this issue Sep 22, 2024 · 1 comment
Open

repetitive "[[: not found" error from scriptpatcher.sh #17

spookyahell opened this issue Sep 22, 2024 · 1 comment

Comments

@spookyahell
Copy link

Output from attempting with WSL (Ubuntu 22.04)

fuck@DESKTOP-RC047UP:~/imgpatchtools$ ./scriptpatcher.sh $HOME/S22_flip/9a3aee53e9065364e1ddd01d373c0ba9229c27ed/META-INF/com/google/android/updater-script


#!/bin/sh
mkdir tmp
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
./scriptpatcher.sh: 23: [[: not found
@spookyahell
Copy link
Author

Oh, that's a ubuntu-related issue
https://stackoverflow.com/questions/9666102/bash-double-bracket-issue

However Now I'm getting this.

#!/bin/sh
mkdir tmp
echo "Source: Cat/S22FLIP/S22FLIP:11/RKQ1.210416.002/LTE_S02113.11_N_S22Flip_0.029.04:user/release-keys"
echo "Target: Cat/S22FLIP/S22FLIP:11/RKQ1.210416.002/LTE_S02113.11_N_S22Flip_0.030.03:user/release-keys"
echo "Verifying current system..."
patch_partition_check concat "EMMC:" "boot.img" ":33554432:2781175354d624db73f6a172b796c2c563058e66" concat "EMMC:" "tmp/dev/block/bootdevice/by-name/boot" ":33554432:ee07c75d51068a497f194b2acfd2af9f5b54e957" || echo ERROR: concat "E3005: "" concat "EMMC:" "tmp/dev/block/bootdevice/by-name/boot" ":33554432:2781175354d624db73f6a172b796c2c563058e66" "" or "" concat "EMMC:" "tmp/dev/block/bootdevice/by-name/boot" ":33554432:ee07c75d51068a497f194b2acfd2af9f5b54e957" "" has unexpected contents."
# ---- radio update verification ---- echo "Verifying radio-update..."
patch_partition_check "EMMC:vbmeta.img_system:4096:b1bca9e2b09610b0bdda32dddb4e9f04f72fd92c" "EMMC:/dev/block/bootdevice/by-name/vbmeta_system:4096:120549b0570de7cf60f16c056ffc9b9e9fff1203" || echo ERROR: concat "E3005: "" "EMMC:/dev/block/bootdevice/by-name/vbmeta_system:4096:b1bca9e2b09610b0bdda32dddb4e9f04f72fd92c" "" or "" "EMMC:/dev/block/bootdevice/by-name/vbmeta_system:4096:120549b0570de7cf60f16c056ffc9b9e9fff1203" "" has unexpected contents."
patch_partition_check "EMMC:modem.img:88080384:29f518509e3dd80686809faea373a356e78b498c" "EMMC:/dev/block/bootdevice/by-name/modem:88080384:ca05b271bca920c04d08e8adc926e410ab175256" || echo ERROR: concat "E3005: "" "EMMC:/dev/block/bootdevice/by-name/modem:88080384:29f518509e3dd80686809faea373a356e78b498c" "" or "" "EMMC:/dev/block/bootdevice/by-name/modem:88080384:ca05b271bca920c04d08e8adc926e410ab175256" "" has unexpected contents."
patch_partition_check "EMMC:vbmeta.img:8192:315d000c56aa46b91f334a1d8100556f145f060c" "EMMC:/dev/block/bootdevice/by-name/vbmeta:8192:49059dbb9ab6c32f749d8f597866ece5673c0135" || echo ERROR: concat "E3005: "" "EMMC:/dev/block/bootdevice/by-name/vbmeta:8192:315d000c56aa46b91f334a1d8100556f145f060c" "" or "" "EMMC:/dev/block/bootdevice/by-name/vbmeta:8192:49059dbb9ab6c32f749d8f597866ece5673c0135" "" has unexpected contents."
patch_partition_check "EMMC:vbmetabak.img:8192:315d000c56aa46b91f334a1d8100556f145f060c" "EMMC:/dev/block/bootdevice/by-name/vbmetabak:8192:49059dbb9ab6c32f749d8f597866ece5673c0135" || echo ERROR: concat "E3005: "" "EMMC:/dev/block/bootdevice/by-name/vbmetabak:8192:315d000c56aa46b91f334a1d8100556f145f060c" "" or "" "EMMC:/dev/block/bootdevice/by-name/vbmetabak:8192:49059dbb9ab6c32f749d8f597866ece5673c0135" "" has unexpected contents."
patch_partition_check "EMMC:dtbo.img:8388608:397cbde256d4bd078c28796673abdcb9ce9a7c40" "EMMC:/dev/block/bootdevice/by-name/dtbo:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf" || echo ERROR: concat "E3005: "" "EMMC:/dev/block/bootdevice/by-name/dtbo:8388608:397cbde256d4bd078c28796673abdcb9ce9a7c40" "" or "" "EMMC:/dev/block/bootdevice/by-name/dtbo:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf" "" has unexpected contents."
patch_partition_check "EMMC:dtbobak.img:8388608:397cbde256d4bd078c28796673abdcb9ce9a7c40" "EMMC:/dev/block/bootdevice/by-name/dtbobak:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf" || echo ERROR: concat "E3005: "" "EMMC:/dev/block/bootdevice/by-name/dtbobak:8388608:397cbde256d4bd078c28796673abdcb9ce9a7c40" "" or "" "EMMC:/dev/block/bootdevice/by-name/dtbobak:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf" "" has unexpected contents."
# Patch partition system echo "Patching system image after verification."
BlockImageUpdate map_partition "system" "system.transfer.list" "system.new.dat" "system.patch.dat" || echo ERROR: "E1001: Failed to update system image."
# Patch partition vendor echo "Patching vendor image after verification."
BlockImageUpdate map_partition "vendor" "vendor.transfer.list" "vendor.new.dat" "vendor.patch.dat" || echo ERROR: "E2001: Failed to update vendor image."
# Patch partition product echo "Patching product image after verification."
BlockImageUpdate map_partition "product" "product.transfer.list" "product.new.dat" "product.patch.dat" || echo ERROR: "E2001: Failed to update product image."
# --- End patching dynamic partitions --- echo "Patching boot image..."
patch_partition concat "EMMC:" "boot.img" ":33554432:2781175354d624db73f6a172b796c2c563058e66" concat "EMMC:" "tmp/dev/block/bootdevice/by-name/boot" ":33554432:ee07c75d51068a497f194b2acfd2af9f5b54e957" "boot.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " concat "EMMC:" "tmp/dev/block/bootdevice/by-name/boot" ":33554432:ee07c75d51068a497f194b2acfd2af9f5b54e957"
# ---- radio update tasks ---- echo "Patching firmware images..."
ifelse msm.boot_update "main" patch_partition "EMMC:vbmeta.img_system:4096:b1bca9e2b09610b0bdda32dddb4e9f04f72fd92c" "EMMC:/dev/block/bootdevice/by-name/vbmeta_system:4096:120549b0570de7cf60f16c056ffc9b9e9fff1203" "patch/firmware-update/vbmeta_system.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " "EMMC:/dev/block/bootdevice/by-name/vbmeta_system:4096:120549b0570de7cf60f16c056ffc9b9e9fff1203"
patch_partition "EMMC:modem.img:88080384:29f518509e3dd80686809faea373a356e78b498c" "EMMC:/dev/block/bootdevice/by-name/modem:88080384:ca05b271bca920c04d08e8adc926e410ab175256" "patch/firmware-update/modem.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " "EMMC:/dev/block/bootdevice/by-name/modem:88080384:ca05b271bca920c04d08e8adc926e410ab175256"
patch_partition "EMMC:vbmeta.img:8192:315d000c56aa46b91f334a1d8100556f145f060c" "EMMC:/dev/block/bootdevice/by-name/vbmeta:8192:49059dbb9ab6c32f749d8f597866ece5673c0135" "patch/firmware-update/vbmeta.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " "EMMC:/dev/block/bootdevice/by-name/vbmeta:8192:49059dbb9ab6c32f749d8f597866ece5673c0135"
patch_partition "EMMC:dtbo.img:8388608:397cbde256d4bd078c28796673abdcb9ce9a7c40" "EMMC:/dev/block/bootdevice/by-name/dtbo:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf" "patch/firmware-update/dtbo.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " "EMMC:/dev/block/bootdevice/by-name/dtbo:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf"
ifelse msm.boot_update "backup" patch_partition "EMMC:vbmetabak.img:8192:315d000c56aa46b91f334a1d8100556f145f060c" "EMMC:/dev/block/bootdevice/by-name/vbmetabak:8192:49059dbb9ab6c32f749d8f597866ece5673c0135" "patch/firmware-update/vbmeta.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " "EMMC:/dev/block/bootdevice/by-name/vbmetabak:8192:49059dbb9ab6c32f749d8f597866ece5673c0135"
patch_partition "EMMC:dtbobak.img:8388608:397cbde256d4bd078c28796673abdcb9ce9a7c40" "EMMC:/dev/block/bootdevice/by-name/dtbobak:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf" "patch/firmware-update/dtbo.img.p" || echo ERROR: concat "E3008: Failed to apply patch to " "EMMC:/dev/block/bootdevice/by-name/dtbobak:8388608:57d41038cc8c88ec077dd7a970400ea3d2dc47bf"

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

1 participant