Commit Graph

29589 Commits

Author SHA1 Message Date
Vijay Venkatraman 83f50843cb Merge "Moved include/backtrace to libbacktrace/include" 2017-04-13 00:17:13 +00:00
Josh Gao e1dacfc1b6 adb: kill adb_thread_{create, join, detach, exit}.
We have std::thread now, so we can delete this cruft.

Test: python test_device.py
Test: adb_test
Test: wine adb_test.exe
Test: /data/nativetest/adbd_test/adbd_test
Change-Id: Ie1c1792547b20dec45e2a62ce6515fcb981c3ef8
2017-04-12 17:12:32 -07:00
Tom Cherry 3fa467338f ueventd: Fix up string handling in handle_*_device_event()
Bug: 36250207

Test: Boot bullhead
Test: Boot sailfish, observe no boot time regression
Test: init unit tests

Change-Id: Ie5ec609a3f74bb03f5920734ada4d7de57508de4
2017-04-12 16:36:53 -07:00
Tom Cherry 060b74baad ueventd: convert mkdir_recursive() to std::string
Bug: 36250207

Test: Boot bullhead
Test: Boot sailfish, observe no boot time regression
Test: init unit tests

Change-Id: I5a2ac369d846e044230b709fd07eb21ad12d47bb
2017-04-12 16:36:44 -07:00
Tom Cherry 780a71e779 ueventd: move subsystem logic from code to ueventd.rc
Test: Boot bullhead
Test: Boot sailfish, observe no boot time regression
Test: init unit tests

Change-Id: I690137b584fcc2b9cd2dd932a2678f75a56d6737
2017-04-12 16:36:20 -07:00
Josh Gao 46de1d7f03 adb: don't try to resolve 'localhost'
Misconfigured systems can have localhost pointing to an address that
isn't 127.0.0.1 or ::1.

adb is the only caller of the libcutils socket_loopback functions, so
move them into adb and switch the implementations over to using
INADDR_LOOPBACK and in6addr_loopback, instead of resolving 'localhost'
when connecting.

Bug: http://b/37282612
Test: `killall adb; adb shell`
Test: `killall adb; ip addr del 127.0.0.1/8 dev lo; adb shell`
Change-Id: I01c1885f1d9757ad0f7b353dd04b4d1f057741c8
2017-04-12 16:07:49 -07:00
Jaesoo Lee 65c8cb8935 Merge "disable module loading after BOOT_COMPLETED broadcast"
am: 20b7f78204

Change-Id: I8dc2233f7a39deee7d557d65d8130248fbb32cf5
2017-04-12 23:07:47 +00:00
Jaesoo Lee 20b7f78204 Merge "disable module loading after BOOT_COMPLETED broadcast" 2017-04-12 22:59:37 +00:00
Dmitri Plotnikov 00e1c4f330 Passing additional parameter to powerctl
Test: adb reboot recovery,foo and verify that the parameter reaches bootloader
Change-Id: I9690cf96cf9730e5324b9f5310c3d0341fe25fe2
2017-04-12 14:38:23 -07:00
Hidehiko Abe 352476e118 Force set timezone to UTC in logd.
(cherry picked from commit c27f12a3d396f113c5ae09d2f2c8ff7de3f8b551)

logd assumes that it is running in UTC time zone.
However, if persist.sys.timezone is set at some point later,
that affects and confuses logd behavior.
To avoid such a case, this CL sets TZ to UTC, which overrides
the property's behavior.

Test: Ran CtsOsTestCases.
Test: gTest liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Bug: 33566779
Change-Id: Ib9edd4cb06f019a33aaf8d77d33bd82fdbbda480
2017-04-12 14:33:17 -07:00
Elliott Hughes 48eaef5804 Merge "libcutils: fix system-background tasks shown in top command"
am: e4e4777fc7

Change-Id: Ic6922c4c2022515f7b668f195055df1401087f46
2017-04-12 18:44:58 +00:00
Elliott Hughes e4e4777fc7 Merge "libcutils: fix system-background tasks shown in top command" 2017-04-12 18:33:43 +00:00
Steven Moreland 48cdaff063 libutils: mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: m -j libutils
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: I6c1279a74ef071851401e38bbdd377f13827694c
2017-04-12 08:59:41 -07:00
Johan Torås Halseth 8898a151e6 Merge "Move adb backup/restore helptext to adb shell bu help."
am: 4a36cc7cf6

Change-Id: I89f97a7885fad7ed9456b1f2e63013e00a707a08
2017-04-12 09:16:52 +00:00
Johan Torås Halseth 4a36cc7cf6 Merge "Move adb backup/restore helptext to adb shell bu help." 2017-04-12 09:10:29 +00:00
Ganesh Mahendran 6748f24d70 libcutils: fix system-background tasks shown in top command
tasks in system-background cgroup will be shown as below:
 580   580 system   12  -8   1% S 190656K  19408K unk surfaceflinger  /system/bin/surfaceflinger

