If you want your applications installed on first boot after recovery, you need to have them in the userdata image.
So first thing is to prepare a userdata.img
file that has the apps you want to be installed on first boot in the correspondence of /data/app/
which should be just app/
in the userdata structure, as the DATA
partition is mounted on /data
So the procedure should be:
- restore your device to factory with recovery;
- enter bootloader fastboot mode;
- wipe your data partition;
- program your custom
userdata.img
;
- reboot, the device should automatically install the apks in your userdata image