Commit graph

57063 commits

Author SHA1 Message Date
Yifan Hong
8129dda1f9 libsnapshot: Add ISnapshotManager.
This is the public interface of SnapshotManager.
SnapshotManager then inherits from it.

Test: compiles
Test: vts_libsnapshot_test
Test: update_engine_unittests
Bug: 148956645
Bug: 153555889
Change-Id: Ib19c038f9bb41dd8d27f72ff6a24c231cd4c5a76
2020-04-16 13:12:41 -07:00
Yifan Hong
66f0115b05 libsnapshot clients: Add missing dep.
libsnapshot* uses update_metadata-protos. This
used to be optimized out, but now that SnapshotManager is
virtual, CreateUpdateSnapshots can no longer be optimized out.

Bug: 148956645
Test: compiles
Change-Id: Ib67cafd156308bf5a477996ec32eb786f8e896db
2020-04-16 13:12:41 -07:00
Treehugger Robot
8c6d5bf83c Merge "Re-enable libsnapshot ImageManagerTest" 2020-04-16 17:20:41 +00:00
Tom Cherry
f0dafccb38 Merge "liblog: cleanup log_read.h header" 2020-04-16 15:19:29 +00:00
Martijn Coenen
f0122aa14d Merge "Rename external storage properties." 2020-04-16 08:06:52 +00:00
Tianjie Xu
585ff01946 Merge "Handle the invalid timestamp in zipfile" 2020-04-16 04:33:35 +00:00
Christopher Ferris
9be6d30cc0 Merge "Add benchmarks for symbol reading." 2020-04-16 01:25:29 +00:00
Alessio Balsini
42a608162d Re-enable libsnapshot ImageManagerTest
ImageManagerTest had been temporarily disabled because flaky.
This test looks stable now, re-enable it.

Bug: 148889015
Test: atest vts_libsnapshot_test [-- --abi x86]
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I858661fed7f58d1e2857ed88f5d8e0f5220bf8c2
2020-04-16 00:11:55 +00:00
Treehugger Robot
8fbb0d8de0 Merge "macOS build fix: no SOCK_CLOEXEC on darwin." 2020-04-15 23:38:53 +00:00
Tianjie
426bf3a1f1 Handle the invalid timestamp in zipfile
The month field is one based in the zipfile modification time. And
it causes an overflow converting it to struct tm. Switch to type to
signed integer to suppress the sub-overflow.

Bug: 153882979
Test: parse the problematic zipfile
Change-Id: Iaf47bcc7f83d61b18c9e7a98bb6ab3936c9257e3
2020-04-15 16:32:42 -07:00
Treehugger Robot
a010dd7b50 Merge "Documented range of event logtags used by Android Automotive." 2020-04-15 23:22:28 +00:00
David Anderson
0bd13b7be9 Merge "libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge." 2020-04-15 22:51:20 +00:00
Treehugger Robot
63f2be8f56 Merge "macOS build fix: no off64_t on darwin." 2020-04-15 22:24:03 +00:00
Felipe Leme
76024d755a Documented range of event logtags used by Android Automotive.
Test: N/A
Bug: 153900032

Change-Id: I2e35d56f89becea33c4a4b7fb6af8de3ccbb087a
2020-04-15 14:40:21 -07:00
Elliott Hughes
cbe30fb952 macOS build fix: no SOCK_CLOEXEC on darwin.
We can't use the sysdeps.h copy of this code, so for now add yet
another copy & paste. We should come up with something better in
libbase, but let's get the macOS build fixed first.

Test: builds on mac
Change-Id: Ifb059990d7091f3d91b54e684f4ee14afe69c28b
2020-04-15 21:28:01 +00:00
Christopher Ferris
a9e19097ed Add benchmarks for symbol reading.
Add a number of benchmarks to time how long it takes to look
up symbols.

Test: Ran benchmarks on device.
Change-Id: Iab7aab3f60c2c7056395beca3d36263420bcb5dc
2020-04-15 14:03:21 -07:00
Treehugger Robot
00c2625fd1 Merge "first_stage_init: add hook to exec a shell script" 2020-04-15 19:56:56 +00:00
Treehugger Robot
0919f10fa2 Merge "first_stage_init: increase serial console tries to 50" 2020-04-15 18:47:56 +00:00
Steve Muckle
a4bf2cee04 first_stage_init: add hook to exec a shell script
If the first stage console is being used, attempt to run /first_stage.sh
immediately before the console is created.

