Port Android's applypatch to Linux, base on BSPATCH