Commit graph

1272 commits

Author SHA1 Message Date
Jeff Sharkey
c85be2fc40 Consistent creation/destruction of user data.
am: be70c9a

* commit 'be70c9ae2251ac8f3bfbbe75146f8c533d64e01b':
  Consistent creation/destruction of user data.

Change-Id: Iddb906f6df0587faf95198446c376b2e8d550bec
2016-04-18 19:59:50 +00:00
Jeff Sharkey
be70c9ae22 Consistent creation/destruction of user data.
Preparing and destroying users currently needs to be split across
installd, system_server, and vold, since no single party has all the
required SELinux permissions.

Bug: 27896918, 25861755
Change-Id: Ieec14ccacfc7a3a5ab00df47ace7318feb900c38
2016-04-15 13:47:52 -06:00
Elliott Hughes
ccd9dd53f8 resolve merge conflicts of 81fd991 to nyc-dev-plus-aosp
Change-Id: Iabda2c9ad05ed4aa0a078c5da40b887f36dd9328
2016-04-12 16:44:04 -07:00
Mattias Nissler
81fd991d8b Merge "Switch to BoringSSL crypto."
am: af458c4

* commit 'af458c478a9f333fa39bdddb9a7aa097a2196b64':
  Switch to BoringSSL crypto.

Change-Id: Ie3c9a05bfd05dfa9b1a79fe42b59d0dfb3346843
2016-04-12 23:27:37 +00:00
Elliott Hughes
af458c478a Merge "Switch to BoringSSL crypto." 2016-04-12 23:12:35 +00:00
Dan Austin
8afff3bfe1 Merge "Address const issues in preparation for libcxx rebase." am: a4f7dad
am: 3cc69fa

* commit '3cc69faa6797ae0cfe43f4243d564fbe14f4cfe4':
  Address const issues in preparation for libcxx rebase.

Change-Id: I58f814d71e5d5c067ade613d0bf8a88911d53424
2016-04-12 22:35:50 +00:00
Dan Austin
3cc69faa67 Merge "Address const issues in preparation for libcxx rebase."
am: a4f7dad

* commit 'a4f7dadd389e25d2b5749d1edf65081b3a4e6961':
  Address const issues in preparation for libcxx rebase.

Change-Id: I63c3a205db98d956c3c02a4f4f6fd87fd4e052e8
2016-04-12 22:33:13 +00:00
Dan Austin
a4f7dadd38 Merge "Address const issues in preparation for libcxx rebase." 2016-04-12 22:21:17 +00:00
Yabin Cui
008c7ddb1f Merge "vold: write bootloader message directly." into nyc-dev
am: cbedcc3

* commit 'cbedcc30b32d79d77d89f23074da4dc76bf5e26d':
  vold: write bootloader message directly.

Change-Id: Ib8f63a49a86c0e9e7a231cb5d22f6bb9a14e820f
2016-04-09 01:09:55 +00:00
Yabin Cui
cbedcc30b3 Merge "vold: write bootloader message directly." into nyc-dev 2016-04-08 21:03:43 +00:00
Daichi Hirono
4d5cfe57dd Add log flag for verbose AppFuse log for nyc-dev.
am: 2d6555f

* commit '2d6555f33a5b0fd1e9f0db87e3a2146c3c26add0':
  Add log flag for verbose AppFuse log for nyc-dev.

Change-Id: I8a2325c0dfd70888e635994f8aa5901fbf57efac
2016-04-07 08:16:07 +00:00
Daichi Hirono
2d6555f33a Add log flag for verbose AppFuse log for nyc-dev.
Change-Id: I60ca596e32f8668ae5895e671d92c4978ede6314
Fixed: 28055420
2016-04-07 14:59:32 +09:00
Yabin Cui
ffa2e09921 vold: write bootloader message directly.
Bug: 27176738
Change-Id: I09bfe777e383325809d7ecc2dcb9129fe234053f
2016-04-06 17:21:38 -07:00
Mattias Nissler
dc80323969 Switch to BoringSSL crypto.
This replaces the libmincrypt dependency with libcrypto_utils, which
is needed due to libfec and fs_mgr switching to BoringSSL.

Change-Id: I4f6f4d8cc5e200679331a9bcdf2cc3bad1082dd6
2016-04-06 15:54:11 +02:00
Jeff Sharkey
f6b34cb9d1 Kill apps using PublicVolume when unmounting.
am: 8aff854

* commit '8aff854b940039cce5fa2a227b19e39de6787b20':
  Kill apps using PublicVolume when unmounting.

Change-Id: I12332ee8d416eb2bba0f940a5f8bf64c5766c774
2016-03-31 03:47:49 +00:00
Jeff Sharkey
8aff854b94 Kill apps using PublicVolume when unmounting.
Bug: 24863778
Change-Id: I86a482c6de78afe2e09ca91165000e1b10a42058
2016-03-30 20:37:30 -06:00
Paul Crowley
2761664e57 Don\'t fail if the CE key isn\'t loaded in destroy_user_key
am: 71ee662