Bug: 154126020
Change-Id: I8b7431e7b8219afea295b120d7ea91751804bda6
2020-04-15 10:59:30 -07:00
Will McVicker
c4793572f3 first_stage_init: increase serial console tries to 50
tl,dr;
Increase the attempts to 50 to reduce the chances of failing
to load the serial console. This will only happen if the cmdline
parameter "androidboot.first_stage_console=1" is enabled.

Details:
10 attempts only amounts to about 1 second of trying to open the serial
console. I tested booting an ACK GKI image 5x with 20 vendor modules and
found the serial console loaded on attempt 17 for all five boot
tests.

Bug: 153354917
Test: boot ACK image 5x and verify serial console comes up
Change-Id: I161a4176b2c6cf7b0bc1eefe072ff38b894add5d
Merged-In: I161a4176b2c6cf7b0bc1eefe072ff38b894add5d
2020-04-15 10:57:46 -07:00
Treehugger Robot
0b708cba86 Merge "Remove host_supported from libadb_pairing_server." 2020-04-15 17:16:28 +00:00
David Anderson
f3c8e3036c Merge "fs_mgr: Fix executable path in clean_scratch_files." 2020-04-15 16:35:31 +00:00
Martijn Coenen
ea751d94dd Rename external storage properties.
According to property naming guidelines.

Bug: 152170470
Bug: 153525566
Test: N/A
Change-Id: Ia5ce2a95e43724f8d0a7abf6782bc177dedb18a8
2020-04-15 17:32:28 +02:00
Joshua Duong
5e32d2f8de Remove host_supported from libadb_pairing_server.
To fix mac build error. Shouldn't be building this for the host.

Bug: N/A

Test: mma in system/core/adb on mac.
Change-Id: I8b86d265ef9b91eeaf7a4e5d6623a5399403ecaf
2020-04-15 06:53:38 +00:00
David Anderson
a441612fae fs_mgr: Fix executable path in clean_scratch_files.
Bug: 154071877
Test: no error log on startup
Change-Id: I84c627011992eed6952697e7260051006b1c10d0
2020-04-14 23:47:38 -07:00
David Anderson
f4d58b483e libsnapshot: Add a simple script and gtest to simulate power failures during snapshot-merge.
This test is pretty straight forward: create two large files, then merge
one into the other while injecting kernel crashes. At the end,
block-by-block validation is performed against both the snapshot-merge target
and the file written to disk.

Bug: 139092356
Test: instructions in PowerTest.md
Change-Id: I28cc88160cf824039966abff4e61382090a354c5
2020-04-14 23:32:38 -07:00
Treehugger Robot
8b4ed5f6b6 Merge "macOS build fix: don't build libadbconnection." 2020-04-15 02:12:09 +00:00
Kenny Root
0a1670ab15 Merge "Use <fqname> to avoid conflicts" 2020-04-15 00:44:49 +00:00
Elliott Hughes
729f58e0b7 macOS build fix: don't build libadbconnection.
Test: builds on mac
Change-Id: I91e3bf6b06f31edf542f8f8d6529787b0bf3a6ed
2020-04-14 16:33:16 -07:00
Elliott Hughes
7d9a7a3b6e macOS build fix: no off64_t on darwin.
Darwin has always had a 64-bit off_t, and never added an off64_t.

Test: builds on mac
Change-Id: I4b244dda94c67da76c9e0f47b333c2734f5a94af
2020-04-14 15:34:01 -07:00
Nikita Ioffe
9c898802ed Merge "Add RootTargetPreparer for CtsInitTestCases and CtsFsMgrTestCases" 2020-04-14 21:53:50 +00:00
Kenny Root
15351dcf60 Use <fqname> to avoid conflicts
The newer way of specifying the interface is using <fqname> and it also
has the handy side-effect of not causing conflicts when we add the
strongbox implementation to devices.

Test: make # check $OUT for the correct manifest
Change-Id: If8333814723261c4f3de375861ee19a6d922d55f
2020-04-14 14:37:24 -07:00
Tianjie Xu
83208f0833 Merge "Fix the boundary check when parsing sizes in zip64 extended field" 2020-04-14 21:03:45 +00:00
Tianjie
d9bc8fd639 Fix the boundary check when parsing sizes in zip64 extended field
We should check if the data to read resides within the boundary of
the extended field. Also check OOB when reading bytes from the
zipfile.

