Commit graph

42725 commits

Author SHA1 Message Date
Hridya Valsaraju
a534a5a973 Support fastboot variable battery-soc-ok
Bug: 79480454
Test: fastboot getvar battery-soc-ok

Change-Id: Icfd70a71f1598e437316d4b8f895fd851516febb
Merged-In: Icfd70a71f1598e437316d4b8f895fd851516febb
(cherry picked from commit 9a1203b7ac)
2018-10-05 16:16:49 -07:00
Treehugger Robot
d7f2c56089 Merge "liblp: Add support for updateable partition groups." 2018-10-03 20:33:45 +00:00
Treehugger Robot
fe0e345ef0 Merge changes from topic "ext4 checkpointing"
* changes:
  make checkpointing work on ext4
  Adding bow dm-target
2018-10-03 20:15:48 +00:00
Treehugger Robot
8bd7d5238f Merge "init: IsDmLinearEnabled() replace with check if logical partitions present in fstab" 2018-10-03 20:03:26 +00:00
David Anderson
5246b6c183 liblp: Add support for updateable partition groups.
This patch introduces a new "groups" table in the super partition
metadata. Each entry denotes a named partition group with a maximum
size. All partitions now belong to a group, and the total size of
partitions in a group must not exceed its maximum size. This is enforced
by MetadataBuilder.

There is also a "default" group with no size restriction. This is used
for one-off partitions that aren't restricted by updates, for example,
the scratch partition for overlayfs, or partitions created through
fastbootd.

Bug: 116817738
Test: liblp gtest
Change-Id: I7049ffd35d326e41e25d01b1748cb53a584783a7
2018-10-03 12:14:14 -07:00
Treehugger Robot
cf207d082a Merge "fs_mgr: __mount better detail for ENOENT" 2018-10-03 18:41:40 +00:00
Chih-hung Hsieh
e4ab668994 Merge "Declare __fake_use_va_args as a constexpr function." 2018-10-03 16:45:16 +00:00
Tao Bao
546b539b47 Merge "Support > 2GiB seeks in adb_lseek." 2018-10-03 14:59:01 +00:00
Chih-Hung Hsieh
9cb232b4de Declare __fake_use_va_args as a constexpr function.
* Need a body and return value for this function
  so the constexpr check can inline it.
* C mode can just use an extern function declaration, but not constexpr.

Bug: 116854606
Bug: 111614304
Test: build with WITH_TIDY=1 and enable static analyzer checks
Change-Id: Ie3f4efbcabed99416d196b6c361a772b8c6a4035
2018-10-02 17:38:41 -07:00
Treehugger Robot
4eb864bf7d Merge "allow adb to remount symlink mount points" 2018-10-02 23:41:40 +00:00
Treehugger Robot
49ef2c5897 Merge "Remove tests for sparse images with CRC from fuzzy_fastboot" 2018-10-02 23:05:13 +00:00
Treehugger Robot
afac3fe0b2 Merge "fs_mgr: overlayfs stop adding rootcontext= to mount" 2018-10-02 22:15:38 +00:00
Treehugger Robot
5e94856289 Merge "fs_mgr: overlay: device tree and system as root" 2018-10-02 22:08:23 +00:00
Tom Cherry
32638a1ef6 Merge "init: clarify why we mount /mnt/... in first stage init" 2018-10-02 21:55:08 +00:00
Tom Cherry
e6fc328d16 Merge "fastboot: remove engine.cpp/engine.h" 2018-10-02 21:21:50 +00:00
Mark Salyzyn
c4a2534e2d fs_mgr: overlayfs stop adding rootcontext= to mount
By adding the root context, we cause an issue with kernel security
profile, the kernel can kick back overlay mounts because the sepolicy
is not initialized.

observable error when we have root context setup:

SELinux: Unable to set superblock options before the security\
         server is initialized
init: [libfs_mgr]__mount(source=overlay,target=/system,\
         type=overlay,upperdir=/cache/overlay/system/upper)=-1:\
	 Invalid argument

root context was added initially due to paranoia, so the side effects
are non existent unless upperdir sepolicy is adjusted.

Test: manual
Bug: 109821005
Change-Id: Id218add0a32df3b2a4626d8cb8aa783760c78cc4
2018-10-02 14:08:04 -07:00
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
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