This patch fix this issue.

Change-Id: Ib39ff892010498548d7fbfb4021df62498acd033
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
2017-04-12 16:25:25 +08:00
Tom Cherry 9ae606d659 Merge "ueventd: remove /dev/log"
am: 120add07ab

Change-Id: I136158c1f82ade6c6f41b2c02f9b4d6a592fe4c6
2017-04-12 08:06:02 +00:00
Treehugger Robot 120add07ab Merge "ueventd: remove /dev/log" 2017-04-12 07:58:33 +00:00
Keun-young Park 1dc9738730 Merge "use s_max_mnt_count to detect mke2fs generated partition"
am: 2e3abe2d05

Change-Id: I239527498a38084c472f1629017c993a1a52f41c
2017-04-12 07:55:43 +00:00
Treehugger Robot 2e3abe2d05 Merge "use s_max_mnt_count to detect mke2fs generated partition" 2017-04-12 07:45:13 +00:00
Jaesoo Lee dcf4d19dd9 disable module loading after BOOT_COMPLETED broadcast
This CL disables module loading by writing 1 to
/proc/sys/kernel/modules_disabled when the property sys.boot_completed
is set to 1 by ActivityManagerService (at the broadcast of
PHASE_BOOT_COMPLETED).

Bug: 36515654
Test: tested on sailfish and verified that module loading is disabled in
userdebug and enabled in eng mode
Merged-In: Id38d34a6395966ab21e440614337c0cfca791ad0
(cherry picked from commit 6ed19d1675)

Change-Id: I2faa459b450b3a64f854c832c6b91cbf682bbffa
2017-04-12 10:08:26 +09:00
Tom Cherry a778c81e11 Merge "ueventd: replace char** links with std::vector<std::string>"
am: 162118928e

Change-Id: I3d6a16d0da51e3b45cdc607db0d93bc12d0767c3
2017-04-12 01:05:21 +00:00
Treehugger Robot 162118928e Merge "ueventd: replace char** links with std::vector<std::string>" 2017-04-12 00:57:35 +00:00
Keun-young Park 95e233f9ff use s_max_mnt_count to detect mke2fs generated partition
- Old tool will set it to 10 while mke2fs will set it to -1.
- For now, only tag it.
- TODO: possibly add different policy per image tool version.

bug: 32246772
Test: check dmesg after reboot
Change-Id: Ib763f8ba64957412d2b02a9d6e3fc2bfcf55851e
2017-04-11 17:55:14 -07:00
Tom Cherry d4ff8d83d3 ueventd: remove /dev/log
This was marked deprecated in 2014 and removed in 2015, let's remove
the uevent rule now too.

Test: see that logging still works on bullhead
Change-Id: Idaf3f49a1afe7046eba6c976628b9f1c8b3ec094
2017-04-11 21:35:46 +00:00
Adam Lesinski 80d8a9350c Merge "ZipWriter: Keep LFH and CFH in sync"
am: a309bc491d

Change-Id: I06f20c0edf1cc60bd39f38d45d512cfbf39bb0a9
2017-04-11 20:00:27 +00:00
Treehugger Robot a309bc491d Merge "ZipWriter: Keep LFH and CFH in sync" 2017-04-11 19:42:21 +00:00
Vijay Venkatraman 8f2c28d572 Moved include/backtrace to libbacktrace/include
Export libbacktrace_headers

Bug: 33241851
Test: Build sailfish
Change-Id: Iba310ffc21d17ba542bed954a960ab305037061c
2017-04-11 11:22:43 -07:00
Johan Toras Halseth eca1b3bdcc Move adb backup/restore helptext to adb shell bu help.
Key/value support for adb backup was added in ag/1946677, and help text
for adb shell bu is added in ag/2088937. This CL points the user to this
helptext instead of keeping it here, since it can quickly get out of
sync.

BUG=36170696

Test: adb
Change-Id: Ic40679f421a32e60f292ad20b726a89bfff03349
2017-04-11 19:15:17 +01:00
Jocelyn Bohr e53621c1f2 Merge changes from topic 'trusty_km2_hal'
am: a4b40020ef

Change-Id: I31e2ef8b8a41876cc6c2288abde798e261d00247
2017-04-11 17:04:45 +00:00
Dan Willemsen c0fbad2b2b Merge "Remove .(ll)ndk suffix from (ll)ndk_library"
am: b37312a794

Change-Id: Ide6db0c1ceb6254a2279ca277a2b8a9dbd67b9b7
2017-04-11 16:55:27 +00:00
Jocelyn Bohr a4b40020ef Merge changes from topic 'trusty_km2_hal'
* changes:
  trusty: keymaster: update device tests to use 2.0 API
  trusty: keymaster: Implement abort
  trusty: keymaster: Implement finish
  trusty: keymaster: Implement update
  trusty: keymaster: Implement begin
  trusty: keymaster: Implement upgrade_key
  trusty: keymaster: Implement attest_key
  trusty: keymaster: Implement export_key
  trusty: keymaster: Implement import_key
  trusty: keymaster: Implement get_key_characteristics
  trusty: keymaster: Implement generate_key
  trusty: keymaster: Implement add_rng_entropy
  trusty: keymaster: Implement configure
  trusty: keymaster: Begin update from Keymaster 0.3 to 2.0
