[One (M7) Android Development] mistake37:
here it is:

mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p37", "/data");
assert(file_getprop("/system/build.prop", "ro.build.fingerprint") == "htc/htc_europe/m7:4.2.2/JDQ39/235216.8:user/release-keys" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "htc/htc_europe/m7:4.2.2/JDQ39/235216.8:user/release-keys");
ui_print("Verifying current system...");
show_progress(0.100000, 0);
assert(apply_patch_check("/system/app/AirkanPhoneService.apk", "207da99adef444a56a13e816b9ef27d3b7c18e6a", "7c14fd194ce94ea8414b1f993a5c35e8be33256f"));
set_progress(0.002672);
assert(apply_patch_check("/system/app/AntiSpam.apk", "5e1198777917eea696a87ef39cfafe8377b5fb4f", "6e458f147ab1e2ac31d98535cdd9166a21361185"));
set_progress(0.003517);
assert(apply_patch_check("/system/app/Backup.apk", "29b0b478b50bb980e3eb1676577109b823b2b359", "e90cc4469c13486156705266d17aaf041eafdc64"));
set_progress(0.015029);
assert(apply_patch_check("/system/app/Browser.apk", "1777a808f9d2f3e601fca5d3dc711b50d57b9954", "b324038a6809ca3d37f50eb4f682b750afed2e8b"));
set_progress(0.056678);
assert(apply_patch_check("/system/app/BugReport.apk", "b87c5b501fb13e212414780f34d67aebb57b0059", "1161b4220429b83e71d4d64eac3dc4d4423727b7"));
set_progress(0.058362);
assert(apply_patch_check("/system/app/Calculator.apk", "9947e1f59c404a53017e04fada842a544367bc7e", "75e7cde3d5bc94e1429a286578404d81b953a5b4"));
set_progress(0.066689);
assert(apply_patch_check("/system/app/Calendar.apk", "c9aa2c06eac56984b088e1104fbd1cfb77115c82", "02b1618bf1d8fd5c2d273d790ed787bbbaf94a29"));
set_progress(0.077481);
assert(apply_patch_check("/system/app/CalendarProvider.apk", "43c4d4e8d2fcfcf1b25dcc1ffdec720714e75547", "836ab1e3c6f29acb7c6f03ad6f1bd161659528bd"));
set_progress(0.078624);
assert(apply_patch_check("/system/app/Camera.apk", "eceb9d370b3ca3d5e30eef01ba9682f3a5a91670", "b19d1362f0f1f7682f73123d9384c2c2efd2dc52"));
set_progress(0.122855);
assert(apply_patch_check("/system/app/CloudService.apk", "04327a10ef85b5e829bd5aa7d7dd87240f952fc0", "fa267326caeec59da7e83e1155655a71b6d79075"));
set_progress(0.124586);
assert(apply_patch_check("/system/app/Contacts.apk", "ad6abd63c0e2379a5eb25192bf0bae52bfcdf2d4", "6d65f8b72302ce7059d4bf38731c1e2377f05aa3"));
set_progress(0.154960);
assert(apply_patch_check("/system/app/ContactsProvider.apk", "80a9fd0ff8950584707b3339617e8bb38d3b66e5", "c7f2d11a444159a7171dc24d98278935fe872829"));
set_progress(0.157182);
assert(apply_patch_check("/system/app/DataHubProvider.apk", "aca303a662e7916622000921f00de7b45d4400d9", "78cacf291e7f2522bde31fc24714067b720a111c"));
set_progress(0.157255);
assert(apply_patch_check("/system/app/DownloadProvider.apk", "fe4bbfd9f14e77521494322005c4d7afefedbc09", "0ff32565a3e4f03da2abc20f6d45ce11c2298bfd"));
set_progress(0.158118);
assert(apply_patch_check("/system/app/DownloadProviderUi.apk", "1c2c51eeca023c511a84e6280638a2f83186bc4c", "ce2bc965c65dcde1621a6a466ac73e79154abe5a"));
set_progress(0.158782);
assert(apply_patch_check("/system/app/FusedLocation.apk", "86c82deb93001fc3a574d0492667de16d96c4f06", "a161b9d6dc809f173abb6928b91e9bacda141516"));
set_progress(0.158841);
assert(apply_patch_check("/system/app/MiWallpaper.apk", "ecb573c64f662743b03a69c11ef038c14ba43ada", "2acdb2a36b9d10a31efd5a25a71cec345b73c5c0"));
set_progress(0.158943);
assert(apply_patch_check("/system/app/MiuiGallery.apk", "28d7ed9f96bc9c6adf6a95f0a54fcc8b6d81f247", "32ce609d0618c595240105fcbfe25007b7944d0a"));
set_progress(0.190536);
assert(apply_patch_check("/system/app/MiuiHome.apk", "3502c9b56c002108ff7394f8e4554ecea7cdee55", "21988311b48863c66fb21014a5b4406865700508"));
set_progress(0.216866);
assert(apply_patch_check("/system/app/MiuiSystemUI.apk", "81586e577b4e93b0dc71904793c4e51b8598775d", "f108dc1664419bdda89e357a2f3434130aec9fe6"));
set_progress(0.233515);
assert(apply_patch_check("/system/app/MiuiVideo.apk", "4a24dbe78d81c66b76013bf5b7df6672c82f4511", "13aa322f61ca5a3576c3ffe5390e0292c377cdcd"));
set_progress(0.255234);
assert(apply_patch_check("/system/app/MiuiVideoPlayer.apk", "6d99ae63e4fd0d753e469e780d529a3408c0e47f", "36eff3abf51f9d5fac2a5d11190c4857d16cf04a"));
set_progress(0.263715);
assert(apply_patch_check("/system/app/Mms.apk", "5780bfddcfc536b4b3ba11e2009320d6e4489934", "77132c73cf00f1b0d525641f9fd51bb523a1c445"));
set_progress(0.294469);
assert(apply_patch_check("/system/app/Music.apk", "6d998fd6ae3cced3e28ca93ad322d04efc23de72", "483b31d18eb0ccfded8b84a5b31b8b2e5bc649e1"));
set_progress(0.332941);
assert(apply_patch_check("/system/app/Notes.apk", "7a9d12337aaca08a3f358da9553145915e0a2621", "4a5ea584d8490e803e2f9de4307f15a1fbd64bfb"));
set_progress(0.349284);
assert(apply_patch_check("/system/app/PackageInstaller.apk", "eabbf5f3b58c380d1b5ba331fc9d99b201b90f6f", "4b770ba1038a04fff9e0ad937448ab3cc7674a74"));
set_progress(0.354239);
assert(apply_patch_check("/system/app/PaymentService.apk", "6045f17bda1c566b0c2749d6a7a42ae7ff72bc5b", "953e98dcb4ec2e7330b5dcb89e139e387ae7e9bf"));
set_progress(0.368785);
assert(apply_patch_check("/system/app/Phone.apk", "6bd429fa9fd9d3b6c52a66f5fee37a45df6a4d61", "b45abd635322acf9cad0324c06bbd2c8884b3085"));
set_progress(0.411306);
assert(apply_patch_check("/system/app/Provision.apk", "333c6a062fccfb8ac86e5c552a311ed4e99b6a4e", "68b39547cc2911d28cb70d1ba215ae5472e90858"));
set_progress(0.424158);
assert(apply_patch_check("/system/app/QuickSearchBox.apk", "e6e997a11b556f1cc0e260fc94c6cc15c02b42f8", "dd01bb099aaaa24e1a04d300bdd8c57f17653447"));
set_progress(0.426747);
assert(apply_patch_check("/system/app/Settings.apk", "70a1065e7c113e310293c2bc795bdf7d64a01596", "e21e7b60dca76a20a704c75677bebe3711003987"));
set_progress(0.533349);
assert(apply_patch_check("/system/app/SettingsProvider.apk", "0bedf4d5bfe2d34af373bd177a4f5b6c4674fd95", "8048b05701d66b72bb8eab026cbb2e1b4fb41605"));
set_progress(0.535009);
assert(apply_patch_check("/system/app/SoundRecorder.apk", "0d1e250a3f9cb224f66b79a98421cde61a76b234", "26b87a184c88152d4f80ee90c6359e51bd8fd9c6"));
set_progress(0.563017);
assert(apply_patch_check("/system/app/SuperMarket.apk", "382acbe7f852d4f33bd6872a18a8be932fb6fabf", "b7cd1369fce8e756dd1565dbd6a0dfe396159952"));
set_progress(0.568866);
assert(apply_patch_check("/system/app/TelephonyProvider.apk", "38016add752e0e085a2ff93f695dd58eb8d69bb8", "b811b042bd43d40dff8175dd9119a2f799b42e71"));
set_progress(0.569529);
assert(apply_patch_check("/system/app/ThemeManager.apk", "ccf0043314f1946427eb14cf2984af0731773890", "ab88e0dbf617d109676f8f38dd5d89daa82d6e63"));
set_progress(0.579044);
assert(apply_patch_check("/system/app/Updater.apk", "a37e30a80f58e34ccdec85b5e6deaf83381181db", "c82799d2b7c7b6f4dca74c31021c75b1ec8d00b4"));
set_progress(0.595195);
assert(apply_patch_check("/system/app/VoiceAssist.apk", "500347965378a24acde3d2f47186783529985646", "a7036e41e1574e135e5b5341126a6f000e736be7"));
set_progress(0.610494);
assert(apply_patch_check("/system/app/VpnDialogs.apk", "d474181342be6277f9acadc1a0f4e04df54a384e", "c86039b7f9064075b6e45ff166d1cd25fc20029f"));
set_progress(0.610577);
assert(apply_patch_check("/system/app/Weather.apk", "006fd8a1ce381d565ba8876438f35be85f129e40", "327de3eead2b87882765bc190f989c5dab05183d"));
set_progress(0.628145);
assert(apply_patch_check("/system/app/WeatherProvider.apk", "82d1f14c6e8de1632f5fa9424b521875b3a7e859", "09ee5d709234dd5a168e1fca00fe2fef6da75f94"));
set_progress(0.628227);
assert(apply_patch_check("/system/app/XiaomiServiceFramework.apk", "37b9461c209d6fc0eb91089b91d7edd6b070d335", "ded78067ce32edd81afbf925ddda0ef6c0967c81"));
set_progress(0.651085);
assert(apply_patch_check("/system/app/YellowPage.apk", "35fb83d6e60420b5a358d66f93f766c0db01aaf3", "04869607b9afa0e8d9871709b4943fdfa88b57ba"));
set_progress(0.661042);
assert(apply_patch_check("/system/bin/installd", "1c5378ba8d7e9a19f72f054f5d5fc16642dbbc4c", "9a8cccefbdc4058540027a0030a82b8491580ec0"));
set_progress(0.661270);
assert(apply_patch_check("/system/build.prop", "c23ac0c48e87f884051c5891b66ec3d68a1cc559", "e39eb1a7ffd87e6c40257cb337c1c93216fd6569"));
set_progress(0.661325);
assert(apply_patch_check("/system/etc/permission_config.json", "3ebe52a0aca10fc3ef25bd75966e8bc94ab40f63", "6089921223c3cba2e11b763ca3577d9dea2f01f5"));
set_progress(0.661335);
assert(apply_patch_check("/system/framework/android.policy.jar", "138bd7b4ca6cfb39fa3a692d7b744d402affb51d", "01db4bfc6b5b595a9120c85023c0b3059faa38f9"));
set_progress(0.663633);
assert(apply_patch_check("/system/framework/framework-miui-res.apk", "cc3ba699cc180d8646619317ef56e5c2afb4585c", "6ee850020deeebc5e6ae77d03670d5f9eb142d24"));
set_progress(0.728123);
assert(apply_patch_check("/system/framework/framework-res.apk", "48b972cb417d2461b62ac74f689b7834b6596c7a", "a54d1b9f128749b465ae7fd1b10a6cb02c66c07e"));
set_progress(0.843898);
assert(apply_patch_check("/system/framework/framework.jar", "ae783c157ee5145757c05c928aebd490d13464fd", "db35b62eb6016a31b8d0e23ee2da10d90f0c2ebd"));
set_progress(0.865550);
assert(apply_patch_check("/system/framework/framework2.jar", "354e887a53c869462c8167731f3a27074f4071ed", "47e4641479bd2b4b49f8ac953bebee7e9da5b1f7"));
set_progress(0.880715);
assert(apply_patch_check("/system/framework/services.jar", "4b9ef8e26a520be4ae6d15438ca8ec61b3cce66c", "0905320df29f44a0745ff75810088e1899937c20"));
set_progress(0.890700);
assert(apply_patch_check("/system/framework/telephony-common.jar", "4104f5fb61e3d391ced5ab2457008ef0c34ffc10", "01bdf828ca0cbc643a4da43d8b4f2f278ac94bb8"));
set_progress(0.897187);
assert(apply_patch_check("/system/lib/libffmpeg_xm.so", "adb3e550fc1434ecb987e30fda3bb4f7d2a5aa40", "cc3a43d24bf8f034eab07288d80db8c11b889b00"));
set_progress(0.922693);
assert(apply_patch_check("/system/lib/libshellservice.so", "3a7466259fabd24a5fed2f41a6a4472246246672", "0cdf5988c2a530f54465b52e2797b41e0de1287d"));
set_progress(0.922864);
assert(apply_patch_check("/system/media/theme/default/alarmscreen", "6f6d5c97459e3dd0bfdc68afa342be4ca8e5dcda", "eddb134cb3ebfd5188dd0a18f7239cbe1ad4b04c"));
set_progress(0.926945);
assert(apply_patch_check("/system/media/theme/default/icons", "0afdcc4fd7f30c200b6a4a7edef5f73ea1016bcb", "f460e001e3d01ff1b2ae0951ac8919ca42644fa3"));
set_progress(0.929505);
assert(apply_patch_check("/system/media/theme/default/lockscreen", "c0d428af17a3aee1136ac726d73e38a7735b6d51", "4e680cb316082fc0509f6558eaf561d18f93173b"));
set_progress(0.935724);
assert(apply_patch_check("/system/xbin/shelld", "00c435df9fc3ceb6e84d5ba3eab8e190fda8a7bb", "1e90dd709adaf41a2d8198990feba52c4a176ae1"));
set_progress(0.935787);
assert(apply_patch_space(17450267));

