Commit graph

766 commits

Author SHA1 Message Date
Daniel Rosenberg
6a74dcaa6e Fixed bugs with ASEC filesystem.
Changed ext4 to be 4kb aligned, and fat to be 32kb aligned.
Fixed issue that could potentially cause unencrypted ext4
ASECS to overwrite the ASEC super block when filled.

Change-Id: I890426c82ac9cbc65add85a8e3f5063504193c31
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2014-05-28 23:23:47 +00:00
JP Abgrall
12e36398b5 am 099b20f3: am 1881395b: am c6752b06: Merge "vold: wildcard support for device path matching"
* commit '099b20f3ce42a49ba49a1a70a818047ea59612ad':
  vold: wildcard support for device path matching
2014-05-27 19:28:07 +00:00
JP Abgrall
099b20f3ce am 1881395b: am c6752b06: Merge "vold: wildcard support for device path matching"
* commit '1881395b696017dfb40a01e718cc8dc2ea7a38e9':
  vold: wildcard support for device path matching
2014-05-27 19:24:03 +00:00
JP Abgrall
1881395b69 am c6752b06: Merge "vold: wildcard support for device path matching"
* commit 'c6752b06987207bd69b12ad1feadd358e296d52e':
  vold: wildcard support for device path matching
2014-05-27 19:21:48 +00:00
JP Abgrall
c6752b0698 Merge "vold: wildcard support for device path matching" 2014-05-27 19:19:32 +00:00
The Android Automerger
df293f14f5 merge in master-release history after reset to b31f33b5e4 2014-05-22 07:22:42 -07:00
The Android Automerger
be320c8db9 merge in master-release history after reset to b31f33b5e4 2014-05-22 05:51:14 -07:00
The Android Automerger
da0b1a9f63 merge in master-release history after reset to b31f33b5e4 2014-05-21 05:51:09 -07:00
The Android Automerger
88c25e48da merge in master-release history after reset to b31f33b5e4 2014-05-20 05:51:25 -07:00
The Android Automerger
dee8b2372f merge in master-release history after reset to b31f33b5e4 2014-05-19 05:50:25 -07:00
The Android Automerger
6b6bc5f2e8 merge in master-release history after reset to b31f33b5e4 2014-05-18 05:50:13 -07:00
The Android Automerger
5b1d492d26 merge in master-release history after reset to b31f33b5e4 2014-05-17 05:51:52 -07:00
Cylen Yao
b31f33b5e4 Support non-sequential partition index
Add support for the storage with non-sequential partition index
Ex: if using  extended partition, the index of the partition will be greater than 5

[toddpoynor@google.com: fixup mPendingPartCount data type]
Change-Id: I5dbc870fbaac24045f5b994fcb899d5df73c6a55
2014-05-16 13:15:27 -07:00
Todd Poynor
89ec37fcdd Updates for BatteryProperty 64-bit property values
Change-Id: I4838d384e14a7c2c0b607c0bd693e9c7bef75fb7
2014-05-16 03:06:10 +00:00
The Android Automerger
92bd5a7fd1 merge in master-release history after reset to 8c00839714 2014-05-15 05:51:29 -07:00
Cylen Yao
27cfee3fa4 avoid fs_mkdirs when SD card removed
Must limit vold calls to fs_mkdirs() only when the volume is mounted.
If NOT, it will trigger selinux warning as follows.
audit(1398835637.785:8): avc:  denied  { write } for  pid=137 comm="vold" name="sdcard0" dev="rootfs" ino=3191 scontext=u:r:vold:s0 tcontext=u:object_r:rootfs:s0 tclass=dir

Change-Id: I1113fc961cbdd8bbd2fcbf740c2f504628c8399d
Signed-off-by: Cylen Yao <cylen.yao@mediatek.com>
2014-05-14 20:42:13 -07:00
The Android Automerger
c53713bc5d merge in master-release history after reset to 8c00839714 2014-05-14 05:51:48 -07:00
The Android Automerger
e630fcdf93 merge in master-release history after reset to 8c00839714 2014-05-13 05:51:16 -07:00
The Android Automerger
e619817e83 merge in master-release history after reset to 8c00839714 2014-05-12 05:50:20 -07:00
The Android Automerger
ddf384dae6 merge in master-release history after reset to 8c00839714 2014-05-11 05:50:08 -07:00
The Android Automerger
d80416001c merge in master-release history after reset to 8c00839714 2014-05-10 05:51:27 -07:00
The Android Automerger
a62481c8c7 merge in master-release history after reset to 8c00839714 2014-05-08 05:51:02 -07:00
Paul Lawrence
a8014507b0 Fix encryption on Nakasi
We need to make sure we don't try to read the flags on keymaster
version 2 or below, or we get random junk.

