Commit graph

42865 commits

Author SHA1 Message Date
Mark Salyzyn
22d31c2e68 fs_mgr: overlay: device tree and system as root
fs_mgr_overlayfs_mount_all() should pick up /system even if device tree
does not specify / or /system.

Because of change where we pass fstab to fs_mgr_overlayfs_mount_all(),
/ (or rather /system) overlayfs mount got shifted to early init and
did not occur in first stage init. We need the assumption that /
mount is implied when not specified in the dt fstab to be considered
by overlayfs logic.

Test: manual
Bug: 109821005
Bug: 115751838
Change-Id: Ia8fc5d8e8cc50c66197a91efa80e46d66c2d108d
2018-10-02 14:07:56 -07:00
Jayant Chowdhary
a535e5a64e Merge "Reland "Add static libbinderthreadstate explicitly to charger module.""" 2018-10-02 20:14:37 +00:00
Hridya Valsaraju
94d05063ba Remove tests for sparse images with CRC from fuzzy_fastboot
Sparse images with CRC are currently not supported by the
Android build system.

Test: ./fuzzy_fastboot --gtest_filter=Conformance.*
Change-Id: I6a73fb0dc5d4c77a3d1a0384c137789eb06fa956
2018-10-02 17:21:39 +00:00
Tom Cherry
21824dddeb init: clarify why we mount /mnt/... in first stage init
Test: n/a
Change-Id: I55974fb285c55756536d038f4e20cb45d11906ee
2018-10-02 10:21:03 -07:00
Paul Lawrence
786d0b27a2 make checkpointing work on ext4
Test: Test script passes

Change-Id: Iafa337947f2fd456aa692ecb112ccc56638f7947
2018-10-02 10:12:33 -07:00
Paul Lawrence
8a9c294f37 Adding bow dm-target
Test: Can load with dm-ctl
Change-Id: I0c6a750340fa6babcfa0f72b66c18a0b3eacd9d8
2018-10-02 10:12:30 -07:00
Treehugger Robot
dcee6d22fb Merge "Interface with health HAL to read battery voltage" 2018-10-02 05:21:45 +00:00
Christopher Ferris
4755a06956 Merge "Move to new isolation test runner." 2018-10-01 23:07:31 +00:00
Jayant Chowdhary
c2d3949693 Reland "Add static libbinderthreadstate explicitly to charger module.""
This reverts commit 17a65497bb.

Reason for revert: Dependencies which broke tests due to exclusion from LOCAL_JNI_SHARED_LIBS have been added. 

Change-Id: I51e8ea7072026f233cd4a6c7e2142d92603af1f9
2018-10-01 22:50:07 +00:00
David Anderson
5cbd2e43ee Don't hardcode the super partition name.
If a device has logical partitions but does not use a partition called
"super", we will need this to be configurable. Note that the "slot"
argument is currently unused, but will be necessary for update_engine if
there are A and B super partitions.

Bug: 116608795
Test: super partition works
Change-Id: Ieb548a158faeb423f3561230f26d582325efbc6b
2018-10-01 14:13:22 -07:00
Treehugger Robot
9af3b16c72 Merge "Match src paths with aidl package name" 2018-09-29 21:48:29 +00:00
Treehugger Robot
e15267b5d1 Merge "Add support to read fastboot variable 'off-mode-charge'" 2018-09-28 22:45:40 +00:00
Hridya Valsaraju
47658caae4 Interface with health HAL to read battery voltage
Bug: 78793464
Test: fastboot getvar battery-voltage
Change-Id: Ie0763e4f08327ec7649c5629066eb73e8142e0e6
2018-09-28 14:28:49 -07:00
Hridya Valsaraju
7c9bbe948b Add support to read fastboot variable 'off-mode-charge'
Bug: 78793464
Bug: 79480454

Test: fastboot getvar off-mode-charge
Change-Id: I4c40847be292e8e2e420340f81bb624b247bc11b
Merged-In: I4c40847be292e8e2e420340f81bb624b247bc11b
(cherry picked from commit b05d278696)
2018-09-28 14:16:47 -07:00
Treehugger Robot
007e52efe0 Merge "Support fastboot variable 'variant'." 2018-09-28 20:15:46 +00:00
Hridya Valsaraju
4af80901a6 Support fastboot variable 'variant'.
Bug: 79480454
Bug: 78793464
Test: fastboot getvar variant
Change-Id: Iefef82c147d8405318c793ad0a73f00674bbb63d
Merged-In: Iefef82c147d8405318c793ad0a73f00674bbb63d
(cherry picked from commit 4785287a00)
2018-09-28 11:38:58 -07:00
Treehugger Robot
bd9751a387 Merge "trusty: keymaster3: Modify TrustyKeymaster3Device::update method" 2018-09-28 18:21:50 +00:00
Mark Salyzyn
49163e96a1 Merge "fs_mgr: overlayfs increase logging signal to noise ratio" 2018-09-28 14:17:08 +00:00
Treehugger Robot
455364c6cb Merge changes I156bfefd,I14b0b7e8
* changes:
  bootstat: smpl -> reboot,powerloss
  bootstat: uvlo -> reboot,undervoltage
2018-09-28 14:14:32 +00:00
Remi NGUYEN VAN
f41dc66201 Merge "Revert "Add static libbinderthreadstate explicitly to charger module."" 2018-09-28 09:42:54 +00:00
Remi NGUYEN VAN
17a65497bb Revert "Add static libbinderthreadstate explicitly to charger module."
This reverts commit f23fa3b12f.

Reason for revert: This breaks framework tests and blocks presubmit

Change-Id: Iccf29d7499c378c611ea5a783074865febf8514e
2018-09-28 07:50:18 +00:00
Christopher Ferris
805ea83840 Move to new isolation test runner.
Test: Ran tests.
Change-Id: I1c226111d4667daded90320e1d2b944c5566d34f
2018-09-27 22:23:17 -07:00
Bowgo Tsai
41649b871a allow adb to remount symlink mount points
Currently `adb remount` won't remount symlink mount points.
In Android Generic System Image, there is a symlink
/product -> /system/product for devices with and without a physical
/product partition to work, respectively:

  - Mount product partition under /system/product via
    'mount /product' OR

  - Keep using /product -> /system/product symlink,
    when no product partition

Currently find_proc_mount() is seeking "/product" under /proc/mounts.
But the actual mount path is "/system/product" when GSI is used
on a device with product partition.

Bug: 111539442
Test: adb remount && touch /product/abc on both GSI and non-GSI

Change-Id: I8f15a67109d0a3f4ee18596ef7eb4280c5631b11
2018-09-28 12:47:27 +08:00
Jayant Chowdhary
87b6cb497b Merge "Add static libbinderthreadstate explicitly to charger module." 2018-09-27 21:02:36 +00:00
Jayant Chowdhary
f23fa3b12f Add static libbinderthreadstate explicitly to charger module.
Bug: 110364143

Bug: 114311116

Test: Builds

Change-Id: I367cab4f6113d72bbaf1c9a41099110124916f57
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2018-09-27 10:36:13 -07:00
Treehugger Robot
5b1111c074 Merge "Revert "Revert "mkbootimg: Build mkbootimg with Soong.""" 2018-09-27 16:37:01 +00:00
Treehugger Robot
07adf8b856 Merge "Enable -Wexit-time-destructor for all targets" 2018-09-27 15:39:25 +00:00
Tao Bao
0e5e816185 Revert "Revert "mkbootimg: Build mkbootimg with Soong.""
This reverts commit 55a78bf580.