# ---- start making changes here ----

ui_print("Removing unneeded files...");
delete("/system/app/HTC_CIR.apk",
"/system/recovery.img");
show_progress(0.800000, 0);
ui_print("Patching system files...");
apply_patch("/data/preinstall_apps/VoiceAssist.apk", "-",
a47566dd022964524bbbc6a7bbde35525df48b4e, 9679911,
b006ad2434a759f002647a2d76fb30f872237f1d, package_extract_file("patch/data/preinstall_apps/VoiceAssist.apk.p"));
set_progress(0.064323);
apply_patch("/system/app/AirkanPhoneService.apk", "-",
207da99adef444a56a13e816b9ef27d3b7c18e6a, 402781,
7c14fd194ce94ea8414b1f993a5c35e8be33256f, package_extract_file("patch/system/app/AirkanPhoneService.apk.p"));
set_progress(0.066999);
apply_patch("/system/app/AntiSpam.apk", "-",
5e1198777917eea696a87ef39cfafe8377b5fb4f, 127372,
6e458f147ab1e2ac31d98535cdd9166a21361185, package_extract_file("patch/system/app/AntiSpam.apk.p"));
set_progress(0.067846);
apply_patch("/system/app/Backup.apk", "-",
29b0b478b50bb980e3eb1676577109b823b2b359, 1735117,
e90cc4469c13486156705266d17aaf041eafdc64, package_extract_file("patch/system/app/Backup.apk.p"));
set_progress(0.079376);
apply_patch("/system/app/Browser.apk", "-",
1777a808f9d2f3e601fca5d3dc711b50d57b9954, 6256903,
b324038a6809ca3d37f50eb4f682b750afed2e8b, package_extract_file("patch/system/app/Browser.apk.p"));
set_progress(0.120953);
apply_patch("/system/app/BugReport.apk", "-",
b87c5b501fb13e212414780f34d67aebb57b0059, 253938,
1161b4220429b83e71d4d64eac3dc4d4423727b7, package_extract_file("patch/system/app/BugReport.apk.p"));
set_progress(0.122640);
apply_patch("/system/app/Calculator.apk", "-",
9947e1f59c404a53017e04fada842a544367bc7e, 1254986,
75e7cde3d5bc94e1429a286578404d81b953a5b4, package_extract_file("patch/system/app/Calculator.apk.p"));
set_progress(0.130979);
apply_patch("/system/app/Calendar.apk", "-",
c9aa2c06eac56984b088e1104fbd1cfb77115c82, 1626677,
02b1618bf1d8fd5c2d273d790ed787bbbaf94a29, package_extract_file("patch/system/app/Calendar.apk.p"));
set_progress(0.141789);
apply_patch("/system/app/CalendarProvider.apk", "-",
43c4d4e8d2fcfcf1b25dcc1ffdec720714e75547, 172246,
836ab1e3c6f29acb7c6f03ad6f1bd161659528bd, package_extract_file("patch/system/app/CalendarProvider.apk.p"));
set_progress(0.142933);
apply_patch("/system/app/Camera.apk", "-",
eceb9d370b3ca3d5e30eef01ba9682f3a5a91670, 6666820,
b19d1362f0f1f7682f73123d9384c2c2efd2dc52, package_extract_file("patch/system/app/Camera.apk.p"));
set_progress(0.187234);
apply_patch("/system/app/CloudService.apk", "-",
04327a10ef85b5e829bd5aa7d7dd87240f952fc0, 260941,
fa267326caeec59da7e83e1155655a71b6d79075, package_extract_file("patch/system/app/CloudService.apk.p"));
set_progress(0.188968);
apply_patch("/system/app/Contacts.apk", "-",
ad6abd63c0e2379a5eb25192bf0bae52bfcdf2d4, 4579224,
6d65f8b72302ce7059d4bf38731c1e2377f05aa3, package_extract_file("patch/system/app/Contacts.apk.p"));
set_progress(0.219397);
apply_patch("/system/app/ContactsProvider.apk", "-",
80a9fd0ff8950584707b3339617e8bb38d3b66e5, 334998,
c7f2d11a444159a7171dc24d98278935fe872829, package_extract_file("patch/system/app/ContactsProvider.apk.p"));
set_progress(0.221623);
apply_patch("/system/app/DataHubProvider.apk", "-",
aca303a662e7916622000921f00de7b45d4400d9, 10975,
78cacf291e7f2522bde31fc24714067b720a111c, package_extract_file("patch/system/app/DataHubProvider.apk.p"));
set_progress(0.221696);
apply_patch("/system/app/DownloadProvider.apk", "-",
fe4bbfd9f14e77521494322005c4d7afefedbc09, 130098,
0ff32565a3e4f03da2abc20f6d45ce11c2298bfd, package_extract_file("patch/system/app/DownloadProvider.apk.p"));
set_progress(0.222561);
apply_patch("/system/app/DownloadProviderUi.apk", "-",
1c2c51eeca023c511a84e6280638a2f83186bc4c, 100109,
ce2bc965c65dcde1621a6a466ac73e79154abe5a, package_extract_file("patch/system/app/DownloadProviderUi.apk.p"));
set_progress(0.223226);
apply_patch("/system/app/FusedLocation.apk", "-",
86c82deb93001fc3a574d0492667de16d96c4f06, 8819,
a161b9d6dc809f173abb6928b91e9bacda141516, package_extract_file("patch/system/app/FusedLocation.apk.p"));
set_progress(0.223284);
apply_patch("/system/app/MiWallpaper.apk", "-",
ecb573c64f662743b03a69c11ef038c14ba43ada, 15342,
2acdb2a36b9d10a31efd5a25a71cec345b73c5c0, package_extract_file("patch/system/app/MiWallpaper.apk.p"));
set_progress(0.223386);
apply_patch("/system/app/MiuiGallery.apk", "-",
28d7ed9f96bc9c6adf6a95f0a54fcc8b6d81f247, 4762743,
32ce609d0618c595240105fcbfe25007b7944d0a, package_extract_file("patch/system/app/MiuiGallery.apk.p"));
set_progress(0.255035);
apply_patch("/system/app/MiuiHome.apk", "-",
3502c9b56c002108ff7394f8e4554ecea7cdee55, 3968814,
21988311b48863c66fb21014a5b4406865700508, package_extract_file("patch/system/app/MiuiHome.apk.p"));
set_progress(0.281407);
apply_patch("/system/app/MiuiSystemUI.apk", "-",
81586e577b4e93b0dc71904793c4e51b8598775d, 2509359,
f108dc1664419bdda89e357a2f3434130aec9fe6, package_extract_file("patch/system/app/MiuiSystemUI.apk.p"));
set_progress(0.298082);
apply_patch("/system/app/MiuiVideo.apk", "-",
4a24dbe78d81c66b76013bf5b7df6672c82f4511, 3274247,
13aa322f61ca5a3576c3ffe5390e0292c377cdcd, package_extract_file("patch/system/app/MiuiVideo.apk.p"));
set_progress(0.319839);
apply_patch("/system/app/MiuiVideoPlayer.apk", "-",
6d99ae63e4fd0d753e469e780d529a3408c0e47f, 1278317,
36eff3abf51f9d5fac2a5d11190c4857d16cf04a, package_extract_file("patch/system/app/MiuiVideoPlayer.apk.p"));
set_progress(0.328334);
apply_patch("/system/app/Mms.apk", "-",
5780bfddcfc536b4b3ba11e2009320d6e4489934, 4636640,
77132c73cf00f1b0d525641f9fd51bb523a1c445, package_extract_file("patch/system/app/Mms.apk.p"));
set_progress(0.359144);
apply_patch("/system/app/Music.apk", "-",
6d998fd6ae3cced3e28ca93ad322d04efc23de72, 5798524,
483b31d18eb0ccfded8b84a5b31b8b2e5bc649e1, package_extract_file("patch/system/app/Music.apk.p"));
set_progress(0.397675);
apply_patch("/system/app/Notes.apk", "-",
7a9d12337aaca08a3f358da9553145915e0a2621, 2463320,
4a5ea584d8490e803e2f9de4307f15a1fbd64bfb, package_extract_file("patch/system/app/Notes.apk.p"));
set_progress(0.414044);
apply_patch("/system/app/PackageInstaller.apk", "-",
eabbf5f3b58c380d1b5ba331fc9d99b201b90f6f, 759346,
4b770ba1038a04fff9e0ad937448ab3cc7674a74, package_extract_file("patch/system/app/PackageInstaller.apk.p"));
set_progress(0.419090);
apply_patch("/system/app/PaymentService.apk", "-",
6045f17bda1c566b0c2749d6a7a42ae7ff72bc5b, 2196049,
953e98dcb4ec2e7330b5dcb89e139e387ae7e9bf, package_extract_file("patch/system/app/PaymentService.apk.p"));
set_progress(0.433683);
apply_patch("/system/app/Phone.apk", "-",
6bd429fa9fd9d3b6c52a66f5fee37a45df6a4d61, 6409074,
b45abd635322acf9cad0324c06bbd2c8884b3085, package_extract_file("patch/system/app/Phone.apk.p"));
set_progress(0.476271);
apply_patch("/system/app/Provision.apk", "-",
333c6a062fccfb8ac86e5c552a311ed4e99b6a4e, 1937076,
68b39547cc2911d28cb70d1ba215ae5472e90858, package_extract_file("patch/system/app/Provision.apk.p"));
set_progress(0.489143);
apply_patch("/system/app/QuickSearchBox.apk", "-",
e6e997a11b556f1cc0e260fc94c6cc15c02b42f8, 390337,
dd01bb099aaaa24e1a04d300bdd8c57f17653447, package_extract_file("patch/system/app/QuickSearchBox.apk.p"));
set_progress(0.491737);
apply_patch("/system/app/Settings.apk", "-",
70a1065e7c113e310293c2bc795bdf7d64a01596, 16060519,
e21e7b60dca76a20a704c75677bebe3711003987, package_extract_file("patch/system/app/Settings.apk.p"));
set_progress(0.598458);
apply_patch("/system/app/SettingsProvider.apk", "-",
0bedf4d5bfe2d34af373bd177a4f5b6c4674fd95, 252431,
8048b05701d66b72bb8eab026cbb2e1b4fb41605, package_extract_file("patch/system/app/SettingsProvider.apk.p"));
set_progress(0.600136);
apply_patch("/system/app/SoundRecorder.apk", "-",
0d1e250a3f9cb224f66b79a98421cde61a76b234, 4221577,
26b87a184c88152d4f80ee90c6359e51bd8fd9c6, package_extract_file("patch/system/app/SoundRecorder.apk.p"));
set_progress(0.628188);
apply_patch("/system/app/SuperMarket.apk", "-",
382acbe7f852d4f33bd6872a18a8be932fb6fabf, 771283,
b7cd1369fce8e756dd1565dbd6a0dfe396159952, package_extract_file("patch/system/app/SuperMarket.apk.p"));
set_progress(0.633313);
apply_patch("/system/app/TelephonyProvider.apk", "-",
38016add752e0e085a2ff93f695dd58eb8d69bb8, 99986,
b811b042bd43d40dff8175dd9119a2f799b42e71, package_extract_file("patch/system/app/TelephonyProvider.apk.p"));
set_progress(0.633978);
apply_patch("/system/app/ThemeManager.apk", "-",
ccf0043314f1946427eb14cf2984af0731773890, 1436291,
ab88e0dbf617d109676f8f38dd5d89daa82d6e63, package_extract_file("patch/system/app/ThemeManager.apk.p"));
set_progress(0.643522);
apply_patch("/system/app/Updater.apk", "-",
a37e30a80f58e34ccdec85b5e6deaf83381181db, 2436167,
c82799d2b7c7b6f4dca74c31021c75b1ec8d00b4, package_extract_file("patch/system/app/Updater.apk.p"));
set_progress(0.659710);
apply_patch("/system/app/VoiceAssist.apk", "-",
500347965378a24acde3d2f47186783529985646, 2356989,
a7036e41e1574e135e5b5341126a6f000e736be7, package_extract_file("patch/system/app/VoiceAssist.apk.p"));
set_progress(0.675372);
apply_patch("/system/app/VpnDialogs.apk", "-",
d474181342be6277f9acadc1a0f4e04df54a384e, 12398,
c86039b7f9064075b6e45ff166d1cd25fc20029f, package_extract_file("patch/system/app/VpnDialogs.apk.p"));
set_progress(0.675455);
apply_patch("/system/app/Weather.apk", "-",
006fd8a1ce381d565ba8876438f35be85f129e40, 2474122,
327de3eead2b87882765bc190f989c5dab05183d, package_extract_file("patch/system/app/Weather.apk.p"));
set_progress(0.691895);
apply_patch("/system/app/WeatherProvider.apk", "-",
82d1f14c6e8de1632f5fa9424b521875b3a7e859, 12347,
09ee5d709234dd5a168e1fca00fe2fef6da75f94, package_extract_file("patch/system/app/WeatherProvider.apk.p"));
set_progress(0.691977);
apply_patch("/system/app/XiaomiServiceFramework.apk", "-",
37b9461c209d6fc0eb91089b91d7edd6b070d335, 3444281,
ded78067ce32edd81afbf925ddda0ef6c0967c81, package_extract_file("patch/system/app/XiaomiServiceFramework.apk.p"));
set_progress(0.714865);
apply_patch("/system/app/YellowPage.apk", "-",
35fb83d6e60420b5a358d66f93f766c0db01aaf3, 1500837,
04869607b9afa0e8d9871709b4943fdfa88b57ba, package_extract_file("patch/system/app/YellowPage.apk.p"));
set_progress(0.724838);
apply_patch("/system/bin/installd", "-",
1c5378ba8d7e9a19f72f054f5d5fc16642dbbc4c, 34400,
9a8cccefbdc4058540027a0030a82b8491580ec0, package_extract_file("patch/system/bin/installd.p"));
set_progress(0.725066);
apply_patch("/system/etc/permission_config.json", "-",
3ebe52a0aca10fc3ef25bd75966e8bc94ab40f63, 1598,
6089921223c3cba2e11b763ca3577d9dea2f01f5, package_extract_file("patch/system/etc/permission_config.json.p"));
set_progress(0.725077);
apply_patch("/system/framework/android.policy.jar", "-",
138bd7b4ca6cfb39fa3a692d7b744d402affb51d, 346420,
01db4bfc6b5b595a9120c85023c0b3059faa38f9, package_extract_file("patch/system/framework/android.policy.jar.p"));
set_progress(0.727379);
apply_patch("/system/framework/framework-miui-res.apk", "-",
cc3ba699cc180d8646619317ef56e5c2afb4585c, 9720482,
6ee850020deeebc5e6ae77d03670d5f9eb142d24, package_extract_file("patch/system/framework/framework-miui-res.apk.p"));
set_progress(0.791971);
apply_patch("/system/framework/framework-res.apk", "-",
48b972cb417d2461b62ac74f689b7834b6596c7a, 17451064,
a54d1b9f128749b465ae7fd1b10a6cb02c66c07e, package_extract_file("patch/system/framework/framework-res.apk.p"));
set_progress(0.907933);
apply_patch("/system/framework/framework.jar", "-",
ae783c157ee5145757c05c928aebd490d13464fd, 3263837,
db35b62eb6016a31b8d0e23ee2da10d90f0c2ebd, package_extract_file("patch/system/framework/framework.jar.p"));
set_progress(0.929622);
apply_patch("/system/framework/framework2.jar", "-",
354e887a53c869462c8167731f3a27074f4071ed, 2286279,
47e4641479bd2b4b49f8ac953bebee7e9da5b1f7, package_extract_file("patch/system/framework/framework2.jar.p"));
set_progress(0.944814);
apply_patch("/system/framework/services.jar", "-",
4b9ef8e26a520be4ae6d15438ca8ec61b3cce66c, 1504902,
0905320df29f44a0745ff75810088e1899937c20, package_extract_file("patch/system/framework/services.jar.p"));
set_progress(0.954814);
apply_patch("/system/framework/telephony-common.jar", "-",
4104f5fb61e3d391ced5ab2457008ef0c34ffc10, 977658,
01bdf828ca0cbc643a4da43d8b4f2f278ac94bb8, package_extract_file("patch/system/framework/telephony-common.jar.p"));
set_progress(0.961310);
apply_patch("/system/lib/libffmpeg_xm.so", "-",
adb3e550fc1434ecb987e30fda3bb4f7d2a5aa40, 3840352,
cc3a43d24bf8f034eab07288d80db8c11b889b00, package_extract_file("patch/system/lib/libffmpeg_xm.so.p"));
set_progress(0.986830);
apply_patch("/system/lib/libshellservice.so", "-",
3a7466259fabd24a5fed2f41a6a4472246246672, 25868,
0cdf5988c2a530f54465b52e2797b41e0de1287d, package_extract_file("patch/system/lib/libshellservice.so.p"));
set_progress(0.987001);
apply_patch("/system/media/theme/default/alarmscreen", "-",
6f6d5c97459e3dd0bfdc68afa342be4ca8e5dcda, 615045,
eddb134cb3ebfd5188dd0a18f7239cbe1ad4b04c, package_extract_file("patch/system/media/theme/default/alarmscreen.p"));
set_progress(0.991088);
apply_patch("/system/media/theme/default/icons", "-",
0afdcc4fd7f30c200b6a4a7edef5f73ea1016bcb, 385841,
f460e001e3d01ff1b2ae0951ac8919ca42644fa3, package_extract_file("patch/system/media/theme/default/icons.p"));
set_progress(0.993652);
apply_patch("/system/media/theme/default/lockscreen", "-",
c0d428af17a3aee1136ac726d73e38a7735b6d51, 937426,
4e680cb316082fc0509f6558eaf561d18f93173b, package_extract_file("patch/system/media/theme/default/lockscreen.p"));
set_progress(0.999881);
apply_patch("/system/xbin/shelld", "-",
00c435df9fc3ceb6e84d5ba3eab8e190fda8a7bb, 9484,
1e90dd709adaf41a2d8198990feba52c4a176ae1, package_extract_file("patch/system/xbin/shelld.p"));
set_progress(0.999945);
show_progress(0.100000, 10);
ui_print("Unpacking new files...");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
ui_print("Symlinks and permissions...");
set_perm_recursive(1000, 1000, 0755, 0644, "/data/preinstall_apps");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 0, 0777, 0644, "/system/bin/.ext");
set_perm(0, 1000, 0750, "/system/bin/iptables");
set_perm(0, 2000, 0777, "/system/bin/mpdecision");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 0777, "/system/bin/pnpmgr");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm(1000, 1000, 0755, "/system/bin/sysro");
set_perm(1000, 1000, 0755, "/system/bin/sysrw");
set_perm(0, 1000, 0750, "/system/bin/tc");
set_perm(0, 2000, 0777, "/system/bin/thermald");
set_perm(0, 0, 0700, "/system/build.prop");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(1002, 1002, 0440, "/system/etc/bluetooth/main.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(1000, 3003, 0640, "/system/etc/gps.conf");
set_perm(0, 0, 0400, "/system/etc/hsml.key");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0777, "/system/etc/init.d/99bulletproof");
set_perm(0, 0, 0555, "/system/etc/init.post_boot.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 0, 0644, 0644, "/system/lib/modules");
set_perm(0, 0, 0444, "/system/lib/modules/bcmdhd.ko");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/lib/drm");
set_perm(0, 0, 0644, "/system/vendor/lib/drm/libdrmwvmplugin.so");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24/full_model.bin");
set_perm(0, 0, 0644, "/system/vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N/full_model.bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm(0, 1000, 06750, "/system/xbin/shelld");
set_perm(0, 0, 06755, "/system/xbin/su");
ui_print("Patching remaining system files...");
apply_patch("/system/build.prop", "-",
c23ac0c48e87f884051c5891b66ec3d68a1cc559, 8351,
e39eb1a7ffd87e6c40257cb337c1c93216fd6569, package_extract_file("patch/system/build.prop.p"));
set_perm(0, 0, 0644, "/system/build.prop");
unmount("/data");
unmount("/system");