Commit graph

1433 commits

Author SHA1 Message Date
Tom Cherry
f71511ac41 vdc: use libbase logging and log directly to kmsg on boot
Init is no longer calling vdc with logwrapper, so it must take care of
logging to kmsg directly.

Test: observe logging in kmsg on boot and stderr on normal usage
Change-Id: Ie3e59da433bd154f121ce103dea0c59eb0bab069
2017-03-29 17:06:31 -07:00
Treehugger Robot
71fa1068de Merge "make shutdown safe for double calls." 2017-03-15 02:39:51 +00:00
Keun-young Park
a5bbb5e3c1 make shutdown safe for double calls.
- In new shutdown sequence, volume shutdown is requested in two places:
  system_server and init.
- Make VolumeManager.shutdown safe for double calls.
  It crashed before this change.

bug: 36004738
Test: reboot and check last_kmsg for crash / vdc timeout
Change-Id: I296913959b2647b65d66553073f2032545beba57
2017-03-14 17:27:02 -07:00
Treehugger Robot
92f21f5294 Merge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()" 2017-03-10 02:07:34 +00:00
Bowgo Tsai
e8fb6c3000 vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()
The original default /fstab.{ro.hardware} might be moved to /vendor/etc/.
or /odm/etc/. Use the new API to get the default fstab instead of using
the hard-coded /fstab.{ro.hardware}.

Bug: 35811655
Test: boot marlin with /vendor/etc/fstab.marlin
Change-Id: I92d6aefe6ff3433b7d1a671358d990bb7b1f2150
2017-03-09 23:31:18 +08:00
Treehugger Robot
b3715cf3af Merge "vold: add coldboot back and make sure it won't block booting" 2017-03-07 20:24:01 +00:00
Calin Juravle
61a7d1a815 Merge "Vold: Clean up code related to foreign dex use" 2017-03-07 19:00:18 +00:00
Wei Wang
2edbe28add vold: add coldboot back and make sure it won't block booting
coldboot is needed when device rebooted with USB device attched
so Vold netlink won't miss the information.
This CL added back coldboot and moved down so that it won't block
vold cl and ccl threads.

Bug: 36007238
Test: reboot marlin with flash drive attached and flash drive is recognized
Change-Id: Ie39f348e97a8500515e394e386541289a91b2425
2017-03-06 17:49:37 -08:00
Calin Juravle
3a68f14192 Vold: Clean up code related to foreign dex use
We simplified the way we track whether or not a dex file is used by
other apps. DexManger in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170
Change-Id: Id0360205b019be92049f36eab4339f4736e974f4
2017-03-03 18:24:21 -08:00
Isaac Chen
bf8518056d Merge "Removed HW encryption build flags and related code." 2017-02-15 08:45:30 +00:00
Isaac Chen
dff70b4e3e Removed HW encryption build flags and related code.
TARGET_HW_DISK_ENCRYPTION and TARGET_CRYPTFS_HW_PATH build flags
and related code in cryptfs.c are removed since it doesn't match
the driver in current tree.

To enable HW encryption, the driver needs to be hidlized.

Bug: 34268168

Test: compile
Change-Id: I507a0e2908b3c407c565e44873b82c94a8305de6
2017-02-14 20:40:00 +08:00
Treehugger Robot
cebf7ea40f Merge "Add mode bits to open calls" 2017-02-09 04:12:36 +00:00
George Burgess IV
2a6ff153ee Add mode bits to open calls
This was already done internally a while ago, but for us to submit
clang FORTIFY, we need it here, as well.

Bug: 32073964
Test: Clang FORTIFY no longer complains about open calls here.
Change-Id: I72428ac4d3279ffc330ae5aa579960c26703053c
Merged-In: Iaed2538831b19ada26005bbef33cff28209c6512
2017-01-25 13:21:17 -08:00
Treehugger Robot
cc29c526d4 Merge "Remove coldboot from vold" 2017-01-25 19:42:44 +00:00
Wei Wang
6b455c29be Remove coldboot from vold
coldboot is now taken care by ueventd, so removing the duplicate
logic to save boottime.
This CL also fixes a missing lock.


Bug: 33786699
Test: manual
Change-Id: I71270252f3153abc815d142b5da7a9cb85b94dac
2017-01-25 18:15:38 +00:00
Treehugger Robot
d65506217d Merge "Include libavb in static libraries" 2017-01-21 12:47:04 +00:00
Treehugger Robot
ec58e5851d Merge "Fix deadlock between vold and init" 2017-01-20 01:06:50 +00:00
Dimitry Ivanov
c976e73bbd Fix deadlock between vold and init
By setting property after listeners are initialized
we avoid deadlock between vold and init where
vold is waiting on property_service while init is blocked
(and therefore is not able to accept connections) on vdc
which is attempting to communicate with vold.