There's no change in this CL from the initial landing. The earlier crash
was caused by manifest setup in build-tools and clang-tools branches,
which has been addressed by the following CLs.
https://android-review.googlesource.com/c/platform/manifest/+/769045
https://android-review.googlesource.com/c/platform/manifest/+/769044

Bug: 116698229
Change-Id: I33701c9f77e814257cc5c65ad7aa587835ae00ad
Test: TreeHugger
2018-09-27 14:11:51 +00:00
Pirama Arumuga Nainar
ca6ee8331f Enable -Wexit-time-destructor for all targets
This warning should be available for Windows as well.

Test: mmma system/core/base
Change-Id: Id2e7e4da2e5105870a8d1e10c793e4a54c5b3d04
2018-09-26 23:31:00 -07:00
Treehugger Robot
9c5c396d11 Merge "Do not construct std::function with Allocator argument" 2018-09-27 01:43:39 +00:00
Tom Cherry
e3745bc57a Merge "init: use '/system' as the system mount point for force_normal_boot" 2018-09-27 00:35:22 +00:00
Treehugger Robot
4b187d2bc9 Merge changes I6a14ac96,I996b9885
* changes:
  adb: add fdevent_release.
  adb: fix test_device.FileOperationsTest.test_push_empty.
2018-09-27 00:30:30 +00:00
Mark Salyzyn
03df4238f6 fs_mgr: overlayfs increase logging signal to noise ratio
Remove unnecessary content from logging.  PERROR implies failure,
and logging reports source, so no need to fortify.

Test: compile
Bug: 109821005
Change-Id: Ie25de6ec35dd1890e9a14ecee96956e743a2a91c
2018-09-26 16:08:09 -07:00
Mark Salyzyn
8243f66580 fs_mgr: __mount better detail for ENOENT
By telling us that the target or source is missing for ENOENT, we
can triage whether it is a build/configuration problem or a driver
problem.  Two engineers spend more than a few hours investigating
a build problem rationalizing adding this instrumentation.

Test: compile
Bug: 109821005
Change-Id: I1ecc6230ebee128c0963d6020787230c1e2fb8c1
2018-09-26 16:05:58 -07:00
Elliott Hughes
cabfc3dc80 Support > 2GiB seeks in adb_lseek.
Also stop using size_t (which will be 32-bit on Win32) for offsets in
adb_sideload_host, and stop truncating large file sizes in our
"sideload-host" messages.

