How to use Android "Apply update from SD Card" to run custom script

9.9k Views Asked by At

I'm trying to recover some pictures from my HTC One M9. It freezes on reboot after just a few seconds. I can only access the bootloader screen (white background with colorful menu options) and the Android Recovery screen (black background with 7 options.

From that Recovery screen, I immediately see the error

E:mount /cache fail, format it and mount again
E:failed to mount /cache (Invalid Argument).. try emmc mount

I've tried Sprint phone support, the Sprint store, and HTC support.
My attempt to "Wipe Cache Partition" from that menu fails with the same error. I've tried adb, but it doesn't recognize the device in the "List of devices attached"

I'm considering two options, both of which would require using that "update from SD card" option... either a script that copies the files to the sd card, or a script that performs the required mount. It looks like executing that update is pretty straight-forward, but I haven't found any information on how to code those functions.

1

There are 1 best solutions below

1
On

The edify scripting language that's used in the updater is documented here

I don't think it will do you much good though, I'm pretty sure the update file contents have to be signed with a signature that was known to the OS when it was being compiled (either the system signature or one set as an OTA cert)