#!/system/bin/sh
if ! applypatch -c EMMC:/dev/block/mmcblk0p2:5687296:81228c4e64ebd30759ee34296e741acfc22249b7; then
  log -t recovery "Installing new recovery image"
  applypatch -b /system/etc/recovery-resource.dat EMMC:/dev/block/mmcblk0p1:5249024:5f48c3bbcdeb6647901fd62630bc8dc5a113593a EMMC:/dev/block/mmcblk0p2 81228c4e64ebd30759ee34296e741acfc22249b7 5687296 5f48c3bbcdeb6647901fd62630bc8dc5a113593a:/system/recovery-from-boot.p
else
  log -t recovery "Recovery image already installed"
fi
