[Motorola Droid X2] skwoodwiva:
Thanks to mastafunk for the info.

I noticed after uninstalling system recovery that it still worked(edit pull is for emergency only will reset date. Just plug in and power off) w/ a battery pull. I remember now where the /preinstall files came from:

Rom Manager

Set charge mode.

Uninstall sys recov, and rom mgr(if there).

Then DL mkt RM free/donate. Install.

DL latest 5025 (1st choice).

Reboot into recov and it just boots.

Install Tenfar's and get into cwr.

Go adv and reboot recovery (goes to stk recov, should this not be CWR? So here is where the preinstall gets filled?) and reboot from there.

/preinstall is filled!

You do not need to do this just showing how they got there.

I am saying that with these 2 folders: /preinstall and /system/bin as well as the .recovery_mode file , cwr works for the Dx2. While trying to confirm the source of the PI files I crashed. So SBF'ing I confirmed it works: use Root Explorer, you may have to set charge mode and uninstall SR.

1)paste to /preinstall: the 3 files and set perms to rwxrwxrwx ( adbd is not needed btw. ), and update-recovery.zip: rwxr-xr-x . Note hijack goes to /preinstall as well as /system/bin.

2)Change charge_only_mode ( your original in system/bin) to .bak. Then paste the 2 /system/bin files (less the .not file) set perms to rwxrwxrwx.

3)Then .recovery_mode goes in /data perms to rw-rw-rw-.

Edit: have the charger plugged in and Power off. I thought a: (Pull battery and put it back in. Plug in) was needed but it is not. CWR!

Edit: the /pi needs just 3 files: ud-recovery.zip, ud-binary(same as in the zip) and hijack (same as system/bin/) 6 files if you count hijack twice.

This may work on the Milestone X2. I don't know of anyone who tried this yet.

About the files needed (attached at the end)note file: charge_only_mode.bin.not in /system/bin was included for reference NOT TO MESS WITH IT.

The linkage notation, in Root Explorer, from chargeonlymode to hijack gets lost once the files are off the phone but it still works.

This could it be packaged in a zip and flashed from CWR so after a data wipe or a ROM flash CWR could be restored before leaving CWR.

I wrote a test script to write .recovery_mode to /data. I wiped data from cwr then mounted /data manually. Then ran the script and recovery was restored with a battery pull.

I cannot get the full "ReRecovery" to work. For the update-binary I am told P3Droid's prerooted 234 is good to pull from. But have yet to try his binary. Here is where I am at: updater-script:

run_program("/bin/mount", "/dev/block/ mmcblk0p12 ", "/system");

run_program("/bin/mount", "/dev/block/ mmcblk0p16 ", "/data");

run_program("/bin/mount", "/dev/block/ mmcblk0p17 ", "/preinstall");

#this one zeroed /preinstall.

Or

#mount("ext3", "/dev/block/mmcblk0p12", "/system");

#mount("ext3", "/dev/block/mmcblk0p17", "/preinstall");

#mount("ext3", "/dev/block/mmcblk0p16", "/data");

# this gave a status 7

package_extract_dir("data", "/data");

#set_perm(0, 0, 0666, "/data/.recovery_mode");

set_perm(0, 0, 0666, "/data/test");

unmount("/data");

package_extract_dir("system", "/system");

#set_perm(0, 0, 0777, "/system/bin/charge_only_mode");

set_perm(0, 0, 0777, "/system/bin/test");

#set_perm(0, 0, 0777, "/system/bin/hijack");

unmount("/system");

package_extract_dir("preinstall", "/preinstall");

#set_perm(0, 0, 0666, "/preinstall/adbd");

set_perm(0, 0, 0666, "/preinstall/test");

#set_perm(0, 0, 0777, "/preinstall/hijack");

#set_perm(0, 0, 0777, "/preinstall/hijack.killall");

#set_perm(0, 0, 0777, "/preinstall/update-binary");

#set_perm(0, 0, 0755, "/preinstall/update-recovery.zip");

unmount("/preinstall");

End code

#'ed out real files for test files. This trashed /preinstall and no test files got written. Test files are 0 bytes.

Any help would be greatly appreciated.