Requires
  https://googleplex-android-review.git.corp.google.com/#/c/460689/

Bug: 14384714
Change-Id: I5a4ede1bec0347b8319cedaae6535201c122cf48
2014-05-07 11:47:02 -07:00
Paul Lawrence
8c00839714 Fix encryption on Nakasi
We need to make sure we don't try to read the flags on keymaster
version 2 or below, or we get random junk.

Requires
  https://googleplex-android-review.git.corp.google.com/#/c/460689/

Bug: 14384714
Change-Id: I5a4ede1bec0347b8319cedaae6535201c122cf48
2014-05-06 22:16:16 +00:00
Octavian Purdila
46c301c03e vold: wildcard support for device path matching
Switching the kernel to the new sysfs layout (unselecting
CONFIG_SYSFS_DEPRECATED) complicates VolD block device recognition.

The uevents are reporting full specific paths, such as:

/devices/pci0000:0e/0000:0e:18.0/mmc_host/mmc0/mmc0:1234/block/mmcblk0

Because the full device path may contain variable IDs (in this MMC
case "1234") using full path entries in fstab does not work. Android
supports partial matches but only as a prefix at the beginning of the
path.

This patch adds support for matching shell wildcard patterns via
fnmatch(). The prefix matching rule is preserved, but if it is
detected a warning is issued.

Change-Id: Ia0c5eddec06bd71bec6ce838be3b5345278e0bab
Author:    Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Signed-off-by: Jim Bride <jim.bride@intel.com>
Reviewed-by: Bergeron, Michael <michael.bergeron@intel.com>
Tested-by: Uyyala, Sridhar <sridhar.uyyala@intel.com>
Reviewed-by: Leung, Daniel <daniel.leung@intel.com>
Reviewed-by: Uyyala, Sridhar <sridhar.uyyala@intel.com>
2014-05-05 18:23:27 +03:00
JP Abgrall
8ee0410a4d am 2d3c0c05: am a821d50b: am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""
* commit '2d3c0c05e9cce7bad6afd3ceacca85b297367894':
2014-04-30 12:50:51 +00:00
Nick Kralevich
2c4963a816 am a7a612bf: am 15c3e01e: am 3c0d02aa: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
* commit 'a7a612bf9b302962908f709ccc27a781356ac73b':
2014-04-30 12:50:50 +00:00
Mark Salyzyn
86abdc4c8c am 598fdf7a: am 3d9b98cc: am 1dc1fb4a: Merge "vold: suppress unused argument warning messages"
* commit '598fdf7abe087a3f45b5ab0c932ad339b2e5bb4a':
2014-04-30 12:50:50 +00:00
Nick Kralevich
90665929ac am e8a19bdb: am 9aace96c: am 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."
* commit 'e8a19bdba03cdb323732fc9d4178456a87ee11d5':
2014-04-30 12:50:49 +00:00
Colin Cross
8e0f2a5a0a am 02cb9f5e: am 4c20805a: am 1d8e3ce8: Merge "vold: fix errors inside ALOGV"
* commit '02cb9f5ea3c1177f89e7403bc253164e4a65cbfe':
2014-04-30 12:50:49 +00:00
JP Abgrall
2d3c0c05e9 am a821d50b: am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""
* commit 'a821d50bd43809414521590ebe65601b823f8095':
2014-04-30 01:00:10 +00:00
Nick Kralevich
a7a612bf9b am 15c3e01e: am 3c0d02aa: Merge "Convert all selinux_android_restorecon and _setfilecon calls to new API."
* commit '15c3e01e05359fb11ce5e63934d7c3d54d0d6e93':
2014-04-30 01:00:10 +00:00
Mark Salyzyn
598fdf7abe am 3d9b98cc: am 1dc1fb4a: Merge "vold: suppress unused argument warning messages"
* commit '3d9b98cc833dc7c07da6bb0cc27926c68b63c276':
2014-04-30 01:00:09 +00:00
Nick Kralevich
e8a19bdba0 am 9aace96c: am 311edc8c: Merge "Add SELinux restorecon calls on ASEC containers."
* commit '9aace96cd0f4606d48d7d9052fb134f80a5c961c':
2014-04-30 01:00:09 +00:00
Colin Cross
02cb9f5ea3 am 4c20805a: am 1d8e3ce8: Merge "vold: fix errors inside ALOGV"
* commit '4c20805a33ff194454e5cce3de44943a245e5a44':
2014-04-30 01:00:08 +00:00
Paul Lawrence
bf85d892e9 Merge "Add keymaster support to cryptfs" 2014-04-18 20:26:11 +00:00
Paul Lawrence
69f4ebd81e Add keymaster support to cryptfs
Use keymaster to wrap the cryptfs keys.

