How to set getExternalStorageState() I have rooted a B&amp;N Nook Glowlight running Android 2.1. The device does not come with an SD card, so I symlinked to another directory from /sdcard/. Now I need to set the Environment.getExternalStorageState() value so that apps will be able to find the "card". How does one set this value?

Note that other devices, such as the Nexus S, also do not have an SD Card, yet they do return a Environment.getExternalStorageState() value for applications that require it.

Note that I am not writing an Android application which uses this value. I need to set this value device-wide so that other applications (such as Anki and Opera will be able to find it.
The source for eclair's Environment.getExternalStorageState() is here.  It looks like getExternalStorageState() comes to this:

return SystemProperties.get("EXTERNAL_STORAGE_STATE", MEDIA_REMOVED)

I think you want to take a look at the /system/build.prop file and check for a line like:

EXTERNAL_STORAGE_STATE=removed

If it's there, try changing it to:

EXTERNAL_STORAGE_STATE=mounted

To do this, adb pull /system/build.prop, modify the file on your computer, then adb remount to make /system writable (or adb shell, su, mount -o rw,remount /system)... then exit back to your computer and adb push build.prop /system/build.prop to push the modified file to /system).  Then reboot.

You can try temporarily (from root shell):

setprop EXTERNAL_STORAGE_STATE mounted

...if that works, you might then programmatically try:

SystemProperties.set("EXTERNAL_STORAGE_STATE", Environment.MEDIA_MOUNTED);

Hope this works out for ya.