[SuperR Kitchen] ingbrzy:
You cant just change it manually..

see differences..

Version generated by rimg2sdat from untouched system.img is always just format version 1.. (missing zero blocks)

1
423466
erase 2,0,786384
new 2770,0,365341,193,365537,703,366060,19586,384946,20340,385713,22440,387816,22446,387835,22449,387841,22456,387966,22462,387975,22565,388104,22568,388110,22571,388139,22909,388480,23608,389205,23994,389594,23997,389623,32961,398590,33471,399169,62530,428231,62857,428571,65536,431253,66046,431964,66837,433959,67029,434155,67065,443669,69417,446025,69419,446060,69452,446097,69579,446228,69650,446303,69654,446311,69746,446406,70522,447186,70534,447202,70902,447574,74418,451094,74809,451493,74910,451601,74914,451613,74917,451753,74923,452219,74926,452244,74929,452249,74936,452258,74945,452269,74947,452273,74963,452291,75074,452404,75108,452440,75116,452450,75150,452492,75212,452585,75279,452654,75293,452670,75386,452765,75456,452837,76319,453702,76945,454330,77305,454692,77317,454706,77324,454715,77326,454719,77330,454725,77380,454777,78672,456078,78723,456131,78728,456156,78735,456165,78737,456169,78782,456216,78786,456222,80307,457745,80312,457752,80319,457771,80667,458130,80690,458161,80758,458231,80789,458282,80792,458287,83346,460863,83431,460958,83443,460990,83927,461476,84261,461812,84500,462053,84679,462234,84684,462241,85137,462696,85164,462725,85209,462772,85258,462829,85497,463099,86073,463677,86093,463699,86263,463871,86771,464381,86942,464554,86952,464566,86954,464570,87078,464696,87104,464730,87175,464832,87376,465035,87930,465591,87933,465596,87938,465603,87940,465607,87943,465612,87950,465621,88347,466020,88352,466033,88385,466074,88430,466141,88526,466239,88563,466278,88565,466282,88654,466373,88658,466379,88698,466433,88701,466445,88792,466544,89009,466783,89043,466819,89056,466834,89091,466871,89094,466876,89118,466902,89170,466968,89463,467269,89516,467331,89630,467467,89636,467475,89654,467515,89656,467871,89844,468068,89854,468100,89981,468229,90039,468289,90099,468351,90138,468392,90454,468710,90641,468899,90745,469015,90786,469086,91102,469404,92439,470763,92496,470828,92540,470894,92548,470904,94240,472598,94256,472616,94271,472633,94274,472652,94279,472665,95016,473424,95029,473439,95051,473463,95072,473486,95427,473843,95430,473862,95503,473944,95688,474137,95722,474193,95727,474200,95745,474220,95748,474225,95786,474265,95812,474307,95868,474371,95982,474507,97209,475736,97212,475741,97229,475760,97295,475828,97417,475966,97422,475979,97439,476018,97643,476224,98168,476751,98250,476853,98299,476910,98304,476937,98497,477132,99007,477644,108245,486884,119695,498336,120410,499053,120413,499070,120426,499091,120433,499120,120474,499163,120484,499175,120499,499192,120502,499197,120512,499209,120528,499239,120576,499345,120645,499416,120672,499445,120693,499468,120702,499479,120720,499499,120724,499505,120728,499511,120752,499545,120754,499556,120763,499587,120765,499591,120780,499608,120796,499626,120837,499669,120842,499676,120847,499695,120852,499730,120855,499735,120880,499762,120882,499766,120886,499772,120889,499777,120916,499806,120933,499825,120944,499846,120948,499860,121042,499963,121049,499979,122939,501878,126815,505763,126823,507103,126843,507128,126858,507176,126941,510005,130721,513806,130723,517486,131072,518465,131582,518980,131641,519080,131778,519478,131918,519645,132153,520023,132267,520703,132462,520906,132630,521456,132729,521564,132732,521611,132894,521807,133022,521961,133107,522174,134106,523398,134309,523604,134313,524193,134321,524249,134342,524294,134410,524577,134487,525288,134553,525358,136187,527007,136193,527112,141584,532518,163761,554714,163840,554954,164033,555218,164543,555870,171012,562544,177647,569359,177718,569616,177746,569782,177844,570092,177858,570141,177915,570338,178013,570537,178016,570551,178075,570717,178088,570737,178125,570930,178128,570977,178157,571009,178226,571230,196608,589643,197118,590221,229376,622582,229569,622785,230079,623805,230156,624821,230190,624862,230296,624973,230458,628647,230472,628685,230531,628748,230547,628766,230557,628782,230578,628808,230606,628847,230712,636927,230715,636932,230787,637008,230806,637070,230812,637136,230815,637141,230863,637194,230866,637200,230873,637222,230916,637271,230985,637349,230991,637808,231018,637839,233704,640800,233707,640806,262144,669612,262654,670313,290714,698376,290717,698705,290719,698709,290722,698927,290724,699302,290727,699310,290729,699368,290732,699386,290735,699393,290737,699402,290740,699473,290742,699505,290745,699540,290747,699626,290750,699709,290752,699800,290755,699899,290757,702097,290760,702141,290763,702429,290765,702454,290768,702504,290770,702606,290773,703414,290775,703462,290778,703591,290780,703766,290783,703892,290786,704054,290788,704126,290791,704352,290793,704400,290796,704523,290798,704608,290801,705385,290803,705397,290806,716790,290809,749561,290811,782331,290814,815102,290816,847872,290819,880643,290821,913413,290824,946184,290826,978954,290829,1011725,290834,1044498,290837,1045011,290839,1057204,290842,1071073,290844,1071083,290847,290848,290849,290851,290852,290853,290854,290856,290857,290858,290860,290861,290862,290863,290865,290866,290867,290869,290870,290871,290872,290874,290875,290876,290877,290879,290880,290881,290882,290884,290885,290886,290888,290889,290890,290892,290893,290894,290895,290897,290898,290899,290900,290902,290903,290904,290905,290907,290908,290909,290911,290912,290913,290914,290916,290917,290918,290920,290921,290922,290923,290925,290926,290927,290928,290930,290931,290932,290933,290935,290936,290937,290939,290940,290941,290942,290944,290945,290946,290948,290949,290950,290951,290953,290954,290955,290956,290958,290959,290960,290962,290963,290964,290965,290967,290968,290969,290971,290972,290973,290974,290976,290977,290978,290979,290981,290982,290983,290985,290986,290987,290988,290990,290991,290992,290994,290995,290996,290997,290999,291000,291001,291002,291004,291005,291006,291007,291009,291010,291011,291013,291014,291015,291016,291018,291019,291020,291022,291023,291024,291025,291027,291028,291029,291030,291032,291033,291034,291036,291037,291038,291039,291041,291042,291043,291045,291046,291047,291048,291050,291051,291052,291053,291055,291056,291057,291058,291060,291061,291062,291064,291065,291066,291067,291069,291070,291071,291073,291074,291075,291076,291078,291079,291080,291081,291083,291084,291085,291087,291088,291089,291091,291092,291093,291094,291096,291097,291098,291099,291101,291102,291103,291104,291106,291107,291108,291110,291111,291112,291113,291115,291116,291117,291118,291120,291121,291122,291124,291125,291126,291127,291129,291130,291131,291132,291134,291135,291136,291138,291139,291140,291141,291143,291144,291145,291147,291148,291149,291150,291152,291153,291154,291155,291157,291158,291159,291161,291162,291163,291164,291166,291167,291168,291170,291171,291172,291173,291175,291176,291177,291178,291180,291181,291182,291183,291185,291186,291187,291189,291190,291191,291192,291194,291195,291196,291198,291199,291200,291201,291203,291204,291205,291206,291208,291209,291210,291212,291213,291214,291215,291217,291218,291219,291221,291222,291223,291224,291226,291227,291228,291229,291231,291232,291233,291234,291236,291237,291238,291240,291241,291242,291243,291245,291246,291247,291249,291250,291251,291252,291254,291255,291256,291257,291259,291260,291261,291263,291264,291265,291266,291268,291269,291270,291272,291273,291274,291275,291277,291278,291279,291280,291282,291283,291284,291286,291287,291288,291290,291291,291293,291294,291295,291297,291298,291299,291300,291302,291303,291304,291305,291307,291308,291309,291310,291312,291313,291314,291315,291317,291318,291320,291321,291322,291323,291325,291326,291327,291328,291330,291331,291332,291333,291335,291336,291337,291338,291340,291341,291342,291344,291345,291346,291348,291349,291350,291351,291353,291354,291355,291356,291358,291359,291360,291361,291363,291364,291365,291366,291368,291369,291371,291372,291373,291374,291376,291377,291378,291379,291381,291382,291383,291384,291386,291387,291388,291389,291391,291392,291394,291395,291396,291397,291399,291400,291401,291402,291404,291405,291406,291407,291409,291410,291411,291412,291414,291415,291416,291417,291419,291420,291422,291423,291424,291425,291427,291428,291429,291430,291432,291433,291434,291435,291437,291438,291439,291440,291442,291443,291445,291446,291447,291448,291450,291451,291452,291453,291455,291456,291457,291458,291460,291461,291462,291463,291465,291466,291467,291469,291470,291471,291473,291474,291475,291476,291478,291479,291480,291481,291483,291484,291485,291486,291488,291489,291490,291491,291493,291494,291496,291497,291498,291499,291501,291502,291503,291504,291506,291507,291508,291509,291511,291512,291513,291514,291516,291517,291518,291520,291521,291522,291524,291525,291526,291527,291529,291530,291531,291532,291534,291535,291536,291537,291539,291540,291541,291542,291544,291545,291547,291548,291549,291550,291552,291553,291554,291555,291557,291558,291559,291560,291562,291563,291564,291565,291567,291568,291570,291571,291572,291573,291575,291576,291577,291578,291580,291581,291582,291583,291585,291586,291587,291588,291590,291591,291592,291593,291595,291596,291598,291599,291600,291601,291603,291604,291605,291606,291608,291609,291610,291611,291613,291614,291615,291616,291618,291619,291621,291622,291623,291624,291626,291627,291628,291629,291631,291632,291633,291634,291636,291637,291638,291639,291641,291642,291643,291645,291646,291647,291649,291650,291651,291652,291654,291655,291656,291657,291659,291660,291661,291662,291664,291665,291666,291667,291669,291670,291672,291673,291674,291675,291677,291678,291679,291680,291682,291683,291684,291685,291687,291688,291689,291690,291692,291693,291695,291696,291697,291698,291700,291701,291702,291703,291705,291706,291707,291708,291710,291711,291712,294911,294912,294914,295105,295106,295615,307013,307028,307056,307060,309681,309684,318275,318276,322718,322719,322727,322732,322755,322775,327679,327680,327681,328190,356757,356758,358498,358499,358501,358502,358514,358515,358517,358518,358646,358647,358649,358650,358675,358676,358678,358679,358704,358705,358707,358708,358733,358734,358736,358737,358762,358763,358765,358766,358847,358848,358850,358851,358863,358864,358866,358867,358879,358880,358882,358883,358895,358896,358898,358899,358911,358912,358914,358915,358927,358928,358930,358931,359081,359082,359084,359085,359110,359111,359113,359114,359126,359127,359129,359130,359142,359143,359145,359146,359171,359172,359174,359175,359200,359201,359203,359204,359229,359230,359232,359233,359258,359259,359261,359262,359330,359331,359333,359334,359372,359373,359375,359376,359388,359389,359391,359392,359404,359405,359407,359408,359420,359421,359423,359424,359541,359542,359544,359545,359570,359571,359573,359574,359599,359600,359602,359603,359628,359629,359631,359632,359657,359658,359660,359661,359729,359730,359732,359733,359745,359746,359748,359749,359881,359882,359884,359885,359910,359911,359913,359914,359939,359940,359942,359943,359998,359999,360001,360002,360014,360015,360017,360018,360030,360034,360046,360047,360049,360050,360178,360179,360181,360182,360194,360198,360210,360211,360213,360214,360226,360227,360229,360230,360255,360256,360258,360259,360284,360285,360287,360288,360313,360314,360316,360317,360329,360330,360332,360333,360345,360346,360348,360349,360447,360448,360449,360958,360990,360991,360993,360994,361006,361007,361009,361010,361022,361023,361025,361026,361038,361039,361041,361042,361067,361068,361070,361071,361096,361097,361099,361100,361125,361126,361128,361129,361210,361211,361213,361214,361226,361227,361229,361230,361272,361273,361275,361276,361288,361289,361291,361292,361420,361421,361423,361424,361436,361437,361439,361440,361452,361453,361455,361456,361468,361469,361471,361472,361497,361498,361500,361501,361526,361527,361529,361530,361555,361556,361558,361559,361640,361641,361643,361644,361656,361657,361659,361660,361724,361725,361727,361728,361740,361741,361743,361744,361756,361757,361759,361760,361772,361773,361775,361776,361788,361789,361791,361792,361804,361805,361807,361808,361947,361948,361950,361951,361963,361964,361966,361967,361979,361980,361982,361983,361995,361996,361998,361999,362024,362025,362027,362028,362053,362054,362056,362057,362082,362083,362085,362086,362111,362112,362114,362115,362157,362158,362160,362161,362173,362174,362176,362177,362189,362190,362192,362193,362205,362206,362208,362209,362348,362349,362351,362352,362364,362365,362367,362368,362380,362381,362383,362384,362396,362397,362399,362400,362425,362426,362428,362429,362454,362455,362457,362458,362483,362484,362486,362487,362512,362513,362515,362516,362610,362611,362613,362614,362626,362627,362629,362630,362694,362695,362697,362698,362710,362711,362713,362714,362726,362727,362729,362730,362742,362743,362745,362746,362758,362759,362761,362762,362774,362775,362777,362778,362895,362896,362898,362899,362911,362912,362914,362915,362940,362941,362943,362944,362969,362970,362972,362973,362998,362999,363001,363002,363083,363084,363086,363087,363099,363100,363102,363103,363291,363292,363294,363295,363320,363321,363323,363324,363349,363350,363352,363353,363408,363409,363411,363412,363424,363425,363427,363428,363560,363561,363563,363564,363589,363590,363592,363593,363618,363619,363621,363622,363784,363785,363787,363788,363813,363814,363816,363817,363842,363843,363845,363846,363901,363902,363904,363905,363917,363918,363920,363921,364053,364054,364056,364057,364082,364083,364085,364086,364111,364112,364114,364115,364170,364171,364173,364174,364186,364187,364189,364190,364215,364216,364218,364219,364231,364232,364234,364235,364247,364248,364250,364251,364263,364264,364266,364267,364279,364280,364282,364283,364295,364296,364298,364299,364311,364312,364314,364315,364549,364550,364552,364553,364565,364566,364568,364569,364650,364651,364653,364654,364666,364667,364669,364670,364682,364683,364685,364686,364698,364699,364701,364702,364819,364820,364822,364823,364835,364836,364838,364839,364864,364865,364867,364868,364893,364894,364896,364897,364922,364923,364925,364926,365007,365008,365010,365011,365023,365024,365026,365027,365133,365134,365136,365137,365162,365163,365165,365166,365191,365192,365194,365195,365220,365221,365223,365224,365249,365250,365252,365253,365308,365309,365311,365312,365324,365325,365327,365328,365340,365341,365343,365344,365356,365357,365359,365360,365372,365373,365375,365376,365388,365389,365391,365392,365509,365510,365512,365513,365538,365539,365541,365542,365567,365568,365570,365571,365596,365597,365599,365600,365625,365626,365628,365629,365697,365698,365700,365701,365713,365714,365716,365717,365917,365918,367121,367122,367125,367126,376600,376604,376605,376608,376609,376641,376642,376645,376647,376649,376650,376653,376654,376657,376658,376660,376661,376664,376666,376668,376669,376672,376674,376676,376677,376684,376685,376691,376696,376699,376835,376836,377295,377296,377297,377318,377319,377320,377321,377322,377323,377324,377325,377326,377327,377328,377329,377330,377331,377332,377333,377334,377335,377342,377352,377373,377374,377375,377376,377377,377378,377379,377380,377381,377382,377383,377384,377385,377386,377387,377388,377389,377390,377391,377392,377393,377394,377395,377396,377397,377405,377406,377407,377408,377409,377428,377429,377430,377431,377432,377433,377434,377435,377436,377437,377438,377439,377440,377441,377452,377461,377463,377470,377471,377472,377473,377474,377493,377494,377495,377496,377517,377526,377527,377528,377547,377548,377549,377550,377551,377552,377553,377554,377555,377556,377557,377558,377559,377560,377561,377562,377563,377564,377571,377581,377602,377603,377604,377605,377606,377607,377608,377609,377610,377611,377612,377613,377614,377615,377616,377617,377618,377619,377626,377636,377657,377658,377659,377660,377661,377662,377663,377664,377665,377666,377667,377668,377669,377670,377671,377672,377673,377674,377681,377688,377689,377690,377711,377712,377713,377714,377715,377716,377717,377718,377719,377720,377721,377722,377735,377742,377744,377751,377752,377753,377774,377775,377776,377777,377778,377779,377780,377781,377782,377783,377784,377785,377798,377804,377806,377814,377815,377816,377837,377838,377839,377840,377861,378213,378215,378223,378224,378225,378246,378247,378248,378249,378250,378251,378252,378253,378254,378255,378256,378257,378258,378259,378270,378276,378300,378301,378302,378303,378324,378331,378332,378333,378354,378355,378356,378357,378358,378359,378360,378361,378362,378363,378378,378385,378386,378387,378408,378409,378410,378411,378412,378413,378414,378415,378416,378417,378432,378439,378441,378448,378449,378450,378471,378472,378473,378474,378475,378476,378477,378478,378479,378480,378495,378502,378503,378504,378525,378526,378527,378528,378529,378530,378531,378532,378533,378534,378549,378556,378557,378558,378579,378580,378581,378582,378583,378584,378603,378610,378611,378612,378633,378634,378635,378636,378637,378638,378639,378640,378641,378642,378643,378644,378657,378664,378665,378666,378687,378688,378689,378690,378691,378692,378693,378694,378695,378696,378697,378698,378711,378748,378769,378770,378771,378772,378773,378774,378775,378776,378777,378778,378779,378780,378781,378782,378783,378784,378793,378801,378802,378803,378824,378825,378826,378827,378828,378829,378830,378831,378832,378833,378834,378835,378848,378857,378878,378879,378880,378881,378882,378883,378884,378885,378886,378887,378888,378889,378890,378891,378892,378893,378902,378910,378912,378919,378921,378928,378930,378937,378939,378946,378948,380277,380280,380281,380285,380286,380318,383022,383064,383076,383085,386755,386763,386766,387393,387397,387398,387437,387439,387696,387700,387726,387727,387869,387870,388432,388436,388443,388444,388819,388826,388834,388835,388878,388879,388907,388913,388937,388939,389065,389067,389279,389292,389294,389295,389871,389880,389925,389928,389951,389952,390166,390167,390797,390801,390804,390805,390819,390820,390917,390919,390933,390934,390950,390953,391113,391114,391183,391185,391324,391327,391531,391532,391710,391712,391897,391898,392035,392036,392244,392248,392282,392283,392422,392423,392512,392524,392534,392535,392641,392642,392646,392649,392804,392805,392847,392849,392851,392852,392998,393004,393034,393035,393101,393103,393205,393206,393215,393216,393217,393726,394658,394665,394667,394672,394673,394677,398181,398189,398212,398213,398216,398217,398218,398219,398223,398225,398229,398230,398240,398241,406203,406215,406216,406217,406218,406221,406261,406264,406323,406324,406325,406326,406330,406331,406332,406334,406339,406349,406350,406355,406362,406364,406816,406817,406820,406821,407095,407096,407098,407099,407466,407468,407658,407659,407661,407662,407986,407988,407989,407990,408196,408205,408560,408578,408582,408583,408637,408639,408651,408654,408657,408658,408664,408665,408732,408733,408761,408763,408792,408795,408872,408879,408957,408959,409035,409048,409139,409144,411337,411340,411376,411381,411665,411666,411685,411689,411734,411736,411832,411836,412633,412641,412686,412687,412811,412813,412983,412986,413108,413109,413264,413268,413337,413338,413558,413561,413606,413607,413726,413727,413807,413810,414583,414584,414590,414594,414623,425984,425985,458752,458753,491520,491521,524288,524289,557056,557057,589824,589825,622592,622593,655360,655361,688128,688129,720896,720897,753664,753665,754174,754175,766365,780230,780231,780232,780239,786384