Requires selinux change
  https://googleplex-android-review.git.corp.google.com/#/c/449411

Bug: 9467042
Change-Id: If25a01cb85ed193a271d61382de0560d85553b7e
2014-04-18 11:40:13 -07:00
Mohamad Ayyash
e8feb83976 Merge "vdc: fix segfault" 2014-04-16 17:54:35 +00:00
Mohamad Ayyash
5e900ac898 vdc: fix segfault
Change-Id: I1a35fe15b311d3f5203c5bc02d3db87e942cf554
2014-04-15 18:08:05 -07:00
Paul Lawrence
45f10533f8 Revert "Revert "Encrypt phone even if pattern or no keyguard""
Don't block based on keyguard type, and pass type to encryption function.

Requires:
  https://googleplex-android-review.git.corp.google.com/#/c/444201/
or encryption will no longer work.

This reverts commit efec3f2927.

Change-Id: I431589a56eb11118027e0a5a84f55e973b1084aa
2014-04-10 14:30:31 +00:00
Paul Lawrence
efec3f2927 Revert "Encrypt phone even if pattern or no keyguard"
This reverts commit 5cc86c5741.

Without two more commits, this will break encryption. I'll re-commit when the other two pass code review.

Change-Id: I71720d065c16cf0f7f534e74ffe883f1e113c477
2014-04-03 20:55:47 +00:00
Paul Lawrence
5cc86c5741 Encrypt phone even if pattern or no keyguard
Add option to enablecrypto to take type, allowing us to set type
when encrypting.

Bug: 13749169
Change-Id: If22fcfa93f1ebd1a5bd3b0077bb3bd8ae71fe819
2014-04-03 19:20:28 +00:00
Paul Lawrence
0798707334 Merge "Fix setfield/getfield" 2014-03-24 17:51:59 +00:00
Paul Lawrence
cc215381dd Merge "Store password in vold" 2014-03-21 20:40:36 +00:00
Paul Lawrence
87999173dd Don't corrupt ssd when encrypting and power fails
Stop encryption when battery is low, mark position, and continue on reboot.

Note - support for multiple encrypted volumes removed as no devices seem
to exist with an fstab that uses this feature. If you want support for such
a device, contact me and we will re-add it with appropriate testing.

Bug: 13284213
Change-Id: I1f7178e4f7dd8ea816cbc03ab5c4f6543e98acaa
2014-03-21 18:30:26 +00:00
Paul Lawrence
399317ede4 Store password in vold
If we are not to double prompt, we need to pass the password from
CryptKeeper to KeyStore. Since the entire framework is taken down
and restarted, we must store the password in a secure system daemon.
There seems no better way than holding it in vold.

Change-Id: Ia60f2f051fc3f87c4b6468465f17b655f43f97de
2014-03-21 11:15:39 -07:00
Paul Lawrence
8561b5c9f5 Fix setfield/getfield
Check for versions >= feature version, not equal

Bug: 13526708
Change-Id: Ie07f6334e6b7c5ca0d7f83ba00827a508e2c2963
2014-03-18 10:52:14 -07:00
JP Abgrall
a821d50bd4 am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""
* commit '470f0b3ff46493b4a46b3599db33a29e94615d30':
  Avoid segv by checking argc in "storage user <mountpoint>"
2014-03-13 15:54:36 +00:00
Mohamad Ayyash
f8e9569507 Merge "vold: Add a new mountall command." 2014-03-12 22:06:56 +00:00
JP Abgrall
df7382e477 am a29997ae: am 470f0b3f: Merge "Avoid segv by checking argc in "storage user <mountpoint>""
* commit 'a29997ae260d3d7cf41c40d9c7ba42b761b12d30':
  Avoid segv by checking argc in "storage user <mountpoint>"
2014-03-12 20:35:03 +00:00