Commit graph

56085 commits

Author SHA1 Message Date
Yifan Hong
31bd607f6c Make ramdisk_available.
am: 7dd4553991

Change-Id: I161449e90ad91359cb7bb98c91078ab51e3b54b5
2020-01-24 16:38:26 -08:00
Automerger Merge Worker
db35eb2c53 Merge "Support casefolded encryption" am: be27975fff
Change-Id: Ic5d84fb0c33f612d486358b2c4b780069a6eec10
2020-01-24 02:26:51 +00:00
Daniel Rosenberg
be27975fff Merge "Support casefolded encryption" 2020-01-24 02:09:55 +00:00
Automerger Merge Worker
a996f11aac Merge "libsnapshot: fix null pointer deref" am: f3700b9e42
Change-Id: I5c21edc690f3ea5e428f6ea0e1cae6f6c979e63d
2020-01-24 01:23:21 +00:00
Automerger Merge Worker
a554e96622 Merge "Relax permissions on /data/misc/logd" am: e3a7783686
Change-Id: I15a102fed8de07767aa3479f57f05bb4541caa93
2020-01-24 01:23:10 +00:00
Treehugger Robot
f3700b9e42 Merge "libsnapshot: fix null pointer deref" 2020-01-24 01:12:33 +00:00
Mike Ma
e3a7783686 Merge "Relax permissions on /data/misc/logd" 2020-01-24 01:04:03 +00:00
Automerger Merge Worker
ee38372728 Merge "Build test_com.android.adbd.apex." am: 427006042c
Change-Id: If112d7a595befc75f49cb1e988783016eb957dde
2020-01-24 00:11:15 +00:00
Josh Gao
427006042c Merge "Build test_com.android.adbd.apex." 2020-01-23 23:58:43 +00:00
Automerger Merge Worker
c0aa8dd3bc Merge "When encountered an unexpected status, mention it" am: 071c4b37e8
Change-Id: I3639559df9ee3217effd18701a8734cd22a58e58
2020-01-23 21:47:02 +00:00
Treehugger Robot
071c4b37e8 Merge "When encountered an unexpected status, mention it" 2020-01-23 21:30:31 +00:00
Tom Cherry
44c7bcb29e Merge "Move default tag from libbase to liblog"
am: b40c15e101

Change-Id: I3df5ce6a45cd4ee8cdd912d305a1e06bfedc4548
2020-01-23 13:14:56 -08:00
Yifan Hong
39de68cb6d libsnapshot: fix null pointer deref
Bug: 148129196
Test: TH
Change-Id: If6a628fe1bcb3006c7a21021162488a807a7f9f7
2020-01-23 12:58:25 -08:00
Treehugger Robot
b40c15e101 Merge "Move default tag from libbase to liblog" 2020-01-23 20:32:25 +00:00
Josh Gao
7da5d8a977 Build test_com.android.adbd.apex.
Build a test apex with an INT_MAX version code for the purposes of
update/rollback testing.

Test: atest adbd_e2e_tests # in internal master
Change-Id: I0e616db03dcbc940af2741dfca5b4c5f50a5a654
2020-01-23 11:55:03 -08:00
Christopher Ferris
0dd7ac6cd0 Merge "Properly handle empty map after read-only map."
am: 8bf4e29e44

Change-Id: Id7162e6f9edd13428eca7f39eb00f6a860d1e31e
2020-01-23 10:04:55 -08:00
Christopher Ferris
8bf4e29e44 Merge "Properly handle empty map after read-only map." 2020-01-23 17:45:26 +00:00
Tom Cherry
69ee5dde99 Move default tag from libbase to liblog
Bug: 119867234
Test: log tags look right, libbase/liblog unit tests
Change-Id: I3670c3fdce3d0238a23a53bba2877ffed1291f9c
2020-01-23 08:39:31 -08:00
Elliott Hughes
1d789a3535 Merge "debuggerd: remove the raw stack dump."
am: f8c0350eaa

Change-Id: I4e2deeebda36db892d09ae80357ab84a196901ce
2020-01-23 08:10:39 -08:00
Elliott Hughes
f8c0350eaa Merge "debuggerd: remove the raw stack dump." 2020-01-23 16:07:42 +00:00
Baligh Uddin
304d9784e4 Merge "Use SOONG_HOST_OUT_EXECUTABLES"
am: 2148b252c2

Change-Id: Ifaa5b147ea8016334aa7774124abaa4ca67ffdc0
2020-01-23 08:05:42 -08:00
Treehugger Robot
2148b252c2 Merge "Use SOONG_HOST_OUT_EXECUTABLES" 2020-01-23 16:02:29 +00:00
Baligh Uddin
3d902d1637 Use SOONG_HOST_OUT_EXECUTABLES
Bug: 147699225
Test: m com.android.tzdata (apexer requires these executables)
Change-Id: I008d244e330d2113cb3f2dd4b6c770df3f2fac06
2020-01-23 14:09:01 +00:00
Bowgo Tsai
85df445ee1 Merge "fastbootd: exporting more properties"
am: cfd517d2a0

