Removing dependencies on /system
The dependencies to the Android /system
folder include two parts:
- All kernel modules for device drivers are located at:
$OUT/system/lib/modules/4.x.x-android-x86
. - We need to run some basic Linux commands during the recovery boot process. For example, we do hardware initialization using the following command:
on init exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
Let's work on the preceding two points one by one in the following sections.
Hardware initialization in recovery
To load the minimum device drivers needed by recovery, we have to change the execution of the shell script for Android system start. This is a customization process from general to specific, which is different from the goal of the Android-x86 project. In the Android-x86 project, all possible device drivers are available, while we should only include the drivers needed by recovery for VirtualBox here. As we can see when we introduce a two stages boot, all possible device drivers...