高通平台添加新的分区

diff --git a/device/qcom/msm8909/BoardConfig.mk b/device/qcom/msm8909/BoardConfig.mk
index fe11e06..1ca7871 100755
--- a/device/qcom/msm8909/BoardConfig.mk
+++ b/device/qcom/msm8909/BoardConfig.mk
@@ -114,6 +114,12 @@ BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
 BOARD_OEMIMAGE_PARTITION_SIZE := 268435456
 BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
 
+#<!--jicong.wang modify for task 14456
+BOARD_UPDATEIMAGE_PARTITION_SIZE := 62914560
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 5241814016
+BOARD_USERDATAIMAGE_16G_PARTITION_SIZE := 13057899520
+BOARD_USERDATAIMAGE_32G_PARTITION_SIZE := 25223994368
+#jicong.wang modify for task 14456 -->
 
 # Add NON-HLOS files for ota upgrade
 ADD_RADIO_FILES ?= true
diff --git a/device/qcom/msm8909/fstab.qcom b/device/qcom/msm8909/fstab.qcom
index f1b9480..8bb127b 100755
--- a/device/qcom/msm8909/fstab.qcom
+++ b/device/qcom/msm8909/fstab.qcom
@@ -12,3 +12,6 @@
 /dev/block/bootdevice/by-name/config*         /frp  emmc  defaults defaults,encryptable=footer
 /devices/platform/msm_hsusb_host/usb1/1-1/*          /storage/usbotg    vfat    nosuid,nodev         wait,voldmanaged=usbotg:auto,noemulatedsd
 /dev/block/bootdevice/by-name/misc      /misc             emmc    defaults                                            defaults
+#<!--jicong.wang modify for task 14456
+/dev/block/bootdevice/by-name/update    /update    ext4     defaults   defaults
+#jicong.wang modify for task 14456 -->
diff --git a/device/qcom/msm8909/init.target.rc b/device/qcom/msm8909/init.target.rc
index 1c63cdd..fe02ba4 100755
--- a/device/qcom/msm8909/init.target.rc
+++ b/device/qcom/msm8909/init.target.rc
@@ -60,6 +60,11 @@ on fs
 
     wait /dev/block/bootdevice/by-name/oem
     mount ext4 /dev/block/bootdevice/by-name/oem /oem ro nosuid nodev barrier=1
+    #<!--jicong.wang modify for task 14456
+    chown root root /update
+    chmod 0777 /update
+    restorecon_recursive /update
+    #jicong.wang modify for task 14456-->
 
 on post-fs-data
     mkdir /data/tombstones 0771 system system
diff --git a/device/qcom/msm8909/msm8909.mk b/device/qcom/msm8909/msm8909.mk
index d9087ec..4abec73 100755
--- a/device/qcom/msm8909/msm8909.mk
+++ b/device/qcom/msm8909/msm8909.mk
@@ -146,3 +146,6 @@ endif
 #bugadd by zhaoyanjiao@20180816 for support update the mbn
 PRODUCT_PROPERTY_OVERRIDES += persist.radio.start_ota_daemon=1
 PROJECT_MBN := 8909
+#<!--jicong.wang modify for task 14456
+PRODUCT_COPY_FILES += device/qcom/msm8909/update.img:$(PRODUCT_OUT)/update.img
+#jicong.wang modify for 14456 -->
\ No newline at end of file
diff --git a/device/qcom/msm8909/recovery.fstab b/device/qcom/msm8909/recovery.fstab
index 0df77b4..071a7f3 100755
--- a/device/qcom/msm8909/recovery.fstab
+++ b/device/qcom/msm8909/recovery.fstab
@@ -34,3 +34,6 @@
 /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
+#<!--jicong.wang modify for task 14456
+/dev/block/bootdevice/by-name/update    /update    ext4     defaults   defaults
+#jicong.wang modify for task 14456 -->
diff --git a/device/qcom/msm8909/update.img b/device/qcom/msm8909/update.img
new file mode 100755
index 0000000..3767fc7
Binary files /dev/null and b/device/qcom/msm8909/update.img differ
diff --git a/device/qcom/sepolicy/common/adbd.te b/device/qcom/sepolicy/common/adbd.te
old mode 100644
new mode 100755
index de3beee..b6e18f9
--- a/device/qcom/sepolicy/common/adbd.te
+++ b/device/qcom/sepolicy/common/adbd.te
@@ -6,3 +6,8 @@ r_dir_file(adbd, RIDL_data_file)
 # allow read access for adb
 r_dir_file(adbd, qti_logkit_priv_data_file)
 r_dir_file(adbd, qti_logkit_pub_data_file)
+#<!--jicong.wang modify for task 14456
+allow adbd update_data_file:dir { search open read write add_name create getattr setattr };
+allow adbd update_data_file:file { open read create write getattr setattr};
+#jicong.wang modify for task 14456 -->
+
diff --git a/device/qcom/sepolicy/common/device.te b/device/qcom/sepolicy/common/device.te
old mode 100644
new mode 100755
index 2217974..f06a2b4
--- a/device/qcom/sepolicy/common/device.te
+++ b/device/qcom/sepolicy/common/device.te
@@ -141,3 +141,4 @@ type at_device, dev_type;
 
 #define Bluetooth device
 type bt_device, dev_type;
+type update_block_device,dev_type;
diff --git a/device/qcom/sepolicy/common/file.te b/device/qcom/sepolicy/common/file.te
old mode 100644
new mode 100755
index 997d025..cead5fc
--- a/device/qcom/sepolicy/common/file.te
+++ b/device/qcom/sepolicy/common/file.te
@@ -207,3 +207,6 @@ type sysfs_kgsl, sysfs_type, fs_type;
 
 # secure touch files
 type sysfs_securetouch, fs_type, sysfs_type;
+#<!--jicong.wang modify for task 14456
+type update_data_file, file_type;
+#jicong.wang modify for task 14456 -->
diff --git a/device/qcom/sepolicy/common/file_contexts b/device/qcom/sepolicy/common/file_contexts
old mode 100644
new mode 100755
index d0b6283..8ab306c
--- a/device/qcom/sepolicy/common/file_contexts
+++ b/device/qcom/sepolicy/common/file_contexts
@@ -380,3 +380,7 @@
 # cache files
 #
 /cache/FTM_AP(/.*)?                                                  u:object_r:mmi_data_file:s0
+#<!--jicong.wang modify for task 14456
+/update(/.*)?        u:object_r:update_data_file:s0
+#jicong.wang modify for task 14456 -->
+
diff --git a/device/qcom/sepolicy/common/init.te b/device/qcom/sepolicy/common/init.te
old mode 100644
new mode 100755
index 772e5fe..c952bb2
--- a/device/qcom/sepolicy/common/init.te
+++ b/device/qcom/sepolicy/common/init.te
@@ -34,3 +34,7 @@ allow init bt_firmware_file:dir { mounton };
 
 #dontaudit non configfs usb denials
 dontaudit init sysfs:dir write;
+#<!--jicong.wang modify for task 14456
+allow init update_block_device:blk_file rw_file_perms;
+allow init update_block_device:blk_file relabelto;
+#jicong.wang modify for task 14456 -->
diff --git a/device/qcom/sepolicy/common/platform_app.te b/device/qcom/sepolicy/common/platform_app.te
old mode 100644
new mode 100755
index 0dd94dd..354b22a
--- a/device/qcom/sepolicy/common/platform_app.te
+++ b/device/qcom/sepolicy/common/platform_app.te
@@ -30,3 +30,7 @@ allow platform_app gba_auth_service:service_manager find;
 
 # Allow dpmservice to be found
 allow platform_app dpmservice:service_manager find;
+#<!--jicong.wang modify for task 14456
+allow platform_app update_data_file:dir { search open read write add_name create getattr setattr };
+allow platform_app update_data_file:file { open read create write getattr setattr};
+#jicong.wang modify for task 14456 -->
diff --git a/device/qcom/sepolicy/common/recovery.te b/device/qcom/sepolicy/common/recovery.te
old mode 100644
new mode 100755
index c5b2c0e..be82039
--- a/device/qcom/sepolicy/common/recovery.te
+++ b/device/qcom/sepolicy/common/recovery.te
@@ -23,4 +23,7 @@ recovery_only(`
     set_prop(recovery, ffs_prop);
     get_prop(recovery, sys_usb_controller_prop);
     get_prop(recovery, boot_mode_prop);
+    #<!--jicong.wang modify for task 14456
+    allow recovery update_block_device:blk_file *;
+    #jicong.wang modify for task 14456-->
 ')
diff --git a/device/qcom/sepolicy/common/shell.te b/device/qcom/sepolicy/common/shell.te
old mode 100644
new mode 100755
index fadb39b..b696068
--- a/device/qcom/sepolicy/common/shell.te
+++ b/device/qcom/sepolicy/common/shell.te
@@ -34,3 +34,9 @@ r_dir_file(shell, RIDL_data_file)
 # allow read access for shell
 r_dir_file(shell, qti_logkit_priv_data_file)
 r_dir_file(shell, qti_logkit_pub_data_file)
+#<!--jicong.wang modify for task 14456
+r_dir_file(shell, update_data_file)
+allow shell update_data_file:dir { search open read write add_name create getattr setattr };
+allow shell update_data_file:file { open read create write getattr setattr};
+#jicong.wang modify for task 14456-->
+
diff --git a/device/qcom/sepolicy/common/system_app.te b/device/qcom/sepolicy/common/system_app.te
old mode 100644
new mode 100755
index 2e5c540..14350c9
--- a/device/qcom/sepolicy/common/system_app.te
+++ b/device/qcom/sepolicy/common/system_app.te
@@ -197,3 +197,9 @@ unix_socket_connect(system_app, ims, ims)
 
 # access to qseeproxy domain
 allow system_app qseeproxy:unix_dgram_socket sendto;
+#<!--jicong.wang modify for task 14456
+allow system_app update_data_file:dir { search open read write add_name create getattr setattr };
+allow system_app update_data_file:file { open read create write getattr setattr};
+#jicong.wang modify for task 14456 -->
+
+
diff --git a/device/qcom/sepolicy/common/system_server.te b/device/qcom/sepolicy/common/system_server.te
old mode 100644
new mode 100755
index 5757820..c8f14e2
--- a/device/qcom/sepolicy/common/system_server.te
+++ b/device/qcom/sepolicy/common/system_server.te
@@ -162,3 +162,7 @@ allow system_server persist_alarm_file:file { rw_file_perms create };
 userdebug_or_eng(`
   diag_use(system_server)
 ')
+#<!--jicong.wang modify for task 14456
+allow system_server update_data_file:dir { search open read write add_name create getattr setattr };
+allow system_server update_data_file:file { open read create write getattr setattr};
+#jicong.wang modify for task 14456 -->
diff --git a/device/qcom/sepolicy/common/vold.te b/device/qcom/sepolicy/common/vold.te
index 48411eb..e9253c3 100755
--- a/device/qcom/sepolicy/common/vold.te
+++ b/device/qcom/sepolicy/common/vold.te
@@ -10,3 +10,10 @@ allow vold cache_recovery_file:file create_file_perms;
 allow vold { proc_sysrq proc_dirty_ratio }:file rw_file_perms;
 wakelock_use(vold)
 allow vold swap_block_device:blk_file r_file_perms;
+#<!--jicong.wang modify for task 14456
+allow vold update_data_file:dir r_dir_perms;
+allow vold update_block_device:blk_file rw_file_perms;
+allow vold update_block_device:blk_file create_file_perms;
+allow vold update_data_file:dir { read getattr open ioctl };
+#jicong.wang modify for task 14456 -->
+
diff --git a/device/qcom/sepolicy/msm8909/file_contexts b/device/qcom/sepolicy/msm8909/file_contexts
old mode 100644
new mode 100755
index 1953010..5a654c9
--- a/device/qcom/sepolicy/msm8909/file_contexts
+++ b/device/qcom/sepolicy/msm8909/file_contexts
@@ -56,3 +56,6 @@
 /dev/block/platform/soc/7824900.sdhci/by-name/cache                 u:object_r:cache_block_device:s0
 /dev/block/platform/soc/7824900.sdhci/by-name/boot                  u:object_r:boot_block_device:s0
 /dev/block/platform/soc/7824900.sdhci/by-name/system                u:object_r:system_block_device:s0
+#<!--jicong.wang modify for task 14456
+/dev/block/bootdevice/by-name/update                               u:object_r:update_block_device:s0
+#jicong.wang modify for task 14456 -->
diff --git a/system/core/rootdir/Android.mk b/system/core/rootdir/Android.mk
old mode 100644
new mode 100755
index 7d0c87d..e03d892
--- a/system/core/rootdir/Android.mk
+++ b/system/core/rootdir/Android.mk
@@ -126,6 +126,11 @@ LOCAL_POST_INSTALL_CMD := mkdir -p $(addprefix $(TARGET_ROOT_OUT)/, \
     ln -sf /data/user_de/0/com.android.shell/files/bugreports $(TARGET_ROOT_OUT)/bugreports; \
     ln -sf /sys/kernel/debug $(TARGET_ROOT_OUT)/d; \
     ln -sf /storage/self/primary $(TARGET_ROOT_OUT)/sdcard
+
+#<!--jicong.wang modify for task 14456
+LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/update
+#jicong.wang modify for task 14456 -->
+
 ifdef BOARD_USES_VENDORIMAGE
   LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_ROOT_OUT)/vendor
 else

上面upate.img 生成步骤

~/code/LA.BR.1.2.9/out/host/linux-x86/bin $ ./make_ext4fs -s -l 60M -a update update.img
Creating filesystem with parameters:
    Size: 62914560
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 3840
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 15360
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/3840 inodes and 1278/15360 blocks


~/code/LA.BR.1.2.9/out/host/linux-x86/bin $ ./simg2img update.img update_ext4.img
~/code/LA.BR.1.2.9/out/host/linux-x86/bin $ ls -l update_ext4.img 
-rw-rw-r-- 1 sijingjing sijingjing 62914560 Oct 21 10:26 update_ext4.img
~/code/LA.BR.1.2.9/out/host/linux-x86/bin $ file update_ext4.img 
update_ext4.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
~/code/LA.BR.1.2.9/out/host/linux-x86/bin $ 

需要将生成的update_ext4.img 替换update.img

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值