* Needed because stock does not use dynamic partitions so there's no existing metadata that could be used Change-Id: Icbc828389465f3d4681ca8e4c3adec782540752e
20 lines
399 B
Bash
20 lines
399 B
Bash
#!/system/bin/sh
|
|
#
|
|
# Copyright (C) 2021 The LineageOS Project
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
SUPER="/dev/block/by-name/system"
|
|
|
|
mkdir /tmp/super-mnt
|
|
|
|
mount $SUPER /tmp/super-mnt 2>/dev/null
|
|
|
|
if [ "$?" = "0" ]; then
|
|
echo "Detected stock /system in super partition, flashing super_dummy.img!"
|
|
umount /tmp/super-mnt
|
|
dd if=/tmp/super_dummy.img of=$SUPER
|
|
fi
|
|
|
|
rmdir /tmp/super-mnt
|