• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

config/25-Apr-2025-13570

include/microdroid/25-Apr-2025-3411

metadata/25-Apr-2025-6739

src/com/android/virt/25-Apr-2025-5040

Android.bpD25-Apr-2025987 5045

README.mdD25-Apr-20251.4 KiB4125

metadata.ccD25-Apr-20252.3 KiB7442

metadata.protoD25-Apr-20251.9 KiB8264

README.md

1# Microdroid Payload
2
3Payload disk is a composite disk image referencing host APEXes and an APK so that microdroid
4mounts/activates APK/APEXes and executes a binary within the APK.
5
6Payload disk is created by [VirtualizationService](../../android/virtualizationservice) Service when
7starting a VM.
8
9## Partitions
10
11Payload disk has 1 + N(number of APEX/APK payloads) partitions.
12
13The first partition is a "payload-metadata" partition which describes other partitions.
14And APEXes and an APK are following as separate partitions.
15
16For now, the order of partitions are important.
17
18* partition 1: Metadata partition
19* partition 2 ~ n: APEX payloads
20* partition n+1, n+2: APK payload and its idsig
21
22It's subject to change in the future, though.
23
24### Metadata partition
25
26Metadata partition provides description of the other partitions and the location for VM payload
27configuration.
28
29The partition is a protobuf message prefixed with the size of the message.
30
31| offset | size | description                                          |
32| ------ | ---- | ---------------------------------------------------- |
33| 0      | 4    | Header. unsigned int32: body length(L) in big endian |
34| 4      | L    | Body. A protobuf message. [schema](metadata.proto)   |
35
36### Payload partitions
37
38Each payload partition presents APEX or APK passed from the host.
39
40The size of a payload partition must be a multiple of 4096 bytes.
41