Книга: Beginning Android

Creating a Card Image

Creating a Card Image

Rather than require emulators to somehow have access to an actual SD card reader and use actual SD cards, Android is set up to use card images. An image is simply a file that the emulator will treat as if it were an SD card volume. If you are used to disk images used with virtualization tools (e.g., VirtualBox), the concept is the same: Android uses a disk image representing the SD card contents.

To create such an image, use the mksdcard utility, provided in the tools/ directory of your SDK installation. This takes two main parameters:

1. The size of the image, and hence the size of the resulting “card.” If you just supply a number, it is interpreted as a size in bytes. Alternatively, you can append K or M to the number to indicate a size in kilobytes or megabytes, respectively.

2. The filename under which to store the image.

For example, to create a 1GB SD card image, to simulate the G1’s SD card in the emulator, you could run:

mksdcard 1024M sdcard.img

Оглавление книги

Оглавление статьи/книги

Генерация: 0.032. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз