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/015/t470p07271143:userdebug/test-keys");
ui_print("Target: qcom/msm8909/msm8909:7.1.2/017/t470p12011456:userdebug/test-keys");
ui_print("Verifying current system...");
getprop("ro.build.fingerprint") == "qcom/msm8909/msm8909:7.1.2/015/t470p07271143:userdebug/test-keys" ||
    getprop("ro.build.fingerprint") == "qcom/msm8909/msm8909:7.1.2/017/t470p12011456:userdebug/test-keys" ||
    abort("E3001: Package expects build fingerprint of qcom/msm8909/msm8909:7.1.2/015/t470p07271143:userdebug/test-keys or qcom/msm8909/msm8909:7.1.2/017/t470p12011456:userdebug/test-keys; this device has " + getprop("ro.build.fingerprint") + ".");
apply_patch_check("EMMC:/dev/block/bootdevice/by-name/boot:16209192:a5d72d54c4556fae50ef820a66b561f27afa0aed:16209192:fe6607552c3b90bb33a5e3d9861884be34a943a8") || abort("E3005: \"EMMC:/dev/block/bootdevice/by-name/boot:16209192:a5d72d54c4556fae50ef820a66b561f27afa0aed:16209192:fe6607552c3b90bb33a5e3d9861884be34a943a8\" has unexpected contents.");
apply_patch_space(33554432) || abort("E3006: Not enough free space on /cache to apply patches.");
if (range_sha1("/dev/block/bootdevice/by-name/system", "3920,1,80,81,307,575,938,939,941,1273,1279,1317,1480,1570,1836,1837,1838,1839,2055,3161,3163,3164,3165,3166,3167,3168,3169,3170,3171,3180,3181,3182,3287,3288,3289,3290,3291,3384,3385,3386,3392,3393,3394,3395,3396,3397,3398,3399,3400,3417,3418,3419,3436,3437,3438,3439,3440,3450,3451,3452,3504,3505,3506,3507,3508,3520,3521,3522,3524,3525,3526,3527,3528,3538,3539,3540,3552,3553,3554,3555,3556,3592,3593,3594,3601,3602,3603,3604,3605,3648,3649,3650,3674,3675,3676,3677,3678,3730,3731,3740,3741,3742,3743,3781,3782,3783,3793,3794,3795,3796,3797,3798,3799,3800,3877,3878,3879,3880,3881,4114,4115,7001,7002,7003,7005,7006,7007,7008,7009,7018,7019,7020,7026,7027,7028,7029,7030,7058,7059,7060,7123,7124,7125,7126,7127,7195,7196,7197,7203,7204,7205,7206,7207,7236,7237,7238,7242,7243,7244,7245,7246,7267,7268,7269,7271,7272,7273,7274,7275,7283,7284,7285,7289,7290,7291,7292,7293,7311,7312,7317,7318,7319,7320,7332,7333,7334,7337,7338,7339,7340,7341,7356,7357,7358,7362,7363,7364,7365,7366,7379,7380,7381,7382,7383,7384,7450,7461,7462,7463,7464,7465,7466,7467,7476,7478,7479,7480,7481,7483,7484,7485,7486,7487,7488,7489,7538,7547,7548,7549,7550,7551,7552,7553,7607,7617,7618,7619,7620,7621,7622,7623,19573,19575,20848,20849,20892,20893,20923,20924,21252,21253,22221,22255,22829,22830,22935,22936,23228,23229,23441,23442,24362,24365,24366,24367,24433,24434,24435,24436,24602,24603,24747,24748,24921,24922,25093,25094,25454,25455,25472,25714,25717,25718,25727,25728,25729,25730,25747,25748,25769,25770,25879,25880,25918,25919,25922,25923,25934,25935,26401,26402,26403,26404,26426,26427,26448,26449,26688,26689,27801,27802,28098,28099,28217,28218,28695,28696,28697,28698,29223,29224,29239,29240,29271,29272,29333,29334,29340,29341,32750,32751,32768,32770,32849,32850,65536,65537,74222,74956,74957,78521,84212,85049,85583,85758,85759,85839,85840,85946,85947,85971,85972,86119,86120,86121,86122,86123,86124,86992,86993,86994,86995,86996,86997,86998,86999,87033,87034,87041,87042,87043,87044,87045,87046,87047,87048,87080,87081,87135,87136,87171,87172,87173,87174,87175,87176,87177,87178,87179,87180,87181,87182,87183,87184,87185,87186,87187,87188,87189,87190,87191,87192,87193,87194,87195,87196,87197,87198,87199,87200,87201,87202,87203,87204,87205,87206,87207,87208,87364,87365,87473,87474,87617,87618,87719,87720,87910,87911,88070,88071,88134,88135,88283,88284,88488,88489,88583,88584,88738,88739,88801,88802,88803,88804,88805,88806,88807,88808,88809,88810,88811,88812,88813,88814,88823,88824,88825,88826,88828,88829,88830,88831,88858,88859,88860,88861,88887,88888,88889,88890,88917,88918,88919,88920,88932,88933,88934,88935,88943,88944,88945,88946,88950,88951,88952,88953,88959,88960,88961,88962,88963,88964,88965,88966,88968,88969,88970,88971,88980,88981,88982,88983,88984,88985,88986,88987,88988,88989,88990,88991,88992,88993,88994,88995,89073,89074,89075,89076,89077,89078,89079,89080,89081,89082,89083,89084,89085,89086,89087,89088,89090,89091,89092,89093,89094,89095,89096,89097,89133,89134,89135,89136,89172,89173,89174,89175,89176,89177,89178,89179,89180,89181,89182,89183,89184,89185,89187,89188,89190,89191,89192,89193,89194,89195,89196,89197,89198,89199,89200,89201,89202,89203,89204,89205,89206,89207,89208,89209,89210,89211,94632,94633,94634,94635,94636,94637,94638,94639,94640,94641,94642,94643,94647,94648,94651,94652,94656,94657,94661,94662,94666,94667,94668,94669,94670,94671,94674,94675,94676,94677,94678,94679,94680,94681,94682,94683,94684,94685,94686,94687,94688,94689,94690,94691,94692,94693,94694,94695,94696,94697,94698,94699,94700,94701,94702,94703,94704,94705,94706,94707,94708,94709,94710,94711,94712,94713,94714,94715,94716,94717,94718,94719,94720,94721,94722,94723,94724,94725,94726,94727,94728,94729,94730,94731,94732,94733,94734,94735,94736,94737,94738,94739,94740,94741,94742,94743,94744,94745,94746,94747,94748,94749,94750,94751,94755,94756,94761,94762,94763,94764,94887,94888,94889,94890,94891,94892,94893,94894,94895,94896,94897,94898,94899,94900,94902,94903,94904,94905,94907,94908,94909,94910,94912,94913,94914,94915,94917,94918,94919,94920,94922,94923,94924,94925,94927,94928,94929,94930,94932,94933,94934,94935,94936,94937,94938,94939,94940,94941,94942,94943,94949,94950,94951,94952,94953,94954,94960,94961,94962,94963,95044,95045,95046,95047,95048,95049,95435,95436,95437,95438,95440,95441,95442,95443,95444,95445,95451,95452,95453,95454,95459,95460,95461,95462,95463,95464,95481,95482,95483,95484,95514,95515,95516,95517,95518,95519,95538,95539,95540,95541,95551,95552,95553,95554,95555,95556,95579,95580,95581,95582,95583,95584,95585,95586,95588,95589,95590,95591,95595,95596,95597,95598,95600,95601,95602,95603,95605,95606,95607,95608,95610,95611,95612,95613,95615,95616,95617,95618,95620,95621,95622,95623,95625,95626,95627,95628,95631,95632,95633,95634,95636,95637,95638,95639,95642,95643,95644,95645,95647,95648,95649,95650,95660,95661,95662,95663,95664,95665,95666,95667,95668,95669,95670,95671,95672,95673,95678,95679,95680,95681,95682,95683,95690,95691,95692,95693,95715,95716,95717,95718,95719,95720,95765,95766,95767,95768,95782,95783,95784,95785,95786,95787,95803,95804,95805,95806,95807,95808,95809,95810,95823,95824,95825,95826,95828,95829,95830,95831,95833,95834,95835,95836,95838,95839,95840,95841,95843,95844,95845,95846,95848,95849,95850,95851,95853,95854,95855,95856,95858,95859,95860,95861,95863,95864,95865,95866,95868,95869,95870,95871,95878,95879,95880,95881,95883,95884,95885,95886,95887,95888,95889,95890,95891,95892,95893,95894,95895,95896,95901,95902,95903,95904,95905,95906,95913,95914,95915,95916,95920,95921,95922,95923,95924,95925,95932,95933,95934,95935,95936,95937,95938,95939,95941,95942,95943,95944,95946,95947,95948,95949,95951,95952,95953,95954,95956,95957,95958,95959,95961,95962,95963,95964,95966,95967,95968,95969,96077,96078,96079,96080,96081,96082,96083,96084,96085,96086,96087,96088,96089,96090,96091,96092,96093,96094,96095,96096,96097,96098,96099,96100,96108,96109,96110,96111,96119,96120,96121,96122,96123,96124,96131,96132,96133,96134,96141,96142,96143,96144,96145,96146,96147,96148,96149,96150,96151,96152,96161,96162,96163,96164,96165,96166,96182,96183,96184,96185,96187,96188,96189,96190,96192,96193,96194,96195,96197,96198,96199,96200,96205,96206,96207,96208,96210,96211,96212,96213,96214,96215,96216,96217,96222,96223,96224,96225,96226,96227,96237,96238,96239,96240,96265,96266,96267,96268,96269,96270,96356,96357,96358,96359,96422,96423,96424,96425,96426,96427,96578,96579,96580,96581,96596,96597,96598,96599,96600,96601,96620,96621,96622,96623,96624,96625,96626,96627,96932,96933,96997,96998,96999,97000,97087,97088,97751,97752,97757,97758,97763,97764,97774,97775,97788,97789,97804,97805,97833,97834,97844,97845,97882,97883,98155,98156,98157,98158,98159,98160,98161,98162,98235,98236,98279,98280,98281,98282,98285,98286,98287,98288,98289,98290,98291,98292,98293,98294,98296,98297,98302,98304,98306,98385,98386,104971,104972,124027,125633,125685,125686,125687,125688,130067,130070,130075,130076,130093,130094,130123,130124,131067,131068,131069,131070,131072,131073,163840,163842,163921,163922,164415,172777,196608,196609,197102,197108,229376,229378,229457,229458,231739,231759,231760,231777,231778,231797,231798,231813,231814,231817,231818,231821,231822,231824,231825,231828,231829,231832,231833,231836,231837,231841,231842,231844,231845,231847,231848,231851,231852,231855,231856,231858,231859,231877,231878,231896,231897,231929,231930,231947,231948,231965,231966,231983,231984,231987,231988,231990,231991,232002,232003,232009,232010,232023,232024,232034,232035,232050,232051,232071,232072,232088,232089,232106,232107,232124,232125,232128,232129,232135,232136,232141,232142,232145,232146,232149,232150,232153,232154,232157,232158,232162,232163,232167,232168,232171,232172,232176,232177,232180,232181,232185,232186,232190,232191,232203,232204,232208,232209,232221,232222,232240,232241,233271,233272,233275,233276,233282,233283,233301,233302,233305,233306,233309,233310,233322,233323,233327,233328,233333,233334,233338,233339,233342,233343,233346,233347,233355,233356,233374,233375,233390,233391,233394,233395,233400,233401,233406,233407,233414,233415,233418,233419,233426,233427,233433,233434,233435,233436,233443,233444,233462,233463,233468,233469,233473,233474,233479,233480,233491,233492,233498,233499,233504,233505,233515,233516,233521,233522,233523,233524,233525,233526,233527,233528,233532,233533,233535,233536,233542,233543,233546,233547,233554,233555,233558,233559,233588,233589,233602,233603,233627,233628,233664,233665,233691,233692,233736,233737,233761,233762,233773,233774,233802,233803,233829,233830,233842,233843,233844,233845,233848,233849,233851,233852,233854,233855,233858,233859,233862,233863,233870,233871,233873,233874,233878,233879,233888,233889,233893,233894,233899,233900,233904,233905,233910,233911,233914,233915,233919,233920,233924,233925,233932,233933,233938,233939,233942,233943,233948,233949,233953,233954,233957,233958,233963,233964,233968,233969,233973,233974,233977,233978,233984,233985,233988,233989,233994,233995,234001,234002,234005,234006,234016,234017,234019,234020,234025,234026,234030,234031,234046,234047,234050,234051,234055,234056,234061,234062,234067,234068,234073,234074,234079,234080,234084,234085,234087,234088,234094,234095,234101,234102,234108,234109,234113,234114,234121,234122,234128,234129,234132,234133,234139,234140,234146,234147,234154,234155,234158,234159,234169,234170,234173,234174,234185,234186,234189,234190,234194,234195,234200,234201,234206,234207,234213,234214,234222,234223,234228,234229,234236,234237,234241,234242,234244,234245,234249,234250,234255,234256,234261,234262,234269,234270,234277,234278,234281,234282,234290,234291,234292,234293,234300,234301,234308,234309,234315,234316,234372,234373,234395,234396,234403,234404,234413,234414,234421,234422,234430,234431,234443,234444,234455,234456,234466,234467,234479,234480,234488,234489,234497,234498,234508,234509,234519,234520,234528,234529,234537,234538,234542,234543,234550,234551,234561,234562,234572,234573,234583,234584,234635,234636,234644,234645,234653,234654,234669,234670,234674,234675,234688,234689,234697,234698,234741,234742,234755,234756,234772,234773,234782,234783,234791,234792,234820,234821,234833,234834,234844,234845,234858,234859,234869,234870,234881,234882,234896,234897,234908,234909,234926,234927,234933,234934,234938,234939,234980,234981,234991,234992,235001,235002,235013,235014,235024,235025,235032,235033,235042,235043,235054,235055,235066,235067,235071,235072,235081,235082,235091,235092,235102,235103,235110,235111,235119,235120,235134,235135,235163,235164,235174,235175,235197,235198,235256,235257,235271,235272,235277,235278,235322,235323,235336,235337,235352,235353,235368,235369,235375,235376,235389,235390,235401,235402,235414,235415,235423,235424,235435,235436,235446,235447,235474,235475,235553,235554,235565,235566,235576,235577,235588,235589,235597,235598,235620,235621,235628,235629,235639,235640,235649,235650,235668,235669,235712,235713,235722,235723,235735,235736,235743,235744,235780,235781,235827,235828,235836,235837,235842,235843,235851,235852,235872,235873,235879,235880,235881,235882,235884,235885,235887,235888,235890,235891,235894,235895,235897,235898,235900,235901,235903,235904,235907,235908,235912,235913,235915,235916,235919,235920,235922,235923,235925,235926,235928,235929,235932,235933,235935,235936,235939,235940,235941,235942,235943,235944,236006,236007,236008,236009,236010,236011,236021,236022,236023,236024,236065,236066,236067,236068,236069,236070,236289,236290,236291,236292,236325,236326,236327,236328,236329,236330,236565,236566,236567,236568,236576,236577,236578,236579,236580,236581,236594,236595,236596,236597,236629,236630,236631,236632,236633,236634,236641,236642,236643,236644,237252,237253,237254,237255,237256,237257,237341,237342,237343,237344,237410,237411,237412,237413,237414,237415,237509,237510,237511,237512,239467,239468,239469,239470,239471,239472,240997,240998,240999,241000,241147,241148,241149,241150,241151,241152,241842,241843,241844,241845,241852,241853,241854,241855,241856,241857,241858,241859,241860,241861,241873,241874,241875,241876,244464,244465,244466,244467,244468,244469,246833,246834,246835,246836,247319,247320,247321,247322,247323,247324,248219,248220,248221,248222,248379,248380,248381,248382,248383,248384,248660,248661,248662,248663,249646,249647,249648,249649,249650,249651,250237,250238,250239,250240,250246,250247,250248,250249,250250,250251,250261,250262,250263,250264,250277,250278,250279,250280,250281,250282,250316,250317,250318,250319,250325,250326,250327,250328,250329,250330,250341,250342,250343,250344,250404,250405,250406,250407,250408,250409,250415,250416,250417,250418,250652,250653,250654,250655,250656,250657,250814,250815,250816,250817,250864,250865,250866,250867,250868,250869,251002,251003,251004,251005,252684,252685,252686,252687,252688,252689,253996,253997,253998,253999,254009,254010,254011,254012,254013,254014,254065,254066,254067,254068,254104,254105,254106,254107,254108,254109,254110,254111,254112,254113,254169,254170,254171,254172,254177,254178,254179,254180,254181,254182,254205,254206,254207,254208,255622,255623,255624,255625,255626,255627,256676,256677,256678,256679,256682,256683,256684,256685,256686,256687,256700,256701,256702,256703,256709,256710,256711,256712,256713,256714,256730,256731,256732,256733,256745,256746,256747,256748,256749,256750,256830,256831,256832,256833,256834,256835,256836,256837,259235,259236,259237,259238,259281,259282,259283,259284,259285,259286,259403,259404,259405,259406,259409,259410,259411,259412,259413,259414,259425,259426,259427,259428,259489,259490,259491,259492,259493,259494,259583,259584,259585,259586,259719,259720,259721,259722,259723,259724,259970,259971,259972,259973,259984,259985,259986,259987,259988,259989,260032,260033,260034,260035,261092,261093,261094,261095,261096,261097,262009,262010,262011,262012,262013,262014,262015,262016,262017,262018,262019,262020,262021,262022,262023,262024,262025,262026,262027,262028,262029,262030,262039,262040,262041,262042,262043,262044,262053,262054,262055,262056,262113,262114,262115,262116,262117,262118,262119,262120,262121,262122,262123,262124,262125,262126,262127,262128,262129,262130,262140,262141,262142,262144,262145,262714,262717,262718,262723,262724,262725,262726,262727,262728,262729,262730,262731,262732,262733,262734,262740,262741,262742,262743,262764,262765,262788,262789,262790,262791,262802,262803,262846,262847,262898,262899,263218,263219,263326,263327,263328,263329,263337,263338,263343,263344,263356,263357,263371,263372,263415,263416,263429,263430,263475,263476,263487,263488,263595,263596,263912,263913,264011,264012,264049,264050,264079,264080,264099,264100,264108,264109,264293,264294,264436,264437,264447,264448,264465,264466,264475,264476,264610,264611,264617,264618,264647,264648,264678,264679,264868,264869,264875,264876,264882,264883,264888,264889,264893,264894,264907,264908,264916,264917,264921,264922,264952,264953,264970,264971,265001,265002,265056,265057,265074,265075,265105,265106,265125,265126,265134,265135,265142,265143,265166,265167,265216,265217,265228,265229,265233,265234,265238,265239,266044,266045,266049,266050,266054,266055,266071,266072,266076,266077,266083,266084,266088,266089,266094,266095,266100,266101,266105,266106,266111,266112,266117,266118,266122,266123,266127,266128,266133,266134,266139,266140,266145,266146,266151,266152,266156,266157,266162,266163,266168,266169,266173,266174,266179,266180,266185,266186,266190,266191,266196,266197,266202,266203,266207,266208,266213,266214,266219,266220,266224,266225,266230,266231,266236,266237,266241,266242,266247,266248,266253,266254,266258,266259,266264,266265,266270,266271,266275,266276,266281,266282,266287,266288,266292,266293,266298,266299,266304,266305,266309,266310,266315,266316,266321,266322,266326,266327,266332,266333,266338,266339,266346,266347,266354,266355,266368,266369,266374,266375,266397,266398,266427,266428,266470,266471,266507,266508,266514,266515,266573,266574,266578,266579,266597,266598,266602,266603,266776,266777,266946,266947,266953,266954,266968,266969,266978,266979,266988,266989,266998,266999,267008,267009,267018,267019,267028,267029,267038,267039,267048,267049,267058,267059,267073,267074,267083,267084,267093,267094,267108,267109,267118,267119,267128,267129,267138,267139,267148,267149,267158,267159,267168,267169,267178,267179,267188,267189,267198,267199,267213,267214,267223,267224,267233,267234,267243,267244,267253,267254,267268,267269,267278,267279,267288,267289,267298,267299,267313,267314,267323,267324,267333,267334,267343,267344,267358,267359,267368,267369,267378,267379,267388,267389,267398,267399,267413,267414,267423,267424,267433,267434,267443,267444,267453,267454,267463,267464,267472,267473,267487,267488,267497,267498,267507,267508,267517,267518,267527,267528,267537,267538,267547,267548,267557,267558,267567,267568,267582,267583,267592,267593,267602,267603,267612,267613,267622,267623,267632,267633,267642,267643,267652,267653,267662,267663,267672,267673,267682,267683,267697,267698,267707,267708,267717,267718,267727,267728,267737,267738,267747,267748,267762,267763,267772,267773,267782,267783,267792,267793,267802,267803,267812,267813,267822,267823,267832,267833,267847,267848,267857,267858,267867,267868,267877,267878,267892,267893,267907,267908,267917,267918,267927,267928,267937,267938,267947,267948,267957,267958,267967,267968,267982,267983,267992,267993,268002,268003,268012,268013,268027,268028,268037,268038,268047,268048,268057,268058,268072,268073,268082,268083,268092,268093,268102,268103,268117,268118,268127,268128,268137,268138,268147,268148,268157,268158,268167,268168,268182,268183,268192,268193,268202,268203,268212,268213,268222,268223,268237,268238,268247,268248,268257,268258,268267,268268,268277,268278,268287,268288,268302,268303,268312,268313,268322,268323,268332,268333,268342,268343,268352,268353,268367,268368,268377,268378,268387,268388,268397,268398,268407,268408,268417,268418,268427,268428,268437,268438,268447,268448,268457,268458,268472,268473,268482,268483,268492,268493,268502,268503,268512,268513,268522,268523,268532,268533,268542,268543,268552,268553,268562,268563,268577,268578,268587,268588,268597,268598,268607,268608,268617,268618,268627,268628,268637,268638,268647,268648,268657,268658,268667,268668,268682,268683,268692,268693,268702,268703,268712,268713,268722,268723,268732,268733,268742,268743,268752,268753,268762,268763,268777,268778,268787,268788,268797,268798,268807,268808,268817,268818,268827,268828,268837,268838,268847,268848,268857,268858,268867,268868,268877,268878,268887,268888,268897,268898,268912,268913,268922,268923,268932,268933,268942,268943,268952,268953,268962,268963,268972,268973,268982,268983,268992,268993,269007,269008,269017,269018,269027,269028,269037,269038,269047,269048,269057,269058,269067,269068,269082,269083,269092,269093,269102,269103,269112,269113,269122,269123,269132,269133,269142,269143,269152,269153,269162,269163,269172,269173,269182,269183,269192,269193,269207,269208,269217,269218,269227,269228,269237,269238,269247,269248,269257,269258,269267,269268,269277,269278,269287,269288,269297,269298,269312,269313,269322,269323,269332,269333,269342,269343,269357,269358,269367,269368,269377,269378,269387,269388,269397,269398,269407,269408,269417,269418,269427,269428,269437,269438,269447,269448,269462,269463,269472,269473,269482,269483,269492,269493,269502,269503,269512,269513,269522,269523,269532,269533,269547,269548,269557,269558,269567,269568,269577,269578,269587,269588,269597,269598,269612,269613,269622,269623,269632,269633,269642,269643,269652,269653,269662,269663,269672,269673,269682,269683,269692,269693,269707,269708,269717,269718,269727,269728,269737,269738,269848,269849,269912,269913,269917,269918,269924,269925,269938,269939,269945,269946,270004,270005,270026,270027,270040,270041,270073,270074,270167,270168,270182,270183,270192,270193,270237,270238,270270,270271,270281,270282,270288,270289,270294,270295,270408,270409,270428,270429,270434,270435,271111,271112,271131,271132,271144,271145,271158,271159,271222,271223,271228,271229,271235,271236,271242,271243,271250,271251,271320,271321,271329,271330,271337,271338,271357,271358,271379,271380,271649,271650,276472,276473,276502,276503,276510,276511,276625,276626,276648,276649,276699,276700,276729,276730,276754,276755,276768,276769,276774,276775,276788,276789,276793,276794,276829,276830,276836,276837,276843,276844,276852,276853,276862,276863,276871,276872,276928,276929,276947,276948,276979,276980,276985,276986,276997,276998,277053,277054,277066,277067,277235,277236,277250,277251,277326,277327,277385,277386,277407,277408,277452,277453,277467,277468,277472,277473,277478,277479,277484,277485,277490,277491,277496,277497,277502,277503,277510,277511,277813,277814,277818,277819,277846,277847,277860,277861,277865,277866,277872,277873,277882,277883,277914,277915,277920,277921,277927,277928,277935,277936,277943,277944,277948,277949,277953,277954,277960,277961,277967,277968,277974,277975,277980,277981,277986,277987,277992,277993,277998,277999,278004,278005,278009,278010,278015,278016,278021,278022,278027,278028,278033,278034,278040,278041,278046,278047,278052,278053,278057,278058,278064,278065,278071,278072,278078,278079,278088,278089,278098,278099,278106,278107,278112,278113,278126,278127,278136,278137,278142,278143,278150,278151,278156,278157,278162,278163,278168,278169,278175,278176,278180,278181,278186,278187,278192,278193,278197,278198,278203,278204,278209,278210,278214,278215,278219,278220,278225,278226,278230,278231,278238,278239,278245,278246,278250,278251,278256,278257,278399,278400,278412,278413,278441,278442,278463,278464,278502,278503,278644,278645,278678,278679,278685,278686,278821,278822,278840,278841,278877,278878,278887,278888,278909,278910,279159,279160,279201,279202,279214,279215,279222,279223,279229,279230,279235,279236,279244,279245,279251,279252,279283,279284,279301,279302,279316,279317,279325,279326,279332,279333,279339,279340,279358,279359,279390,279391,279415,279416,279464,279465,279476,279477,279483,279484,279498,279499,279501,279502,279509,279510,279519,279520,279526,279527,279552,279553,279572,279573,279590,279591,279620,279621,279625,279626,279630,279631,279635,279636,279649,279650,279652,279653,282118,282119,282121,282122,282126,282127,282132,282133,282139,282140,282195,282196,282198,282199,282610,282611,283830,283831,283838,283839,284017,284018,284022,284023,284030,284031,284074,284075,284096,284097,284101,284102,284106,284107,284116,284117,284122,284123,284128,284129,284137,284138,284172,284173,284177,284178,284188,284189,284196,284197,284201,284202,284207,284208,284388,284389,284425,284426,284433,284434,284452,284453,284479,284480,284508,284509,284516,284517,284522,284523,284534,284535,284555,284556,284562,284563,284591,284592,284631,284632,284639,284640,284651,284652,284717,284718,284736,284737,284770,284771,284775,284776,284784,284785,284790,284791,284800,284801,284806,284807,284836,284837,284976,284977,284987,284988,284992,284993,284998,284999,285018,285019,285020,285021,285032,285033,285041,285042,285053,285054,285061,285062,285068,285069,285075,285076,285087,285088,285094,285095,285102,285103,285110,285111,285117,285118,285122,285123,285129,285130,285134,285135,285142,285143,285149,285150,285161,285162,285166,285167,285175,285176,285183,285184,285190,285191,285197,285198,285205,285206,285213,285214,285219,285220,285226,285227,285233,285234,285235,285236,285273,285274,285311,285312,285351,285352,285354,285355,285356,285357,285358,285359,285371,285372,285373,285374,285375,285376,285397,285398,285409,285410,285411,285412,285413,285414,285538,285539,285540,285541,285547,285548,285549,285550,285551,285552,285553,285554,285555,285556,285557,285558,285566,285567,285572,285573,285579,285580,285586,285587,285599,285600,285606,285607,285627,285628,285639,285640,285641,285642,285692,285693,285699,285700,285705,285706,285760,285761,285766,285767,285772,285773,285779,285780,285785,285786,285960,285961,285968,285969,285974,285975,285980,285981,285987,285988,285997,285998,286052,286053,286065,286066,286095,286096,286101,286102,286108,286109,286114,286115,286122,286123,286128,286129,286134,286135,286140,286141,286217,286218,286236,286237,286312,286313,286318,286319,286325,286326,286531,294912,294914,294993,294994,295487,295488,300403,300405,300406,300407,300408,300409,300410,300411,300421,300422,300423,300424,300459,300460,300461,300465,300466,300467,300468,300469,300482,300483,300484,300495,300496,300497,300498,300499,300514,300515,300516,301302,301303,301304,301305,301306,301307,301308,301309,301310,305216,305217,305218,305274,305275,305276,305277,305278,305279,305280,305281,305282,305460,305461,305462,305467,305468,305469,305470,305471,305487,305488,305489,305497,305498,305499,305500,305501,305520,305521,305947,305948,305949,305959,305960,305961,305962,305963,305983,305984,305985,306004,306005,306006,306007,306008,306025,306026,306027,306032,306033,306034,306035,306036,306063,306064,306065,306091,306092,306093,306094,306095,306146,306147,306148,306179,306180,306181,306182,306183,306199,306200,306201,306208,306209,306210,306211,306212,306222,306223,306224,306325,306326,306327,306328,306329,306360,306361,306362,306905,306906,306907,306908,306909,308634,308635,308636,308649,308650,308651,308652,308653,308668,308669,308679,308680,308681,308682,308704,308705,308706,308807,308808,308809,308810,308811,308858,308859,308860,308864,308865,308866,308867,308868,308876,308877,308878,308885,308886,308887,308888,308889,308911,308912,308913,308921,308922,308923,308924,308925,308935,308936,308937,308967,308968,308969,308970,308971,308997,308998,308999,313727,313728,313729,313730,313731,313732,313733,313734,313735,314394,314395,314396,314397,314398,314399,314400,314401,314402,314418,314419,314420,314421,314422,314449,314450,314451,314452,314453,314454,314534,314535,314536,314537,314538,314539,314540,314541,314542,314547,314548,314549,314550,314551,314570,314571,314572,314573") == "7a63fe04869a381fd0d3a27341717313297b8836" || 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", "3920,1,80,81,307,575,938,939,941,1273,1279,1317,1480,1570,1836,1837,1838,1839,2055,3161,3163,3164,3165,3166,3167,3168,3169,3170,3171,3180,3181,3182,3287,3288,3289,3290,3291,3384,3385,3386,3392,3393,3394,3395,3396,3397,3398,3399,3400,3417,3418,3419,3436,3437,3438,3439,3440,3450,3451,3452,3504,3505,3506,3507,3508,3520,3521,3522,3524,3525,3526,3527,3528,3538,3539,3540,3552,3553,3554,3555,3556,3592,3593,3594,3601,3602,3603,3604,3605,3648,3649,3650,3674,3675,3676,3677,3678,3730,3731,3740,3741,3742,3743,3781,3782,3783,3793,3794,3795,3796,3797,3798,3799,3800,3877,3878,3879,3880,3881,4114,4115,7001,7002,7003,7005,7006,7007,7008,7009,7018,7019,7020,7026,7027,7028,7029,7030,7058,7059,7060,7123,7124,7125,7126,7127,7195,7196,7197,7203,7204,7205,7206,7207,7236,7237,7238,7242,7243,7244,7245,7246,7267,7268,7269,7271,7272,7273,7274,7275,7283,7284,7285,7289,7290,7291,7292,7293,7311,7312,7317,7318,7319,7320,7332,7333,7334,7337,7338,7339,7340,7341,7356,7357,7358,7362,7363,7364,7365,7366,7379,7380,7381,7382,7383,7384,7450,7461,7462,7463,7464,7465,7466,7467,7476,7478,7479,7480,7481,7483,7484,7485,7486,7487,7488,7489,7538,7547,7548,7549,7550,7551,7552,7553,7607,7617,7618,7619,7620,7621,7622,7623,19573,19575,20848,20849,20892,20893,20923,20924,21252,21253,22221,22255,22829,22830,22935,22936,23228,23229,23441,23442,24362,24365,24366,24367,24433,24434,24435,24436,24602,24603,24747,24748,24921,24922,25093,25094,25454,25455,25472,25714,25717,25718,25727,25728,25729,25730,25747,25748,25769,25770,25879,25880,25918,25919,25922,25923,25934,25935,26401,26402,26403,26404,26426,26427,26448,26449,26688,26689,27801,27802,28098,28099,28217,28218,28695,28696,28697,28698,29223,29224,29239,29240,29271,29272,29333,29334,29340,29341,32750,32751,32768,32770,32849,32850,65536,65537,74222,74956,74957,78521,84212,85049,85583,85758,85759,85839,85840,85946,85947,85971,85972,86119,86120,86121,86122,86123,86124,86992,86993,86994,86995,86996,86997,86998,86999,87033,87034,87041,87042,87043,87044,87045,87046,87047,87048,87080,87081,87135,87136,87171,87172,87173,87174,87175,87176,87177,87178,87179,87180,87181,87182,87183,87184,87185,87186,87187,87188,87189,87190,87191,87192,87193,87194,87195,87196,87197,87198,87199,87200,87201,87202,87203,87204,87205,87206,87207,87208,87364,87365,87473,87474,87617,87618,87719,87720,87910,87911,88070,88071,88134,88135,88283,88284,88488,88489,88583,88584,88738,88739,88801,88802,88803,88804,88805,88806,88807,88808,88809,88810,88811,88812,88813,88814,88823,88824,88825,88826,88828,88829,88830,88831,88858,88859,88860,88861,88887,88888,88889,88890,88917,88918,88919,88920,88932,88933,88934,88935,88943,88944,88945,88946,88950,88951,88952,88953,88959,88960,88961,88962,88963,88964,88965,88966,88968,88969,88970,88971,88980,88981,88982,88983,88984,88985,88986,88987,88988,88989,88990,88991,88992,88993,88994,88995,89073,89074,89075,89076,89077,89078,89079,89080,89081,89082,89083,89084,89085,89086,89087,89088,89090,89091,89092,89093,89094,89095,89096,89097,89133,89134,89135,89136,89172,89173,89174,89175,89176,89177,89178,89179,89180,89181,89182,89183,89184,89185,89187,89188,89190,89191,89192,89193,89194,89195,89196,89197,89198,89199,89200,89201,89202,89203,89204,89205,89206,89207,89208,89209,89210,89211,94632,94633,94634,94635,94636,94637,94638,94639,94640,94641,94642,94643,94647,94648,94651,94652,94656,94657,94661,94662,94666,94667,94668,94669,94670,94671,94674,94675,94676,94677,94678,94679,94680,94681,94682,94683,94684,94685,94686,94687,94688,94689,94690,94691,94692,94693,94694,94695,94696,94697,94698,94699,94700,94701,94702,94703,94704,94705,94706,94707,94708,94709,94710,94711,94712,94713,94714,94715,94716,94717,94718,94719,94720,94721,94722,94723,94724,94725,94726,94727,94728,94729,94730,94731,94732,94733,94734,94735,94736,94737,94738,94739,94740,94741,94742,94743,94744,94745,94746,94747,94748,94749,94750,94751,94755,94756,94761,94762,94763,94764,94887,94888,94889,94890,94891,94892,94893,94894,94895,94896,94897,94898,94899,94900,94902,94903,94904,94905,94907,94908,94909,94910,94912,94913,94914,94915,94917,94918,94919,94920,94922,94923,94924,94925,94927,94928,94929,94930,94932,94933,94934,94935,94936,94937,94938,94939,94940,94941,94942,94943,94949,94950,94951,94952,94953,94954,94960,94961,94962,94963,95044,95045,95046,95047,95048,95049,95435,95436,95437,95438,95440,95441,95442,95443,95444,95445,95451,95452,95453,95454,95459,95460,95461,95462,95463,95464,95481,95482,95483,95484,95514,95515,95516,95517,95518,95519,95538,95539,95540,95541,95551,95552,95553,95554,95555,95556,95579,95580,95581,95582,95583,95584,95585,95586,95588,95589,95590,95591,95595,95596,95597,95598,95600,95601,95602,95603,95605,95606,95607,95608,95610,95611,95612,95613,95615,95616,95617,95618,95620,95621,95622,95623,95625,95626,95627,95628,95631,95632,95633,95634,95636,95637,95638,95639,95642,95643,95644,95645,95647,95648,95649,95650,95660,95661,95662,95663,95664,95665,95666,95667,95668,95669,95670,95671,95672,95673,95678,95679,95680,95681,95682,95683,95690,95691,95692,95693,95715,95716,95717,95718,95719,95720,95765,95766,95767,95768,95782,95783,95784,95785,95786,95787,95803,95804,95805,95806,95807,95808,95809,95810,95823,95824,95825,95826,95828,95829,95830,95831,95833,95834,95835,95836,95838,95839,95840,95841,95843,95844,95845,95846,95848,95849,95850,95851,95853,95854,95855,95856,95858,95859,95860,95861,95863,95864,95865,95866,95868,95869,95870,95871,95878,95879,95880,95881,95883,95884,95885,95886,95887,95888,95889,95890,95891,95892,95893,95894,95895,95896,95901,95902,95903,95904,95905,95906,95913,95914,95915,95916,95920,95921,95922,95923,95924,95925,95932,95933,95934,95935,95936,95937,95938,95939,95941,95942,95943,95944,95946,95947,95948,95949,95951,95952,95953,95954,95956,95957,95958,95959,95961,95962,95963,95964,95966,95967,95968,95969,96077,96078,96079,96080,96081,96082,96083,96084,96085,96086,96087,96088,96089,96090,96091,96092,96093,96094,96095,96096,96097,96098,96099,96100,96108,96109,96110,96111,96119,96120,96121,96122,96123,96124,96131,96132,96133,96134,96141,96142,96143,96144,96145,96146,96147,96148,96149,96150,96151,96152,96161,96162,96163,96164,96165,96166,96182,96183,96184,96185,96187,96188,96189,96190,96192,96193,96194,96195,96197,96198,96199,96200,96205,96206,96207,96208,96210,96211,96212,96213,96214,96215,96216,96217,96222,96223,96224,96225,96226,96227,96237,96238,96239,96240,96265,96266,96267,96268,96269,96270,96356,96357,96358,96359,96422,96423,96424,96425,96426,96427,96578,96579,96580,96581,96596,96597,96598,96599,96600,96601,96620,96621,96622,96623,96624,96625,96626,96627,96932,96933,96997,96998,96999,97000,97087,97088,97751,97752,97757,97758,97763,97764,97774,97775,97788,97789,97804,97805,97833,97834,97844,97845,97882,97883,98155,98156,98157,98158,98159,98160,98161,98162,98235,98236,98279,98280,98281,98282,98285,98286,98287,98288,98289,98290,98291,98292,98293,98294,98296,98297,98302,98304,98306,98385,98386,104971,104972,124027,125633,125685,125686,125687,125688,130067,130070,130075,130076,130093,130094,130123,130124,131067,131068,131069,131070,131072,131073,163840,163842,163921,163922,164415,172777,196608,196609,197102,197108,229376,229378,229457,229458,231739,231759,231760,231777,231778,231797,231798,231813,231814,231817,231818,231821,231822,231824,231825,231828,231829,231832,231833,231836,231837,231841,231842,231844,231845,231847,231848,231851,231852,231855,231856,231858,231859,231877,231878,231896,231897,231929,231930,231947,231948,231965,231966,231983,231984,231987,231988,231990,231991,232002,232003,232009,232010,232023,232024,232034,232035,232050,232051,232071,232072,232088,232089,232106,232107,232124,232125,232128,232129,232135,232136,232141,232142,232145,232146,232149,232150,232153,232154,232157,232158,232162,232163,232167,232168,232171,232172,232176,232177,232180,232181,232185,232186,232190,232191,232203,232204,232208,232209,232221,232222,232240,232241,233271,233272,233275,233276,233282,233283,233301,233302,233305,233306,233309,233310,233322,233323,233327,233328,233333,233334,233338,233339,233342,233343,233346,233347,233355,233356,233374,233375,233390,233391,233394,233395,233400,233401,233406,233407,233414,233415,233418,233419,233426,233427,233433,233434,233435,233436,233443,233444,233462,233463,233468,233469,233473,233474,233479,233480,233491,233492,233498,233499,233504,233505,233515,233516,233521,233522,233523,233524,233525,233526,233527,233528,233532,233533,233535,233536,233542,233543,233546,233547,233554,233555,233558,233559,233588,233589,233602,233603,233627,233628,233664,233665,233691,233692,233736,233737,233761,233762,233773,233774,233802,233803,233829,233830,233842,233843,233844,233845,233848,233849,233851,233852,233854,233855,233858,233859,233862,233863,233870,233871,233873,233874,233878,233879,233888,233889,233893,233894,233899,233900,233904,233905,233910,233911,233914,233915,233919,233920,233924,233925,233932,233933,233938,233939,233942,233943,233948,233949,233953,233954,233957,233958,233963,233964,233968,233969,233973,233974,233977,233978,233984,233985,233988,233989,233994,233995,234001,234002,234005,234006,234016,234017,234019,234020,234025,234026,234030,234031,234046,234047,234050,234051,234055,234056,234061,234062,234067,234068,234073,234074,234079,234080,234084,234085,234087,234088,234094,234095,234101,234102,234108,234109,234113,234114,234121,234122,234128,234129,234132,234133,234139,234140,234146,234147,234154,234155,234158,234159,234169,234170,234173,234174,234185,234186,234189,234190,234194,234195,234200,234201,234206,234207,234213,234214,234222,234223,234228,234229,234236,234237,234241,234242,234244,234245,234249,234250,234255,234256,234261,234262,234269,234270,234277,234278,234281,234282,234290,234291,234292,234293,234300,234301,234308,234309,234315,234316,234372,234373,234395,234396,234403,234404,234413,234414,234421,234422,234430,234431,234443,234444,234455,234456,234466,234467,234479,234480,234488,234489,234497,234498,234508,234509,234519,234520,234528,234529,234537,234538,234542,234543,234550,234551,234561,234562,234572,234573,234583,234584,234635,234636,234644,234645,234653,234654,234669,234670,234674,234675,234688,234689,234697,234698,234741,234742,234755,234756,234772,234773,234782,234783,234791,234792,234820,234821,234833,234834,234844,234845,234858,234859,234869,234870,234881,234882,234896,234897,234908,234909,234926,234927,234933,234934,234938,234939,234980,234981,234991,234992,235001,235002,235013,235014,235024,235025,235032,235033,235042,235043,235054,235055,235066,235067,235071,235072,235081,235082,235091,235092,235102,235103,235110,235111,235119,235120,235134,235135,235163,235164,235174,235175,235197,235198,235256,235257,235271,235272,235277,235278,235322,235323,235336,235337,235352,235353,235368,235369,235375,235376,235389,235390,235401,235402,235414,235415,235423,235424,235435,235436,235446,235447,235474,235475,235553,235554,235565,235566,235576,235577,235588,235589,235597,235598,235620,235621,235628,235629,235639,235640,235649,235650,235668,235669,235712,235713,235722,235723,235735,235736,235743,235744,235780,235781,235827,235828,235836,235837,235842,235843,235851,235852,235872,235873,235879,235880,235881,235882,235884,235885,235887,235888,235890,235891,235894,235895,235897,235898,235900,235901,235903,235904,235907,235908,235912,235913,235915,235916,235919,235920,235922,235923,235925,235926,235928,235929,235932,235933,235935,235936,235939,235940,235941,235942,235943,235944,236006,236007,236008,236009,236010,236011,236021,236022,236023,236024,236065,236066,236067,236068,236069,236070,236289,236290,236291,236292,236325,236326,236327,236328,236329,236330,236565,236566,236567,236568,236576,236577,236578,236579,236580,236581,236594,236595,236596,236597,236629,236630,236631,236632,236633,236634,236641,236642,236643,236644,237252,237253,237254,237255,237256,237257,237341,237342,237343,237344,237410,237411,237412,237413,237414,237415,237509,237510,237511,237512,239467,239468,239469,239470,239471,239472,240997,240998,240999,241000,241147,241148,241149,241150,241151,241152,241842,241843,241844,241845,241852,241853,241854,241855,241856,241857,241858,241859,241860,241861,241873,241874,241875,241876,244464,244465,244466,244467,244468,244469,246833,246834,246835,246836,247319,247320,247321,247322,247323,247324,248219,248220,248221,248222,248379,248380,248381,248382,248383,248384,248660,248661,248662,248663,249646,249647,249648,249649,249650,249651,250237,250238,250239,250240,250246,250247,250248,250249,250250,250251,250261,250262,250263,250264,250277,250278,250279,250280,250281,250282,250316,250317,250318,250319,250325,250326,250327,250328,250329,250330,250341,250342,250343,250344,250404,250405,250406,250407,250408,250409,250415,250416,250417,250418,250652,250653,250654,250655,250656,250657,250814,250815,250816,250817,250864,250865,250866,250867,250868,250869,251002,251003,251004,251005,252684,252685,252686,252687,252688,252689,253996,253997,253998,253999,254009,254010,254011,254012,254013,254014,254065,254066,254067,254068,254104,254105,254106,254107,254108,254109,254110,254111,254112,254113,254169,254170,254171,254172,254177,254178,254179,254180,254181,254182,254205,254206,254207,254208,255622,255623,255624,255625,255626,255627,256676,256677,256678,256679,256682,256683,256684,256685,256686,256687,256700,256701,256702,256703,256709,256710,256711,256712,256713,256714,256730,256731,256732,256733,256745,256746,256747,256748,256749,256750,256830,256831,256832,256833,256834,256835,256836,256837,259235,259236,259237,259238,259281,259282,259283,259284,259285,259286,259403,259404,259405,259406,259409,259410,259411,259412,259413,259414,259425,259426,259427,259428,259489,259490,259491,259492,259493,259494,259583,259584,259585,259586,259719,259720,259721,259722,259723,259724,259970,259971,259972,259973,259984,259985,259986,259987,259988,259989,260032,260033,260034,260035,261092,261093,261094,261095,261096,261097,262009,262010,262011,262012,262013,262014,262015,262016,262017,262018,262019,262020,262021,262022,262023,262024,262025,262026,262027,262028,262029,262030,262039,262040,262041,262042,262043,262044,262053,262054,262055,262056,262113,262114,262115,262116,262117,262118,262119,262120,262121,262122,262123,262124,262125,262126,262127,262128,262129,262130,262140,262141,262142,262144,262145,262714,262717,262718,262723,262724,262725,262726,262727,262728,262729,262730,262731,262732,262733,262734,262740,262741,262742,262743,262764,262765,262788,262789,262790,262791,262802,262803,262846,262847,262898,262899,263218,263219,263326,263327,263328,263329,263337,263338,263343,263344,263356,263357,263371,263372,263415,263416,263429,263430,263475,263476,263487,263488,263595,263596,263912,263913,264011,264012,264049,264050,264079,264080,264099,264100,264108,264109,264293,264294,264436,264437,264447,264448,264465,264466,264475,264476,264610,264611,264617,264618,264647,264648,264678,264679,264868,264869,264875,264876,264882,264883,264888,264889,264893,264894,264907,264908,264916,264917,264921,264922,264952,264953,264970,264971,265001,265002,265056,265057,265074,265075,265105,265106,265125,265126,265134,265135,265142,265143,265166,265167,265216,265217,265228,265229,265233,265234,265238,265239,266044,266045,266049,266050,266054,266055,266071,266072,266076,266077,266083,266084,266088,266089,266094,266095,266100,266101,266105,266106,266111,266112,266117,266118,266122,266123,266127,266128,266133,266134,266139,266140,266145,266146,266151,266152,266156,266157,266162,266163,266168,266169,266173,266174,266179,266180,266185,266186,266190,266191,266196,266197,266202,266203,266207,266208,266213,266214,266219,266220,266224,266225,266230,266231,266236,266237,266241,266242,266247,266248,266253,266254,266258,266259,266264,266265,266270,266271,266275,266276,266281,266282,266287,266288,266292,266293,266298,266299,266304,266305,266309,266310,266315,266316,266321,266322,266326,266327,266332,266333,266338,266339,266346,266347,266354,266355,266368,266369,266374,266375,266397,266398,266427,266428,266470,266471,266507,266508,266514,266515,266573,266574,266578,266579,266597,266598,266602,266603,266776,266777,266946,266947,266953,266954,266968,266969,266978,266979,266988,266989,266998,266999,267008,267009,267018,267019,267028,267029,267038,267039,267048,267049,267058,267059,267073,267074,267083,267084,267093,267094,267108,267109,267118,267119,267128,267129,267138,267139,267148,267149,267158,267159,267168,267169,267178,267179,267188,267189,267198,267199,267213,267214,267223,267224,267233,267234,267243,267244,267253,267254,267268,267269,267278,267279,267288,267289,267298,267299,267313,267314,267323,267324,267333,267334,267343,267344,267358,267359,267368,267369,267378,267379,267388,267389,267398,267399,267413,267414,267423,267424,267433,267434,267443,267444,267453,267454,267463,267464,267472,267473,267487,267488,267497,267498,267507,267508,267517,267518,267527,267528,267537,267538,267547,267548,267557,267558,267567,267568,267582,267583,267592,267593,267602,267603,267612,267613,267622,267623,267632,267633,267642,267643,267652,267653,267662,267663,267672,267673,267682,267683,267697,267698,267707,267708,267717,267718,267727,267728,267737,267738,267747,267748,267762,267763,267772,267773,267782,267783,267792,267793,267802,267803,267812,267813,267822,267823,267832,267833,267847,267848,267857,267858,267867,267868,267877,267878,267892,267893,267907,267908,267917,267918,267927,267928,267937,267938,267947,267948,267957,267958,267967,267968,267982,267983,267992,267993,268002,268003,268012,268013,268027,268028,268037,268038,268047,268048,268057,268058,268072,268073,268082,268083,268092,268093,268102,268103,268117,268118,268127,268128,268137,268138,268147,268148,268157,268158,268167,268168,268182,268183,268192,268193,268202,268203,268212,268213,268222,268223,268237,268238,268247,268248,268257,268258,268267,268268,268277,268278,268287,268288,268302,268303,268312,268313,268322,268323,268332,268333,268342,268343,268352,268353,268367,268368,268377,268378,268387,268388,268397,268398,268407,268408,268417,268418,268427,268428,268437,268438,268447,268448,268457,268458,268472,268473,268482,268483,268492,268493,268502,268503,268512,268513,268522,268523,268532,268533,268542,268543,268552,268553,268562,268563,268577,268578,268587,268588,268597,268598,268607,268608,268617,268618,268627,268628,268637,268638,268647,268648,268657,268658,268667,268668,268682,268683,268692,268693,268702,268703,268712,268713,268722,268723,268732,268733,268742,268743,268752,268753,268762,268763,268777,268778,268787,268788,268797,268798,268807,268808,268817,268818,268827,268828,268837,268838,268847,268848,268857,268858,268867,268868,268877,268878,268887,268888,268897,268898,268912,268913,268922,268923,268932,268933,268942,268943,268952,268953,268962,268963,268972,268973,268982,268983,268992,268993,269007,269008,269017,269018,269027,269028,269037,269038,269047,269048,269057,269058,269067,269068,269082,269083,269092,269093,269102,269103,269112,269113,269122,269123,269132,269133,269142,269143,269152,269153,269162,269163,269172,269173,269182,269183,269192,269193,269207,269208,269217,269218,269227,269228,269237,269238,269247,269248,269257,269258,269267,269268,269277,269278,269287,269288,269297,269298,269312,269313,269322,269323,269332,269333,269342,269343,269357,269358,269367,269368,269377,269378,269387,269388,269397,269398,269407,269408,269417,269418,269427,269428,269437,269438,269447,269448,269462,269463,269472,269473,269482,269483,269492,269493,269502,269503,269512,269513,269522,269523,269532,269533,269547,269548,269557,269558,269567,269568,269577,269578,269587,269588,269597,269598,269612,269613,269622,269623,269632,269633,269642,269643,269652,269653,269662,269663,269672,269673,269682,269683,269692,269693,269707,269708,269717,269718,269727,269728,269737,269738,269848,269849,269912,269913,269917,269918,269924,269925,269938,269939,269945,269946,270004,270005,270026,270027,270040,270041,270073,270074,270167,270168,270182,270183,270192,270193,270237,270238,270270,270271,270281,270282,270288,270289,270294,270295,270408,270409,270428,270429,270434,270435,271111,271112,271131,271132,271144,271145,271158,271159,271222,271223,271228,271229,271235,271236,271242,271243,271250,271251,271320,271321,271329,271330,271337,271338,271357,271358,271379,271380,271649,271650,276472,276473,276502,276503,276510,276511,276625,276626,276648,276649,276699,276700,276729,276730,276754,276755,276768,276769,276774,276775,276788,276789,276793,276794,276829,276830,276836,276837,276843,276844,276852,276853,276862,276863,276871,276872,276928,276929,276947,276948,276979,276980,276985,276986,276997,276998,277053,277054,277066,277067,277235,277236,277250,277251,277326,277327,277385,277386,277407,277408,277452,277453,277467,277468,277472,277473,277478,277479,277484,277485,277490,277491,277496,277497,277502,277503,277510,277511,277813,277814,277818,277819,277846,277847,277860,277861,277865,277866,277872,277873,277882,277883,277914,277915,277920,277921,277927,277928,277935,277936,277943,277944,277948,277949,277953,277954,277960,277961,277967,277968,277974,277975,277980,277981,277986,277987,277992,277993,277998,277999,278004,278005,278009,278010,278015,278016,278021,278022,278027,278028,278033,278034,278040,278041,278046,278047,278052,278053,278057,278058,278064,278065,278071,278072,278078,278079,278088,278089,278098,278099,278106,278107,278112,278113,278126,278127,278136,278137,278142,278143,278150,278151,278156,278157,278162,278163,278168,278169,278175,278176,278180,278181,278186,278187,278192,278193,278197,278198,278203,278204,278209,278210,278214,278215,278219,278220,278225,278226,278230,278231,278238,278239,278245,278246,278250,278251,278256,278257,278399,278400,278412,278413,278441,278442,278463,278464,278502,278503,278644,278645,278678,278679,278685,278686,278821,278822,278840,278841,278877,278878,278887,278888,278909,278910,279159,279160,279201,279202,279214,279215,279222,279223,279229,279230,279235,279236,279244,279245,279251,279252,279283,279284,279301,279302,279316,279317,279325,279326,279332,279333,279339,279340,279358,279359,279390,279391,279415,279416,279464,279465,279476,279477,279483,279484,279498,279499,279501,279502,279509,279510,279519,279520,279526,279527,279552,279553,279572,279573,279590,279591,279620,279621,279625,279626,279630,279631,279635,279636,279649,279650,279652,279653,282118,282119,282121,282122,282126,282127,282132,282133,282139,282140,282195,282196,282198,282199,282610,282611,283830,283831,283838,283839,284017,284018,284022,284023,284030,284031,284074,284075,284096,284097,284101,284102,284106,284107,284116,284117,284122,284123,284128,284129,284137,284138,284172,284173,284177,284178,284188,284189,284196,284197,284201,284202,284207,284208,284388,284389,284425,284426,284433,284434,284452,284453,284479,284480,284508,284509,284516,284517,284522,284523,284534,284535,284555,284556,284562,284563,284591,284592,284631,284632,284639,284640,284651,284652,284717,284718,284736,284737,284770,284771,284775,284776,284784,284785,284790,284791,284800,284801,284806,284807,284836,284837,284976,284977,284987,284988,284992,284993,284998,284999,285018,285019,285020,285021,285032,285033,285041,285042,285053,285054,285061,285062,285068,285069,285075,285076,285087,285088,285094,285095,285102,285103,285110,285111,285117,285118,285122,285123,285129,285130,285134,285135,285142,285143,285149,285150,285161,285162,285166,285167,285175,285176,285183,285184,285190,285191,285197,285198,285205,285206,285213,285214,285219,285220,285226,285227,285233,285234,285235,285236,285273,285274,285311,285312,285351,285352,285354,285355,285356,285357,285358,285359,285371,285372,285373,285374,285375,285376,285397,285398,285409,285410,285411,285412,285413,285414,285538,285539,285540,285541,285547,285548,285549,285550,285551,285552,285553,285554,285555,285556,285557,285558,285566,285567,285572,285573,285579,285580,285586,285587,285599,285600,285606,285607,285627,285628,285639,285640,285641,285642,285692,285693,285699,285700,285705,285706,285760,285761,285766,285767,285772,285773,285779,285780,285785,285786,285960,285961,285968,285969,285974,285975,285980,285981,285987,285988,285997,285998,286052,286053,286065,286066,286095,286096,286101,286102,286108,286109,286114,286115,286122,286123,286128,286129,286134,286135,286140,286141,286217,286218,286236,286237,286312,286313,286318,286319,286325,286326,286531,294912,294914,294993,294994,295487,295488,300403,300405,300406,300407,300408,300409,300410,300411,300421,300422,300423,300424,300459,300460,300461,300465,300466,300467,300468,300469,300482,300483,300484,300495,300496,300497,300498,300499,300514,300515,300516,301302,301303,301304,301305,301306,301307,301308,301309,301310,305216,305217,305218,305274,305275,305276,305277,305278,305279,305280,305281,305282,305460,305461,305462,305467,305468,305469,305470,305471,305487,305488,305489,305497,305498,305499,305500,305501,305520,305521,305947,305948,305949,305959,305960,305961,305962,305963,305983,305984,305985,306004,306005,306006,306007,306008,306025,306026,306027,306032,306033,306034,306035,306036,306063,306064,306065,306091,306092,306093,306094,306095,306146,306147,306148,306179,306180,306181,306182,306183,306199,306200,306201,306208,306209,306210,306211,306212,306222,306223,306224,306325,306326,306327,306328,306329,306360,306361,306362,306905,306906,306907,306908,306909,308634,308635,308636,308649,308650,308651,308652,308653,308668,308669,308679,308680,308681,308682,308704,308705,308706,308807,308808,308809,308810,308811,308858,308859,308860,308864,308865,308866,308867,308868,308876,308877,308878,308885,308886,308887,308888,308889,308911,308912,308913,308921,308922,308923,308924,308925,308935,308936,308937,308967,308968,308969,308970,308971,308997,308998,308999,313727,313728,313729,313730,313731,313732,313733,313734,313735,314394,314395,314396,314397,314398,314399,314400,314401,314402,314418,314419,314420,314421,314422,314449,314450,314451,314452,314453,314454,314534,314535,314536,314537,314538,314539,314540,314541,314542,314547,314548,314549,314550,314551,314570,314571,314572,314573") && 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:16209192:a5d72d54c4556fae50ef820a66b561f27afa0aed:16209192:fe6607552c3b90bb33a5e3d9861884be34a943a8",
            "-", fe6607552c3b90bb33a5e3d9861884be34a943a8, 16209192,
            a5d72d54c4556fae50ef820a66b561f27afa0aed,
            package_extract_file("patch/boot.img.p")) ||
    abort("E3008: Failed to apply patch to EMMC:/dev/block/bootdevice/by-name/boot:16209192:a5d72d54c4556fae50ef820a66b561f27afa0aed:16209192:fe6607552c3b90bb33a5e3d9861884be34a943a8");

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

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