#!/system/bin/sh
if ! applypatch -c EMMC:/dev/block/mmcblk0p2:5801984:1df4307f4eb668812a056b8d0dfd1a020a8f68af; then
  log -t recovery "Installing new recovery image"
  applypatch -b /system/etc/recovery-resource.dat EMMC:/dev/block/mmcblk0p1:5249024:100026b299e8ef9e38373b5a99ca5db5c785aa4d EMMC:/dev/block/mmcblk0p2 1df4307f4eb668812a056b8d0dfd1a020a8f68af 5801984 100026b299e8ef9e38373b5a99ca5db5c785aa4d:/system/recovery-from-boot.p
else
  log -t recovery "Recovery image already installed"
fi