Bug: 153828925
Test: parse the poc with hwasan build
Change-Id: I54b58a287b9ae4ca0e5cc563086c1ed8051fb72a
2020-04-14 11:26:42 -07:00
Nikita Ioffe
f3504ec58d Add RootTargetPreparer for CtsInitTestCases and CtsFsMgrTestCases
Some of the test cases in CtsInitTestCases and CtsFsMgrTestCases require
root. This CL makes it possible to run such tests cases on userdebug
builds, which in turn means that they will be run on presubmit.

New option was implemented in
https://android-review.googlesource.com/c/platform/tools/tradefederation/+/1283834

Test: atest CtsInitTestCases
Test: atest CtsFsMgrTestCases
Change-Id: I3d29789ddd7ac549e40ac193c58d986670c49285
2020-04-14 18:57:07 +01:00
Tom Cherry
715a58e24d liblog: cleanup log_read.h header
There's no need to pull in <fcntl.h> to get O_NONBLOCK, since the
ANDROID_LOG_* macros are better standalone.

Also note that 0x00000003 should be reserved since these corresponded
to previously used values.

Test: build
Change-Id: Icaee6ee0250fe97d8324b3b340f7e196767b2711
2020-04-14 08:59:41 -07:00
Jaegeuk Kim
8b8743462c Merge "fstab: support f2fs compression" 2020-04-14 15:54:18 +00:00
Tom Cherry
92d34064e1 Merge "liblog: remove operator overloads from log_msg" 2020-04-14 15:32:32 +00:00
Tom Cherry
0ca9bd2bcd liblog: remove operator overloads from log_msg
No one's using them and it's not intuitive how they would be used.

Test: build
Change-Id: I8d49825be2e7ecee9834060260b1c59c30664f1d
2020-04-13 13:48:58 -07:00
Treehugger Robot
451197cb64 Merge "[incfs] Stream the hash tree for incremental installation" 2020-04-13 20:37:27 +00:00
Alex Buynytskyy
82c1c9711d [incfs] Stream the hash tree for incremental installation
Instead of sending the whole tree upfront use the same
streaming interface for it as for the data blocks

This improves installation speed by almost 200ms,
650-800ms -> 500-600ms

Bug: 153696423
Test: manual, adb install in various configurations

Change-Id: Ia83de2af54ca0b1969397514ea5d761719af9055
Merged-In: Ia83de2af54ca0b1969397514ea5d761719af9055
2020-04-13 13:00:01 -07:00
Nikita Ioffe
1c14654732 Merge "Fallback to hard reboot if userspace reboot hasn't started in time" 2020-04-13 19:14:56 +00:00
Tom Cherry
ffe39ea541 Merge "Cleanup some trivial TODOs." 2020-04-13 15:39:49 +00:00
Nikita Ioffe
d05535485f Fallback to hard reboot if userspace reboot hasn't started in time
Similarly to other recovery mechanisms, timeout is controlled by a
read-only property that can be configured per-device.

Test: adb root
Test: adb shell setprop init.userspace_reboot.started.timeoutmillis 2
Test: adb reboot userspace
Bug: 152803929
Change-Id: Id70710b46da798945ac5422ef7d69265911ea5ef
2020-04-11 01:59:17 +01:00
Tom Cherry
ac0cee539f Merge "liblog: cleanup TODOs in tests" 2020-04-11 00:18:57 +00:00
Josh Gao
44b7cb92d6 Merge "debuggerd: don't leave a zombie child if crash_dump is killed." 2020-04-10 22:04:03 +00:00
Tom Cherry
acf0bebcf9 Merge "Revert "logd: iterator corruption paranoia"" 2020-04-10 20:53:59 +00:00
Tom Cherry
5f4c79f510 liblog: cleanup TODOs in tests
1) log_msg.msg() will never be nullptr, unless logd sends an invalid
   response, so it's the right idea to ASSERT() that this is true
   instead of just checking and continuing.
2) Even though liblog.too_big_payload is tautological, there's no
   reason not to test it, in case the assumptions that make it
   tautological change.
3) We're not too worried about the return value of logging functions
   or that liblog prevents them from being written (anyone can write
   their own values to logd after all).

Test: liblog-unit-tests
Change-Id: I144cc7cf45c164ea5f04e0786ff0e298fd626f07
2020-04-10 13:48:05 -07:00
Tom Cherry
5d93b127f5 Merge "init: fix todo in a test" 2020-04-10 19:56:04 +00:00
Josh Gao
8489bfb4d7 Merge "[adb] Don't copy features set on each get()" 2020-04-10 18:18:15 +00:00