Skip to content

Commit b7fdd49

Browse files
committed
Switch to nexus style mode completely v3
This is a 3rd iteration of the patch in which we go completely Nexus. We eliminate external sdcard completely and use it as /data that can be fully encrypted. In addition we perform series of storage layout changes, cleanups and optimizations. Now to the details: * Use original "userdata" parititon as /system (60% more space for GApps and ODEX data). * Use original system partiton as /cache. This also allow much faster boot with encrypted data (dalvik-cache is available on boot for asking user's password). * Reduce size of primary zram swap to 96MB since profiling showed this to be sufficient (20% more RAM). * Use original "cache" partition as secondary swap (to provide backup swap for smaller zram swap). * We create pre-odexed build optimized for "small" devices which should allow the following: - Avoid usage of userdata for DEX data of system apps and data duplication - Avoid encryption of ODEX data of system apps - Allow much faster access from /system partition - Enable ART-small mode which pre-compiles ODEX data for system apps and relocaes to dalvik-cache only bare minimum of clasees * Add misc recovery related settings and coresponding changes to TWRP in order to support above (this device tree can be used for building TWRP image) * Remove duplicated default init.rc code * General cleanups Change-Id: Ieb2b58569fcc20bb2d77def3f205fd009386d7bc
1 parent fd693a0 commit b7fdd49

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

BoardConfig.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ TW_NO_CPU_TEMP := true
192192
TW_NEW_ION_HEAP := true
193193
TW_INCLUDE_NTFS_3G := true
194194
TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
195-
TW_BACKUP_DATA_MEDIA := true
195+
TW_BACKUP_DATA_MEDIA := false
196196

197-
# Dalvik/ART optimizations
197+
# Dalvik/ART
198198
WITH_DEXPREOPT := true
199199
WITH_DEXPREOPT_COMP := false
200200
WITH_DEXPREOPT_PIC := true

device_pyramid.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ $(call inherit-product, device/htc/pyramid/media_a1026.mk)
226226
## htc audio settings
227227
$(call inherit-product, device/htc/pyramid/media_htcaudio.mk)
228228

229+
# setup dalvik vm configs
229230
$(call inherit-product, frameworks/native/build/phone-hdpi-512-dalvik-heap.mk)
230231

231232
# Discard inherited values and use our own instead.

recovery/root/etc/twrp.fstab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
/recovery emmc /dev/block/mmcblk0p21
55
/system ext4 /dev/block/mmcblk0p23
66
/data f2fs /dev/block/mmcblk1 length=-16384
7-
/cache f2fs /dev/block/mmcblk0p24
7+
/cache ext4 /dev/block/mmcblk0p22
88
/misc emmc /dev/block/mmcblk0p31
99
/usbdisk vfat /dev/block/sda1 /dev/block/sda flags=display="usbdisk";storage;wipeingui;removable

rootdir/etc/fstab.pyramid

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
1010
/dev/block/platform/msm_sdcc.1/by-name/devlog /devlog ext4 rw,noatime,nosuid,nodev,barrier=0 wait
1111
/dev/block/platform/msm_sdcc.1/by-name/userdata /system ext4 ro,noatime,barrier=0 wait
12-
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check
13-
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
12+
/dev/block/platform/msm_sdcc.1/by-name/system /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check
13+
/dev/block/platform/msm_sdcc.1/by-name/system /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
1414
/dev/block/platform/msm_sdcc.3/mmcblk1 /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=footer,length=-16384
1515
/dev/block/platform/msm_sdcc.3/mmcblk1 /data f2fs noatime,nodiratime,nosuid,nodev,inline_xattr,discard,rw wait,check,encryptable=footer,length=-16384
1616

1717
# USB storage
1818
/devices/platform/msm_hsusb_host.0/usb1 auto auto defaults voldmanaged=usbdisk:auto,noemulatedsd
1919

2020
# ZRAM
21-
/dev/block/zram0 none swap defaults zramsize=134217728
21+
/dev/block/zram0 none swap defaults zramsize=100663296
2222

2323
# System as secondary swap
24-
/dev/block/platform/msm_sdcc.1/by-name/system none swap defaults defaults
24+
/dev/block/platform/msm_sdcc.1/by-name/cache none swap defaults defaults

system_prop.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
2424
PRODUCT_PROPERTY_OVERRIDES += \
2525
windowsmgr.max_events_per_sec=300 \
2626
pm.sleep_mode=1
27-
# dalvik.vm.dexopt-data-only=1 \
28-
# dalvik.vm.dexopt-flags=m=y \
2927

3028
# Display
3129
PRODUCT_PROPERTY_OVERRIDES += \
@@ -42,7 +40,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
4240
PRODUCT_PROPERTY_OVERRIDES += \
4341
ro.setupwizard.enable_bypass=1 \
4442
ro.com.google.locationfeatures=1
45-
# dalvik.vm.lockprof.threshold=500 \
4643

4744
# USB-OTG
4845
persist.sys.isUsbOtgEnabled=true

0 commit comments

Comments
 (0)