Is the firmware really stored in another eMMC than the Android firmware?
No. Baseband firmware, kernel and userspace Android are all stored on the same eMMC (there might be some exception but I don't know of). Some SoCs have boot area partitions which are somewhat isolated at hardware level (usually used for bootloaders) but technically those are also on the same eMMC. So are Replay Protected Memory Block (RPMB) partitions.
How does Android interact with the baseband firmware?
Your understanding is correct that Communication / Baseband Processors (CP/BP or modem) are completely isolated from Application Processor (AP, which runs Android OS) and they run their own RTOS. Communication between AP and BP can be through multiple possible channels but mostly those are proprietary just like BPs themselves (not sure why: if giants like Qualcomm are keeping backdoors, or hiding their security vulnerabilities, or don't want to put users' privacy at stake). On Qualcomm devices, for instance, its in-kernel implementation is called Shared Memory Device/Driver (SMD).
BP also includes a Digital Signal Processor (DSP) which is used for multimedia processing. Both Modem and DSP have their mountable partitions on eMMC (at least on Qualcomm devices) which they access through kernel using RPC mechanism. This old document states:
"No new hardware is required. An eMMC card will have 2 partitions reserved for modem storage.
...
All the modem requests will be handled by a user space program and the remote storage RPC client will provide an interface to the user application to receive the requests from modem and also to send the status of requests to modem."
In-kernel implementation includes just an RPC client, while a closed source userspace daemon (Remote Storage) handles the actual communication with the modem. Though privacy advocates have issues with this approach. Since the kernel interfaces of SMD or other communication drivers are not documented, only the closed source binary blobs (HALs, provided by SoC vendors) in userspace can communicate with them (e.g. rmt_storage
uses Userspace I/O API), while Android framework communicates with the HALs. Reference implementations of HALs are part of AOSP.
Is it only mounted for modem firmware update?
No. MODEM is usually first partition on eMMC with FAT filesystem, while DSP has EXT4. Both have entries in fstab
and are mounted on every boot. rmt_storage
also provides BP access to IMEI which is stored on signed partitions like EFS, MODEMST1, MODEMST2, FSG, FSC along with modem firmware files. All of these partitions have no filesystems but are binary blobs written to raw partitions. So they aren't mounted. All or some of these partitions may get OTA firmware updates from OEM/SoC vendors.
Like rmt_storage
, Radio Interface Layer Daemon (rild
) is another HAL from vendor which facilitates communication between Android's telephony stack and modem's LTE/3G/2G interface through kernel using control and data transfer protocols like RMNET, QMI etc. Other isolated components including RPM, GPS, Modem Diagnostic Mode and TEE (not sure about SE) also communicate with AP using similar communication channels in kernel (which also include UART) and their respective HALs in userspace. RPM (Resource and Power Management) and TEE (Qualcomm's TtustZone) have also their partitions on eMMC, both contain ELF executable binaries.
RESOURCES: