[Droid Eris Android Development] scary alien:
Beta Amon_RA 1.6.2 Recovery (new test feature)

Okay, I was asked by hoban_eris to include, in Amon_RA's custom recovery for the HTC Droid Eris, support for the file/directory navigation features found in recent versions of ClockworkMod custom recovery.

Well, I spent a lot of time (a whole lot :p) yesterday trying to evaluate and incorporate the code that hoban_eris pointed out in earlier posts, but I have ended-up abandoning this effort at this time. The gather_files routine was straightforward enough, as was the choose_file_menu routine that calls gather_files (and itself, recursively). The convolution comes when choose_file_menu invokes get_menu_selection where the actual key entry is evaluated. The functions in ClockworkMod are (properly) generic and used for several menu/options and are not specific to the .zip file flashing function. It finally because apparent that this was not a straight-forward of a change as I first hoped.

Well, this morning, I thought about what hoban_eris (and I'm sure others) really want: the ability to store their flashable .zip files in a location other than the top-directory of /sdcard. So, I figured I could simply add a menu item and function that would give you the ability to specify what directory that will be for your phone. Well, it wasn't really all that simple (stupid newlines in filenames tripped me up for a while :p), but here's what I've done:

1. Still using the trackball-optional version of this recovery, I've added a menu option on the main screen: Set alt flash zip dir

2. When you select this option, it will look for a file named /sdcard/amon_ra_alt_flash_dir which will contain the name of the directory on your /sdcard that you have placed your .zip files in.

Just populate this file via a text editor and transfer it over to your /sdcard or use adb shell and do something like this:

echo "/sdcard/myROMs" > /sdcard/amon_ra_alt_flash_dir

(substituting whatever actual directory name you want to use, of course).

Note: the directory that you specify will be checked to make sure that it exists when this function is invoked.

3. Next, when you use the Flash zip from sdcard function, the directory that you specified in the /sdcard/amon_ra_alt_flash_dir will be used instead of /sdcard for the selection of your .zip files.

4. If you do not select this new Set alt flash zip dir function or if the /sdcard/amon_ra_alt_flash_dir file is not found when using it, the normal / default /sdcard directory will still be used to search for your .zip files when using the Flash zip from sdcard option

5. Only the Flash zip from sdcard function has been modified to use this alternate directory.

That's about it. Check it out and let me know what you think.

Below is a screenshot and the .zip file containing this test/beta recovery image.

Cheers!

View attachment recovery-RA-eris-v1.6.2-beta.zip

MD5 sum of the .zip file: c72f03a55abf66d880f3b5c70a547674

MD5 sum of the .img file: 316a1f08cb09d424b9577169efcc6781

edit: it also occurred to me that I could make the recognition and reading of the /sdcard/amon_ra_alt_flash_dir file automatic so that you don't have to select it via a menu item/option...let me know if I should pursue this. Thanks.