Proper version 3 (From original dat ROM)

3
439792
0
0
new 84,0,32770,32961,32963,33471,65535,65536,65538,66046,98303,98304,98306,98497,98499,99007,131071,131072,131074,131582,163839,163840,163842,164033,164035,164543,196607,196608,196610,197118,229375,229376,229378,229569,229571,230079,262143,262144,262146,262654,294911,294912,294914,295105,295107,295615,327679,327680,327682,328190,360447,360448,360450,360958,393215,393216,393218,393726,414623,425984,425986,458752,458754,491520,491522,524288,524290,557056,557058,589824,589826,622592,622594,655360,655362,688128,688130,720896,720898,753664,753666,754174,780230,780231,786384
zero 104,32770,32961,32963,33471,65535,65536,65538,66046,98303,98304,98306,98497,98499,99007,131071,131072,131074,131582,163839,163840,163842,164033,164035,164543,196607,196608,196610,197118,229375,229376,229378,229569,229571,230079,262143,262144,262146,262654,294911,294912,294914,295105,295107,295615,327679,327680,327682,328190,360447,360448,360450,360958,393215,393216,393218,393726,414623,415135,425472,425984,425986,426498,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524802,556544,557056,557058,557570,589312,589824,589826,590338,622080,622592,622594,623106,654848,655360,655362,655874,687616,688128,688130,688642,720384,720896,720898,721410,753152,753664,753666,754174,780230,780231
erase 22,415135,425472,426498,458240,459266,491008,492034,523776,524802,556544,557570,589312,590338,622080,623106,654848,655874,687616,688642,720384,721410,753152

Versions should be:

# - version 1: android-5.0.0_r1
# - version 2: android-5.1.0_r1
# - version 3: android-6.0.0_r1