View Single Post
Old 11-02-2011, 03:58 PM   #75
perldude69
Fun-ologist
perldude69 began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Oct 2011
Device: Pocket Edge, Galaxy S
Here is the reasoning behind the method I used to modify the update.sh:

The type of update is not determined by some variable being set at the top of the script. It is determined by the start parameters of the Update.sh itself. They are writen to a system variable $1 and assigned to the script variable $BOOT_COMMAND. The system value that sets the parameter UPDATE_ORIGIN=factory is "--update_package=SDESI:update.zip".

We could hard wire this value to the $BOOT_COMMAND variable, but then other things go awry. The variable "UPDATE_SRV_DEV is assigned the value "/dev/mmcblk0p1", and this would break my system because I have the update.zip file on USB (/dev/sda1), not the mini SD card.

I found it easier to just replace the "==" check with a "!=" and call it even. It is a quick change, and once the restore is complete, I don't need to go through a lot of code to change it back to work as designed.

Do as you wish, but this was the reasoning behind my script modification.

-- Jim
perldude69 is offline   Reply With Quote