fix update_engine_sideload
authorwuxianlin <wuxianlinwxl@gmail.com>
Fri, 25 May 2018 08:54:52 +0000 (16:54 +0800)
committerwuxianlin <wuxianlinwxl@gmail.com>
Fri, 25 May 2018 14:57:45 +0000 (22:57 +0800)
BoardConfig.mk
recovery.fstab
recovery/root/etc/twrp.fstab [new file with mode: 0644]
recovery/root/etc/update_engine/update-payload-key.pub.pem [new file with mode: 0644]
recovery/root/init.recovery.qcom.rc

index 3d530f6347ce63af40f8f72ea94743b35e759e57..e74630e75409901df99fac76b5da4933b910c2ee 100644 (file)
@@ -93,6 +93,7 @@ TW_EXCLUDE_SUPERSU := true
 TW_EXTRA_LANGUAGES := true
 TW_INCLUDE_NTFS_3G := true
 AB_OTA_UPDATER := true
+BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
 TW_INPUT_BLACKLIST := "hbtp_vm"
 TW_MAX_BRIGHTNESS := 255
 TW_THEME := portrait_hdpi
index 676a144fb00245be674dfbc365ed562d2be5d15f..0f2d3b47d9b04ebc25fc8ac6eb7dcef390e7d2d8 100644 (file)
@@ -1,19 +1,40 @@
-# mount point  fstype  device                                  device2                         flags
-/boot          emmc    /dev/block/bootdevice/by-name/boot                                      flags=slotselect
-/system                ext4    /dev/block/bootdevice/by-name/system                                    flags=slotselect
-/system_image  emmc    /dev/block/bootdevice/by-name/system                                    flags=slotselect
-/vendor                ext4    /dev/block/bootdevice/by-name/vendor                                    flags=slotselect;display="Vendor";backup=1
-/vendor_image  emmc    /dev/block/bootdevice/by-name/vendor                                    flags=slotselect
-/data          ext4    /dev/block/bootdevice/by-name/userdata                                  flags=encryptable=footer
-/firmware      vfat    /dev/block/bootdevice/by-name/modem                                     flags=slotselect;display="Firmware";mounttodecrypt;fsflags=ro
-/misc          emmc    /dev/block/bootdevice/by-name/misc
-/modem         emmc    /dev/block/bootdevice/by-name/modem                                     flags=slotselect;backup=1;display="Modem"
-/bluetooth     emmc    /dev/block/bootdevice/by-name/bluetooth                                 flags=slotselect;backup=1;subpartitionof=/modem
-/dsp           emmc    /dev/block/bootdevice/by-name/dsp                                       flags=slotselect;backup=1;subpartitionof=/modem
-/efs1          emmc    /dev/block/bootdevice/by-name/modemst1                                  flags=backup=1;display=EFS
-/efs2          emmc    /dev/block/bootdevice/by-name/modemst2                                  flags=backup=1;subpartitionof=/efs1
-/efsc          emmc    /dev/block/bootdevice/by-name/fsc                                       flags=backup=1;subpartitionof=/efs1
-/efsg          emmc    /dev/block/bootdevice/by-name/fsg                                       flags=backup=1;subpartitionof=/efs1
+# Copyright (c) 2017, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+#       copyright notice, this list of conditions and the following
+#       disclaimer in the documentation and/or other materials provided
+#       with the distribution.
+#     * Neither the name of The Linux Foundation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-# Removable storage
-/usbstorage      vfat    /dev/block/sdg1                            /dev/block/sdg     flags=fsflags=utf8;display="USB Storage";storage;wipeingui;removable
+# Vendor variant of recovery.fstab. Same as recovery.fstab, with additional vendor entry.
+
+#device         mount point      fstype        [device2] [length=]
+
+/dev/block/bootdevice/by-name/system       /               ext4    ro,barrier=1                                                    wait,slotselect
+/dev/block/bootdevice/by-name/vendor       /vendor         ext4    ro,barrier=1                                                    wait
+/dev/block/bootdevice/by-name/op2        /op2          ext4    noatime,nosuid,nodev,barrier=1,data=ordered                     wait,check
+/dev/block/bootdevice/by-name/userdata     /data           ext4    noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc     wait,check,fileencryption=ice
+/dev/block/bootdevice/by-name/boot         /boot           emmc    defaults                                                        defaults
+/dev/block/bootdevice/by-name/recovery     /recovery       emmc    defaults                                                        defaults
+/dev/block/bootdevice/by-name/misc         /misc           emmc    defaults                                                        defaults
+/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.*.auto*    /storage/usbotg    vfat    nosuid,nodev    wait,voldmanaged=usbotg:auto
+/devices/platform/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.*.auto*    /storage/usbotg    vfat    nosuid,nodev    wait,voldmanaged=usbotg:auto
diff --git a/recovery/root/etc/twrp.fstab b/recovery/root/etc/twrp.fstab
new file mode 100644 (file)
index 0000000..676a144
--- /dev/null
@@ -0,0 +1,19 @@
+# mount point  fstype  device                                  device2                         flags
+/boot          emmc    /dev/block/bootdevice/by-name/boot                                      flags=slotselect
+/system                ext4    /dev/block/bootdevice/by-name/system                                    flags=slotselect
+/system_image  emmc    /dev/block/bootdevice/by-name/system                                    flags=slotselect
+/vendor                ext4    /dev/block/bootdevice/by-name/vendor                                    flags=slotselect;display="Vendor";backup=1
+/vendor_image  emmc    /dev/block/bootdevice/by-name/vendor                                    flags=slotselect
+/data          ext4    /dev/block/bootdevice/by-name/userdata                                  flags=encryptable=footer
+/firmware      vfat    /dev/block/bootdevice/by-name/modem                                     flags=slotselect;display="Firmware";mounttodecrypt;fsflags=ro
+/misc          emmc    /dev/block/bootdevice/by-name/misc
+/modem         emmc    /dev/block/bootdevice/by-name/modem                                     flags=slotselect;backup=1;display="Modem"
+/bluetooth     emmc    /dev/block/bootdevice/by-name/bluetooth                                 flags=slotselect;backup=1;subpartitionof=/modem
+/dsp           emmc    /dev/block/bootdevice/by-name/dsp                                       flags=slotselect;backup=1;subpartitionof=/modem
+/efs1          emmc    /dev/block/bootdevice/by-name/modemst1                                  flags=backup=1;display=EFS
+/efs2          emmc    /dev/block/bootdevice/by-name/modemst2                                  flags=backup=1;subpartitionof=/efs1
+/efsc          emmc    /dev/block/bootdevice/by-name/fsc                                       flags=backup=1;subpartitionof=/efs1
+/efsg          emmc    /dev/block/bootdevice/by-name/fsg                                       flags=backup=1;subpartitionof=/efs1
+
+# Removable storage
+/usbstorage      vfat    /dev/block/sdg1                            /dev/block/sdg     flags=fsflags=utf8;display="USB Storage";storage;wipeingui;removable
diff --git a/recovery/root/etc/update_engine/update-payload-key.pub.pem b/recovery/root/etc/update_engine/update-payload-key.pub.pem
new file mode 100644 (file)
index 0000000..fe13e4a
--- /dev/null
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArI2Vbdgqqu9r6BVa733y
+3tOHzKm7DgBMqn+++Fp40Uw85/RSbLi1INQq1ATPgGRfl7PiNGIALBKmThiZklJo
+p2lGO98AFIa9NP6qU2LVPQKbGddUfqxk/Uba4NAFwg6o/Vz//tT8tEQL/6dLC75G
+s40nkO0WQ3081oxLvuARb06aIu2oUw9FhGXwtTxg2lXE9Xx4f7z0p5D2QtBNrqSE
+KrimVHYlhTaw51Yw5xRX16k7zBkRI2h0DZeEPRpeujFrNHsFq5ydNRc68rIEzz6b
+c3nBIEn8yckOgmcJaPRMw0NP0FKZ9r2+2wSfeTKDItnAI1gaOx64g+TCco9Dn6mu
+wQIDAQAB
+-----END PUBLIC KEY-----
index 9558c906198dce1066c96202e88a0681c600cc5e..74192e46502bcf2b91ebe9a42e45c47d6aa2526c 100644 (file)
@@ -28,6 +28,8 @@
 on fs
     wait /dev/block/platform/soc/${ro.boot.bootdevice}
     symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
+    symlink /dev/block/bootdevice/by-name/oem_stanvbk /dev/block/bootdevice/by-name/oem_stanvbk_a
+    symlink /dev/block/bootdevice/by-name/oem_stanvbk /dev/block/bootdevice/by-name/oem_stanvbk_b
     chmod 0660 /dev/qseecom
     chown system drmrpc /dev/qseecom
     chmod 0664 /dev/ion