(This also speeds up boot by 250ms)

Test: Boot a device, check locks and make sure there is no timeout
      on property_set(.)
Test: Successfully boot a device with new property service protocol.
Bug: http://b/34278978
Change-Id: I9547d2f19cb35aa452bf01fbff0eb4b32a4824a4
2017-01-19 14:44:03 -08:00
bowgotsai
58bdac8d25 Include libavb in static libraries
Bug: 31264231
Test: compile
Change-Id: I1d84f7aa67a0ed31f2b6400cf1c9567bf503295a
2017-01-07 00:45:14 +08:00
The Android Automerger
04c55e6ed7 Manually merge commit 'b406ffa' into stage-aosp-master
* commit 'b406ffa':
  Add support for creating ext4 images with mke2fs

BUG:33304034
2016-12-03 04:08:35 +00:00
Treehugger Robot
b406ffaa86 Merge "Add support for creating ext4 images with mke2fs" 2016-12-02 22:48:23 +00:00
Adrien Schildknecht
e0f409ca32 Add support for creating ext4 images with mke2fs
We are investigating replacing make_ext4fs with the upstream tool mke2fs.
See b/23686092 for more informations.

To mitigate the trouble that may arise if the new tool behave differently
compared to the old one, there will be a transition period where both mke2fs
and make_ext4fs will be supported.

This patch does 3 things:
  - add the necessary code to use mke2fs to format an ext4 partition;
  - add a dependency to the binary used by vold.

Test: m -j32 with TARGET_USES_MKE2FS={,false,true}
                  TARGET_USERIMAGES_USE_EXT4={,true}

Change-Id: I89222642fe1d11a035155c8224b84b2e3719938b
2016-11-22 18:46:37 -08:00
Paul Crowley
4f70554179 Merge "Remove misleading comment (b/26948053)"
am: dbeebf56aa

Change-Id: I6e63f700ecd9cad50956cc2a1cc34b4f81b1a497
2016-10-28 21:14:50 +00:00
Treehugger Robot
dbeebf56aa Merge "Remove misleading comment (b/26948053)" 2016-10-28 21:08:17 +00:00
Rahul Chaudhry
e9e23bf019 Merge "system/vold: cleanup compiler warnings (read of uninitialized memory)."
am: cda5cec39f

Change-Id: I5fdde841ee42e3a48c042538732f22f0fe3eedf9
2016-10-20 03:21:06 +00:00
Treehugger Robot
cda5cec39f Merge "system/vold: cleanup compiler warnings (read of uninitialized memory)." 2016-10-20 03:15:25 +00:00
Rahul Chaudhry
1a077b440a system/vold: cleanup compiler warnings (read of uninitialized memory).
system/vold/ScryptParameters.cpp:48:26: warning: Assigned value is
garbage or undefined
system/vold/ScryptParameters.cpp:48:43: warning: Assigned value is
garbage or undefined
system/vold/ScryptParameters.cpp:48:9: warning: Assigned value is
garbage or undefined

Bug: 26936282
Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mm
Change-Id: I82ffffee48ee94ca5c7f3bbc64059f9cec109a92
2016-10-19 17:58:32 -07:00
Paul Crowley
99360d76e5 Remove misleading comment (b/26948053)
Vold is considered part of our trusted computing base, and
compromising vold is already identified as a complete device
compromise. While storing keys only in the kernel would be better, the
current setup does not introduce a security bug or worsen any security
control.

Bug: 26948053
Test: Comment-only change.
Change-Id: Ib5436f4386769ec44b74dc6b50fbcc0fed99b96b
2016-10-19 15:10:26 -07:00
Tao Bao
df161ae45b Merge "Use libbootloader_message."
am: 1dfd1df2e3

Change-Id: Id9c27a97fc7a6e67a706d9f2d837e42a960fa19a
2016-10-18 22:54:30 +00:00
Tao Bao
1dfd1df2e3 Merge "Use libbootloader_message." 2016-10-18 21:48:23 +00:00
Yabin Cui
889ed48e5f Use libbootloader_message.
Bug: 29582118

Change-Id: I8de2cfbc62908011dba2ab86d17f977ebcfadac0
(cherry picked from commit 1fb5966fbb)
2016-10-16 17:04:46 -07:00
Tao Bao
985d0805e7 Merge "Update the header path for ext4_utils." am: 6a18a6ddb5 am: 4759d1d637
am: e85d4467f5