Change-Id: I611f2ed730091a5c42be7849cb42588e946a43e7
2020-01-22 23:37:01 -08:00
Treehugger Robot
cfd517d2a0 Merge "fastbootd: exporting more properties" 2020-01-23 07:34:09 +00:00
Daniel Rosenberg
8775ce017d Support casefolded encryption
On ext4, enable casefolding if it is requested, but not currently
enabled.

Test: Enable casefolding on device. Check fs configuration on /data
Bug: 138322712
Change-Id: I3d54ab8bf15f28cf52c5b4344aa3fa254af83d60
2020-01-22 20:33:53 -08:00
Stephane Lee
ccf55fdf04 Merge "Populate fields for health HAL 2.1 + batteryCapacityLevel + batteryChargeTimeToFullNow"
am: 223fa17c2e

Change-Id: I4f2e0e45ef21c7fb23575e66eae11b3eb1e6607b
2020-01-22 19:17:14 -08:00
Christopher Ferris
0f40a05309 Properly handle empty map after read-only map.
Recently, the maps for an elf in memory might show up looking like:

  f0000-f1000 0 r-- /system/lib/libc.so
  f1000-f2000 0 ---
  f2000-f3000 1000 r-x /system/lib/libc.so
  f3000-f4000 2000 rw- /system/lib/libc.so

The problem is that there is logic in the code that assumed that the
map before the execute map must be the read-only map. In the case
above, this is not true. Add a new prev_real_map that will point
to the previous map that is not one of these empty maps.

This will fix the backtraces that look like this:

  #00  pc 0000000000050d58  /apex/com.android.runtime/lib64/bionic/libc.so!libc.so (offset 0x50000) (syscall+24) (BuildId: 5252408bf30e395d49ee270b54c77ca4)

To get rid of the !libc.so and the offset value, which is not correct.

Added new unit tests to verify this.
Added new offline test which an empty map between read-only and execute
map. Before this change, the backtraces had lines like
libc.so!libc.so (offset XXX) would be present.

Bug: 148075852

Test: Ran unit tests.
Change-Id: Ie04bfc96b8f91ed885cb1e655cf1e346efe48a45
2020-01-22 18:30:12 -08:00
Yifan Hong
7dd4553991 Make ramdisk_available.
Test: pass
Bug: 147347110
Change-Id: I9787e386e552393efc5beed5aac577be9ce1a3c5
2020-01-22 16:47:14 -08:00
Stephane Lee
223fa17c2e Merge "Populate fields for health HAL 2.1 + batteryCapacityLevel + batteryChargeTimeToFullNow" 2020-01-23 00:39:07 +00:00
Oliver Nguyen
ab1b7ce318 Merge "Set Clang coverage environment variables."
am: 38b33c09f9

Change-Id: I6c484ac1634a12ac963c57a503a0cc41f809bbcd
2020-01-22 14:41:52 -08:00
Oliver Nguyen
38b33c09f9 Merge "Set Clang coverage environment variables." 2020-01-22 22:34:35 +00:00
Elliott Hughes
627928e059 debuggerd: remove the raw stack dump.
This takes a lot of space, isn't convincingly useful, and makes it
likely that the far more valuable stuff that comes after it gets
truncated. So let's just drop it.

Bug: http://b/139860930
Test: manual crasher, presubmit
Change-Id: Ie417ffc07e3cb17e95fdb3d183f8c87de0f34b89
2020-01-22 14:13:46 -08:00
Zim
6bb2476ebd Merge "Harden /mnt/pass_through permission bits"
am: eba798a767

Change-Id: Icdb984ed9253f6ea86ccbfd2432fef68d6889896
2020-01-22 13:38:49 -08:00
Treehugger Robot
eba798a767 Merge "Harden /mnt/pass_through permission bits" 2020-01-22 21:30:53 +00:00
Ruchir Rastogi
d31aea7383 Merge "stats_event.h/c tests"
am: 4169e9e47d

Change-Id: I917ffcefc86909e799abe8b6af33ea1c5b146359
2020-01-22 12:56:01 -08:00
Treehugger Robot
4169e9e47d Merge "stats_event.h/c tests" 2020-01-22 20:50:09 +00:00
Ruchir Rastogi
c6e6c44e50 stats_event.h/c tests
Add unit tests for the native API to log atoms to statsd.

