getprop("ro.product.device") == "msm8909" || abort("E3004: This package is for \"msm8909\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Source: qcom/msm8909/msm8909:7.1.2/078/brian05050255:userdebug/test-keys");
ui_print("Target: qcom/msm8909/msm8909:7.1.2/075/brian06130313:userdebug/test-keys");
ui_print("Verifying current system...");
getprop("ro.build.fingerprint") == "qcom/msm8909/msm8909:7.1.2/078/brian05050255:userdebug/test-keys" ||
    getprop("ro.build.fingerprint") == "qcom/msm8909/msm8909:7.1.2/075/brian06130313:userdebug/test-keys" ||
    abort("E3001: Package expects build fingerprint of qcom/msm8909/msm8909:7.1.2/078/brian05050255:userdebug/test-keys or qcom/msm8909/msm8909:7.1.2/075/brian06130313:userdebug/test-keys; this device has " + getprop("ro.build.fingerprint") + ".");
apply_patch_check("EMMC:/dev/block/bootdevice/by-name/boot:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20:16276776:185e9b76816e1c3c0da5931463662168eb34164a") || abort("E3005: \"EMMC:/dev/block/bootdevice/by-name/boot:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20:16276776:185e9b76816e1c3c0da5931463662168eb34164a\" has unexpected contents.");
apply_patch_space(22372352) || abort("E3006: Not enough free space on /cache to apply patches.");
if (range_sha1("/dev/block/bootdevice/by-name/system", "3752,1,80,81,306,2816,2817,2818,2819,2820,2821,2822,2823,2832,2833,2940,2941,2942,2943,3036,3037,3045,3046,3047,3048,3049,3050,3051,3052,3069,3070,3089,3090,3091,3092,3102,3103,3157,3158,3159,3160,3172,3173,3177,3178,3179,3180,3190,3191,3205,3206,3207,3208,3244,3245,3254,3255,3256,3257,3300,3301,3327,3328,3329,3330,3382,3383,3392,3393,3394,3395,3433,3434,3446,3447,3448,3449,3450,3451,3530,3531,3532,3533,3766,3767,4799,4800,5942,5943,6167,6168,7007,7008,7012,7013,7014,7015,7024,7025,7033,7034,7035,7036,7064,7065,7130,7131,7132,7133,7201,7202,7210,7211,7212,7213,7242,7243,7249,7250,7251,7252,7273,7274,7278,7279,7280,7281,7289,7290,7296,7297,7298,7299,7317,7318,7323,7324,7325,7326,7338,7339,7344,7345,7346,7347,7362,7363,7369,7370,7371,7372,7385,7386,7387,7388,7389,7390,7468,7469,7470,7471,7472,7473,7485,7486,7490,7491,7492,7493,7494,7495,7554,7555,7556,7557,7558,7559,7624,7625,7626,7627,7628,7629,19579,19581,19843,19844,20855,20856,20899,20900,20930,20931,21259,21260,22228,22262,22836,22837,22942,22943,23235,23236,23448,23449,24369,24372,24373,24374,24440,24441,24442,24443,24609,24610,24754,24755,24928,24929,25100,25101,25461,25462,25479,25721,25724,25725,25734,25735,25736,25737,25754,25755,25776,25777,25886,25887,25925,25926,25929,25930,25941,25942,26408,26409,26410,26411,26433,26434,26455,26456,26695,26696,27808,27809,28105,28106,28224,28225,28702,28703,28704,28705,29230,29231,29246,29247,29278,29279,29340,29341,29347,29348,32757,32758,32768,32770,32849,32850,65536,65537,85583,85607,85608,85755,85756,85757,85758,86626,86627,86628,86629,86630,86631,86632,86633,86667,86668,86675,86676,86677,86678,86679,86680,86681,86682,86714,86715,86769,86770,86805,86806,86807,86808,86809,86810,86811,86812,86813,86814,86815,86816,86817,86818,86819,86820,86821,86822,86823,86824,86825,86826,86827,86828,86829,86830,86831,86832,86833,86834,86835,86836,86837,86838,86839,86840,86841,86842,86998,86999,87107,87108,87251,87252,87353,87354,87544,87545,87704,87705,87768,87769,87917,87918,88122,88123,88217,88218,88372,88373,88435,88436,88437,88438,88439,88440,88441,88442,88443,88444,88445,88446,88447,88448,88457,88458,88459,88460,88462,88463,88464,88465,88492,88493,88494,88495,88521,88522,88523,88524,88551,88552,88553,88554,88566,88567,88568,88569,88577,88578,88579,88580,88584,88585,88586,88587,88593,88594,88595,88596,88597,88598,88599,88600,88602,88603,88604,88605,88614,88615,88616,88617,88618,88619,88620,88621,88622,88623,88624,88625,88626,88627,88628,88629,88707,88708,88709,88710,88711,88712,88713,88714,88715,88716,88717,88718,88719,88720,88721,88722,88724,88725,88726,88727,88728,88729,88730,88731,88767,88768,88769,88770,88806,88807,88808,88809,88810,88811,88812,88813,88814,88815,88816,88817,88818,88819,88821,88822,88824,88825,88826,88827,88828,88829,88830,88831,88832,88833,88834,88835,88836,88837,88838,88839,88840,88841,88842,88843,88844,88845,94266,94267,94268,94269,94270,94271,94272,94273,94274,94275,94276,94277,94281,94282,94285,94286,94290,94291,94295,94296,94300,94301,94302,94303,94304,94305,94308,94309,94310,94311,94312,94313,94314,94315,94316,94317,94318,94319,94320,94321,94322,94323,94324,94325,94326,94327,94328,94329,94330,94331,94332,94333,94334,94335,94336,94337,94338,94339,94340,94341,94342,94343,94344,94345,94346,94347,94348,94349,94350,94351,94352,94353,94354,94355,94356,94357,94358,94359,94360,94361,94362,94363,94364,94365,94366,94367,94368,94369,94370,94371,94372,94373,94374,94375,94376,94377,94378,94379,94380,94381,94382,94383,94384,94385,94389,94390,94395,94396,94397,94398,94521,94522,94523,94524,94525,94526,94527,94528,94529,94530,94531,94532,94533,94534,94536,94537,94538,94539,94541,94542,94543,94544,94546,94547,94548,94549,94551,94552,94553,94554,94556,94557,94558,94559,94561,94562,94563,94564,94566,94567,94568,94569,94570,94571,94572,94573,94574,94575,94576,94577,94583,94584,94585,94586,94587,94588,94594,94595,94596,94597,94678,94679,94680,94681,94682,94683,95069,95070,95071,95072,95074,95075,95076,95077,95078,95079,95085,95086,95087,95088,95093,95094,95095,95096,95097,95098,95115,95116,95117,95118,95148,95149,95150,95151,95152,95153,95172,95173,95174,95175,95185,95186,95187,95188,95189,95190,95213,95214,95215,95216,95217,95218,95219,95220,95222,95223,95224,95225,95229,95230,95231,95232,95234,95235,95236,95237,95239,95240,95241,95242,95244,95245,95246,95247,95249,95250,95251,95252,95254,95255,95256,95257,95259,95260,95261,95262,95265,95266,95267,95268,95270,95271,95272,95273,95276,95277,95278,95279,95281,95282,95283,95284,95294,95295,95296,95297,95298,95299,95300,95301,95302,95303,95304,95305,95306,95307,95312,95313,95314,95315,95316,95317,95324,95325,95326,95327,95349,95350,95351,95352,95353,95354,95399,95400,95401,95402,95416,95417,95418,95419,95420,95421,95437,95438,95439,95440,95441,95442,95443,95444,95457,95458,95459,95460,95462,95463,95464,95465,95467,95468,95469,95470,95472,95473,95474,95475,95477,95478,95479,95480,95482,95483,95484,95485,95487,95488,95489,95490,95492,95493,95494,95495,95497,95498,95499,95500,95502,95503,95504,95505,95512,95513,95514,95515,95517,95518,95519,95520,95521,95522,95523,95524,95525,95526,95527,95528,95529,95530,95535,95536,95537,95538,95539,95540,95547,95548,95549,95550,95554,95555,95556,95557,95558,95559,95566,95567,95568,95569,95570,95571,95572,95573,95575,95576,95577,95578,95580,95581,95582,95583,95585,95586,95587,95588,95590,95591,95592,95593,95595,95596,95597,95598,95600,95601,95602,95603,95711,95712,95713,95714,95715,95716,95717,95718,95719,95720,95721,95722,95723,95724,95725,95726,95727,95728,95729,95730,95731,95732,95733,95734,95742,95743,95744,95745,95753,95754,95755,95756,95757,95758,95765,95766,95767,95768,95775,95776,95777,95778,95779,95780,95781,95782,95783,95784,95785,95786,95795,95796,95797,95798,95799,95800,95816,95817,95818,95819,95821,95822,95823,95824,95826,95827,95828,95829,95831,95832,95833,95834,95839,95840,95841,95842,95844,95845,95846,95847,95848,95849,95850,95851,95856,95857,95858,95859,95860,95861,95871,95872,95873,95874,95899,95900,95901,95902,95903,95904,95990,95991,95992,95993,96056,96057,96058,96059,96060,96061,96212,96213,96214,96215,96230,96231,96232,96233,96234,96235,96254,96255,96256,96257,96258,96259,96260,96261,96566,96567,96631,96632,96633,96634,96721,96722,97385,97386,97391,97392,97397,97398,97408,97409,97422,97423,97438,97439,97467,97468,97478,97479,97516,97517,97789,97790,97791,97792,97793,97794,97795,97796,97869,97870,97943,97944,97987,97988,97989,97990,97993,97994,97995,97996,97997,97998,97999,98000,98001,98002,98004,98005,98011,98012,98017,98018,98093,98094,98097,98098,98103,98104,98105,98106,98107,98108,98109,98110,98111,98112,98113,98114,98120,98121,98122,98123,98144,98145,98168,98169,98170,98171,98182,98183,98226,98227,98278,98279,98280,98281,98289,98290,98295,98296,98302,98304,98306,98385,98386,104978,104979,125692,125693,125694,125695,130075,130078,130083,130084,130101,130102,130131,130132,131067,131068,131069,131070,131072,131073,131566,131885,131886,131993,131994,132006,132007,132021,132022,132065,132066,132079,132080,132125,132126,132137,132138,132245,132246,132562,132563,132661,132662,132699,132700,132729,132730,132749,132750,132758,132759,132943,132944,133086,133087,133097,133098,133115,133116,133125,133126,133260,133261,133290,133291,133321,133322,133511,133512,133518,133519,133525,133526,133531,133532,133536,133537,133550,133551,133559,133560,133564,133565,133595,133596,133613,133614,133644,133645,133699,133700,133717,133718,133748,133749,133768,133769,133777,133778,133785,133786,133809,133810,133859,133860,133871,133872,133876,133877,133881,133882,134687,134688,134692,134693,134697,134698,134714,134715,134719,134720,134726,134727,134731,134732,134737,134738,134743,134744,134748,134749,134754,134755,134760,134761,134765,134766,134770,134771,134776,134777,134782,134783,134788,134789,134794,134795,134799,134800,134805,134806,134811,134812,134816,134817,134822,134823,134828,134829,134833,134834,134839,134840,134845,134846,134850,134851,134856,134857,134862,134863,134867,134868,134873,134874,134879,134880,134884,134885,134890,134891,134896,134897,134901,134902,134907,134908,134913,134914,134918,134919,134924,134925,134930,134931,134935,134936,134941,134942,134947,134948,134952,134953,134958,134959,134964,134965,134969,134970,134975,134976,134981,134982,134989,134990,134997,134998,135011,135012,135017,135018,135040,135041,135070,135071,135113,135114,135150,135151,135157,135158,135216,135217,135221,135222,135240,135241,135245,135246,135419,135420,135589,135590,135596,135597,135611,135612,135621,135622,135631,135632,135641,135642,135651,135652,135661,135662,135671,135672,135681,135682,135691,135692,135701,135702,135716,135717,135726,135727,135736,135737,135751,135752,135761,135762,135771,135772,135781,135782,135791,135792,135801,135802,135811,135812,135821,135822,135831,135832,135841,135842,135856,135857,135866,135867,135876,135877,135886,135887,135896,135897,135911,135912,135921,135922,135931,135932,135941,135942,135956,135957,135966,135967,135976,135977,135986,135987,136001,136002,136011,136012,136021,136022,136031,136032,136041,136042,136056,136057,136066,136067,136076,136077,136086,136087,136096,136097,136106,136107,136115,136116,136130,136131,136140,136141,136150,136151,136160,136161,136170,136171,136180,136181,136190,136191,136200,136201,136210,136211,136225,136226,136235,136236,136245,136246,136255,136256,136265,136266,136275,136276,136285,136286,136295,136296,136305,136306,136315,136316,136325,136326,136340,136341,136350,136351,136360,136361,136370,136371,136380,136381,136390,136391,136405,136406,136415,136416,136425,136426,136435,136436,136445,136446,136455,136456,136465,136466,136475,136476,136490,136491,136500,136501,136510,136511,136520,136521,136535,136536,136550,136551,136560,136561,136570,136571,136580,136581,136590,136591,136600,136601,136610,136611,136625,136626,136635,136636,136645,136646,136655,136656,136670,136671,136680,136681,136690,136691,136700,136701,136715,136716,136725,136726,136735,136736,136745,136746,136760,136761,136770,136771,136780,136781,136790,136791,136800,136801,136810,136811,136825,136826,136835,136836,136845,136846,136855,136856,136865,136866,136880,136881,136890,136891,136900,136901,136910,136911,136920,136921,136930,136931,136945,136946,136955,136956,136965,136966,136975,136976,136985,136986,136995,136996,137010,137011,137020,137021,137030,137031,137040,137041,137050,137051,137060,137061,137070,137071,137080,137081,137090,137091,137100,137101,137115,137116,137125,137126,137135,137136,137145,137146,137155,137156,137165,137166,137175,137176,137185,137186,137195,137196,137205,137206,137220,137221,137230,137231,137240,137241,137250,137251,137260,137261,137270,137271,137280,137281,137290,137291,137300,137301,137310,137311,137325,137326,137335,137336,137345,137346,137355,137356,137365,137366,137375,137376,137385,137386,137395,137396,137405,137406,137420,137421,137430,137431,137440,137441,137450,137451,137460,137461,137470,137471,137480,137481,137490,137491,137500,137501,137510,137511,137520,137521,137530,137531,137540,137541,137555,137556,137565,137566,137575,137576,137585,137586,137595,137596,137605,137606,137615,137616,137625,137626,137635,137636,137650,137651,137660,137661,137670,137671,137680,137681,137690,137691,137700,137701,137710,137711,137725,137726,137735,137736,137745,137746,137755,137756,137765,137766,137775,137776,137785,137786,137795,137796,137805,137806,137815,137816,137825,137826,137835,137836,137850,137851,137860,137861,137870,137871,137880,137881,137890,137891,137900,137901,137910,137911,137920,137921,137930,137931,137940,137941,137955,137956,137965,137966,137975,137976,137985,137986,138000,138001,138010,138011,138020,138021,138030,138031,138040,138041,138050,138051,138060,138061,138070,138071,138080,138081,138090,138091,138105,138106,138115,138116,138125,138126,138135,138136,138145,138146,138155,138156,138165,138166,138175,138176,138190,138191,138200,138201,138210,138211,138220,138221,138230,138231,138240,138241,138255,138256,138265,138266,138275,138276,138285,138286,138295,138296,138305,138306,138315,138316,138325,138326,138335,138336,138350,138351,138360,138361,138370,138371,138380,138381,138491,138492,138555,138556,138560,138561,138567,138568,138581,138582,138588,138589,138647,138648,138669,138670,138683,138684,138716,138717,138810,138811,138825,138826,138835,138836,138880,138881,138913,138914,138924,138925,138931,138932,138937,138938,139051,139052,139071,139072,139077,139078,139754,139755,139774,139775,139787,139788,139801,139802,139865,139866,139871,139872,139878,139879,139885,139886,139893,139894,139963,139964,139972,139973,139980,139981,140000,140001,140022,140023,140292,140293,145115,145116,145145,145146,145153,145154,145268,145269,145291,145292,145342,145343,145372,145373,145397,145398,145411,145412,145417,145418,145431,145432,145436,145437,145472,145473,145479,145480,145486,145487,145495,145496,145505,145506,145514,145515,145571,145572,145590,145591,145622,145623,145628,145629,145640,145641,145696,145697,145709,145710,145878,145879,145893,145894,145969,145970,146028,146029,146050,146051,146095,146096,146110,146111,146115,146116,146121,146122,146127,146128,146133,146134,146139,146140,146145,146146,146153,146154,146456,146457,146461,146462,146489,146490,146503,146504,146508,146509,146515,146516,146525,146526,146557,146558,146563,146564,146570,146571,146578,146579,146586,146587,146591,146592,146596,146597,146603,146604,146610,146611,146617,146618,146623,146624,146629,146630,146635,146636,146641,146642,146647,146648,146652,146653,146658,146659,146664,146665,146670,146671,146676,146677,146683,146684,146689,146690,146695,146696,146700,146701,146707,146708,146714,146715,146721,146722,146731,146732,146741,146742,146749,146750,146755,146756,146769,146770,146779,146780,146785,146786,146793,146794,146799,146800,146805,146806,146811,146812,146818,146819,146823,146824,146829,146830,146835,146836,146840,146841,146846,146847,146852,146853,146857,146858,146862,146863,146868,146869,146873,146874,146881,146882,146888,146889,146893,146894,146899,146900,147042,147043,147055,147056,147084,147085,147106,147107,147145,147146,147287,147288,147321,147322,147328,147329,147464,147465,147483,147484,147520,147521,147530,147531,147552,147553,147802,147803,147844,147845,147857,147858,147865,147866,147872,147873,147878,147879,147887,147888,147894,147895,147926,147927,147944,147945,147959,147960,147968,147969,147975,147976,147982,147983,148001,148002,148033,148034,148058,148059,148107,148108,148119,148120,148126,148127,148141,148142,148144,148145,148152,148153,148162,148163,148169,148170,148195,148196,148215,148216,148233,148234,148263,148264,148268,148269,148273,148274,148278,148279,148292,148293,148295,148296,150761,150762,150764,150765,150769,150770,150775,150776,150782,150783,150838,150839,150841,150842,151253,151254,152473,152474,152481,152482,152660,152661,152665,152666,152673,152674,152717,152718,152739,152740,152744,152745,152749,152750,152759,152760,152765,152766,152771,152772,152780,152781,152815,152816,152820,152821,152831,152832,152839,152840,152844,152845,152850,152851,153031,153032,153068,153069,153076,153077,153095,153096,153122,153123,153151,153152,153159,153160,153165,153166,153177,153178,153198,153199,153205,153206,153234,153235,153274,153275,153282,153283,153294,153295,153360,153361,153379,153380,153413,153414,153418,153419,153427,153428,153433,153434,153443,153444,153449,153450,153479,153480,153619,153620,153630,153631,153635,153636,153641,153642,153661,153662,153663,153664,153675,153676,153684,153685,153696,153697,153704,153705,153711,153712,153718,153719,153730,153731,153737,153738,153745,153746,153753,153754,153760,153761,153765,153766,153772,153773,153777,153778,153785,153786,153792,153793,153804,153805,153809,153810,153818,153819,153826,153827,153833,153834,153840,153841,153848,153849,153856,153857,153862,153863,153869,153870,153876,153877,153878,153879,153916,153917,153954,153955,153994,153995,153997,153998,153999,154000,154001,154002,154014,154015,154016,154017,154018,154019,154040,154041,154052,154053,154054,154055,154056,154057,154181,154182,154183,154184,154190,154191,154192,154193,154194,154195,154196,154197,154198,154199,154200,154201,154209,154210,154215,154216,154222,154223,154229,154230,154242,154243,154249,154250,154270,154271,154282,154283,154284,154285,154335,154336,154342,154343,154348,154349,154403,154404,154409,154410,154415,154416,154422,154423,154428,154429,154603,154604,154611,154612,154617,154618,154623,154624,154630,154631,154640,154641,154695,154696,154708,154709,154738,154739,154744,154745,154751,154752,154757,154758,154765,154766,154771,154772,154777,154778,154783,154784,154860,154861,154879,154880,154955,154956,154961,154962,154968,154969,155174,163840,163842,163921,163922,196608,196609,229376,229378,229457,229458,231754,231763,231764,231769,231770,231777,231778,231781,231782,231785,231786,231788,231789,231791,231792,231794,231795,231798,231799,231802,231803,231805,231806,231812,231813,231831,231832,231852,231853,231859,231860,231865,231866,231871,231872,231883,231884,231890,231891,231904,231905,231915,231916,231919,231920,231928,231929,231934,231935,231940,231941,231946,231947,231950,231951,231954,231955,231959,231960,231964,231965,231968,231969,231973,231974,231977,231978,231982,231983,231987,231988,232000,232001,232007,232008,233038,233039,233045,233046,233054,233055,233062,233063,233066,233067,233068,233069,233076,233077,233095,233096,233101,233102,233106,233107,233112,233113,233124,233125,233131,233132,233137,233138,233148,233149,233154,233155,233156,233157,233158,233159,233160,233161,233165,233166,233168,233169,233175,233176,233179,233180,233187,233188,233191,233192,233221,233222,233235,233236,233260,233261,233297,233298,233324,233325,233369,233370,233394,233395,233406,233407,233435,233436,233462,233463,233475,233476,233477,233478,233481,233482,233484,233485,233487,233488,233491,233492,233495,233496,233503,233504,233506,233507,233511,233512,233521,233522,233526,233527,233532,233533,233537,233538,233543,233544,233547,233548,233552,233553,233557,233558,233565,233566,233571,233572,233575,233576,233581,233582,233586,233587,233590,233591,233596,233597,233601,233602,233606,233607,233610,233611,233617,233618,233621,233622,233627,233628,233634,233635,233638,233639,233649,233650,233652,233653,233658,233659,233663,233664,233679,233680,233683,233684,233688,233689,233694,233695,233700,233701,233706,233707,233712,233713,233717,233718,233720,233721,233727,233728,233734,233735,233741,233742,233746,233747,233754,233755,233761,233762,233765,233766,233772,233773,233779,233780,233787,233788,233791,233792,233802,233803,233806,233807,233818,233819,233822,233823,233827,233828,233833,233834,233839,233840,233846,233847,233855,233856,233861,233862,233869,233870,233874,233875,233877,233878,233882,233883,233888,233889,233894,233895,233902,233903,233910,233911,233914,233915,233923,233924,233925,233926,233933,233934,233941,233942,233948,233949,234005,234006,234028,234029,234036,234037,234046,234047,234054,234055,234063,234064,234076,234077,234088,234089,234099,234100,234112,234113,234121,234122,234130,234131,234141,234142,234152,234153,234161,234162,234170,234171,234175,234176,234183,234184,234194,234195,234205,234206,234216,234217,234268,234269,234277,234278,234286,234287,234302,234303,234307,234308,234321,234322,234330,234331,234374,234375,234388,234389,234405,234406,234415,234416,234424,234425,234453,234454,234466,234467,234477,234478,234491,234492,234502,234503,234514,234515,234529,234530,234541,234542,234559,234560,234566,234567,234571,234572,234613,234614,234624,234625,234634,234635,234646,234647,234657,234658,234665,234666,234675,234676,234687,234688,234699,234700,234704,234705,234714,234715,234724,234725,234735,234736,234743,234744,234752,234753,234767,234768,234796,234797,234807,234808,234830,234831,234889,234890,234904,234905,234910,234911,234955,234956,234969,234970,234985,234986,235001,235002,235008,235009,235022,235023,235034,235035,235047,235048,235056,235057,235068,235069,235079,235080,235107,235108,235186,235187,235198,235199,235209,235210,235221,235222,235230,235231,235253,235254,235261,235262,235272,235273,235282,235283,235301,235302,235345,235346,235355,235356,235368,235369,235376,235377,235413,235414,235460,235461,235469,235470,235475,235476,235484,235485,235505,235506,235512,235513,235514,235515,235517,235518,235520,235521,235523,235524,235527,235528,235530,235531,235533,235534,235536,235537,235540,235541,235545,235546,235548,235549,235552,235553,235555,235556,235558,235559,235561,235562,235565,235566,235568,235569,235572,235573,235574,235575,235576,235577,235639,235640,235641,235642,235643,235644,235654,235655,235656,235657,235698,235699,235700,235701,235702,235703,235922,235923,235924,235925,235958,235959,235960,235961,235962,235963,236198,236199,236200,236201,236209,236210,236211,236212,236213,236214,236227,236228,236229,236230,236262,236263,236264,236265,236266,236267,236274,236275,236276,236277,236885,236886,236887,236888,236889,236890,236974,236975,236976,236977,237043,237044,237045,237046,237047,237048,237142,237143,237144,237145,239100,239101,239102,239103,239104,239105,240630,240631,240632,240633,240780,240781,240782,240783,240784,240785,241475,241476,241477,241478,241485,241486,241487,241488,241489,241490,241491,241492,241493,241494,241506,241507,241508,241509,244097,244098,244099,244100,244101,244102,246466,246467,246468,246469,246952,246953,246954,246955,246956,246957,247852,247853,247854,247855,248012,248013,248014,248015,248016,248017,248293,248294,248295,248296,249279,249280,249281,249282,249283,249284,249870,249871,249872,249873,249879,249880,249881,249882,249883,249884,249894,249895,249896,249897,249910,249911,249912,249913,249914,249915,249949,249950,249951,249952,249958,249959,249960,249961,249962,249963,249974,249975,249976,249977,250037,250038,250039,250040,250041,250042,250048,250049,250050,250051,250285,250286,250287,250288,250289,250290,250447,250448,250449,250450,250497,250498,250499,250500,250501,250502,250635,250636,250637,250638,252317,252318,252319,252320,252321,252322,253629,253630,253631,253632,253642,253643,253644,253645,253646,253647,253698,253699,253700,253701,253737,253738,253739,253740,253741,253742,253743,253744,253745,253746,253802,253803,253804,253805,253810,253811,253812,253813,253814,253815,253838,253839,253840,253841,255255,255256,255257,255258,255259,255260,256309,256310,256311,256312,256315,256316,256317,256318,256319,256320,256333,256334,256335,256336,256342,256343,256344,256345,256346,256347,256363,256364,256365,256366,256378,256379,256380,256381,256382,256383,256463,256464,256465,256466,256467,256468,256469,256470,258868,258869,258870,258871,258914,258915,258916,258917,258918,258919,259036,259037,259038,259039,259042,259043,259044,259045,259046,259047,259058,259059,259060,259061,259122,259123,259124,259125,259126,259127,259216,259217,259218,259219,259352,259353,259354,259355,259356,259357,259603,259604,259605,259606,259617,259618,259619,259620,259621,259622,259665,259666,259667,259668,260725,260726,260727,260728,260729,260730,261642,261643,261644,261645,261646,261647,261648,261649,261650,261651,261652,261653,261654,261655,261656,261657,261658,261659,261660,261661,261662,261663,261672,261673,261674,261675,261676,261677,261686,261687,261688,261689,261746,261747,261748,261749,261750,261751,261926,261927,261928,261929,262009,262010,262011,262012,262013,262014,262120,262121,262122,262123,262124,262125,262126,262127,262137,262138,262139,262140,262141,262144,262145,294912,294914,294993,294994,295487,295488,300403,300405,300406,300407,300408,300409,300410,300411,300421,300422,300423,300424,300459,300460,300466,300467,300468,300469,300482,300483,300496,300497,300498,300499,300514,300515,301303,301304,301305,301306,301307,301308,301309,301310,305216,305217,305275,305276,305277,305278,305279,305280,305281,305282,305460,305461,305468,305469,305470,305471,305487,305488,305498,305499,305500,305501,305520,305521,305533,305534,305535,305536,305556,305557,305578,305579,305580,305581,305598,305599,305606,305607,305608,305609,305636,305637,305665,305666,305667,305668,305719,305720,305753,305754,305755,305756,305772,305773,305782,305783,305784,305785,305795,305796,305899,305900,305901,305902,305933,305934,306479,306480,306481,306482,308207,308208,308223,308224,308225,308226,308241,308242,308308,308309,308310,308311,308324,308325,308335,308336,308337,308338,308360,308361,308464,308465,308466,308467,308514,308515,308521,308522,308523,308524,308532,308533,308542,308543,308544,308545,308567,308568,308578,308579,308580,308581,308591,308592,308624,308625,308626,308627,308653,308654,313384,313385,313386,313387,313388,313389,313390,313391,314050,314051,314415,314416,314417,314418,314419,314420,314438,314439,314440,314441,314468,314469,314470,314471,314472,314473,314553,314554,314555,314556,314557,314558,314559,314560,314567,314568,314569,314570,314571,314572") == "ec86fcfaa79aa838f62adab26518de1efacd0851" || block_image_verify("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat")) then
ui_print("Verified system image...");
else
check_first_block("/dev/block/bootdevice/by-name/system");
ifelse (block_image_recover("/dev/block/bootdevice/by-name/system", "3752,1,80,81,306,2816,2817,2818,2819,2820,2821,2822,2823,2832,2833,2940,2941,2942,2943,3036,3037,3045,3046,3047,3048,3049,3050,3051,3052,3069,3070,3089,3090,3091,3092,3102,3103,3157,3158,3159,3160,3172,3173,3177,3178,3179,3180,3190,3191,3205,3206,3207,3208,3244,3245,3254,3255,3256,3257,3300,3301,3327,3328,3329,3330,3382,3383,3392,3393,3394,3395,3433,3434,3446,3447,3448,3449,3450,3451,3530,3531,3532,3533,3766,3767,4799,4800,5942,5943,6167,6168,7007,7008,7012,7013,7014,7015,7024,7025,7033,7034,7035,7036,7064,7065,7130,7131,7132,7133,7201,7202,7210,7211,7212,7213,7242,7243,7249,7250,7251,7252,7273,7274,7278,7279,7280,7281,7289,7290,7296,7297,7298,7299,7317,7318,7323,7324,7325,7326,7338,7339,7344,7345,7346,7347,7362,7363,7369,7370,7371,7372,7385,7386,7387,7388,7389,7390,7468,7469,7470,7471,7472,7473,7485,7486,7490,7491,7492,7493,7494,7495,7554,7555,7556,7557,7558,7559,7624,7625,7626,7627,7628,7629,19579,19581,19843,19844,20855,20856,20899,20900,20930,20931,21259,21260,22228,22262,22836,22837,22942,22943,23235,23236,23448,23449,24369,24372,24373,24374,24440,24441,24442,24443,24609,24610,24754,24755,24928,24929,25100,25101,25461,25462,25479,25721,25724,25725,25734,25735,25736,25737,25754,25755,25776,25777,25886,25887,25925,25926,25929,25930,25941,25942,26408,26409,26410,26411,26433,26434,26455,26456,26695,26696,27808,27809,28105,28106,28224,28225,28702,28703,28704,28705,29230,29231,29246,29247,29278,29279,29340,29341,29347,29348,32757,32758,32768,32770,32849,32850,65536,65537,85583,85607,85608,85755,85756,85757,85758,86626,86627,86628,86629,86630,86631,86632,86633,86667,86668,86675,86676,86677,86678,86679,86680,86681,86682,86714,86715,86769,86770,86805,86806,86807,86808,86809,86810,86811,86812,86813,86814,86815,86816,86817,86818,86819,86820,86821,86822,86823,86824,86825,86826,86827,86828,86829,86830,86831,86832,86833,86834,86835,86836,86837,86838,86839,86840,86841,86842,86998,86999,87107,87108,87251,87252,87353,87354,87544,87545,87704,87705,87768,87769,87917,87918,88122,88123,88217,88218,88372,88373,88435,88436,88437,88438,88439,88440,88441,88442,88443,88444,88445,88446,88447,88448,88457,88458,88459,88460,88462,88463,88464,88465,88492,88493,88494,88495,88521,88522,88523,88524,88551,88552,88553,88554,88566,88567,88568,88569,88577,88578,88579,88580,88584,88585,88586,88587,88593,88594,88595,88596,88597,88598,88599,88600,88602,88603,88604,88605,88614,88615,88616,88617,88618,88619,88620,88621,88622,88623,88624,88625,88626,88627,88628,88629,88707,88708,88709,88710,88711,88712,88713,88714,88715,88716,88717,88718,88719,88720,88721,88722,88724,88725,88726,88727,88728,88729,88730,88731,88767,88768,88769,88770,88806,88807,88808,88809,88810,88811,88812,88813,88814,88815,88816,88817,88818,88819,88821,88822,88824,88825,88826,88827,88828,88829,88830,88831,88832,88833,88834,88835,88836,88837,88838,88839,88840,88841,88842,88843,88844,88845,94266,94267,94268,94269,94270,94271,94272,94273,94274,94275,94276,94277,94281,94282,94285,94286,94290,94291,94295,94296,94300,94301,94302,94303,94304,94305,94308,94309,94310,94311,94312,94313,94314,94315,94316,94317,94318,94319,94320,94321,94322,94323,94324,94325,94326,94327,94328,94329,94330,94331,94332,94333,94334,94335,94336,94337,94338,94339,94340,94341,94342,94343,94344,94345,94346,94347,94348,94349,94350,94351,94352,94353,94354,94355,94356,94357,94358,94359,94360,94361,94362,94363,94364,94365,94366,94367,94368,94369,94370,94371,94372,94373,94374,94375,94376,94377,94378,94379,94380,94381,94382,94383,94384,94385,94389,94390,94395,94396,94397,94398,94521,94522,94523,94524,94525,94526,94527,94528,94529,94530,94531,94532,94533,94534,94536,94537,94538,94539,94541,94542,94543,94544,94546,94547,94548,94549,94551,94552,94553,94554,94556,94557,94558,94559,94561,94562,94563,94564,94566,94567,94568,94569,94570,94571,94572,94573,94574,94575,94576,94577,94583,94584,94585,94586,94587,94588,94594,94595,94596,94597,94678,94679,94680,94681,94682,94683,95069,95070,95071,95072,95074,95075,95076,95077,95078,95079,95085,95086,95087,95088,95093,95094,95095,95096,95097,95098,95115,95116,95117,95118,95148,95149,95150,95151,95152,95153,95172,95173,95174,95175,95185,95186,95187,95188,95189,95190,95213,95214,95215,95216,95217,95218,95219,95220,95222,95223,95224,95225,95229,95230,95231,95232,95234,95235,95236,95237,95239,95240,95241,95242,95244,95245,95246,95247,95249,95250,95251,95252,95254,95255,95256,95257,95259,95260,95261,95262,95265,95266,95267,95268,95270,95271,95272,95273,95276,95277,95278,95279,95281,95282,95283,95284,95294,95295,95296,95297,95298,95299,95300,95301,95302,95303,95304,95305,95306,95307,95312,95313,95314,95315,95316,95317,95324,95325,95326,95327,95349,95350,95351,95352,95353,95354,95399,95400,95401,95402,95416,95417,95418,95419,95420,95421,95437,95438,95439,95440,95441,95442,95443,95444,95457,95458,95459,95460,95462,95463,95464,95465,95467,95468,95469,95470,95472,95473,95474,95475,95477,95478,95479,95480,95482,95483,95484,95485,95487,95488,95489,95490,95492,95493,95494,95495,95497,95498,95499,95500,95502,95503,95504,95505,95512,95513,95514,95515,95517,95518,95519,95520,95521,95522,95523,95524,95525,95526,95527,95528,95529,95530,95535,95536,95537,95538,95539,95540,95547,95548,95549,95550,95554,95555,95556,95557,95558,95559,95566,95567,95568,95569,95570,95571,95572,95573,95575,95576,95577,95578,95580,95581,95582,95583,95585,95586,95587,95588,95590,95591,95592,95593,95595,95596,95597,95598,95600,95601,95602,95603,95711,95712,95713,95714,95715,95716,95717,95718,95719,95720,95721,95722,95723,95724,95725,95726,95727,95728,95729,95730,95731,95732,95733,95734,95742,95743,95744,95745,95753,95754,95755,95756,95757,95758,95765,95766,95767,95768,95775,95776,95777,95778,95779,95780,95781,95782,95783,95784,95785,95786,95795,95796,95797,95798,95799,95800,95816,95817,95818,95819,95821,95822,95823,95824,95826,95827,95828,95829,95831,95832,95833,95834,95839,95840,95841,95842,95844,95845,95846,95847,95848,95849,95850,95851,95856,95857,95858,95859,95860,95861,95871,95872,95873,95874,95899,95900,95901,95902,95903,95904,95990,95991,95992,95993,96056,96057,96058,96059,96060,96061,96212,96213,96214,96215,96230,96231,96232,96233,96234,96235,96254,96255,96256,96257,96258,96259,96260,96261,96566,96567,96631,96632,96633,96634,96721,96722,97385,97386,97391,97392,97397,97398,97408,97409,97422,97423,97438,97439,97467,97468,97478,97479,97516,97517,97789,97790,97791,97792,97793,97794,97795,97796,97869,97870,97943,97944,97987,97988,97989,97990,97993,97994,97995,97996,97997,97998,97999,98000,98001,98002,98004,98005,98011,98012,98017,98018,98093,98094,98097,98098,98103,98104,98105,98106,98107,98108,98109,98110,98111,98112,98113,98114,98120,98121,98122,98123,98144,98145,98168,98169,98170,98171,98182,98183,98226,98227,98278,98279,98280,98281,98289,98290,98295,98296,98302,98304,98306,98385,98386,104978,104979,125692,125693,125694,125695,130075,130078,130083,130084,130101,130102,130131,130132,131067,131068,131069,131070,131072,131073,131566,131885,131886,131993,131994,132006,132007,132021,132022,132065,132066,132079,132080,132125,132126,132137,132138,132245,132246,132562,132563,132661,132662,132699,132700,132729,132730,132749,132750,132758,132759,132943,132944,133086,133087,133097,133098,133115,133116,133125,133126,133260,133261,133290,133291,133321,133322,133511,133512,133518,133519,133525,133526,133531,133532,133536,133537,133550,133551,133559,133560,133564,133565,133595,133596,133613,133614,133644,133645,133699,133700,133717,133718,133748,133749,133768,133769,133777,133778,133785,133786,133809,133810,133859,133860,133871,133872,133876,133877,133881,133882,134687,134688,134692,134693,134697,134698,134714,134715,134719,134720,134726,134727,134731,134732,134737,134738,134743,134744,134748,134749,134754,134755,134760,134761,134765,134766,134770,134771,134776,134777,134782,134783,134788,134789,134794,134795,134799,134800,134805,134806,134811,134812,134816,134817,134822,134823,134828,134829,134833,134834,134839,134840,134845,134846,134850,134851,134856,134857,134862,134863,134867,134868,134873,134874,134879,134880,134884,134885,134890,134891,134896,134897,134901,134902,134907,134908,134913,134914,134918,134919,134924,134925,134930,134931,134935,134936,134941,134942,134947,134948,134952,134953,134958,134959,134964,134965,134969,134970,134975,134976,134981,134982,134989,134990,134997,134998,135011,135012,135017,135018,135040,135041,135070,135071,135113,135114,135150,135151,135157,135158,135216,135217,135221,135222,135240,135241,135245,135246,135419,135420,135589,135590,135596,135597,135611,135612,135621,135622,135631,135632,135641,135642,135651,135652,135661,135662,135671,135672,135681,135682,135691,135692,135701,135702,135716,135717,135726,135727,135736,135737,135751,135752,135761,135762,135771,135772,135781,135782,135791,135792,135801,135802,135811,135812,135821,135822,135831,135832,135841,135842,135856,135857,135866,135867,135876,135877,135886,135887,135896,135897,135911,135912,135921,135922,135931,135932,135941,135942,135956,135957,135966,135967,135976,135977,135986,135987,136001,136002,136011,136012,136021,136022,136031,136032,136041,136042,136056,136057,136066,136067,136076,136077,136086,136087,136096,136097,136106,136107,136115,136116,136130,136131,136140,136141,136150,136151,136160,136161,136170,136171,136180,136181,136190,136191,136200,136201,136210,136211,136225,136226,136235,136236,136245,136246,136255,136256,136265,136266,136275,136276,136285,136286,136295,136296,136305,136306,136315,136316,136325,136326,136340,136341,136350,136351,136360,136361,136370,136371,136380,136381,136390,136391,136405,136406,136415,136416,136425,136426,136435,136436,136445,136446,136455,136456,136465,136466,136475,136476,136490,136491,136500,136501,136510,136511,136520,136521,136535,136536,136550,136551,136560,136561,136570,136571,136580,136581,136590,136591,136600,136601,136610,136611,136625,136626,136635,136636,136645,136646,136655,136656,136670,136671,136680,136681,136690,136691,136700,136701,136715,136716,136725,136726,136735,136736,136745,136746,136760,136761,136770,136771,136780,136781,136790,136791,136800,136801,136810,136811,136825,136826,136835,136836,136845,136846,136855,136856,136865,136866,136880,136881,136890,136891,136900,136901,136910,136911,136920,136921,136930,136931,136945,136946,136955,136956,136965,136966,136975,136976,136985,136986,136995,136996,137010,137011,137020,137021,137030,137031,137040,137041,137050,137051,137060,137061,137070,137071,137080,137081,137090,137091,137100,137101,137115,137116,137125,137126,137135,137136,137145,137146,137155,137156,137165,137166,137175,137176,137185,137186,137195,137196,137205,137206,137220,137221,137230,137231,137240,137241,137250,137251,137260,137261,137270,137271,137280,137281,137290,137291,137300,137301,137310,137311,137325,137326,137335,137336,137345,137346,137355,137356,137365,137366,137375,137376,137385,137386,137395,137396,137405,137406,137420,137421,137430,137431,137440,137441,137450,137451,137460,137461,137470,137471,137480,137481,137490,137491,137500,137501,137510,137511,137520,137521,137530,137531,137540,137541,137555,137556,137565,137566,137575,137576,137585,137586,137595,137596,137605,137606,137615,137616,137625,137626,137635,137636,137650,137651,137660,137661,137670,137671,137680,137681,137690,137691,137700,137701,137710,137711,137725,137726,137735,137736,137745,137746,137755,137756,137765,137766,137775,137776,137785,137786,137795,137796,137805,137806,137815,137816,137825,137826,137835,137836,137850,137851,137860,137861,137870,137871,137880,137881,137890,137891,137900,137901,137910,137911,137920,137921,137930,137931,137940,137941,137955,137956,137965,137966,137975,137976,137985,137986,138000,138001,138010,138011,138020,138021,138030,138031,138040,138041,138050,138051,138060,138061,138070,138071,138080,138081,138090,138091,138105,138106,138115,138116,138125,138126,138135,138136,138145,138146,138155,138156,138165,138166,138175,138176,138190,138191,138200,138201,138210,138211,138220,138221,138230,138231,138240,138241,138255,138256,138265,138266,138275,138276,138285,138286,138295,138296,138305,138306,138315,138316,138325,138326,138335,138336,138350,138351,138360,138361,138370,138371,138380,138381,138491,138492,138555,138556,138560,138561,138567,138568,138581,138582,138588,138589,138647,138648,138669,138670,138683,138684,138716,138717,138810,138811,138825,138826,138835,138836,138880,138881,138913,138914,138924,138925,138931,138932,138937,138938,139051,139052,139071,139072,139077,139078,139754,139755,139774,139775,139787,139788,139801,139802,139865,139866,139871,139872,139878,139879,139885,139886,139893,139894,139963,139964,139972,139973,139980,139981,140000,140001,140022,140023,140292,140293,145115,145116,145145,145146,145153,145154,145268,145269,145291,145292,145342,145343,145372,145373,145397,145398,145411,145412,145417,145418,145431,145432,145436,145437,145472,145473,145479,145480,145486,145487,145495,145496,145505,145506,145514,145515,145571,145572,145590,145591,145622,145623,145628,145629,145640,145641,145696,145697,145709,145710,145878,145879,145893,145894,145969,145970,146028,146029,146050,146051,146095,146096,146110,146111,146115,146116,146121,146122,146127,146128,146133,146134,146139,146140,146145,146146,146153,146154,146456,146457,146461,146462,146489,146490,146503,146504,146508,146509,146515,146516,146525,146526,146557,146558,146563,146564,146570,146571,146578,146579,146586,146587,146591,146592,146596,146597,146603,146604,146610,146611,146617,146618,146623,146624,146629,146630,146635,146636,146641,146642,146647,146648,146652,146653,146658,146659,146664,146665,146670,146671,146676,146677,146683,146684,146689,146690,146695,146696,146700,146701,146707,146708,146714,146715,146721,146722,146731,146732,146741,146742,146749,146750,146755,146756,146769,146770,146779,146780,146785,146786,146793,146794,146799,146800,146805,146806,146811,146812,146818,146819,146823,146824,146829,146830,146835,146836,146840,146841,146846,146847,146852,146853,146857,146858,146862,146863,146868,146869,146873,146874,146881,146882,146888,146889,146893,146894,146899,146900,147042,147043,147055,147056,147084,147085,147106,147107,147145,147146,147287,147288,147321,147322,147328,147329,147464,147465,147483,147484,147520,147521,147530,147531,147552,147553,147802,147803,147844,147845,147857,147858,147865,147866,147872,147873,147878,147879,147887,147888,147894,147895,147926,147927,147944,147945,147959,147960,147968,147969,147975,147976,147982,147983,148001,148002,148033,148034,148058,148059,148107,148108,148119,148120,148126,148127,148141,148142,148144,148145,148152,148153,148162,148163,148169,148170,148195,148196,148215,148216,148233,148234,148263,148264,148268,148269,148273,148274,148278,148279,148292,148293,148295,148296,150761,150762,150764,150765,150769,150770,150775,150776,150782,150783,150838,150839,150841,150842,151253,151254,152473,152474,152481,152482,152660,152661,152665,152666,152673,152674,152717,152718,152739,152740,152744,152745,152749,152750,152759,152760,152765,152766,152771,152772,152780,152781,152815,152816,152820,152821,152831,152832,152839,152840,152844,152845,152850,152851,153031,153032,153068,153069,153076,153077,153095,153096,153122,153123,153151,153152,153159,153160,153165,153166,153177,153178,153198,153199,153205,153206,153234,153235,153274,153275,153282,153283,153294,153295,153360,153361,153379,153380,153413,153414,153418,153419,153427,153428,153433,153434,153443,153444,153449,153450,153479,153480,153619,153620,153630,153631,153635,153636,153641,153642,153661,153662,153663,153664,153675,153676,153684,153685,153696,153697,153704,153705,153711,153712,153718,153719,153730,153731,153737,153738,153745,153746,153753,153754,153760,153761,153765,153766,153772,153773,153777,153778,153785,153786,153792,153793,153804,153805,153809,153810,153818,153819,153826,153827,153833,153834,153840,153841,153848,153849,153856,153857,153862,153863,153869,153870,153876,153877,153878,153879,153916,153917,153954,153955,153994,153995,153997,153998,153999,154000,154001,154002,154014,154015,154016,154017,154018,154019,154040,154041,154052,154053,154054,154055,154056,154057,154181,154182,154183,154184,154190,154191,154192,154193,154194,154195,154196,154197,154198,154199,154200,154201,154209,154210,154215,154216,154222,154223,154229,154230,154242,154243,154249,154250,154270,154271,154282,154283,154284,154285,154335,154336,154342,154343,154348,154349,154403,154404,154409,154410,154415,154416,154422,154423,154428,154429,154603,154604,154611,154612,154617,154618,154623,154624,154630,154631,154640,154641,154695,154696,154708,154709,154738,154739,154744,154745,154751,154752,154757,154758,154765,154766,154771,154772,154777,154778,154783,154784,154860,154861,154879,154880,154955,154956,154961,154962,154968,154969,155174,163840,163842,163921,163922,196608,196609,229376,229378,229457,229458,231754,231763,231764,231769,231770,231777,231778,231781,231782,231785,231786,231788,231789,231791,231792,231794,231795,231798,231799,231802,231803,231805,231806,231812,231813,231831,231832,231852,231853,231859,231860,231865,231866,231871,231872,231883,231884,231890,231891,231904,231905,231915,231916,231919,231920,231928,231929,231934,231935,231940,231941,231946,231947,231950,231951,231954,231955,231959,231960,231964,231965,231968,231969,231973,231974,231977,231978,231982,231983,231987,231988,232000,232001,232007,232008,233038,233039,233045,233046,233054,233055,233062,233063,233066,233067,233068,233069,233076,233077,233095,233096,233101,233102,233106,233107,233112,233113,233124,233125,233131,233132,233137,233138,233148,233149,233154,233155,233156,233157,233158,233159,233160,233161,233165,233166,233168,233169,233175,233176,233179,233180,233187,233188,233191,233192,233221,233222,233235,233236,233260,233261,233297,233298,233324,233325,233369,233370,233394,233395,233406,233407,233435,233436,233462,233463,233475,233476,233477,233478,233481,233482,233484,233485,233487,233488,233491,233492,233495,233496,233503,233504,233506,233507,233511,233512,233521,233522,233526,233527,233532,233533,233537,233538,233543,233544,233547,233548,233552,233553,233557,233558,233565,233566,233571,233572,233575,233576,233581,233582,233586,233587,233590,233591,233596,233597,233601,233602,233606,233607,233610,233611,233617,233618,233621,233622,233627,233628,233634,233635,233638,233639,233649,233650,233652,233653,233658,233659,233663,233664,233679,233680,233683,233684,233688,233689,233694,233695,233700,233701,233706,233707,233712,233713,233717,233718,233720,233721,233727,233728,233734,233735,233741,233742,233746,233747,233754,233755,233761,233762,233765,233766,233772,233773,233779,233780,233787,233788,233791,233792,233802,233803,233806,233807,233818,233819,233822,233823,233827,233828,233833,233834,233839,233840,233846,233847,233855,233856,233861,233862,233869,233870,233874,233875,233877,233878,233882,233883,233888,233889,233894,233895,233902,233903,233910,233911,233914,233915,233923,233924,233925,233926,233933,233934,233941,233942,233948,233949,234005,234006,234028,234029,234036,234037,234046,234047,234054,234055,234063,234064,234076,234077,234088,234089,234099,234100,234112,234113,234121,234122,234130,234131,234141,234142,234152,234153,234161,234162,234170,234171,234175,234176,234183,234184,234194,234195,234205,234206,234216,234217,234268,234269,234277,234278,234286,234287,234302,234303,234307,234308,234321,234322,234330,234331,234374,234375,234388,234389,234405,234406,234415,234416,234424,234425,234453,234454,234466,234467,234477,234478,234491,234492,234502,234503,234514,234515,234529,234530,234541,234542,234559,234560,234566,234567,234571,234572,234613,234614,234624,234625,234634,234635,234646,234647,234657,234658,234665,234666,234675,234676,234687,234688,234699,234700,234704,234705,234714,234715,234724,234725,234735,234736,234743,234744,234752,234753,234767,234768,234796,234797,234807,234808,234830,234831,234889,234890,234904,234905,234910,234911,234955,234956,234969,234970,234985,234986,235001,235002,235008,235009,235022,235023,235034,235035,235047,235048,235056,235057,235068,235069,235079,235080,235107,235108,235186,235187,235198,235199,235209,235210,235221,235222,235230,235231,235253,235254,235261,235262,235272,235273,235282,235283,235301,235302,235345,235346,235355,235356,235368,235369,235376,235377,235413,235414,235460,235461,235469,235470,235475,235476,235484,235485,235505,235506,235512,235513,235514,235515,235517,235518,235520,235521,235523,235524,235527,235528,235530,235531,235533,235534,235536,235537,235540,235541,235545,235546,235548,235549,235552,235553,235555,235556,235558,235559,235561,235562,235565,235566,235568,235569,235572,235573,235574,235575,235576,235577,235639,235640,235641,235642,235643,235644,235654,235655,235656,235657,235698,235699,235700,235701,235702,235703,235922,235923,235924,235925,235958,235959,235960,235961,235962,235963,236198,236199,236200,236201,236209,236210,236211,236212,236213,236214,236227,236228,236229,236230,236262,236263,236264,236265,236266,236267,236274,236275,236276,236277,236885,236886,236887,236888,236889,236890,236974,236975,236976,236977,237043,237044,237045,237046,237047,237048,237142,237143,237144,237145,239100,239101,239102,239103,239104,239105,240630,240631,240632,240633,240780,240781,240782,240783,240784,240785,241475,241476,241477,241478,241485,241486,241487,241488,241489,241490,241491,241492,241493,241494,241506,241507,241508,241509,244097,244098,244099,244100,244101,244102,246466,246467,246468,246469,246952,246953,246954,246955,246956,246957,247852,247853,247854,247855,248012,248013,248014,248015,248016,248017,248293,248294,248295,248296,249279,249280,249281,249282,249283,249284,249870,249871,249872,249873,249879,249880,249881,249882,249883,249884,249894,249895,249896,249897,249910,249911,249912,249913,249914,249915,249949,249950,249951,249952,249958,249959,249960,249961,249962,249963,249974,249975,249976,249977,250037,250038,250039,250040,250041,250042,250048,250049,250050,250051,250285,250286,250287,250288,250289,250290,250447,250448,250449,250450,250497,250498,250499,250500,250501,250502,250635,250636,250637,250638,252317,252318,252319,252320,252321,252322,253629,253630,253631,253632,253642,253643,253644,253645,253646,253647,253698,253699,253700,253701,253737,253738,253739,253740,253741,253742,253743,253744,253745,253746,253802,253803,253804,253805,253810,253811,253812,253813,253814,253815,253838,253839,253840,253841,255255,255256,255257,255258,255259,255260,256309,256310,256311,256312,256315,256316,256317,256318,256319,256320,256333,256334,256335,256336,256342,256343,256344,256345,256346,256347,256363,256364,256365,256366,256378,256379,256380,256381,256382,256383,256463,256464,256465,256466,256467,256468,256469,256470,258868,258869,258870,258871,258914,258915,258916,258917,258918,258919,259036,259037,259038,259039,259042,259043,259044,259045,259046,259047,259058,259059,259060,259061,259122,259123,259124,259125,259126,259127,259216,259217,259218,259219,259352,259353,259354,259355,259356,259357,259603,259604,259605,259606,259617,259618,259619,259620,259621,259622,259665,259666,259667,259668,260725,260726,260727,260728,260729,260730,261642,261643,261644,261645,261646,261647,261648,261649,261650,261651,261652,261653,261654,261655,261656,261657,261658,261659,261660,261661,261662,261663,261672,261673,261674,261675,261676,261677,261686,261687,261688,261689,261746,261747,261748,261749,261750,261751,261926,261927,261928,261929,262009,262010,262011,262012,262013,262014,262120,262121,262122,262123,262124,262125,262126,262127,262137,262138,262139,262140,262141,262144,262145,294912,294914,294993,294994,295487,295488,300403,300405,300406,300407,300408,300409,300410,300411,300421,300422,300423,300424,300459,300460,300466,300467,300468,300469,300482,300483,300496,300497,300498,300499,300514,300515,301303,301304,301305,301306,301307,301308,301309,301310,305216,305217,305275,305276,305277,305278,305279,305280,305281,305282,305460,305461,305468,305469,305470,305471,305487,305488,305498,305499,305500,305501,305520,305521,305533,305534,305535,305536,305556,305557,305578,305579,305580,305581,305598,305599,305606,305607,305608,305609,305636,305637,305665,305666,305667,305668,305719,305720,305753,305754,305755,305756,305772,305773,305782,305783,305784,305785,305795,305796,305899,305900,305901,305902,305933,305934,306479,306480,306481,306482,308207,308208,308223,308224,308225,308226,308241,308242,308308,308309,308310,308311,308324,308325,308335,308336,308337,308338,308360,308361,308464,308465,308466,308467,308514,308515,308521,308522,308523,308524,308532,308533,308542,308543,308544,308545,308567,308568,308578,308579,308580,308581,308591,308592,308624,308625,308626,308627,308653,308654,313384,313385,313386,313387,313388,313389,313390,313391,314050,314051,314415,314416,314417,314418,314419,314420,314438,314439,314440,314441,314468,314469,314470,314471,314472,314473,314553,314554,314555,314556,314557,314558,314559,314560,314567,314568,314569,314570,314571,314572") && block_image_verify("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat"), ui_print("system recovered successfully."), abort("E1004: system partition fails to recover"));
endif;

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

ui_print("Patching system image after verification.");
show_progress(0.900000, 0);
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
ui_print("Patching boot image...");
show_progress(0.100000, 10);
apply_patch("EMMC:/dev/block/bootdevice/by-name/boot:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20:16276776:185e9b76816e1c3c0da5931463662168eb34164a",
            "-", 185e9b76816e1c3c0da5931463662168eb34164a, 16276776,
            fe07e75cfbb3eef66b35fc6b643bfad0c1372c20,
            package_extract_file("patch/boot.img.p")) ||
    abort("E3008: Failed to apply patch to EMMC:/dev/block/bootdevice/by-name/boot:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20:16276776:185e9b76816e1c3c0da5931463662168eb34164a");

# ---- radio update tasks ----

ui_print("Patching firmware images...");
set_progress(1.000000);
