Use GSI-specific init script to detect GSI image.
Now IsGsiRunning() uses "/metadata/gsi/dsu/booted" to detect GSI build.
But this file only exists when GSI is booted via DSU. If we flash the
GSI to the device via fastbootd, the file will not exist. So this method
is not suitable for GSI fastboot flashing scenario.
File "/system/system_ext/etc/init/init.gsi.rc" is the GSI-specific init
script defined in build/make/target/product/gsi/Android.mk. So, add a
separate function IsGsiImage() that uses this file as GSI image marker.
Change-Id: I63072fd93dcf97b9b26b2e3b3cc33e2c49125776
2 files changed