2017-04-11 16:52:45 +00:00
Treehugger Robot b37312a794 Merge "Remove .(ll)ndk suffix from (ll)ndk_library" 2017-04-11 16:19:16 +00:00
Elliott Hughes a16ad5d45c Merge "Add a reasonably full implementation of gzip/gunzip/zcat."
am: ca3de5562b

Change-Id: Id997ac6f852b8036c661376d28d20eacdc3cdc8a
2017-04-11 15:46:19 +00:00
Elliott Hughes ca3de5562b Merge "Add a reasonably full implementation of gzip/gunzip/zcat." 2017-04-11 15:40:32 +00:00
Dan Willemsen ab89b34b6f Remove .(ll)ndk suffix from (ll)ndk_library
Soong handles these automatically now.

Bug: 33241851
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Merged-In: Ica4eedda51bb34db2f39d2c64ea436e1f633bfc3
Change-Id: Ica4eedda51bb34db2f39d2c64ea436e1f633bfc3
2017-04-11 15:14:28 +00:00
Adam Lesinski d987c9dd9e ZipWriter: Keep LFH and CFH in sync
We change the GPB in the LocalFileHeader if the entry can not
have a trailing DataDescriptor. Make sure to patch the
CentralFileHeader to have the same bits set.

Modify ZipArchive to check that the data descriptor bit is consistent
between Central and Local file headers.

(cherry-pick of commit e0eca55fe6)

Test: make ziparchive-tests
Bug: 36686974
Change-Id: Ied167570abcf6426b1c678cd40123e5ad65909db
2017-04-11 01:45:25 +00:00
Keun-young Park cb4dadfb08 Merge "poll umount completion from /proc/mounts"
am: 625a098573

Change-Id: Ie6fc3a126124a61c09c6aababb1da7893bb7eff7
2017-04-11 00:55:22 +00:00
Keun-young Park 625a098573 Merge "poll umount completion from /proc/mounts" 2017-04-11 00:34:00 +00:00
Jocelyn Bohr 5020603116 trusty: keymaster: update device tests to use 2.0 API
Test: builds, ran trusty_keymaster_tipc on imx6ul
Change-Id: Ie9e8ee35ec31aead12adb348e6542a648b41fd7a
2017-04-10 17:33:49 -07:00
Jocelyn Bohr 465615e538 trusty: keymaster: Implement abort
Test: builds
Change-Id: I8dfef740a75ff76aebd3ee63aa747e319193aaed
2017-04-10 17:33:49 -07:00
Jocelyn Bohr e57f3ce2bf trusty: keymaster: Implement finish
Test: builds
Change-Id: I8505f428613176eea5373a459bbce0de17406c55
2017-04-10 17:33:49 -07:00
Jocelyn Bohr 86eb966106 trusty: keymaster: Implement update
Test: builds
Change-Id: Ie411a4e7ae3b5242814777f2781e1d2508917bfa
2017-04-10 17:33:49 -07:00
Jocelyn Bohr d7da42c0fa trusty: keymaster: Implement begin
Test: builds
Change-Id: Icb5470a8c95131ee3d68ab2ce41423302b9ed531
2017-04-10 17:33:49 -07:00
Jocelyn Bohr 22812e9a30 trusty: keymaster: Implement upgrade_key
Test: builds
Change-Id: I2ce86be1cd2c2c35ded371b21cb6546c31e0014e
2017-04-10 17:33:49 -07:00
Jocelyn Bohr a256198b92 trusty: keymaster: Implement attest_key
Test: builds
Change-Id: Ic5bf59db43b4301cbc2fa216470b9f07de8336b0
2017-04-10 17:33:49 -07:00
Jocelyn Bohr 4cbfa7f2f0 trusty: keymaster: Implement export_key
Test: builds
Change-Id: I47d1ed4144014fca47fdf67f9f4d2eb0d9b1eb8f
2017-04-10 17:33:49 -07:00
Jocelyn Bohr 2d768669fa trusty: keymaster: Implement import_key
Test: builds
Change-Id: Ie130df9958d0a75fdedb463a38ea2625e88940db
2017-04-10 17:33:49 -07:00
Jocelyn Bohr a02270fdd9 trusty: keymaster: Implement get_key_characteristics
Test: builds
Change-Id: I6e6a28d8eec5ff91a9e8c82597593857732407f3
2017-04-10 17:33:45 -07:00
Jocelyn Bohr e514dd8ad4 trusty: keymaster: Implement generate_key
Test: builds
Change-Id: Ib77e29709eed2e5f0cd16ed214db61f4257fcebd
2017-04-10 17:21:10 -07:00