* commit '71ee662ec3f82db66f1a34579aff75cc27d4b205':
  Don't fail if the CE key isn't loaded in destroy_user_key

Change-Id: I7700f07dfa3421e57149aacf1a98b0a5eb8bf917
2016-03-29 20:30:13 +00:00
Paul Crowley
71ee662ec3 Don't fail if the CE key isn't loaded in destroy_user_key
Users don't have to be unlocked to be deleted, so don't worry if we
don't have their key to evict.

Bug: 26847403
Bug: 27441228
Change-Id: Ifd93f620926630aa102a3bb4a5d2d45d34f9b75d
2016-03-29 13:07:34 -07:00
Dan Austin
49ab5f9e6d Address const issues in preparation for libcxx rebase.
Change-Id: I5199c1eb4e874fd354beefa1232707949483e88d
2016-03-28 13:24:48 -07:00
Paul Crowley
d4d7651fc3 Support Keymaster2 with lots of clever template logic :)
am: 0323afd

* commit '0323afd69d82ce900d520f4611f56e6c06fc08a1':
  Support Keymaster2 with lots of clever template logic :)
2016-03-17 19:57:36 +00:00
Paul Crowley
0323afd69d Support Keymaster2 with lots of clever template logic :)
Bug: 27718275
Change-Id: I0b2aa74f45fd07a121ce0c342b27426a3fe593ce
2016-03-17 10:56:24 -07:00
Paul Lawrence
a1b97135eb Fix some static analyser issues
am: 300dae7c38

* commit '300dae7c38e6853148a998dfc1030b2be40490b5':
  Fix some static analyser issues
2016-03-11 23:45:29 +00:00
Paul Lawrence
300dae7c38 Fix some static analyser issues
Bug: 27099772
Change-Id: Ic96777edf4ea282be2b8f53525226396c01e023c
2016-03-11 11:02:52 -08:00
Paul Lawrence
dba928fabd Merge "Make sure encryption type is set on first boot" into nyc-dev
am: 439034b8cc

* commit '439034b8cc510a95d25c53c8606f88a40ddcbb0b':
  Make sure encryption type is set on first boot
2016-03-11 01:51:11 +00:00
Paul Lawrence
439034b8cc Merge "Make sure encryption type is set on first boot" into nyc-dev 2016-03-11 01:42:55 +00:00
Jeff Sharkey
d6b13a70fb Merge "Print size as unsigned when sending to framework." into nyc-dev
am: f84fe90714

* commit 'f84fe907141bcdb76425d5ba42913576f018a11c':
  Print size as unsigned when sending to framework.
2016-03-11 00:19:11 +00:00
Jeff Sharkey
f84fe90714 Merge "Print size as unsigned when sending to framework." into nyc-dev 2016-03-11 00:07:25 +00:00
Paul Lawrence
4ed4526e68 Make sure encryption type is set on first boot
Bug: 27599622
Change-Id: I2f38c03941ac8cdba40baf7421132f572866e296
2016-03-10 15:44:21 -08:00
Jeff Sharkey
d087bbc66f Print size as unsigned when sending to framework.
Otherwise we might output negative numbers that confuse the rest
of the recovery stack.

Bug: 26007445
Change-Id: Ic99b49360732e5389c6330be065e1222e25b60ca
2016-03-10 12:11:20 -07:00
Yu Ning
fcb71eba41 Merge "Support emulator\'s virtio-blk based SD card" into nyc-dev
am: 828d386c7d

* commit '828d386c7de04c6f33c1e998fd9d4630f90d5be4':
  Support emulator's virtio-blk based SD card
2016-03-10 17:16:57 +00:00
Prathmesh Prabhu
828d386c7d Merge "Support emulator's virtio-blk based SD card" into nyc-dev 2016-03-10 17:12:59 +00:00
Daniel Rosenberg
7945daa13c Merge "Add information to error message" into nyc-dev
am: 19d76fda3a

* commit '19d76fda3ada9bce91ac95110b10b6e075bc6726':
  Add information to error message
2016-03-10 00:05:52 +00:00
Daniel Rosenberg
19d76fda3a Merge "Add information to error message" into nyc-dev 2016-03-09 23:58:12 +00:00
Paul Crowley
1d348d29a3 Run clang-format over ext4crypt related code
am: df528a7011

* commit 'df528a7011b302c91579898c4a37361214ab05bb':
  Run clang-format over ext4crypt related code
2016-03-09 22:11:05 +00:00
Paul Crowley
41fb6ed048 Use pointers not references for out arguments
am: a051eb7a22

* commit 'a051eb7a22b7cd97e66d2f22b64884f8ebc73952':
  Use pointers not references for out arguments
2016-03-09 22:11:05 +00:00
Paul Crowley
64b60ccfcf Require the auth token for decryption.
am: 320e5e15b6

* commit '320e5e15b621da57a947adc896f7bb8357038bee':
  Require the auth token for decryption.
