Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Nexus style data layout and allow apps, dalvik-cache and media from external sdcard #21

Open
wants to merge 10 commits into
base: cm-12.1
Choose a base branch
from

Conversation

eugenesan
Copy link

Use internal data as in Nexus devices (sdcard0 is emulated).
External sdcard now called sdcard1 and it's optional second partition can be used for dalvik-cache.
Since sdcard1 is registered as secondary storage built-in asec mechanism can be used to move apps to it.

To summarize, this patch allows user to encrypt device including sdcard0 and place in-sensitive data as
apps, dalvik-cache and media on external sdcard.

@eugenesan eugenesan force-pushed the cm-12.1 branch 6 times, most recently from 2a50ddf to 7f21f3a Compare September 6, 2015 13:31
@eugenesan eugenesan changed the title Enable Nexus style internal data Switch to Nexus style data layout and apps, dalvik-cache and media from external sdcard Sep 6, 2015
@eugenesan eugenesan force-pushed the cm-12.1 branch 2 times, most recently from 5ee4ffb to eea3d9e Compare September 6, 2015 14:07
@eugenesan eugenesan changed the title Switch to Nexus style data layout and apps, dalvik-cache and media from external sdcard Switch to Nexus style data layout and allow apps, dalvik-cache and media from external sdcard Sep 6, 2015
@eugenesan eugenesan force-pushed the cm-12.1 branch 6 times, most recently from 29a2c43 to 32a3347 Compare September 14, 2015 16:27
@eugenesan eugenesan force-pushed the cm-12.1 branch 4 times, most recently from c12a1b2 to 850fa81 Compare September 25, 2015 16:03
@eugenesan eugenesan force-pushed the cm-12.1 branch 4 times, most recently from 5198dc0 to e433cb3 Compare October 1, 2015 19:53
ivanich and others added 5 commits October 2, 2015 11:11
Parts of this commit originated in:
  Add HTC Logging functions to support newer HTC props.
  Richard Ross
  I70d0a6878dddf0f41d96735febda82c93496d8ec
* Can be set in props via sys.io.scheduler
Use Nexus style data layout, allow data components on external sdcard and some optimizations and cleanups

Use internal data as in Nexus devices (sdcard0 is emulated) and external sdcard now called sdcard1.

Optional second partition of external sdcard (data1) can be used to store selected data components such as:
app, data, media and dalvik-cache. To do so, one must create a folder with a name of the component/s on data1.

We register sdcard1 as secondary storage allowing built-in asec mechanism to be used to move apps to it.

Also:
* Add misc recovery related settings and coresponding changes to TWRP in order to support above.
* Modify recovery to backup of emulated internal sdcard and apps in asac container.
* Remove duplicated default init.rc code
* Optimize storage, use cache as secondary swap and reuse devlog as cache

To summarize, this patch allows user to encrypt device including sdcard0,
place selected data components on external sdcard and hopefuly provides better performance.

Change-Id: Ib52086347eb1f8fc9fd11031428f2c49bdda9afb
This is a 2nd 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 DEX data).
* Reduce size of primary zram swap by half (Add more RAM).
* Use original "system" as secondary swap (Provide backup swap for smaller zram swap).
* We create pre-odexed build which should allow the following:
  - Avoid usage of userdata for DEX data of system apps and data duplication
  - Avoid encryption of system DEX data (which is public)
  - Allow much faster access from /system partition
  - Allow much faster boot with encrypted data (when data is encrypted,
    dalvik-cache is also and need to be re-created on each boot for asking user's password!)
  - Enable ART-small mode which pre-compiles (into dalvik-cache) only bare minimum of clasees
* Add misc recovery related settings and coresponding changes to TWRP in order to support above.
* Modify recovery related settings (this device tree can be used for building TWRP image)
* Remove duplicated default init.rc code
* General cleanups

Change-Id: I60b8303fce99a83c162ca11bb1304a551c48404a
@eugenesan eugenesan force-pushed the cm-12.1 branch 4 times, most recently from 7251d21 to ed8f497 Compare October 3, 2015 16:44
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants