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/075/brian06130313:userdebug/test-keys");
ui_print("Target: qcom/msm8909/msm8909:7.1.2/078/brian05050255:userdebug/test-keys");
ui_print("Verifying current system...");
getprop("ro.build.fingerprint") == "qcom/msm8909/msm8909:7.1.2/075/brian06130313:userdebug/test-keys" ||
    getprop("ro.build.fingerprint") == "qcom/msm8909/msm8909:7.1.2/078/brian05050255:userdebug/test-keys" ||
    abort("E3001: Package expects build fingerprint of qcom/msm8909/msm8909:7.1.2/075/brian06130313:userdebug/test-keys or qcom/msm8909/msm8909:7.1.2/078/brian05050255:userdebug/test-keys; this device has " + getprop("ro.build.fingerprint") + ".");
apply_patch_check("EMMC:/dev/block/bootdevice/by-name/boot:16276776:185e9b76816e1c3c0da5931463662168eb34164a:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20") || abort("E3005: \"EMMC:/dev/block/bootdevice/by-name/boot:16276776:185e9b76816e1c3c0da5931463662168eb34164a:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20\" has unexpected contents.");
apply_patch_space(23445504) || 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,85689,85690,85837,85838,86706,86707,86741,86742,86749,86750,86751,86752,86784,86785,86839,86840,86875,86876,86877,86878,86879,86880,86881,86882,86883,86884,86885,86886,86887,86888,86889,86890,86891,86892,86893,86894,86895,86896,86897,86898,86899,86900,86901,86902,86903,86904,86905,86906,86907,86908,86909,86910,86911,86912,87068,87069,87177,87178,87321,87322,87423,87424,87614,87615,87774,87775,87838,87839,87987,87988,88192,88193,88287,88288,88442,88443,88505,88506,88507,88508,88509,88510,88511,88512,88513,88514,88515,88516,88517,88518,88527,88528,88529,88530,88532,88533,88534,88535,88562,88563,88564,88565,88591,88592,88593,88594,88621,88622,88623,88624,88636,88637,88638,88639,88647,88648,88649,88650,88654,88655,88656,88657,88663,88664,88665,88666,88667,88668,88669,88670,88672,88673,88674,88675,88684,88685,88686,88687,88688,88689,88690,88691,88692,88693,88694,88695,88696,88697,88698,88699,88777,88778,88779,88780,88781,88782,88783,88784,88785,88786,88787,88788,88789,88790,88791,88792,88794,88795,88796,88797,88798,88799,88800,88801,88837,88838,88839,88840,88876,88877,88878,88879,88880,88881,88882,88883,88884,88885,88886,88887,88888,88889,88891,88892,88894,88895,88896,88897,88898,88899,88900,88901,88902,88903,88904,88905,88906,88907,88908,88909,88910,88911,88912,88913,88914,88915,94336,94337,94338,94339,94340,94341,94342,94343,94344,94345,94346,94347,94351,94352,94355,94356,94360,94361,94365,94366,94370,94371,94372,94373,94374,94375,94378,94379,94380,94381,94382,94383,94384,94385,94386,94387,94388,94389,94390,94391,94392,94393,94394,94395,94396,94397,94398,94399,94400,94401,94402,94403,94404,94405,94406,94407,94408,94409,94410,94411,94412,94413,94414,94415,94416,94417,94418,94419,94420,94421,94422,94423,94424,94425,94426,94427,94428,94429,94430,94431,94432,94433,94434,94435,94436,94437,94438,94439,94440,94441,94442,94443,94444,94445,94446,94447,94448,94449,94450,94451,94452,94453,94454,94455,94459,94460,94465,94466,94467,94468,94591,94592,94593,94594,94595,94596,94597,94598,94599,94600,94601,94602,94603,94604,94606,94607,94608,94609,94611,94612,94613,94614,94616,94617,94618,94619,94621,94622,94623,94624,94626,94627,94628,94629,94631,94632,94633,94634,94636,94637,94638,94639,94640,94641,94642,94643,94644,94645,94646,94647,94653,94654,94655,94656,94657,94658,94664,94665,94666,94667,94748,94749,94750,94751,94752,94753,95139,95140,95141,95142,95144,95145,95146,95147,95148,95149,95155,95156,95157,95158,95163,95164,95165,95166,95167,95168,95185,95186,95187,95188,95218,95219,95220,95221,95222,95223,95242,95243,95244,95245,95255,95256,95257,95258,95259,95260,95283,95284,95285,95286,95287,95288,95289,95290,95292,95293,95294,95295,95299,95300,95301,95302,95304,95305,95306,95307,95309,95310,95311,95312,95314,95315,95316,95317,95319,95320,95321,95322,95324,95325,95326,95327,95329,95330,95331,95332,95335,95336,95337,95338,95340,95341,95342,95343,95346,95347,95348,95349,95351,95352,95353,95354,95364,95365,95366,95367,95368,95369,95370,95371,95372,95373,95374,95375,95376,95377,95382,95383,95384,95385,95386,95387,95394,95395,95396,95397,95419,95420,95421,95422,95423,95424,95469,95470,95471,95472,95486,95487,95488,95489,95490,95491,95507,95508,95509,95510,95511,95512,95513,95514,95527,95528,95529,95530,95532,95533,95534,95535,95537,95538,95539,95540,95542,95543,95544,95545,95547,95548,95549,95550,95552,95553,95554,95555,95557,95558,95559,95560,95562,95563,95564,95565,95567,95568,95569,95570,95572,95573,95574,95575,95582,95583,95584,95585,95587,95588,95589,95590,95591,95592,95593,95594,95595,95596,95597,95598,95599,95600,95605,95606,95607,95608,95609,95610,95617,95618,95619,95620,95624,95625,95626,95627,95628,95629,95636,95637,95638,95639,95640,95641,95642,95643,95645,95646,95647,95648,95650,95651,95652,95653,95655,95656,95657,95658,95660,95661,95662,95663,95665,95666,95667,95668,95670,95671,95672,95673,95781,95782,95783,95784,95785,95786,95787,95788,95789,95790,95791,95792,95793,95794,95795,95796,95797,95798,95799,95800,95801,95802,95803,95804,95812,95813,95814,95815,95823,95824,95825,95826,95827,95828,95835,95836,95837,95838,95845,95846,95847,95848,95849,95850,95851,95852,95853,95854,95855,95856,95865,95866,95867,95868,95869,95870,95886,95887,95888,95889,95891,95892,95893,95894,95896,95897,95898,95899,95901,95902,95903,95904,95909,95910,95911,95912,95914,95915,95916,95917,95918,95919,95920,95921,95926,95927,95928,95929,95930,95931,95941,95942,95943,95944,95969,95970,95971,95972,95973,95974,96060,96061,96062,96063,96126,96127,96128,96129,96130,96131,96282,96283,96284,96285,96300,96301,96302,96303,96304,96305,96324,96325,96326,96327,96328,96329,96330,96331,96636,96637,96701,96702,96703,96704,96791,96792,97455,97456,97461,97462,97467,97468,97478,97479,97492,97493,97508,97509,97537,97538,97548,97549,97586,97587,97859,97860,97861,97862,97863,97864,97865,97866,97939,97940,98013,98014,98057,98058,98059,98060,98063,98064,98065,98066,98067,98068,98069,98070,98071,98072,98074,98075,98081,98082,98087,98088,98163,98164,98167,98168,98173,98174,98175,98176,98177,98178,98179,98180,98181,98182,98183,98184,98190,98191,98192,98193,98214,98215,98238,98239,98240,98241,98252,98253,98296,98297,98298,98299,98301,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,131617,163840,163842,163921,163922,196608,196609,197102,197421,197422,197529,197530,197538,197539,197544,197545,197557,197558,197572,197573,197616,197617,197630,197631,197676,197677,197688,197689,197796,197797,198113,198114,198212,198213,198250,198251,198280,198281,198300,198301,198309,198310,198494,198495,198637,198638,198648,198649,198666,198667,198676,198677,198811,198812,198818,198819,198848,198849,198879,198880,199069,199070,199076,199077,199083,199084,199089,199090,199094,199095,199108,199109,199117,199118,199122,199123,199153,199154,199171,199172,199202,199203,199257,199258,199275,199276,199306,199307,199326,199327,199335,199336,199343,199344,199367,199368,199417,199418,199429,199430,199434,199435,199439,199440,200245,200246,200250,200251,200255,200256,200272,200273,200277,200278,200284,200285,200289,200290,200295,200296,200301,200302,200306,200307,200312,200313,200318,200319,200323,200324,200328,200329,200334,200335,200340,200341,200346,200347,200352,200353,200357,200358,200363,200364,200369,200370,200374,200375,200380,200381,200386,200387,200391,200392,200397,200398,200403,200404,200408,200409,200414,200415,200420,200421,200425,200426,200431,200432,200437,200438,200442,200443,200448,200449,200454,200455,200459,200460,200465,200466,200471,200472,200476,200477,200482,200483,200488,200489,200493,200494,200499,200500,200505,200506,200510,200511,200516,200517,200522,200523,200527,200528,200533,200534,200539,200540,200547,200548,200555,200556,200569,200570,200575,200576,200598,200599,200628,200629,200671,200672,200708,200709,200715,200716,200774,200775,200779,200780,200798,200799,200803,200804,200977,200978,201147,201148,201154,201155,201169,201170,201179,201180,201189,201190,201199,201200,201209,201210,201219,201220,201229,201230,201239,201240,201249,201250,201259,201260,201274,201275,201284,201285,201294,201295,201309,201310,201319,201320,201329,201330,201339,201340,201349,201350,201359,201360,201369,201370,201379,201380,201389,201390,201399,201400,201414,201415,201424,201425,201434,201435,201444,201445,201454,201455,201469,201470,201479,201480,201489,201490,201499,201500,201514,201515,201524,201525,201534,201535,201544,201545,201559,201560,201569,201570,201579,201580,201589,201590,201599,201600,201614,201615,201624,201625,201634,201635,201644,201645,201654,201655,201664,201665,201673,201674,201688,201689,201698,201699,201708,201709,201718,201719,201728,201729,201738,201739,201748,201749,201758,201759,201768,201769,201783,201784,201793,201794,201803,201804,201813,201814,201823,201824,201833,201834,201843,201844,201853,201854,201863,201864,201873,201874,201883,201884,201898,201899,201908,201909,201918,201919,201928,201929,201938,201939,201948,201949,201963,201964,201973,201974,201983,201984,201993,201994,202003,202004,202013,202014,202023,202024,202033,202034,202048,202049,202058,202059,202068,202069,202078,202079,202093,202094,202108,202109,202118,202119,202128,202129,202138,202139,202148,202149,202158,202159,202168,202169,202183,202184,202193,202194,202203,202204,202213,202214,202228,202229,202238,202239,202248,202249,202258,202259,202273,202274,202283,202284,202293,202294,202303,202304,202318,202319,202328,202329,202338,202339,202348,202349,202358,202359,202368,202369,202383,202384,202393,202394,202403,202404,202413,202414,202423,202424,202438,202439,202448,202449,202458,202459,202468,202469,202478,202479,202488,202489,202503,202504,202513,202514,202523,202524,202533,202534,202543,202544,202553,202554,202568,202569,202578,202579,202588,202589,202598,202599,202608,202609,202618,202619,202628,202629,202638,202639,202648,202649,202658,202659,202673,202674,202683,202684,202693,202694,202703,202704,202713,202714,202723,202724,202733,202734,202743,202744,202753,202754,202763,202764,202778,202779,202788,202789,202798,202799,202808,202809,202818,202819,202828,202829,202838,202839,202848,202849,202858,202859,202868,202869,202883,202884,202893,202894,202903,202904,202913,202914,202923,202924,202933,202934,202943,202944,202953,202954,202963,202964,202978,202979,202988,202989,202998,202999,203008,203009,203018,203019,203028,203029,203038,203039,203048,203049,203058,203059,203068,203069,203078,203079,203088,203089,203098,203099,203113,203114,203123,203124,203133,203134,203143,203144,203153,203154,203163,203164,203173,203174,203183,203184,203193,203194,203208,203209,203218,203219,203228,203229,203238,203239,203248,203249,203258,203259,203268,203269,203283,203284,203293,203294,203303,203304,203313,203314,203323,203324,203333,203334,203343,203344,203353,203354,203363,203364,203373,203374,203383,203384,203393,203394,203408,203409,203418,203419,203428,203429,203438,203439,203448,203449,203458,203459,203468,203469,203478,203479,203488,203489,203498,203499,203513,203514,203523,203524,203533,203534,203543,203544,203558,203559,203568,203569,203578,203579,203588,203589,203598,203599,203608,203609,203618,203619,203628,203629,203638,203639,203648,203649,203663,203664,203673,203674,203683,203684,203693,203694,203703,203704,203713,203714,203723,203724,203733,203734,203748,203749,203758,203759,203768,203769,203778,203779,203788,203789,203798,203799,203813,203814,203823,203824,203833,203834,203843,203844,203853,203854,203863,203864,203873,203874,203883,203884,203893,203894,203908,203909,203918,203919,203928,203929,203938,203939,204049,204050,204113,204114,204118,204119,204125,204126,204139,204140,204146,204147,204205,204206,204227,204228,204241,204242,204274,204275,204368,204369,204383,204384,204393,204394,204438,204439,204471,204472,204482,204483,204489,204490,204495,204496,204609,204610,204629,204630,204635,204636,205312,205313,205332,205333,205345,205346,205359,205360,205423,205424,205429,205430,205436,205437,205443,205444,205451,205452,205521,205522,205530,205531,205538,205539,205558,205559,205580,205581,205850,205851,210673,210674,210703,210704,210711,210712,210826,210827,210849,210850,210900,210901,210930,210931,210955,210956,210969,210970,210975,210976,210989,210990,210994,210995,211030,211031,211037,211038,211044,211045,211053,211054,211063,211064,211072,211073,211129,211130,211148,211149,211180,211181,211186,211187,211198,211199,211254,211255,211267,211268,211436,211437,211451,211452,211527,211528,211586,211587,211608,211609,211653,211654,211668,211669,211673,211674,211679,211680,211685,211686,211691,211692,211697,211698,211703,211704,211711,211712,212014,212015,212019,212020,212047,212048,212061,212062,212066,212067,212073,212074,212083,212084,212115,212116,212121,212122,212128,212129,212136,212137,212144,212145,212149,212150,212154,212155,212161,212162,212168,212169,212175,212176,212181,212182,212187,212188,212193,212194,212199,212200,212205,212206,212210,212211,212216,212217,212222,212223,212228,212229,212234,212235,212241,212242,212247,212248,212253,212254,212258,212259,212265,212266,212272,212273,212279,212280,212289,212290,212299,212300,212307,212308,212313,212314,212327,212328,212337,212338,212343,212344,212351,212352,212357,212358,212363,212364,212369,212370,212376,212377,212381,212382,212387,212388,212393,212394,212398,212399,212404,212405,212410,212411,212415,212416,212420,212421,212426,212427,212431,212432,212439,212440,212446,212447,212451,212452,212457,212458,212600,212601,212613,212614,212642,212643,212664,212665,212703,212704,212845,212846,212879,212880,212886,212887,213022,213023,213041,213042,213078,213079,213088,213089,213110,213111,213360,213361,213402,213403,213415,213416,213423,213424,213430,213431,213436,213437,213445,213446,213452,213453,213484,213485,213502,213503,213517,213518,213526,213527,213533,213534,213540,213541,213559,213560,213591,213592,213616,213617,213665,213666,213677,213678,213684,213685,213699,213700,213707,213708,213717,213718,213724,213725,213750,213751,213770,213771,213788,213789,213818,213819,213823,213824,213828,213829,213833,213834,213847,213848,213850,213851,216316,216317,216319,216320,216324,216325,216330,216331,216337,216338,216393,216394,216396,216397,216808,216809,218028,218029,218036,218037,218215,218216,218220,218221,218228,218229,218272,218273,218294,218295,218299,218300,218304,218305,218314,218315,218320,218321,218326,218327,218335,218336,218370,218371,218375,218376,218386,218387,218394,218395,218399,218400,218405,218406,218586,218587,218623,218624,218631,218632,218650,218651,218677,218678,218706,218707,218714,218715,218720,218721,218732,218733,218753,218754,218760,218761,218789,218790,218829,218830,218837,218838,218849,218850,218915,218916,218934,218935,218968,218969,218973,218974,218982,218983,218988,218989,218998,218999,219004,219005,219034,219035,219174,219175,219185,219186,219190,219191,219196,219197,219216,219217,219218,219219,219230,219231,219239,219240,219251,219252,219259,219260,219266,219267,219273,219274,219285,219286,219292,219293,219300,219301,219308,219309,219315,219316,219320,219321,219327,219328,219332,219333,219340,219341,219347,219348,219359,219360,219364,219365,219373,219374,219381,219382,219388,219389,219395,219396,219403,219404,219411,219412,219417,219418,219424,219425,219431,219432,219433,219434,219471,219472,219509,219510,219549,219550,219552,219553,219554,219555,219556,219557,219569,219570,219571,219572,219573,219574,219595,219596,219607,219608,219609,219610,219611,219612,219736,219737,219738,219739,219745,219746,219747,219748,219749,219750,219751,219752,219753,219754,219755,219756,219764,219765,219770,219771,219777,219778,219784,219785,219797,219798,219804,219805,219825,219826,219837,219838,219839,219840,219890,219891,219897,219898,219903,219904,219958,219959,219964,219965,219970,219971,219977,219978,219983,219984,220158,220159,220166,220167,220172,220173,220178,220179,220185,220186,220195,220196,220250,220251,220263,220264,220293,220294,220299,220300,220306,220307,220312,220313,220320,220321,220326,220327,220332,220333,220338,220339,220415,220416,220434,220435,220510,220511,220516,220517,220523,220524,220729,229376,229378,229457,229458,231754,231766,231767,231776,231777,231788,231789,231796,231797,231800,231801,231803,231804,231806,231807,231809,231810,231813,231814,231817,231818,231820,231821,231831,231832,231850,231851,231875,231876,231886,231887,231896,231897,231906,231907,231918,231919,231925,231926,231939,231940,231950,231951,231958,231959,231971,231972,231981,231982,231991,231992,232001,232002,232005,232006,232009,232010,232014,232015,232019,232020,232023,232024,232028,232029,232032,232033,232037,232038,232042,232043,232055,232056,232066,232067,233097,233098,233108,233109,233117,233118,233129,233130,233137,233138,233139,233140,233147,233148,233166,233167,233172,233173,233177,233178,233183,233184,233195,233196,233202,233203,233208,233209,233219,233220,233225,233226,233227,233228,233229,233230,233231,233232,233236,233237,233239,233240,233246,233247,233250,233251,233258,233259,233262,233263,233292,233293,233306,233307,233331,233332,233368,233369,233395,233396,233440,233441,233465,233466,233477,233478,233506,233507,233533,233534,233546,233547,233548,233549,233552,233553,233555,233556,233558,233559,233562,233563,233566,233567,233574,233575,233577,233578,233582,233583,233592,233593,233597,233598,233603,233604,233608,233609,233614,233615,233618,233619,233623,233624,233628,233629,233636,233637,233642,233643,233646,233647,233652,233653,233657,233658,233661,233662,233667,233668,233672,233673,233677,233678,233681,233682,233688,233689,233692,233693,233698,233699,233705,233706,233709,233710,233720,233721,233723,233724,233729,233730,233734,233735,233750,233751,233754,233755,233759,233760,233765,233766,233771,233772,233777,233778,233783,233784,233788,233789,233791,233792,233798,233799,233805,233806,233812,233813,233817,233818,233825,233826,233832,233833,233836,233837,233843,233844,233850,233851,233858,233859,233862,233863,233873,233874,233877,233878,233889,233890,233893,233894,233898,233899,233904,233905,233910,233911,233917,233918,233926,233927,233932,233933,233940,233941,233945,233946,233948,233949,233953,233954,233959,233960,233965,233966,233973,233974,233981,233982,233985,233986,233994,233995,233996,233997,234004,234005,234012,234013,234019,234020,234076,234077,234099,234100,234107,234108,234117,234118,234125,234126,234134,234135,234147,234148,234159,234160,234170,234171,234183,234184,234192,234193,234201,234202,234212,234213,234223,234224,234232,234233,234241,234242,234246,234247,234254,234255,234265,234266,234276,234277,234287,234288,234339,234340,234348,234349,234357,234358,234373,234374,234378,234379,234392,234393,234401,234402,234445,234446,234459,234460,234476,234477,234486,234487,234495,234496,234524,234525,234537,234538,234548,234549,234562,234563,234573,234574,234585,234586,234600,234601,234612,234613,234630,234631,234637,234638,234642,234643,234684,234685,234695,234696,234705,234706,234717,234718,234728,234729,234736,234737,234746,234747,234758,234759,234770,234771,234775,234776,234785,234786,234795,234796,234806,234807,234814,234815,234823,234824,234838,234839,234867,234868,234878,234879,234901,234902,234960,234961,234975,234976,234981,234982,235026,235027,235040,235041,235056,235057,235072,235073,235079,235080,235093,235094,235105,235106,235118,235119,235127,235128,235139,235140,235150,235151,235178,235179,235257,235258,235269,235270,235280,235281,235292,235293,235301,235302,235324,235325,235332,235333,235343,235344,235353,235354,235372,235373,235416,235417,235426,235427,235439,235440,235447,235448,235484,235485,235531,235532,235540,235541,235546,235547,235555,235556,235576,235577,235583,235584,235585,235586,235588,235589,235591,235592,235594,235595,235598,235599,235601,235602,235604,235605,235607,235608,235611,235612,235616,235617,235619,235620,235623,235624,235626,235627,235629,235630,235632,235633,235636,235637,235639,235640,235643,235644,235645,235646,235647,235648,235710,235711,235712,235713,235714,235715,235725,235726,235727,235728,235769,235770,235771,235772,235773,235774,235993,235994,235995,235996,236029,236030,236031,236032,236033,236034,236269,236270,236271,236272,236280,236281,236282,236283,236284,236285,236298,236299,236300,236301,236333,236334,236335,236336,236337,236338,236345,236346,236347,236348,236956,236957,236958,236959,236960,236961,237045,237046,237047,237048,237114,237115,237116,237117,237118,237119,237213,237214,237215,237216,239171,239172,239173,239174,239175,239176,240701,240702,240703,240704,240851,240852,240853,240854,240855,240856,241546,241547,241548,241549,241556,241557,241558,241559,241560,241561,241562,241563,241564,241565,241577,241578,241579,241580,244168,244169,244170,244171,244172,244173,246537,246538,246539,246540,247023,247024,247025,247026,247027,247028,247923,247924,247925,247926,248083,248084,248085,248086,248087,248088,248364,248365,248366,248367,249350,249351,249352,249353,249354,249355,249941,249942,249943,249944,249950,249951,249952,249953,249954,249955,249965,249966,249967,249968,249981,249982,249983,249984,249985,249986,250020,250021,250022,250023,250029,250030,250031,250032,250033,250034,250045,250046,250047,250048,250108,250109,250110,250111,250112,250113,250119,250120,250121,250122,250356,250357,250358,250359,250360,250361,250518,250519,250520,250521,250568,250569,250570,250571,250572,250573,250706,250707,250708,250709,252388,252389,252390,252391,252392,252393,253700,253701,253702,253703,253713,253714,253715,253716,253717,253718,253769,253770,253771,253772,253808,253809,253810,253811,253812,253813,253814,253815,253816,253817,253873,253874,253875,253876,253881,253882,253883,253884,253885,253886,253909,253910,253911,253912,255326,255327,255328,255329,255330,255331,256380,256381,256382,256383,256386,256387,256388,256389,256390,256391,256404,256405,256406,256407,256413,256414,256415,256416,256417,256418,256434,256435,256436,256437,256449,256450,256451,256452,256453,256454,256534,256535,256536,256537,256538,256539,256540,256541,258939,258940,258941,258942,258985,258986,258987,258988,258989,258990,259107,259108,259109,259110,259113,259114,259115,259116,259117,259118,259129,259130,259131,259132,259193,259194,259195,259196,259197,259198,259287,259288,259289,259290,259423,259424,259425,259426,259427,259428,259674,259675,259676,259677,259688,259689,259690,259691,259692,259693,259736,259737,259738,259739,260796,260797,260798,260799,260800,260801,261713,261714,261715,261716,261717,261718,261719,261720,261721,261722,261723,261724,261725,261726,261727,261728,261729,261730,261731,261732,261733,261734,261743,261744,261745,261746,261747,261748,261757,261758,261759,261760,261817,261818,261819,261820,261821,261822,261997,261998,261999,262000,262080,262081,262082,262083,262084,262085,262086,262087,262111,262112,262113,262114,262115,262116,262126,262127,262128,262129,262130,262131,262132,262133,262134,262135,262136,262137,262138,262139,262140,262141,262142,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") == "84e2ed6454b3a88f9dc91ff888d1e2b09bd15a8f" || 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,85689,85690,85837,85838,86706,86707,86741,86742,86749,86750,86751,86752,86784,86785,86839,86840,86875,86876,86877,86878,86879,86880,86881,86882,86883,86884,86885,86886,86887,86888,86889,86890,86891,86892,86893,86894,86895,86896,86897,86898,86899,86900,86901,86902,86903,86904,86905,86906,86907,86908,86909,86910,86911,86912,87068,87069,87177,87178,87321,87322,87423,87424,87614,87615,87774,87775,87838,87839,87987,87988,88192,88193,88287,88288,88442,88443,88505,88506,88507,88508,88509,88510,88511,88512,88513,88514,88515,88516,88517,88518,88527,88528,88529,88530,88532,88533,88534,88535,88562,88563,88564,88565,88591,88592,88593,88594,88621,88622,88623,88624,88636,88637,88638,88639,88647,88648,88649,88650,88654,88655,88656,88657,88663,88664,88665,88666,88667,88668,88669,88670,88672,88673,88674,88675,88684,88685,88686,88687,88688,88689,88690,88691,88692,88693,88694,88695,88696,88697,88698,88699,88777,88778,88779,88780,88781,88782,88783,88784,88785,88786,88787,88788,88789,88790,88791,88792,88794,88795,88796,88797,88798,88799,88800,88801,88837,88838,88839,88840,88876,88877,88878,88879,88880,88881,88882,88883,88884,88885,88886,88887,88888,88889,88891,88892,88894,88895,88896,88897,88898,88899,88900,88901,88902,88903,88904,88905,88906,88907,88908,88909,88910,88911,88912,88913,88914,88915,94336,94337,94338,94339,94340,94341,94342,94343,94344,94345,94346,94347,94351,94352,94355,94356,94360,94361,94365,94366,94370,94371,94372,94373,94374,94375,94378,94379,94380,94381,94382,94383,94384,94385,94386,94387,94388,94389,94390,94391,94392,94393,94394,94395,94396,94397,94398,94399,94400,94401,94402,94403,94404,94405,94406,94407,94408,94409,94410,94411,94412,94413,94414,94415,94416,94417,94418,94419,94420,94421,94422,94423,94424,94425,94426,94427,94428,94429,94430,94431,94432,94433,94434,94435,94436,94437,94438,94439,94440,94441,94442,94443,94444,94445,94446,94447,94448,94449,94450,94451,94452,94453,94454,94455,94459,94460,94465,94466,94467,94468,94591,94592,94593,94594,94595,94596,94597,94598,94599,94600,94601,94602,94603,94604,94606,94607,94608,94609,94611,94612,94613,94614,94616,94617,94618,94619,94621,94622,94623,94624,94626,94627,94628,94629,94631,94632,94633,94634,94636,94637,94638,94639,94640,94641,94642,94643,94644,94645,94646,94647,94653,94654,94655,94656,94657,94658,94664,94665,94666,94667,94748,94749,94750,94751,94752,94753,95139,95140,95141,95142,95144,95145,95146,95147,95148,95149,95155,95156,95157,95158,95163,95164,95165,95166,95167,95168,95185,95186,95187,95188,95218,95219,95220,95221,95222,95223,95242,95243,95244,95245,95255,95256,95257,95258,95259,95260,95283,95284,95285,95286,95287,95288,95289,95290,95292,95293,95294,95295,95299,95300,95301,95302,95304,95305,95306,95307,95309,95310,95311,95312,95314,95315,95316,95317,95319,95320,95321,95322,95324,95325,95326,95327,95329,95330,95331,95332,95335,95336,95337,95338,95340,95341,95342,95343,95346,95347,95348,95349,95351,95352,95353,95354,95364,95365,95366,95367,95368,95369,95370,95371,95372,95373,95374,95375,95376,95377,95382,95383,95384,95385,95386,95387,95394,95395,95396,95397,95419,95420,95421,95422,95423,95424,95469,95470,95471,95472,95486,95487,95488,95489,95490,95491,95507,95508,95509,95510,95511,95512,95513,95514,95527,95528,95529,95530,95532,95533,95534,95535,95537,95538,95539,95540,95542,95543,95544,95545,95547,95548,95549,95550,95552,95553,95554,95555,95557,95558,95559,95560,95562,95563,95564,95565,95567,95568,95569,95570,95572,95573,95574,95575,95582,95583,95584,95585,95587,95588,95589,95590,95591,95592,95593,95594,95595,95596,95597,95598,95599,95600,95605,95606,95607,95608,95609,95610,95617,95618,95619,95620,95624,95625,95626,95627,95628,95629,95636,95637,95638,95639,95640,95641,95642,95643,95645,95646,95647,95648,95650,95651,95652,95653,95655,95656,95657,95658,95660,95661,95662,95663,95665,95666,95667,95668,95670,95671,95672,95673,95781,95782,95783,95784,95785,95786,95787,95788,95789,95790,95791,95792,95793,95794,95795,95796,95797,95798,95799,95800,95801,95802,95803,95804,95812,95813,95814,95815,95823,95824,95825,95826,95827,95828,95835,95836,95837,95838,95845,95846,95847,95848,95849,95850,95851,95852,95853,95854,95855,95856,95865,95866,95867,95868,95869,95870,95886,95887,95888,95889,95891,95892,95893,95894,95896,95897,95898,95899,95901,95902,95903,95904,95909,95910,95911,95912,95914,95915,95916,95917,95918,95919,95920,95921,95926,95927,95928,95929,95930,95931,95941,95942,95943,95944,95969,95970,95971,95972,95973,95974,96060,96061,96062,96063,96126,96127,96128,96129,96130,96131,96282,96283,96284,96285,96300,96301,96302,96303,96304,96305,96324,96325,96326,96327,96328,96329,96330,96331,96636,96637,96701,96702,96703,96704,96791,96792,97455,97456,97461,97462,97467,97468,97478,97479,97492,97493,97508,97509,97537,97538,97548,97549,97586,97587,97859,97860,97861,97862,97863,97864,97865,97866,97939,97940,98013,98014,98057,98058,98059,98060,98063,98064,98065,98066,98067,98068,98069,98070,98071,98072,98074,98075,98081,98082,98087,98088,98163,98164,98167,98168,98173,98174,98175,98176,98177,98178,98179,98180,98181,98182,98183,98184,98190,98191,98192,98193,98214,98215,98238,98239,98240,98241,98252,98253,98296,98297,98298,98299,98301,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,131617,163840,163842,163921,163922,196608,196609,197102,197421,197422,197529,197530,197538,197539,197544,197545,197557,197558,197572,197573,197616,197617,197630,197631,197676,197677,197688,197689,197796,197797,198113,198114,198212,198213,198250,198251,198280,198281,198300,198301,198309,198310,198494,198495,198637,198638,198648,198649,198666,198667,198676,198677,198811,198812,198818,198819,198848,198849,198879,198880,199069,199070,199076,199077,199083,199084,199089,199090,199094,199095,199108,199109,199117,199118,199122,199123,199153,199154,199171,199172,199202,199203,199257,199258,199275,199276,199306,199307,199326,199327,199335,199336,199343,199344,199367,199368,199417,199418,199429,199430,199434,199435,199439,199440,200245,200246,200250,200251,200255,200256,200272,200273,200277,200278,200284,200285,200289,200290,200295,200296,200301,200302,200306,200307,200312,200313,200318,200319,200323,200324,200328,200329,200334,200335,200340,200341,200346,200347,200352,200353,200357,200358,200363,200364,200369,200370,200374,200375,200380,200381,200386,200387,200391,200392,200397,200398,200403,200404,200408,200409,200414,200415,200420,200421,200425,200426,200431,200432,200437,200438,200442,200443,200448,200449,200454,200455,200459,200460,200465,200466,200471,200472,200476,200477,200482,200483,200488,200489,200493,200494,200499,200500,200505,200506,200510,200511,200516,200517,200522,200523,200527,200528,200533,200534,200539,200540,200547,200548,200555,200556,200569,200570,200575,200576,200598,200599,200628,200629,200671,200672,200708,200709,200715,200716,200774,200775,200779,200780,200798,200799,200803,200804,200977,200978,201147,201148,201154,201155,201169,201170,201179,201180,201189,201190,201199,201200,201209,201210,201219,201220,201229,201230,201239,201240,201249,201250,201259,201260,201274,201275,201284,201285,201294,201295,201309,201310,201319,201320,201329,201330,201339,201340,201349,201350,201359,201360,201369,201370,201379,201380,201389,201390,201399,201400,201414,201415,201424,201425,201434,201435,201444,201445,201454,201455,201469,201470,201479,201480,201489,201490,201499,201500,201514,201515,201524,201525,201534,201535,201544,201545,201559,201560,201569,201570,201579,201580,201589,201590,201599,201600,201614,201615,201624,201625,201634,201635,201644,201645,201654,201655,201664,201665,201673,201674,201688,201689,201698,201699,201708,201709,201718,201719,201728,201729,201738,201739,201748,201749,201758,201759,201768,201769,201783,201784,201793,201794,201803,201804,201813,201814,201823,201824,201833,201834,201843,201844,201853,201854,201863,201864,201873,201874,201883,201884,201898,201899,201908,201909,201918,201919,201928,201929,201938,201939,201948,201949,201963,201964,201973,201974,201983,201984,201993,201994,202003,202004,202013,202014,202023,202024,202033,202034,202048,202049,202058,202059,202068,202069,202078,202079,202093,202094,202108,202109,202118,202119,202128,202129,202138,202139,202148,202149,202158,202159,202168,202169,202183,202184,202193,202194,202203,202204,202213,202214,202228,202229,202238,202239,202248,202249,202258,202259,202273,202274,202283,202284,202293,202294,202303,202304,202318,202319,202328,202329,202338,202339,202348,202349,202358,202359,202368,202369,202383,202384,202393,202394,202403,202404,202413,202414,202423,202424,202438,202439,202448,202449,202458,202459,202468,202469,202478,202479,202488,202489,202503,202504,202513,202514,202523,202524,202533,202534,202543,202544,202553,202554,202568,202569,202578,202579,202588,202589,202598,202599,202608,202609,202618,202619,202628,202629,202638,202639,202648,202649,202658,202659,202673,202674,202683,202684,202693,202694,202703,202704,202713,202714,202723,202724,202733,202734,202743,202744,202753,202754,202763,202764,202778,202779,202788,202789,202798,202799,202808,202809,202818,202819,202828,202829,202838,202839,202848,202849,202858,202859,202868,202869,202883,202884,202893,202894,202903,202904,202913,202914,202923,202924,202933,202934,202943,202944,202953,202954,202963,202964,202978,202979,202988,202989,202998,202999,203008,203009,203018,203019,203028,203029,203038,203039,203048,203049,203058,203059,203068,203069,203078,203079,203088,203089,203098,203099,203113,203114,203123,203124,203133,203134,203143,203144,203153,203154,203163,203164,203173,203174,203183,203184,203193,203194,203208,203209,203218,203219,203228,203229,203238,203239,203248,203249,203258,203259,203268,203269,203283,203284,203293,203294,203303,203304,203313,203314,203323,203324,203333,203334,203343,203344,203353,203354,203363,203364,203373,203374,203383,203384,203393,203394,203408,203409,203418,203419,203428,203429,203438,203439,203448,203449,203458,203459,203468,203469,203478,203479,203488,203489,203498,203499,203513,203514,203523,203524,203533,203534,203543,203544,203558,203559,203568,203569,203578,203579,203588,203589,203598,203599,203608,203609,203618,203619,203628,203629,203638,203639,203648,203649,203663,203664,203673,203674,203683,203684,203693,203694,203703,203704,203713,203714,203723,203724,203733,203734,203748,203749,203758,203759,203768,203769,203778,203779,203788,203789,203798,203799,203813,203814,203823,203824,203833,203834,203843,203844,203853,203854,203863,203864,203873,203874,203883,203884,203893,203894,203908,203909,203918,203919,203928,203929,203938,203939,204049,204050,204113,204114,204118,204119,204125,204126,204139,204140,204146,204147,204205,204206,204227,204228,204241,204242,204274,204275,204368,204369,204383,204384,204393,204394,204438,204439,204471,204472,204482,204483,204489,204490,204495,204496,204609,204610,204629,204630,204635,204636,205312,205313,205332,205333,205345,205346,205359,205360,205423,205424,205429,205430,205436,205437,205443,205444,205451,205452,205521,205522,205530,205531,205538,205539,205558,205559,205580,205581,205850,205851,210673,210674,210703,210704,210711,210712,210826,210827,210849,210850,210900,210901,210930,210931,210955,210956,210969,210970,210975,210976,210989,210990,210994,210995,211030,211031,211037,211038,211044,211045,211053,211054,211063,211064,211072,211073,211129,211130,211148,211149,211180,211181,211186,211187,211198,211199,211254,211255,211267,211268,211436,211437,211451,211452,211527,211528,211586,211587,211608,211609,211653,211654,211668,211669,211673,211674,211679,211680,211685,211686,211691,211692,211697,211698,211703,211704,211711,211712,212014,212015,212019,212020,212047,212048,212061,212062,212066,212067,212073,212074,212083,212084,212115,212116,212121,212122,212128,212129,212136,212137,212144,212145,212149,212150,212154,212155,212161,212162,212168,212169,212175,212176,212181,212182,212187,212188,212193,212194,212199,212200,212205,212206,212210,212211,212216,212217,212222,212223,212228,212229,212234,212235,212241,212242,212247,212248,212253,212254,212258,212259,212265,212266,212272,212273,212279,212280,212289,212290,212299,212300,212307,212308,212313,212314,212327,212328,212337,212338,212343,212344,212351,212352,212357,212358,212363,212364,212369,212370,212376,212377,212381,212382,212387,212388,212393,212394,212398,212399,212404,212405,212410,212411,212415,212416,212420,212421,212426,212427,212431,212432,212439,212440,212446,212447,212451,212452,212457,212458,212600,212601,212613,212614,212642,212643,212664,212665,212703,212704,212845,212846,212879,212880,212886,212887,213022,213023,213041,213042,213078,213079,213088,213089,213110,213111,213360,213361,213402,213403,213415,213416,213423,213424,213430,213431,213436,213437,213445,213446,213452,213453,213484,213485,213502,213503,213517,213518,213526,213527,213533,213534,213540,213541,213559,213560,213591,213592,213616,213617,213665,213666,213677,213678,213684,213685,213699,213700,213707,213708,213717,213718,213724,213725,213750,213751,213770,213771,213788,213789,213818,213819,213823,213824,213828,213829,213833,213834,213847,213848,213850,213851,216316,216317,216319,216320,216324,216325,216330,216331,216337,216338,216393,216394,216396,216397,216808,216809,218028,218029,218036,218037,218215,218216,218220,218221,218228,218229,218272,218273,218294,218295,218299,218300,218304,218305,218314,218315,218320,218321,218326,218327,218335,218336,218370,218371,218375,218376,218386,218387,218394,218395,218399,218400,218405,218406,218586,218587,218623,218624,218631,218632,218650,218651,218677,218678,218706,218707,218714,218715,218720,218721,218732,218733,218753,218754,218760,218761,218789,218790,218829,218830,218837,218838,218849,218850,218915,218916,218934,218935,218968,218969,218973,218974,218982,218983,218988,218989,218998,218999,219004,219005,219034,219035,219174,219175,219185,219186,219190,219191,219196,219197,219216,219217,219218,219219,219230,219231,219239,219240,219251,219252,219259,219260,219266,219267,219273,219274,219285,219286,219292,219293,219300,219301,219308,219309,219315,219316,219320,219321,219327,219328,219332,219333,219340,219341,219347,219348,219359,219360,219364,219365,219373,219374,219381,219382,219388,219389,219395,219396,219403,219404,219411,219412,219417,219418,219424,219425,219431,219432,219433,219434,219471,219472,219509,219510,219549,219550,219552,219553,219554,219555,219556,219557,219569,219570,219571,219572,219573,219574,219595,219596,219607,219608,219609,219610,219611,219612,219736,219737,219738,219739,219745,219746,219747,219748,219749,219750,219751,219752,219753,219754,219755,219756,219764,219765,219770,219771,219777,219778,219784,219785,219797,219798,219804,219805,219825,219826,219837,219838,219839,219840,219890,219891,219897,219898,219903,219904,219958,219959,219964,219965,219970,219971,219977,219978,219983,219984,220158,220159,220166,220167,220172,220173,220178,220179,220185,220186,220195,220196,220250,220251,220263,220264,220293,220294,220299,220300,220306,220307,220312,220313,220320,220321,220326,220327,220332,220333,220338,220339,220415,220416,220434,220435,220510,220511,220516,220517,220523,220524,220729,229376,229378,229457,229458,231754,231766,231767,231776,231777,231788,231789,231796,231797,231800,231801,231803,231804,231806,231807,231809,231810,231813,231814,231817,231818,231820,231821,231831,231832,231850,231851,231875,231876,231886,231887,231896,231897,231906,231907,231918,231919,231925,231926,231939,231940,231950,231951,231958,231959,231971,231972,231981,231982,231991,231992,232001,232002,232005,232006,232009,232010,232014,232015,232019,232020,232023,232024,232028,232029,232032,232033,232037,232038,232042,232043,232055,232056,232066,232067,233097,233098,233108,233109,233117,233118,233129,233130,233137,233138,233139,233140,233147,233148,233166,233167,233172,233173,233177,233178,233183,233184,233195,233196,233202,233203,233208,233209,233219,233220,233225,233226,233227,233228,233229,233230,233231,233232,233236,233237,233239,233240,233246,233247,233250,233251,233258,233259,233262,233263,233292,233293,233306,233307,233331,233332,233368,233369,233395,233396,233440,233441,233465,233466,233477,233478,233506,233507,233533,233534,233546,233547,233548,233549,233552,233553,233555,233556,233558,233559,233562,233563,233566,233567,233574,233575,233577,233578,233582,233583,233592,233593,233597,233598,233603,233604,233608,233609,233614,233615,233618,233619,233623,233624,233628,233629,233636,233637,233642,233643,233646,233647,233652,233653,233657,233658,233661,233662,233667,233668,233672,233673,233677,233678,233681,233682,233688,233689,233692,233693,233698,233699,233705,233706,233709,233710,233720,233721,233723,233724,233729,233730,233734,233735,233750,233751,233754,233755,233759,233760,233765,233766,233771,233772,233777,233778,233783,233784,233788,233789,233791,233792,233798,233799,233805,233806,233812,233813,233817,233818,233825,233826,233832,233833,233836,233837,233843,233844,233850,233851,233858,233859,233862,233863,233873,233874,233877,233878,233889,233890,233893,233894,233898,233899,233904,233905,233910,233911,233917,233918,233926,233927,233932,233933,233940,233941,233945,233946,233948,233949,233953,233954,233959,233960,233965,233966,233973,233974,233981,233982,233985,233986,233994,233995,233996,233997,234004,234005,234012,234013,234019,234020,234076,234077,234099,234100,234107,234108,234117,234118,234125,234126,234134,234135,234147,234148,234159,234160,234170,234171,234183,234184,234192,234193,234201,234202,234212,234213,234223,234224,234232,234233,234241,234242,234246,234247,234254,234255,234265,234266,234276,234277,234287,234288,234339,234340,234348,234349,234357,234358,234373,234374,234378,234379,234392,234393,234401,234402,234445,234446,234459,234460,234476,234477,234486,234487,234495,234496,234524,234525,234537,234538,234548,234549,234562,234563,234573,234574,234585,234586,234600,234601,234612,234613,234630,234631,234637,234638,234642,234643,234684,234685,234695,234696,234705,234706,234717,234718,234728,234729,234736,234737,234746,234747,234758,234759,234770,234771,234775,234776,234785,234786,234795,234796,234806,234807,234814,234815,234823,234824,234838,234839,234867,234868,234878,234879,234901,234902,234960,234961,234975,234976,234981,234982,235026,235027,235040,235041,235056,235057,235072,235073,235079,235080,235093,235094,235105,235106,235118,235119,235127,235128,235139,235140,235150,235151,235178,235179,235257,235258,235269,235270,235280,235281,235292,235293,235301,235302,235324,235325,235332,235333,235343,235344,235353,235354,235372,235373,235416,235417,235426,235427,235439,235440,235447,235448,235484,235485,235531,235532,235540,235541,235546,235547,235555,235556,235576,235577,235583,235584,235585,235586,235588,235589,235591,235592,235594,235595,235598,235599,235601,235602,235604,235605,235607,235608,235611,235612,235616,235617,235619,235620,235623,235624,235626,235627,235629,235630,235632,235633,235636,235637,235639,235640,235643,235644,235645,235646,235647,235648,235710,235711,235712,235713,235714,235715,235725,235726,235727,235728,235769,235770,235771,235772,235773,235774,235993,235994,235995,235996,236029,236030,236031,236032,236033,236034,236269,236270,236271,236272,236280,236281,236282,236283,236284,236285,236298,236299,236300,236301,236333,236334,236335,236336,236337,236338,236345,236346,236347,236348,236956,236957,236958,236959,236960,236961,237045,237046,237047,237048,237114,237115,237116,237117,237118,237119,237213,237214,237215,237216,239171,239172,239173,239174,239175,239176,240701,240702,240703,240704,240851,240852,240853,240854,240855,240856,241546,241547,241548,241549,241556,241557,241558,241559,241560,241561,241562,241563,241564,241565,241577,241578,241579,241580,244168,244169,244170,244171,244172,244173,246537,246538,246539,246540,247023,247024,247025,247026,247027,247028,247923,247924,247925,247926,248083,248084,248085,248086,248087,248088,248364,248365,248366,248367,249350,249351,249352,249353,249354,249355,249941,249942,249943,249944,249950,249951,249952,249953,249954,249955,249965,249966,249967,249968,249981,249982,249983,249984,249985,249986,250020,250021,250022,250023,250029,250030,250031,250032,250033,250034,250045,250046,250047,250048,250108,250109,250110,250111,250112,250113,250119,250120,250121,250122,250356,250357,250358,250359,250360,250361,250518,250519,250520,250521,250568,250569,250570,250571,250572,250573,250706,250707,250708,250709,252388,252389,252390,252391,252392,252393,253700,253701,253702,253703,253713,253714,253715,253716,253717,253718,253769,253770,253771,253772,253808,253809,253810,253811,253812,253813,253814,253815,253816,253817,253873,253874,253875,253876,253881,253882,253883,253884,253885,253886,253909,253910,253911,253912,255326,255327,255328,255329,255330,255331,256380,256381,256382,256383,256386,256387,256388,256389,256390,256391,256404,256405,256406,256407,256413,256414,256415,256416,256417,256418,256434,256435,256436,256437,256449,256450,256451,256452,256453,256454,256534,256535,256536,256537,256538,256539,256540,256541,258939,258940,258941,258942,258985,258986,258987,258988,258989,258990,259107,259108,259109,259110,259113,259114,259115,259116,259117,259118,259129,259130,259131,259132,259193,259194,259195,259196,259197,259198,259287,259288,259289,259290,259423,259424,259425,259426,259427,259428,259674,259675,259676,259677,259688,259689,259690,259691,259692,259693,259736,259737,259738,259739,260796,260797,260798,260799,260800,260801,261713,261714,261715,261716,261717,261718,261719,261720,261721,261722,261723,261724,261725,261726,261727,261728,261729,261730,261731,261732,261733,261734,261743,261744,261745,261746,261747,261748,261757,261758,261759,261760,261817,261818,261819,261820,261821,261822,261997,261998,261999,262000,262080,262081,262082,262083,262084,262085,262086,262087,262111,262112,262113,262114,262115,262116,262126,262127,262128,262129,262130,262131,262132,262133,262134,262135,262136,262137,262138,262139,262140,262141,262142,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:185e9b76816e1c3c0da5931463662168eb34164a:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20",
            "-", fe07e75cfbb3eef66b35fc6b643bfad0c1372c20, 16276776,
            185e9b76816e1c3c0da5931463662168eb34164a,
            package_extract_file("patch/boot.img.p")) ||
    abort("E3008: Failed to apply patch to EMMC:/dev/block/bootdevice/by-name/boot:16276776:185e9b76816e1c3c0da5931463662168eb34164a:16276776:fe07e75cfbb3eef66b35fc6b643bfad0c1372c20");

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

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