I've been studying/Googleing/researching how to make an update.zip file as my mid1045 is stuck in boot screen and the only thing I can do is boot to stock recovery. so I thought I'd share what I've learned and let everyone pick it apart before I totally bork my bits
but hey its been a fun ride. I have literally taken apart hundreds of .zips apart over the last 2 or 3 weeks
I have 29 zips right now that I've taken apart several time each
I emptied my recycle bin and had 71,000 files and 5.6GB in it. I've tried them all and none of them worked I've Googled till my eyes feel like they're going to bleed
"https://www.google.com/search?q=edify+script+commands&biw=1920&bih=979&sa=X&ei=7Sm9Udy5GaGSyQGp-oGgDg&ved=0CBwQpwUoBg&source=lnt&tbs=cdr%3A1%2Ccd_min%3A6%2F15%2F2013%2Ccd_max%3A11%2F1%2F2012&tbm=" this [Tutorial] Edify Scripts,Making Flashable Zips - xda-developers and this are both good places to start.
OK all flashable zips have a directory structure \META-INF\com\google\android with update-binary and updater-script in them the updater-binary is what gets executed when you boot into recovery and it loades the updater-script. In the META-INF folder there is a directory com and 3 files cert.rsa, cert.sf and manifest.mf these are what the bootloader looks at for verification. Sometimes I've seen a google and android directory in the \META-INF\com in the android directory is a file named ota "Over The Air" correct me if I'm wrong but I believe its a sha1 cert from the vendor.
I'm not questioning your code Vampirefo, I trying to learn what I can and cant do with this
http://www.androidtablets.net/forum...recovery-coby-allwinner-via-command-line.html I was wondering, this line does? reboots into recovery but why the busybox dd and what is nandf I know its /misc. I know what busybox and dd are but why are you makeing a copy of them there? I dont see nandf ever used again?
I cant use adb otherwise I wouldn have this problem, but I can copy the img files directly to my sdcard from my computer, so no need to adb push to sdcard
would that work? and I hope you learned as much as I have and if you've got comments or code/commands to share post them here

OK all flashable zips have a directory structure \META-INF\com\google\android with update-binary and updater-script in them the updater-binary is what gets executed when you boot into recovery and it loades the updater-script. In the META-INF folder there is a directory com and 3 files cert.rsa, cert.sf and manifest.mf these are what the bootloader looks at for verification. Sometimes I've seen a google and android directory in the \META-INF\com in the android directory is a file named ota "Over The Air" correct me if I'm wrong but I believe its a sha1 cert from the vendor.
I'm not questioning your code Vampirefo, I trying to learn what I can and cant do with this
echo -n boot-recovery | busybox dd of=/dev/block/nandf count=1 conv=sync; sync; reboot
I cant use adb otherwise I wouldn have this problem, but I can copy the img files directly to my sdcard from my computer, so no need to adb push to sdcard
Now we get to the part that I might be able to usein push terminal
adb push bootloader.img /sdcard/bootloader.img
adb push boot.img /sdcard/boot.img
adb push system.tgz /sdcard/system.tgz
Is cat part of busybox,or edify scripting language or is it from adb? can I use adb commands in my script? should I do a format before I cat my nand partitions? should they be unmounted? what is the order of operations for something like that unmount/format/mount and should I use busybox dd, or cat are those any better than package_extract_dir("system", "/system"). I think dd would be best as it does a bit for bit copy. the next part I understand your removing the /system and /data recursively I understand wipeing the system partition but why the data partition? and how does it get restored? and why rm -r and not format, or delete_recursive("directory-path-1", "directory-path-2") so if I make a update.zip with my recovery files in it and an updater-script that looks something like thisin execute terminal
adb shell
cat /sdcard/bootloader.img > /dev/block/nanda
cat /sdcard/boot.img > /dev/block/nandc
Now if you need to restore system
adb shell
mount -t ext4 /dev/block/nandd /system
mount -t ext4 /dev/block/nande /data
rm -r /system/*
rm -r /data/*
busybox tar -xzvf /sdcard/system.tgz
once done reboot
and rebootformat("ext4", "EMMC", "/dev/block/nanda");
format("ext4", "EMMC", "/dev/block/nandc");
format("ext4", "EMMC", "/dev/block/nandd");
mount -t ext4 /dev/block/nanda /bootloader;
mount -t ext4 /dev/block/nandc /boot;
mount -t ext4 /dev/block/nandd /system;
cat /sdcard/bootloader.img > /dev/block/nanda; or
busybox dd if=/sdcard/bootloader.img of=/dev/block/nanda; or
package_extract_dir("bootloader.img", "/dev/block/nanda");
cat /sdcard/boot.img > /dev/block/nandc;
mount -t ext4 /dev/block/nandd /system;
rm -r /system/
busybox tar -xzvf /sdcard/system.tgz;
would that work? and I hope you learned as much as I have and if you've got comments or code/commands to share post them here
Last edited: