Sunday, May 29, 2016

[Q] How to merge various system_*.img files?

Hello.

I have a Lenovo Vibe K5 (A6020L36 model), and as many people, I want root and, if possible, a custom recovery and custom ROM.

So, the first step was find and download a stock ROM and flashing program, this is already done. But the ROM comes with several "system.img" files (system_1.img, system_2.img, and so on until system_39.img), some of them have several megabytes in size, and others have only 8kb. I need to merge them to get one system.img to edit, but all process I tried failed.

First, I tried the command "copy /b system_1.img+system_2.img+etc", and get a system.img about 2Gb in size, but the file is somehow corrupt:
  • When I extract it with unyaffs, I only get the "app" and "lost+found" folders;
  • When I navigate the remaining folders with EXT2 Explorer, I can see the remaining folders, but they are empty;
  • When I try to open with EXT4 Unpacker, it gives an error about 'list index out of bounds';
  • The same happens if I use the command but ignoring the 8kb files.

When I open only system_1.img in EXT4 Unpacker, it comes with same error. With EXT2 Explorer, I again can see all the folders, but except for 'app' folder, all others are empty. The others system files appears blank in both programs.

Then, I tried to use this tool, but it gives the same error at post #8 (tried with Win10 64bits and Win7 32bits, both as administrator).

The stock recovery don't have an option to make a backup, then I tried to launch a TWRP recovery made by another user, but gives an error 'dtb not found'.

Tried also the adb 'dd' command, wich comes with a 'permission denied' error, because don't have root. The flashing programs (QFIL and others Qualcomm programs) appears to don't have a backup option for system partition, only for nvram stuff.

I stucked now, I can't find a way to generate a single and valid system.img. Any ideas to get it? Attached are some usefull files to look at, I think. I also have the stock boot.img and recovery.img.

Any help will be appreciated. Thanks in advice.

Attached Files
File Type: xml patch0.xml - [Click for QR Code] (6.1 KB)
File Type: xml rawprogram0.xml - [Click for QR Code] (33.4 KB)


from xda-developers http://ift.tt/1TNU0Jv
via IFTTT

No comments:

Post a Comment