Change-Id: I78ef6034fc2586383e70345bcd186875528c9ffc
2016-10-10 22:14:58 +00:00
Tao Bao
e85d4467f5 Merge "Update the header path for ext4_utils." am: 6a18a6ddb5
am: 4759d1d637

Change-Id: Ia2d03836b7c194f641aa2c75b113a0a87e84e397
2016-10-10 21:46:17 +00:00
Tao Bao
4759d1d637 Merge "Update the header path for ext4_utils."
am: 6a18a6ddb5

Change-Id: I9f82c4f612ce5287b24e53ef151b886b91b0a0d7
2016-10-10 21:15:02 +00:00
Tao Bao
6a18a6ddb5 Merge "Update the header path for ext4_utils." 2016-10-10 20:07:32 +00:00
Tao Bao
989fec2769 Update the header path for ext4_utils.
Test: mmma system/vold

Change-Id: I805b8874b05b8043390c2cd3c143cc469913c067
2016-10-05 23:12:49 -07:00
Andreas Gampe
32e3190d10 Merge "Vold: remove unused define" am: 7ac97f8e37 am: de114c0d89
am: dd0fc053d2

Change-Id: I2d223f85f22929ed531d6fabb86cfbe2727aa71b
2016-09-24 16:49:04 +00:00
Andreas Gampe
dd0fc053d2 Merge "Vold: remove unused define" am: 7ac97f8e37
am: de114c0d89

Change-Id: Ida80b4ef12a7fcccadd219c7a7a4151a6f1b6098
2016-09-24 16:46:42 +00:00
Andreas Gampe
de114c0d89 Merge "Vold: remove unused define"
am: 7ac97f8e37

Change-Id: I617533e47e28a8081f7a2f477bda0c44fb3ea992
2016-09-24 16:44:43 +00:00
Treehugger Robot
7ac97f8e37 Merge "Vold: remove unused define" 2016-09-24 16:39:05 +00:00
Andreas Gampe
1ee738cd45 Vold: remove unused define
Introduced in commit 36801cccf2,
but never used.

Test: m
Bug: 31338270
Change-Id: I90bbab0208032b75b3700b02f0dc053b0e5ed38a
2016-09-23 18:02:49 -07:00
Dan Albert
5ee8b78072 Merge "Add missing include." am: 45b09e9144 am: 2ab88f0a77
am: 9d7bf437b0

Change-Id: Id77fcbc8bffc2e45a0b1d3f5e4ac5fdc195711be
2016-09-22 09:16:19 +00:00
Dan Albert
9d7bf437b0 Merge "Add missing include." am: 45b09e9144
am: 2ab88f0a77

Change-Id: I84171fb41e8cd0040da34891d9b527400ff49b3f
2016-09-21 23:42:36 +00:00
Dan Albert
2ab88f0a77 Merge "Add missing include."
am: 45b09e9144

Change-Id: I97b57690ed9cccd71b0c3d9b83fb1fd0f2e3d835
2016-09-21 23:22:29 +00:00
Treehugger Robot
45b09e9144 Merge "Add missing include." 2016-09-21 22:40:09 +00:00
Dan Albert
616b250ecf Add missing include.
Test: mm
Bug: None
Change-Id: If3cbe642292016fdac603cce83f3ef252dda7481
2016-09-21 13:57:53 -07:00
Wei Wang
b2c339739b Update fs_mgr_mount_all function am: 84c985e275
am: c3c04acae6

Change-Id: Iaf67826394328097426ea9ee605ec2908f67ebec
2016-09-07 17:58:40 +00:00
Wei Wang
c3c04acae6 Update fs_mgr_mount_all function
am: 84c985e275

Change-Id: Ia2d7410d092d7569c8f8873a101140db9320c019
2016-09-07 17:53:30 +00:00
Wei Wang
bb4611b43b Merge "Update fs_mgr_mount_all function" am: 1d58bcf6d4 am: 554d8679e7
am: 02a52f1f10

Change-Id: Ie242ec19217b81a76dd3fd046ff8157bd3691381
2016-09-06 20:21:07 +00:00
Wei Wang
02a52f1f10 Merge "Update fs_mgr_mount_all function" am: 1d58bcf6d4
am: 554d8679e7

Change-Id: Id6a99695c437c37b60e8e03eff9ff60eb91707a0
2016-09-06 20:18:06 +00:00