Bug: http://b/112003354
Test: builds
Change-Id: If5b7cc9d1fc7ff7ca6eaebd20418f7b061846203
2018-09-26 14:48:05 -07:00
Mark Salyzyn
9b1e7a34b9 init: IsDmLinearEnabled() replace with check if logical partitions present in fstab
IsDmLinearEnabled() true if logical partitions present in fstab.

Test: boot on logical device
Bug: 109821005
Change-Id: Ic083b0b8d9f7e9511d78bdc05c9f848521f1feb5
2018-09-26 21:04:24 +00:00
Tom Cherry
c382957789 init: use '/system' as the system mount point for force_normal_boot
We need to keep the right mount points in the fstab for other
processes to access (/ for system-as-root or /system otherwise).
Force_normal_boot devices are defacto not system-as-root,
since they're booting through the recovery ramdisk and therefore must
use /system as the system mount point.

Bug: 114062208
Test: boot pixel from recovery with force_normal_boot
Change-Id: Ib0e4e4f8a29299ecdcd35e8f1415551c4c9745ad
2018-09-26 13:27:16 -07:00
Pirama Arumuga Nainar
02ab36e220 Do not construct std::function with Allocator argument
Bug: http://b/116702964

This breaks when built with C++17, where these constructors are removed.
Looks like libc++ ignored the allocator arguments anyway - so this
should be NFC even with C++17.

Test: memunreachable_test on the host and Sailfish with C++14, C++17
Change-Id: I638326a900781f64d0562b5ec38e990659967039
2018-09-26 20:24:13 +00:00
Mark Salyzyn
f62983a646 bootstat: smpl -> reboot,powerloss
smpl anywhere in boot loader reason string will match and convert to
reboot,powerloss when propagated to system boot reason.

Test: compile
Bug: 63736262
Change-Id: I156bfefd05d2bab480408cf6bb1dc4c61c8983f9
2018-09-26 13:02:16 -07:00
Mark Salyzyn
ec7bafee94 bootstat: uvlo -> reboot,undervoltage
uvlo anywhere in boot loader reason string will match and convert to
reboot,undervoltage when propagated to system boot reason.

Test: compile
Bug: 63736262
Change-Id: I14b0b7e8185aa4fb519efdb6cb1306718e9de69c
2018-09-26 13:02:16 -07:00
Josh Gao
2f6c2fa935 adb: add fdevent_release.
Implement a version of fdevent_destroy that returns the file descriptor
previously owned by the fdevent, instead of closing it.

Bug: http://b/74616284
Test: treehugger
Change-Id: I6a14ac96e6b8c801bc71bfcc9094851c158510ae
2018-09-26 12:44:30 -07:00
Josh Gao
ed17650438 adb: fix test_device.FileOperationsTest.test_push_empty.
It was doing a test with `[ -d foo`, without the closing square bracket.

Test: python -m unittest test_device.FileOperationsTest.test_push_empty
Change-Id: I996b98850cf916986ef969768a7235547fcc404a
2018-09-26 12:44:30 -07:00
Josh Gao
db8b2afe23 Merge "adb: make test_device.py executable." 2018-09-26 19:43:28 +00:00
Treehugger Robot
e4931c5bd4 Merge "Support 'fastboot getvar unlocked' command." 2018-09-26 16:21:28 +00:00
Tao Bao
6cc0d76d83 Merge "Revert "mkbootimg: Build mkbootimg with Soong."" 2018-09-26 15:20:50 +00:00
Tao Bao
55a78bf580 Revert "mkbootimg: Build mkbootimg with Soong."
This reverts commit 51360fc349.

Reason for revert: Triggered some crash in Soong.

Bug: 116698229
Change-Id: Iab4827fdadc65cbabb60aa07eeac7b33acea68a0
2018-09-26 15:19:24 +00:00
Tao Bao
0baf7f7250 Merge "mkbootimg: Build mkbootimg with Soong." 2018-09-26 15:00:23 +00:00
Martijn Coenen
1e3764575e Merge "init: start apexd as early as we can." 2018-09-26 06:56:26 +00:00
Pirama Arumuga Nainar
53f5945609 Do not enable -Wold-style-cast for Windows
Bug: http://b/91353691

Enable -Wold-style-cast only for non-Windows targets.  _islower_l,
_isupper_l etc. in MinGW locale_win32.h (included from
libcxx/include/__locale) have an old-style-cast.

Test: Build and test Windows modules under Wine.
Change-Id: Ib7594559a43096885b0cc1c656cf59db8b52d38b
2018-09-26 02:14:02 +00:00
Treehugger Robot
5952034c25 Merge "Set device lock status from kernel command line." 2018-09-26 02:02:13 +00:00