2016-03-09 22:11:05 +00:00
Daniel Rosenberg
25a5213c1f Add information to error message
Bug: 27452459
Change-Id: I89e813755da0946de4effd827799681df7e12d82
2016-03-09 13:53:39 -08:00
Paul Crowley
b930c26c1f Fix memory leak in generate_key wrapper. Other fixes.
am: d9b9295b8c

* commit 'd9b9295b8c2f17448f4eb3ea2c6f7d4a5c207c3f':
  Fix memory leak in generate_key wrapper. Other fixes.
2016-03-09 19:26:02 +00:00
Paul Crowley
df528a7011 Run clang-format over ext4crypt related code
The formatting here is inconsistent with Android house style; use
clang-format to bring it back into line.

Change-Id: Id1fe6ff54e9b668ca88c3fc021ae0a5bdd1327eb
2016-03-09 09:34:13 -08:00
Paul Crowley
a051eb7a22 Use pointers not references for out arguments
Google/Android C++ style requires that arguments passed in for writing
should be pointers, not references, so that it's visible in the caller
that they'll be written to.

Bug: 27566014
Change-Id: I5cd55906cc4b2f61c8b97b223786be0b3ce28862
2016-03-09 09:32:02 -08:00
Paul Crowley
320e5e15b6 Require the auth token for decryption.
A bug meant that the auth token wasn't being used; it turns out that
in order to use it we need to do things slightly differently.

Bug: 27496553
Change-Id: I0f0ab77fed31b92a79eba4acf488cb098691b4be
2016-03-08 14:32:00 -08:00
Paul Crowley
d9b9295b8c Fix memory leak in generate_key wrapper. Other fixes.
- catch errors in looking for the keyring
- static_assert to prevent a buffer overrun
- remove obsolete, misleading comment
- dial down priority of some log messages
- explain why we ignore some errors
- idiomatic C++11

Bug: 27552432
Change-Id: Ic3ee05b41eae45e7c6b571a459b326a483663526
2016-03-08 14:31:49 -08:00
Yu Ning
942d4e830b Support emulator's virtio-blk based SD card
Currently, vold only supports MMC (for SD cards) and SCSI (for USB
drives) devices. It does not recognize any device whose major number is
not one of those used by MMC and SCSI. Unfortunately, virtio-blk is one
such device. It is used by the new Android emulator (a.k.a. qemu2,
featuring the "ranchu" virtual board) for SD card emulation.

In order to make this virtio-blk based SD card device appear in Android
and appear as an SD card (rather than a USB drive), changes have to be
made to both vold (wherever the device major number is checked) and
ranchu's storage configuration. This CL implements former.

This is a stop-gap solution for emulator in nyc.
A longer term solution in-tune with upstream kernel is in the pipes.

Updated from aosp/master version.

BUG:27431753

Change-Id: I5014edec73be7c5b565d91542464c82cbe58992c
Signed-off-by: Yu Ning <yu.ning@intel.com>
(cherry picked from commit 5b1d1c7dfa13b4dca75213581dc8351b841b76c8)
2016-03-08 12:19:41 -08:00
Paul Crowley
2227b35945 Merge "Use a proper key length for the mode." into nyc-dev
am: ad8e26297b

* commit 'ad8e26297b07f26376bd3125b11ae280304c22e8':
  Use a proper key length for the mode.
2016-03-02 19:09:01 +00:00
Calin Juravle
c0c305fbcf Prepare profile directories only for the internal storage
am: d1ee944f08

* commit 'd1ee944f0839d60b014722c7facbb4a66bd4f2c3':
  Prepare profile directories only for the internal storage
2016-03-02 19:08:54 +00:00
Paul Crowley
ad8e26297b Merge "Use a proper key length for the mode." into nyc-dev 2016-03-02 18:59:58 +00:00
Paul Crowley
2199069aca Use a proper key length for the mode.
Bug: 27440526
Change-Id: I818450252dcd39f21948fc2e70856659eba5f50f
2016-03-02 10:39:53 -08:00
Calin Juravle
d1ee944f08 Prepare profile directories only for the internal storage
Bug: 27444691
Change-Id: I0d30e8883fe655c90cda47ab167a878764ea0802
2016-03-02 18:36:50 +00:00
Calin Juravle
29593a8128 Create profile folder for foreign dex markers.
am: 493f5aa160

* commit '493f5aa16075eec6948f476b3fe0d29de063ee85':
  Create profile folder for foreign dex markers.
2016-03-01 21:43:43 +00:00
Calin Juravle
493f5aa160 Create profile folder for foreign dex markers.
This is a special profile folder where apps will leave profile markers
for the dex files they load and don't own. System server will read the
markers and decide if the apks should be fully compiled instead of
profile guide compiled.

Bug: 27334750
Bug: 26080105
Change-Id: Ib18f20cf78a8dbfc465610ec6ceec52699c5420a
2016-02-25 23:31:50 +00:00