(This CL is being cherrypicked into AOSP in order to prevent automerger
issues with the rename from libstatssocket to libstatspush.)

Test: bit libstatssocket_test:*
Bug: 145231901
Change-Id: If427c17319787200260cbe3b71075ca556c9a82b
Merged-In: If427c17319787200260cbe3b71075ca556c9a82b
2020-01-22 11:43:01 -08:00
Tom Cherry
82b6e55054 Merge "liblog: check loggability before formatting"
am: 929c9e8b40

Change-Id: I83738092ea00854e2f45c760628650def304301e
2020-01-22 11:36:15 -08:00
Treehugger Robot
929c9e8b40 Merge "liblog: check loggability before formatting" 2020-01-22 19:16:11 +00:00
Stephane Lee
86f9f6aed5 Populate fields for health HAL 2.1
+ batteryCapacityLevel
+ batteryChargeTimeToFullNow

Bug: 137790244
Test: lshal debug (health service)
Change-Id: Ieb0b42e6cdded5974f01198ee151453367f82579
2020-01-22 10:50:05 -08:00
Zim
6ca090e6b0 Harden /mnt/pass_through permission bits
It previously had 0755 permission bits

With such permissive bits, an unauthorized app can access a file using
the /mnt/pass_through path for instance even if access via /storage
would have been restricted.

It is now 0700

TODO: Change ACL for /mnt/user from 0755 to 0700 in vold only when
FUSE flag is on. Changing it with FUSE off breaks accessing /sdcard
because /sdcard is eventually a symlink to /mnt/user/0/primary

Test: adb shell ls -d /mnt/pass_through
Bug: 135341433
Change-Id: I3ea9655c6b8c6b4f847b34a2d3b96784a8f4a160
2020-01-22 17:54:45 +00:00
Christopher Ferris
15c7e20207 Merge "Fix global finding logic."
am: d88210b676

Change-Id: I7ed869cbd0089c63dbb51fa7b2b2b2ebfb673a92
2020-01-22 09:34:40 -08:00
Christopher Ferris
d88210b676 Merge "Fix global finding logic." 2020-01-22 17:07:47 +00:00
Tom Cherry
96e7ef5ec1 liblog: check loggability before formatting
Only print logs with priority >= INFO on host, as fake_log_device
does.

This fixes a regression in host builds where loggability wasn't
checked at all.

Bug: 69935292
Test: ART host tests don't print extraneous logs
Change-Id: I885b794da6f24bd905192252925e4a9f88b06674
2020-01-22 08:49:59 -08:00
Bowgo Tsai
99f9a38a8b fastbootd: exporting more properties
Exporting more properties that can be useful for image compatibility
check, prior to run fastboot flash.

Bug: 74445765
Bug: 144473561
Test: fastboot getvar <new variable>
Change-Id: I2ddfa2c1e9e719e05a3a64b9ca1d608957aebf11
2020-01-22 23:29:07 +08:00
Yifan Hong
55573a3774 Merge "SnapshotManager::WaitForMerge gives more info"
am: e99ec483b1

Change-Id: I369b2220bb42258d19fe275fd69c83a03a3c9bba
2020-01-21 19:22:36 -08:00
Yifan Hong
e99ec483b1 Merge "SnapshotManager::WaitForMerge gives more info" 2020-01-22 03:13:16 +00:00
Mike Ma
a7fb095207 Relax permissions on /data/misc/logd
Incidentd needs to access /data/misc/logd to get persisted logs for
debugging purposes. Relax permissions on /data/misc/logd to allow
group (log) to access the dir and read its files. Effectively change
to:
drwxr-x--- logd log /data/misc/logd
-rw-r----- logd log /data/misc/logd/logcat*

Since this dir stores the past output of logcat, anyone that can run
logcat can be granted access to this dir. Access to this dir is further
guarded by SELinux. So it is safe.

Bug: 147924172
Test: Build, flash, reboot. Verify that the files have the right
      permissions.

Change-Id: I4d2aa9d5883d1ef14411b2b3902f0ca7c641dd7e
2020-01-21 18:39:19 -08:00
Christopher Ferris
de5cd8ccd4 Fix global finding logic.
Recently, the maps for an elf in memory might show up looking like:

  f0000-f1000 0 r-- /system/lib/libc.so
  f1000-f2000 0 ---
  f2000-f3000 1000 r-x /system/lib/libc.so
  f3000-f4000 2000 rw- /system/lib/libc.so

That empty map was confusing the logic when looking for a global
variable. Now this case is handled properly.

New unit test added for this case.

Bug: 147910661

Test: Ran unit tests.
Test: Ran original failing test 137-cfi.
Change-Id: Ida2e96d1da5e1bf61f41646949fe5a2d405c0d61
2020-01-21 18:00:57 -08:00