#!/system/bin/sh

recover() {
  TARGET=$1
  BACKUP="${1}.orig"
  NO_ORIG="${1}.no_orig"
  if [ -f $NO_ORIG ]; then
    rm -f $TARGET $NO_ORIG
  elif [ -f $BACKUP ]; then
    mv $BACKUP $TARGET
  fi
}

mount -o rw,remount /system

rm /system/xposed.prop
rm /system/framework/XposedBridge.jar

rm /system/bin/app_process32_xposed
recover /system/bin/dex2oat
recover /system/bin/oatdump
recover /system/bin/patchoat
recover /system/lib/libart.so
recover /system/lib/libart-compiler.so
recover /system/lib/libart-disassembler.so
recover /system/lib/libxposed_art.so     
recover /system/lib/libsigchain.so       
