admin / 23.08.2018
Содержание
Typical Android system implementing fastboot (this includes FirefoxOS devices) uses so called images to run the kernel. It consist of the kernel itself and a ramdisk that it used to populate root () filesystem. Because it’s often useful to edit this filesystem (especially to modify file), let’s look how we can manipulate this image. I already briefly described how this can be done as part of my older post but now I’m going to describe more advanced and standalone (you don’t need Android sources for it) tool.
I assume that you have an image dump and it’s filename is . You can dump it using commands like:
You can read my older post to see how this can be done on Alcatel One Touch Fire.
To do just about anything useful, you need proper tools. In this case, the tool is called . It’s quite easy to install:
This will create executable which can be used right away (you don’t have to copy it anywhere).
In order to extract , use option followed with a path to the file. This will create few files in the current directory:
is a ramdisk file. It should be gzipped cpio file. To uncompress it, use following command:
Then edit the files you want, most probably . To recreate ramdisk image, use:
You may create new boot image using option. You have to specify config file ( option), kernel image ( option), and ramdisk image ( option):
If you extracted existing file, the config file was created for you. I explain this file later.
You may also change in place, using option combined with to change kernel image, to change ramdisk image, to change config file or to change specific config option only. For example to only change ramdisk and set config option, you could use:
Now you can boot this image with command or flash it using .
You can get some basic information from the image without extracting it with option:
Most of this information is stored in a file and it’s used when recreating the image file. In some cases, you may want to change them. Here’s its example content:
— size of the boot image; should be multiple of . It can never be smaller than the actual produced image file otherwise system won’t boot. You can remove this line and will calculate it for you. Of course, this can’t be bigger than your boot partition on the device.
— it’s the size of a NAND page. You probably don’t want to change that.
, , , — specifies where in memory should each image be put by when flashing the image. You may want to change this if you want to change kernel in your image.
Note that those addresses are only used when you flash the image ( command), if you boot it () they will be calculated like this (typical address is 0x10000000, it can be changed by parameter):
I believe that the address should be the same as in your kernel config.
is not used by bootloader but it can be displayed with option so you may want to use it to specify the purpose of each image, for example.
contains command line passed to the kernel.
The utility is another one of the tools I’m including in my book, this time to accompany the chapter about the Boot process.
I deal a lot with the internal format of images there, and realized I needed a quick extractor. This became more important when I started to deal with the L preview, and Google Glass system images I used for research.
You can get the tool right here. Just unpack the tar. There’s a Mac OS X and Linux ELF32/64 binary, and the source. As usual, you might want to check out the RSS feed, or follow my company’s Twitter for more updates.
Well, most users wouldn’t. But if you need a quick tool to unpack Android images, this is useful. Think of it as the inverse of mkbootimg (from the AOSP), coupled with simg2img (the sparse image extractor). Another bonus feature it provides is unpacking the Linux bzimage kernels.
Another reason — If you’re downloading a rooting tool — and you want to avoid getting malware. I just downloaded An NVIDIA Shield root image, for example — which is really nothing more than a bootimg. So it was trivial to run this tool to extract it — specifically, get to the ramdisk, then and make sure I can have a peek at it before installing.
Like So:
To obtain an Android system image, you can either get it from a zip (e.g. Google’s update, Amazon’s update.bin, etc), or by ‘ing for a device, then copying it over. Note that some devices (e.g. the HTC One M8) may need a bit of processing, in this case stripping the 256 header HBoot uses:
If you’re using the Google images, it’s easier:
You can also use it to extract the filesystem image (basically, do what does:
Lastly, you can use it for imgdata extraction as well (as the file format there is derived from that of the boot image:
The book has a TON of detail about the format of the boot images, as well as customizing the boot process by tinkering with the boot loader, system.img, and what not. The book has been out for a while, and you can get it on this very site, or on Amazon.
Volume II — covering the deep internals of the frameworks and the runtime — will be out around the time N goes final. In the interim, I encourage you to try out the tool (as well as the even more powerful Dextra, and the simple but useful bindump) and, of course — JTrace. Shoot me an email (to j@) if you’ve any questions. Or comments. Or in general. All are welcome.
Образ диска IMG широко использовался в Mac OS 9 и более ранних версиях операционной системы. В Mac OS X данный формат был заменен файлом .DMG.
Как, чем открыть файл .img?
MagicISO
Формат файла .img #2
Описание файла .img на русскомФайл данных образа диска CloneCD
Описание файла .img на английскомCloneCD Disk Image Data File
Тип файлаОбразы дисков
Подробное описаниеОбраз диска IMG содержит копию данных компакт-диска, выполненную с помощью программы CloneCD.
При прожиге нового диска с образа, данный файл должен находится в одной папке с соответсвующими файлами .CCD и .SUB.
Как, чем открыть файл .img?
SlySoft CloneCD
IsoBuster
EZB Systems UltraISO
Boot.img содержит ядро и ramdisk, критические файлы, необходимые для загрузки устройства, прежде чем монтировать файловую систему. Вы должны сами создать boot.img, используя mkbootimg, инструмент, предоставляемый AOSP.
Все необходимые данные доступны в этой ветке xda-developers.
Этот дискуссионный поток google также может быть полезен
Как Сделать Прошивку в Формате Img
http://tav.dukeb.ru/%D0%9A%D0%B0%D0%BA%20%D0%A1%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C%20%D0%9F%D1%80%D0%BE%D1%88%D0%B8%D0%B2%D0%BA%D1%83%20%D0%B2%20%D0%A4%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B5%20Img App Store для iPhone перешедших вПодписка на рассылку “как сделать прошивку в формате img”.
В процессе прошивки вы увидите множество сменяющихся образов в формате img, дольше всего найти на сайте поддержки устройства. Подписка на рассылку “как сделать прошивку в формате img”. Рассылка выходит раз в сутки и содержит список программ из App Store для iPhone перешедших. Прошивки в формате. Полный образ диска дополняется файлами SUB и CCD с такими же именами, находящимися в той же папке. Как сделать прошивку в формате. Как сделать прошивку в zip на android из img Android Club. Подробное как сделать файл img для прошивки андроид описаниеобраз диска img содержит копию данных компакт-диска, выполненную с помощью. В общем мне нужно сделать прошивку для Android в update. Чем распаковать формат. Img? Прошивка Как получить tar-файл для прошивки через ODIN создание. MD5? MD5 файлы, но далеко не все обновления представлены в таком виде например CWM RECOVERY, выкладываются в формате NAME.
Все прошивки для планшетов на процессоре Allwinner имеют один и тот же формат img IMAGEWTY. После долгих поисков я все-таки нашел программу, которая позволяет разобрать и собрать прошивку для планшетов на базе Allwinner. Подписка на рассылку “как сделать прошивку в формате img”. Рассылка выходит раз в сутки и содержит список программ из App Store для iPhone перешедших в категорию бесплатные за последние 24 часа. Подписка на рассылку “как сделать прошивку в формате img”. Как Сделать Прошивку в Формате Img
FILED UNDER : IT