[Desire Q&A, Help & Troubleshooting] aquade2:
oh sorry;

I'm sorry; I would not try PB99IMG.ZIP yet.

I'm still S-ON state. I'm working trying to S-OFF. Now I'm continuing a failed state;;

It was said does not have S-OFF, but would continue to modify the script to fit the desire I mean.

Because this phrase("failed to open /dev/kmem:No such file or directory") continues to fail.

So I'm going to show the modified part.(Was bold part is modified.)

1) flash_hboot

#!/system/bin/sh

# Check md5 of bravo_alphaspl.img

CSUM=$(md5sum /sdcard/root_files/bravo_alphaspl.img)

if [ "$CSUM" = "7bd5234711364880de1fa982dcf3a2d6 /sdcard/root_files/bravo_alphaspl.img" ]; then

echo 'Flashing engineering hboot file...'

dd if=/sdcard/root_files/bravo_alphaspl.img of=/dev/block/mmcblk0p18

# Ensure data in memory has synced back to disk

echo 'Syncing data...'

sync

sleep 10

else

echo 'Verification of bravo_alphaspl.img failed!'

fi

2) flash_hboot_z

#!/system/bin/sh

# Check md5 of bravo_alphaspl-cm7r2.img

CSUM=$(md5sum /sdcard/root_files/bravo_alphaspl-cm7r2.img)

if [ "$CSUM" = "0be8c68b41f3ab6dda4f772d6de50760 /sdcard/root_files/bravo_alphaspl-cm7r2.img" ]; then

echo 'Flashing engineering hboot file...'

dd if=/sdcard/root_files/bravo_alphaspl-cm7r2.img of=/dev/block/mmcblk0p18

# Ensure data in memory has synced back to disk

echo 'Syncing data...'

sync

sleep 10

else

echo 'Verification of bravo_alphaspl-cm7r2.img failed!'

fi

3) perm_root

#!/system/bin/sh

# Copy needed files to internal memory on phone

echo 'Copying needed files...'

mkdir /data/local/tmp

cp /sdcard/root_files/busybox /data/local/tmp/busybox

cp /sdcard/root_files/gfree /data/local/tmp/gfree

cp /sdcard/root_files/gfree_verify /data/local/tmp/gfree_verify

cp /sdcard/root_files/flash_hboot /data/local/tmp/flash_hboot

cp /sdcard/root_files/flash_hboot /data/local/tmp/flash_hboot_z

# Set permissions on all files

chmod 777 /data/local/tmp/*

# Run gfree

echo 'Running gfree...'

/data/local/tmp/gfree -f

# Ensure data in memory has synced back to disk

echo 'Syncing data...'

sync

sleep 10

# Remount system as read/write

mount -o rw,remount -t ext4 /dev/block/mmcblk0p18 /system

# Set up Busybox

echo 'Installing Busybox...'

mkdir /system/xbin

/data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox

chmod 4755 /system/xbin/busybox

/system/xbin/busybox --install -s /system/xbin

# Set up su and Superuser.apk

echo 'Installing SuperUser...'

cp /sdcard/root_files/Superuser.apk /system/app/Superuser.apk

cp /sdcard/root_files/su /system/bin/su

chmod 4755 /system/bin/su

# Remount system as read-only

mount -o ro,remount -t ext4 /dev/block/mmcblk0p18 /system

# Ensure data in memory has synced back to disk

echo 'Syncing data...'

sync

sleep 10

4)gfree

....

Searching for brq filter... - Address: 0x%.8x + 0x%x

- ***WARNING***: Found fuzzy match for brq filter, but conditional branch isn't. (0x%.8x)

- 0x%.8x -> 0x%.8x

- ***WARNING***: Did not find brq filter. Patching and backing up partition 7... /dev/block/mmcblk0p18 Error opening input file. /sdcard/part7backup-%lu.bin Failed to allocate memory for backup file name.. lol

wb Error opening copy file. Error reading input file. Error writing copy file. Error closing input file. Error closing copy file. Error opening output file. Error reading copy file. patching secu_flag: 1

patching secu_flag: 0

Error writing output file. Error closing output file. Done.

....

I also modified've uploaded a zip file as an attachment, please refer'll.

* I keep saying sorry apologize question; S-OFF is not easy to do with my thought otherwise; Thanks again, I apologize for answers continues.:angel: