yashsingh1/xdaforums huggingface dataset:
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
At least that confirms that the system files copied across - we should override (-o) I suppose but as we're testing lets use (-n)

Can you copy the initrd.gz and zImage to the root directory of the zip (you shouldn't need to remove the other initrd's).

systeminstall(){
echo "installing system"
# rm -rf /system/*
unzip /sdcard/*${ROM_NAME}*.zip system/*
# /tmp/unzip /sdcard/*${ROM_NAME}*.zip data/*
unzip -n /sdcard/*${ROM_NAME}*.zip META-INF/*
unzip -n /sdcard/*${ROM_NAME}*.zip boot.img -d /tmp/
cat '/META-INF/com/google/android/updater-script' | sed -e '/assert(/,/);/!d' > /tmp/updater-script
cat '/META-INF/com/google/android/updater-script' | sed -e '/symlink(/,/);/!d' >> /tmp/updater-script
cat '/META-INF/com/google/android/updater-script' | sed -e '/setmetadata/,/);/!d' >> /tmp/updater-script
cp /tmp/updater-script /META-INF/com/google/android/updater-script
zip -r /META-INF
cp /META-INF.zip /sdcard/symlink-${ROM_NAME}.zip
}
bootingred(){
echo "obtaining an initrd.gz and zImage to work with"
###### Copying zImage and initrd.gz from /boot_dir when one wasn't in the zip
if [ ! -a "/tmp/boot.img" ]; then
unzip -n /sdcard/*${ROM_NAME}*.zip zImage -d /tmp/
unzip -n /sdcard/*${ROM_NAME}*.zip initrd.gz -d /tmp/
else
/tmp/unpackbootimg /tmp/boot.img /tmp > /tmp/bootimg.txt
/tmp/unpackbootimg /tmp/boot.img /tmp
cp /tmp/boot.img-ramdisk.gz /tmp/initrd.gz
fi
if [ -f /sdcard/zImage ]; then
cp /sdcard/zImage /tmp/zImage
cp /sdcard/modules/* /system/modules/
fi
if [ -f /sdcard/initrd.gz ]; then
cp /sdcard/initrd.gz /tmp/initrd.gz
fi
}

so the progession is: boot.img from zip, if no boot.img then initrd.gz and zImage taken from zip. With both being overwritten by initrd.gz and/or zImage from /sdcard.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
it is late and i am making mistakes. there was already an initrd.gz and zImage on sdcard and i didn't put the correct ones on it for the last test:o

i might have to try again tomorrow:fingers-crossed:

Edit; OK i put the nand ramdisk and kernel to root of zip on sdcard, put the above post's code in the script then pushed script and bins to /tmp

i get the attached

Edit2; did same with slimkat, attached 29 & 30 (with more inflations in between shots)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
tried latest script with bins on /sdcard, get the followings screens.

Note screen 34, it shows the sdcard from windows and a few folders are missing, NativeSD, DirectSD, .Androidsecure, is this because /sdcard is mounted twice in the script?

Edit; found missing $s in lines 92 and 104, it solves the first mount error, see scr35 attached. (Also added "loop" to the echo line ("setting loop partitions...") in line 27 for clarity)

Edit 2; tried adding /data and /system to mkdirs(), also added /s to bind lines in mountpart() but still errors. I think we need to umount /sd-ext and /sdext2 (and /sdcard ?) at start of script.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Tried test 5 twice, once from fresh boot of twrp, then immediately afterwards, get slightly different errors (36 continued in 37 attached). Also /system files seemed to have been written in the first run since it hung on "installing system" for a while, but not on second run.

Edit; I have been searching the 1 & 8 flag error, it seems a workaround is to unzip the files on PC, then put on sdcard.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
yes my zips unzip fine in windows, checked md5s. I had to unzip to put nand initrd.gz and zImage onto sdcard.

test6 screen attached.

will try another zip.

Edit; i can't get the script to recognize new rOm, installtype.prop is same as old, seems 'testing' is not called
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test7 attached

it still seems that testing is not being called, so install.prop is not overwritten.

ooh just saw your edit, test8 soon...

Edit; it is same (40 attached). I noticed that installtype.prop still exists, and that line 354 checks for it before running testing, so i edited this line

And get 41 attached

Edit2 BTW using rOm=SlimKat, type=DirectSD
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
mount & ls

edit; test9 44 & 45 SlimKat NativeSD
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
found a couple of errors test10

line 8 mkbooting should be mkbootimg

line 73 mkdirss() should be mkdirs()

the attached shows 3 runs, rebooting twrp in between, with above errors edited, third run hung for a few seconds before the zip error.

Edt; line 150- updater should be update

Edit2; not sure why the lines 93-98 are there, why put system in a place traditionally for initrd.gz and zImage?

also not sure why lines 120 & 121 are there, this puts the previously created system folder into boot and in boot_dir.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
think i got it right, didn't put in type or ROM_NAME to script. i get attached.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Any difference when in the shell?:

adb shell

sh /tmp/universal11.sh NativeSD SlimKat

add this, just to check

#!/sbin/sh

set -u

testing() {

echo "TESTING MODE"

type=$1

ROM_NAME=$2

echo -e "\$type=$1"

echo -e "\$ROM_NAME=$2"

cp /sdcard/bins/* /tmp

# Run rom with sh script.sh TyPe RoM

# changing RoM to name of rom - name must be in the name of the rom zip i.e for 567SlimKat-V78.zip, RoM can be 'SlimKat'

# changing TyPe to one of NAND DataOnExt NativeSD DirectSD

}
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
same from adb shell

Added those two echo lines but same again

BTW i don't have bins in /sdcard/bins folder, they are on root of sdcard
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
i think it is the same, see test12 attached (added missing fi after first run)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test13 attached

Edit if i push this script

#!/sbin/sh
### set -u
echo "TESTING MODE"
type=$1
ROM_NAME=$2
echo "type=$1"
echo "ROM_NAME=$2"

and sh /tmp/newscript.sh NativeSD SlimKat

i get "type=NativeSD"etc echoed.

Can only think to put testing() earlier in script
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
grep seems the problem
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
seems same

Edit; oops, that is because it was the same:o for some reason.

I redid the test this morning and got mostly SUCCESS. See test16 below, the first bit, before extractions, scrolled off my command prompt screen, but i saw no errors. Note that i had to remove the spaces in "type = $1" and "ROM_NAME = $2" before it would run.

Excellent job:good::good:

Edit2; i added the modules in /sdcard/modules, deleted /sdcard/SlimKattest.zip and /sdcard/NativeSD/ , rebooted twrp. i managed to get screen of first bit before it scrolled off (test16-1, part1), it mentions DirectSD

Edit3; line 192 changed to "cp /sdcard/modules/* /system/lib/modules/

added "mkdir /boot_dir/"${ROM_NAME}"-new" at line 330 (and 336)

i get test16-2 below:)

still get DirectSD mention at start, not sure why. It also says "running on ext4" towards end. I have 2x f2fs partitions ATM.

Edit4; used initrd.gz and zImage from /sdcard/SlimKat-new/ to boot ad sd, hangs on HTC screen for >30mins, extracted mountfs-NativeSD.sh and found "/bin/busybox mkdir -p /NativeSD /bin/busybox mount -t ext4 -o ro,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD # mount the system data app dir"
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Double Post ...
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
did you see my last post edit4?

SlimKattest.zip is only 10MB, i can post it if you want.

---------- Post added at 02:10 PM ---------- Previous post was at 02:04 PM ----------

at mounting data, you can see it in the last post's screens test16-1part1, at the bottom

shall i try test17 you posted above yet?
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Size sounds about right. Its the zip with modified updater script with data and system folders removed.

Just check and see if it runs in recovery (might need to rerun script, I think I have those other issues worked out).

Add "cp /tmp/mountfs-"${type}".sh /sdcard/mountfs.sh" after runn so that you don't need to extract it.

Edit. Yea if you could - removed that DirectSD echo, it was there because you have a p3

(the script is set up to mount p3 as DirectData, and only to bind mount p3/... as /data if type is DirectSD)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
oops deleted test16 SlimKattest.zip before you posted:o

test17 below

Edit; replaced "FIND"s in systeminstall with "find" and get screen 60 below
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test18, managed to get screen at start, then lots of extracts, then lots of compresses then i get screen part2

The SlimKattest.zip installs successfully though
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Does the rom run? Might as well go with what I was going to do initially and send the output to /dev/null. (unless you think having the extracting lines is a good idea?)

Edit. yeah I see tha it exitted - I believe with the aroma line ... If it exits again just # it out - shouldn't cause any issues.

systeminstall() {
echo "installing system"
cd /
# rm -rf /system/*
cp /sdcard/*"${ROM_NAME}"*.zip /sdcard/"${ROM_NAME}"test.zip
chmod 0777 /tmp/7za
/tmp/7za x /sdcard/"${ROM_NAME}"test.zip -y > /dev/null
cp /META-INF/com/google/android/update-binary-installer /META-INF/com/google/android/update-binary
cat '/META-INF/com/google/android/updater-script' | sed -e '/assert(/,/);/!d' > /tmp/updater-script
cat '/META-INF/com/google/android/updater-script' | sed -e '/symlink(/,/);/!d' >> /tmp/updater-script
cat '/META-INF/com/google/android/updater-script' | sed -e '/setmetadata/,/);/!d' >> /tmp/updater-script
echo "umount /NativeSD\
umount /DirectSD\
umount /system\
umount /data\
umount /boot\
umount /system\
umount /boot_dir" >> /tmp/updater-script
cp /tmp/updater-script /META-INF/com/google/android/updater-script
/tmp/7za a /sdcard/"${ROM_NAME}"test.zip META-INF/ > /dev/null
/tmp/7za d /sdcard/"${ROM_NAME}"test.zip aroma* -r > /dev/null
/tmp/7za d /sdcard/"${ROM_NAME}"test.zip system/* > /dev/null
/tmp/7za d /sdcard/"${ROM_NAME}"test.zip data/* > /dev/null
}
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Test18-1 rom hangs on HTC screen, will wait a bit longer and post dmesg and mountfs*.sh (edit; renamed to .txt)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
hanging on htc screen, using nexushd2 directsd
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
That mountfs seems fine - lets take a look at init.rc can you check the contents of mmcblk0p2/NativeSD/${ROM_NAME}/system (and system/bin):

runn() {
if [ ! -f /sdcard/installtype.prop ]; then
testing $type $ROM_NAME || exiterr
else
getpropfile || exiterr
fi
cleanup $2 || exiterr
partnames || exiterr
echo "0 0 0 0 0 0 0 0 0x11800000" > /tmp/bootimg.txt
bootloadercheck || exiterr
exportvar || exiterr
mkdirs || exiterr
if [ "${install_type}" -gt '1' ]; then
mountpart || exiterr
fi
if [ "${bootloader}" = cLK ]; then
bootorig || exiterr
fi
installsystem=`find '/sdcard' -name '*.zip' | grep ${ROM_NAME}`
if [ -n "${installsystem}" ]; then
systeminstall || exiterr
fi
if [ ! -f /tmp/initrd.gz ]; then
bootingred || exiterr
fi
if [ ! -f /tmp/mountfs-"${type}".sh ]; then
mkmountfs || exiterr
fi
mkinitrd || exiterr
initrdcp || exiterr
if [ ${bootloader} = cLK ]; then
bootflash || exiterr
fi
# revertinitrd || exiterr
showresult || exiterr

}
runn
cp /tmp/mountfs-"${type}".sh /sdcard/testrun.txt
cat /tmp/work/init.rc >> /sdcard/testrun.txt
exit 0
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
I have attached init.rc(.txt) from last test.

I added the last code to test19 and ran it, get 19-2 screen below. Edit; attached 19-2 testrun.txt

i can revert the last changes to see the contents of mmcblk0p2/NativeSD/${ROM_NAME}/system (and system/bin) if you want.

Edit2; I found my error in last 19-2 test run, i had renamed /sdcard/NexusHD2-KitKattest.zip to /sdcard/lastNexusHD2-KitKattest.zip, and it was picked up by the script.

No errors this time

Edit3; /dev/block/mmcblk0p2 is empty, from command line and filemanager, see screen from test19-3, this is after installing the *test.zip, will see if it boots

Edit4; hangs on htc screen again, attached dmesg,testrun,

edit5; added a better dmesg.txt showing startup.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Looks like a couple ""'s were the problem . (regarding edit3. I'm sure you realised it's not blank just not accessable that way).

mkinitrd() {
echo "modifying ramdisk"
###### Setting up working directory
cp /tmp/initrd.gz /tmp/initrd-${ROM_NAME}.gz
mkdir -p /tmp/work
cd /tmp/work

###### Unzipping nand kernel
gzip -d -c ../initrd-${ROM_NAME}.gz | cpio -i -d
if [ ! -d bin ]; then
mkdir bin
fi
cp /sbin/busybox /tmp/work/bin/busybox
cp /sbin/e2fsck /tmp/work/bin/e2fsck
cp /tmp/mountfs-"${type}".sh /tmp/work/mountfs-"${type}".sh

if [ "${mt1}" = f2fs ] || [ "${mt2}" = f2fs ]; then
echo "copying fsck for f2fs"
cp /sbin/fsck.f2fs /tmp/work/bin/fsck.f2fs
chmod 0777 /tmp/work/bin/fsck.f2fs
fi
chmod 0777 /tmp/work/mountfs-"${type}".sh
chmod 0777 /tmp/work/bin/busybox
chmod 0777 /tmp/work/bin/e2fsck

###### Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt '2' ]; then
sed -i '/mtd@misc/s/^/#/' /tmp/work/ueventd.*.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' /tmp/work/*.rc
sed -i "s/rOm/$ROM_NAME/g" /tmp/work/mountfs-"${type}".sh
fi
###### Checking for anything other than nand is to be installed
if [ "${install_type}" -gt '1' ]; then
sed -i '/on fs/ a exec /mountfs-${type}.sh' /tmp/work/*.rc
chmod 0750 /tmp/work/init*.rc
chmod 0644 /tmp/work/ueventd.*.rc
fi
###### Building new ramdisk
find . | cpio -o -H newc | gzip -9 > /tmp/initrd-done.gz
}
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
I didn't realise that;), Learning never ends:D

test 19-4 hangs on htc screen, scripts seemed to run ok.

Edit; i noticed " 3.421569] init: property 'type' doesn't exist while expanding '/mountfs-${type}.sh'" in dmesg, seems it was named wrong
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test20 hangs on htc screen

mountfs-DirectSD.sh is in initrd.gz in test20
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Okay - have tested this one properly and it runs as it should (replacing $type with DIrectSD etc.)

mkinitrd() {
echo "modifying ramdisk"
###### Setting up working directory
cp /tmp/initrd.gz /tmp/initrd-${ROM_NAME}.gz
mkdir -p /tmp/work
cd /tmp/work

###### Unzipping nand kernel
gzip -d -c ../initrd-${ROM_NAME}.gz | cpio -i -d
if [ ! -d bin ]; then
mkdir bin
fi
cp /sbin/busybox /tmp/work/bin/busybox
cp /sbin/e2fsck /tmp/work/bin/e2fsck
cp /tmp/mountfs-'${type}'.sh /tmp/work/mountfs-'${type}'.sh

if [ ${mt1} = f2fs ] || [ ${mt2} = f2fs ]; then
echo "copying fsck for f2fs"
cp /sbin/fsck.f2fs /tmp/work/bin/fsck.f2fs
chmod 0777 /tmp/work/bin/fsck.f2fs
fi
chmod 0777 /tmp/work/mountfs-'${type}'.sh
chmod 0777 /tmp/work/bin/busybox
chmod 0777 /tmp/work/bin/e2fsck

###### Modifying ramdisk to not use yaffs, and use sd partitions instead.
if [ "${install_type}" -gt '2' ]; then
sed -i '/mtd@misc/s/^/#/' /tmp/work/ueventd.*.rc
sed -i '/mount yaffs2/s/^/#/
s/# #/# /g' /tmp/work/*.rc
fi
###### Checking for anything other than nand is to be installed
if [ "${install_type}" -gt '1' ]; then
sed -i /on fs/ a exec /mountfs-'${type}'.sh /tmp/work/*.rc
chmod 0750 /tmp/work/init*.rc
chmod 0644 /tmp/work/ueventd.*.rc
fi
###### Building new ramdisk
find . | cpio -o -H newc | gzip -9 > /tmp/initrd-done.gz
}
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test20-1 also hangs on htc screen

Edit; i tried changing the sed line in mkinitrd to

the line shows up correctly in init.rc, but still doesn't boot

Edit2; attaching dmesg and testrun for sed edit above
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test21 wrong name for mountfs in init.rc again, probably because $1 is in a function again.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Sorry added $type to mkmountfs instead of mkinitrd, should be

if [ ! -f /tmp/mountfs-'${type}'.sh ]; then
mkmountfs || exiterr
fi
mkinitrd $type || exiterr

Have updated #140
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test22 from updated #140 hangs on htc screen attached screen, dmesg and testrun

i noticed the wait /dev/block.... in screenie and deleted the extra wait... on line 215

i also noticed in line 315 there is a semi-colon at end of the sed line which looks odd in init.rc

Tried again with the above edits and stiil hangs on htc screen.

The sh: 66: unknown operand errors have been there since test20, but i didn't notice them before now, not sure why they appeared.

Edit; have added screen, dmesg and testrun after the above edits
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test23 exits during installing system, it must have installed most since waited a bit
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test24
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test25 changed grap line 158 and re-run

Edit; are we missing a ( after setmetadata line 164?

Edit2; i just tried it again and after the prompt line, i can't open recovery. tried "adb shell mount" and it hangs. Then recovery rebooted. i think something has broken recovery in the last script.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test26 screen exactly the same as test25 screen, recovery hangs and reboots. Seems to be out of memory, see recovery dmesg attached.

Edit; I see lots of children being sacrificed in dmesg, i thought Linux was supposed to be good;)
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test27 i missed grabbing a screen of the start before extractions and compressions took up all of the command prompt screen space again, but memory problems still occurring, recovery dmesg attached.
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
Only other thing I can think of is that /tmp isn't being wiped - which doesn't seem probable. Have you booted a ROM fully lately.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
No, been itching to try -pixelfreak-'s new ones but my wifi is down and can't get stable enough data connection to DL a full rom.

After rebooting recovery /tmp has only recovery.log in it.

Edit; Ok so i tried formatting p2 and p3 to ext4 using f2fs-sd recovery, and installing a couple of roms using NativeSD, both hung on htc screen, dmesg showed a problem with reading from ext4. I then tried xylo-edited 4ext recovery, it showed p2 and p3 as unformatted. So formatted p2 and p3 with 4ext and tried same roms both booted.

Tried pixel's liquid rom on DirectSD, but it didn't boot, hung on bootanim, so used xylo's sdtwrp2.2.2.0 to install to NativeSD, and it booted, nice.

So tried reformatting p2 and p3 to f2fs and using test27 again on liquid nativeSD. I am still getting OOM errors, see dmesg and screens. Note that the start screen also shows the end of the previous run which is identical to this one.

In the start screen it waited on "installing system" for about 15 seconds before the 7zip bit showed up, then it seems to call 7zip twice (with %ages showing each time), then it extracts a load of files and compresses a load (middle screen shows changeover).

Hope this all helps.

Edit2; i think i've sussed it. afaik the lines

cp /sdcard/*"${1}"*.zip /sdcard/"${1}"test.zip
/tmp/7za d /sdcard/"${1}"test.zip system/*
/tmp/7za d /sdcard/"${1}"test.zip data/*
chmod 0777 /tmp/7za
/tmp/7za x /sdcard/"${1}"test.zip -y
cp /sdcard/*"${1}"*.zip /sdcard/"${1}"test.zip

copy rom.zip to test.zip

delete /system and /data from test.zip

change perms (should this be done sooner?)

extracts test.zip, no prompting

copies test.zip to test.zip then runs out of ram because of infinite loop. I think linux picks the last saved suitable name first, and "${1}"test.zip=*"${1}"*.zip

Does this make sense?
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
changed systeminstall () for test27-1 see screens attached.

the systeminstall function is using ${1} for name but i can't see that variable being passed to it in line 407. could this be causing cp errors?

Edit; Ninja'd:)

Edit2; attached test28 screens, it seems it is not deleting all aroma files.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Just tried the last one (test29) from adb, get screen below. p2 (ext4) isn't mounted (created using 4ext sd recovery, not f2fs sd recovery). 900mb free on sdcard btw, can delete some rom.zips.

edit; i noticed a few $1 etc within functions, i just did a test with the code below

#!/sbin/sh
echo $1
a=$1
testing() {
echo "$1 1 $a"
}
testing $1
exit

named it testing.sh, pushed to /tmp and typed adb shell sh testing.sh test, i get

so the ROM_NAME ($2) and type ($1) can be put into functions, as long as they are named when calling the function. Does this help?

Edit2; i also noticed that line 143 "/tmp/7za x /sdcard/${A}test.zip META-INF '-xr@exc.lst' -y" extracts ${A}test.zip, does it make a folder ${A}test/ like in windows? In which case you could add edited files to folder, then 7zip it.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
Tried test 30, see screen

replaced 2 mentions of "A" with "1", get 2 screens

Edit; have you thought about getting this thread moved to dev section? might get more testers. just report one of your posts and request it, up to you.
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test 31, before your edit, see screens. will test edit after dinner;)

edit; test32, your last edit, screen added

edit2; no META_INF folder in / or /sdcard, no zImage/kernel in /, i did have a zImage in /sdcard already

this is in /tmp/updater_script

package_extract_dir(system, /system);
package_extract_dir(data, /data);
umount /NativeSD	umount /DirectSD	umount /system	umount /data	umount /boot	umount /system	umount /boot_dir
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test33 screen
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test33-1 swapped * to @, see screen

trying test34.....

Edit test34 see 2 screens

Edit2; deleted pixel_LIQUIDtest.zip from sdcard and got 2 screens test34-1
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
can you delete liquidtest.zip on the sdcard and run it again.

$romzip is picking up both the ROMzip and the ROMtest.zip (and ROMtest.zip isn't being cleared by cleaning).

changing to:

romzip="/sdcard/${2}*.zip | cut -d ' ' -f '1' "

might also do the trick;
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
:cyclops:

see above edit:)
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
typo and we can get rid of h.

bootingred() {
echo "obtaining an initrd.gz and zImage to work with"
###### Copying zImage and initrd.gz from /boot_dir when one wasn't in the zip
if [ ! -e "boot.img" ]; then
#umount /boot
#umount /boot_dir
#umount /sdcard
nandinitrd=` find ramds -name 'initrd.gz' -print0 | xargs -0 ls -l | sort -k4 | awk '{print $(NF)}' | tail -n 1 `
zImagelocat=` find ramds -name 'zImage' `
#sdcardmounts $1 $2 $3
cp ${zImagelocat} /tmp/zImage
cp ${nandinitrd} /tmp/initrd.gz
else
chmod 0777 /tmp/unpackbootimg
cp boot.img /tmp/boot.img
/tmp/unpackbootimg /tmp/boot.img /tmp > /tmp/bootimg.txt
cp /tmp/boot.img-ramdisk.gz /tmp/initrd.gz
fi
if [ -f "/sdcard/zImage" ]; then
cp /sdcard/zImage /tmp/zImage
cp /sdcard/modules/* /system/lib/modules/ 2> /dev/null
fi
if [ -f /sdcard/initrd.gz ]; then
cp /sdcard/initrd.gz /tmp/initrd.gz
fi
}
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
test34-2, 2 screens
[HD2 Android Q&A, Help & Troubleshooting and Genera] HypoTurtle:
??? did you save the modified script - you still have h and nansinitrd ...
[HD2 Android Q&A, Help & Troubleshooting and Genera] Robbie P:
OOPS:silly:.....

Edit; sorry about that