Commit graph

47261 commits

Author SHA1 Message Date
Jiyong Park
ebe1460df5 Revert "Handle adb sync with Bionic under /bionic" am: fc97d2a116
am: 8b9fa0a44d

Change-Id: Ic582b6217d99200105ef67e096bfe15411609811
2019-03-15 02:30:44 -07:00
Jiyong Park
f90d8479c9 Don't bind-mount bionic files am: 7b4801a921
am: 2f2b99a20d

Change-Id: I060cec73225f039b23c4c1170bf8a7769a7c1ac6
2019-03-15 02:30:10 -07:00
Jiyong Park
8b9fa0a44d Revert "Handle adb sync with Bionic under /bionic"
am: fc97d2a116

Change-Id: I8c8780f0009795d281b93efa691791427402ef45
2019-03-15 02:18:42 -07:00
Jiyong Park
2f2b99a20d Don't bind-mount bionic files
am: 7b4801a921

Change-Id: I80ded3b5efbee209eb705556bc92e2708497da20
2019-03-15 02:17:48 -07:00
Bowgo Tsai
c613c0d130 Merge changes from topic "adb_root_in_user" am: da1251d6a5
am: ac5d9460f2

Change-Id: I5a71508fe02bfb4fc182b2e2501a9d6bf39eba97
2019-03-14 22:00:55 -07:00
Bowgo Tsai
ac5d9460f2 Merge changes from topic "adb_root_in_user"
am: da1251d6a5

Change-Id: Ia9959008ac5cc571efe46bd0b80cbae53356d5ed
2019-03-14 21:55:02 -07:00
Treehugger Robot
da1251d6a5 Merge changes from topic "adb_root_in_user"
* changes:
  Allow overriding ro.debuggable to 1 on USER builds
  adbd: allowing adb root when the device is unlocked
2019-03-15 04:40:43 +00:00
Bowgo Tsai
1dacd42ae1 Allow overriding ro.debuggable to 1 on USER builds
When init found "/force_debuggable" in the first-stage ramdisk, it will
do the following if the device is unlocked:
  1. load /system/etc/adb_debug.prop (with ro.debuggable=1)
  2 .load userdebug_plat_sepolicy.cil instead of original plat_sepolicy.cil from
    /system/etc/selinux/.

This make it possible to run VTS on a USER build GSI, by using a special
ramdisk containing "/force_debuggable".

Bug: 126493225
Test: unlock a USER build device, check 'adb root' can work
Change-Id: I9b4317bac1ce92f2c0baa67c83d4b12deba62c92
2019-03-15 06:12:00 +08:00
Bowgo Tsai
9b30c0a7e6 adbd: allowing adb root when the device is unlocked
As there is no security guarantee when the device is unlocked,
allowing adb root gives us more rooms to debug a USER build images.

Also, this makes it possible to run VTS on a USER build GSI, with
setting ro.debuggable=1 and unlocking the device.

This basically re-lands a reverted change:
https://android-review.googlesource.com/c/platform/system/core/+/437815

Which isn't needed after we moved /sbin/adbd to /system/bin/adbd in
USERDEBUG GSI. But it's still needed for USER build GSI.

Bug: 126493225
Test: unlock a USER build device, check 'adb root' can work
Change-Id: I93f12c8a3fe65c96c947e4602795eadfe591c521
2019-03-15 03:04:46 +08:00
David Anderson
40e223d081 Merge "libfiemap_writer: Calculate FIBMAP blocks correctly." am: 9d3310c019
am: 2cf4f08bd5

Change-Id: Ia8342b273c3b450e00a0f7bd5945d01fd35f0b33
2019-03-14 10:31:46 -07:00
David Anderson
2cf4f08bd5 Merge "libfiemap_writer: Calculate FIBMAP blocks correctly."
am: 9d3310c019

Change-Id: I37ff4a029fc722518a11caab744c4f5378e6eb3b
2019-03-14 10:14:29 -07:00
Tao Bao
cb8ca9e925 Merge changes from topic "charger-shared-libs" am: 74cece70bc
am: 583f5fafb6

Change-Id: I026241ec61f2c44bce2b98bb3f94dff2ab569613
2019-03-14 10:09:58 -07:00
Hans Boehm
c9c666ffed Merge "Revert "Revert "Fix wp and sp comparison bugs""" am: bca89d7bbc
am: 8d1aef81d6

Change-Id: Id5801e89ceb9733929b3e27d036f0da29660bbe4
2019-03-14 10:09:02 -07:00
David Anderson
9d3310c019 Merge "libfiemap_writer: Calculate FIBMAP blocks correctly." 2019-03-14 17:08:19 +00:00
Tao Bao
583f5fafb6 Merge changes from topic "charger-shared-libs"
am: 74cece70bc

Change-Id: Ib6922f38638a33e6ebae9ca10293d980281687c3
2019-03-14 10:05:05 -07:00
Hans Boehm
8d1aef81d6 Merge "Revert "Revert "Fix wp and sp comparison bugs"""
am: bca89d7bbc

Change-Id: I6a0fbce87209d40ca788e7b2ba891488725ee29a
2019-03-14 10:03:52 -07:00
Tao Bao
74cece70bc Merge changes from topic "charger-shared-libs"
* changes:
  healthd: Add charger.recovery module.
  healthd: charger uses shared libraries.
2019-03-14 16:56:29 +00:00
Hans Boehm
bca89d7bbc Merge "Revert "Revert "Fix wp and sp comparison bugs""" 2019-03-14 16:55:49 +00:00
Neil Fuller
424253f257 Merge "Move the logic for creating APEX-related symlinks" am: cb7ac9d752
am: 26fc502a64

Change-Id: I49a439a93477b706f5c1bd9a8ccb1c6dd42ea196
2019-03-14 09:29:01 -07:00
Neil Fuller
26fc502a64 Merge "Move the logic for creating APEX-related symlinks"
am: cb7ac9d752

Change-Id: Ia0a5e6be6c8a15fa5720e0087823677d389a887c
2019-03-14 09:23:50 -07:00
Christopher Ferris
0fd3f965b8 Merge "Add support for displaying soname in an apk." am: 4886a5bd59
am: cb839e8475

Change-Id: I651e448ba74644335fbd7513061ed740b431e794
2019-03-14 09:08:18 -07:00
Neil Fuller
cb7ac9d752 Merge "Move the logic for creating APEX-related symlinks" 2019-03-14 16:06:08 +00:00
Christopher Ferris
cb839e8475 Merge "Add support for displaying soname in an apk."
am: 4886a5bd59

Change-Id: Id99d7d57656cc841d35162f37aa70f36f77db65c
2019-03-14 08:55:00 -07:00
Christopher Ferris
4886a5bd59 Merge "Add support for displaying soname in an apk." 2019-03-14 15:40:59 +00:00
Gavin Corkery
ddd3932823 Merge "Rename data/pkg_staging to data/app-staging." am: ff3c13f52f
am: a5589e817b

Change-Id: I947b13e44dd1a3cf77c07b6d57f117e7bb438cf5
2019-03-14 07:32:23 -07:00
Gavin Corkery
a5589e817b Merge "Rename data/pkg_staging to data/app-staging."
am: ff3c13f52f

Change-Id: I4e63493ec05eb92fbcce6c7ed446a9f08a29bd88
2019-03-14 07:21:14 -07:00
Mark Salyzyn
b7fcdaaa4e Merge "init: epoll: add events argument to RegisterHandler" am: 873ee642f2
am: b7154087a4

Change-Id: I51df638a1cbb4997c3b88774b22a429f73a57d5c
2019-03-14 07:21:02 -07:00
Mark Salyzyn
b7154087a4 Merge "init: epoll: add events argument to RegisterHandler"
am: 873ee642f2

Change-Id: I45d4e0d034a3878f6f76ccceb5e0a6ac91d965e7
2019-03-14 07:15:52 -07:00
Gavin Corkery
ff3c13f52f Merge "Rename data/pkg_staging to data/app-staging." 2019-03-14 14:14:38 +00:00
Mark Salyzyn
873ee642f2 Merge "init: epoll: add events argument to RegisterHandler" 2019-03-14 14:11:27 +00:00
Roland Levillain
6ab844e1fe Merge "Remove Valgrind entries from fs_config." am: e61d5ccf47
am: 710264b43b

Change-Id: I4b06036ef93556eba26d46cde2cf5e6936c5d503
2019-03-14 06:37:47 -07:00
Roland Levillain
710264b43b Merge "Remove Valgrind entries from fs_config."
am: e61d5ccf47

Change-Id: Ia26016e8d112794817bdb809146fad55e6eb3f04
2019-03-14 06:32:35 -07:00
Roland Levillain
e61d5ccf47 Merge "Remove Valgrind entries from fs_config." 2019-03-14 13:22:15 +00:00
Neil Fuller
16e5ae3b39 Move the logic for creating APEX-related symlinks
The existing location of logic for creating symlinks to files that have
moved into APEX does not get executed for -user builds, only
-userdebug and -eng. The new location is equally arbitrary but appears
to be invoked for -user, -userdebug and -eng targets.

Tested with:
make cleaninstall && lunch taimen-[user|userdebug|eng] && make droid

Inspected:
ls -l out/target/product/taimen/system/usr/icu

Bug: 128249030
Bug: 122985829
Bug: 124106384
Test: see above
Merged-In: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
Change-Id: I92a52d0b5ef97e8cb4f780691f8594e40f2fa6b3
(cherry picked from commit 0ed52b789d)
2019-03-14 10:38:54 +00:00
David Anderson
44f54e0343 Merge "libfiemap_writer: Fix the progress bar on VFAT partitions." am: ed5d1ca252
am: 90b78c6d0d

Change-Id: Iec44588fee1210fc0101ca5ad051135f9b974e02
2019-03-13 19:05:54 -07:00
David Anderson
90b78c6d0d Merge "libfiemap_writer: Fix the progress bar on VFAT partitions."
am: ed5d1ca252

Change-Id: Ic7fea9196b809953048e5bf5fe037baa9c26fd4c
2019-03-13 19:01:45 -07:00
David Anderson
483ce1d496 libfiemap_writer: Calculate FIBMAP blocks correctly.
FIBMAP blocks are returned in FIGETBSZ units, which means the number of
blocks also needs to be determined by FIGETBSZ. Using the stat blocksize
is incorrect. On VFAT, FIGETBSZ returns 512 whereas st_blksize is 32768.

Bug: 126230649
Test: fiemap_writer_test gtest
Change-Id: Id0a667936ff9c0b60b1e8f72920cf62ceece1657
2019-03-13 19:01:13 -07:00
David Anderson
ed5d1ca252 Merge "libfiemap_writer: Fix the progress bar on VFAT partitions." 2019-03-14 01:51:27 +00:00
Elliott Hughes
ca41e88529 Merge "run-as: improve diagnostics on failure." am: e5de6db1dd
am: bfe0513107

Change-Id: Id1fe5e5951df93f37dc39fa0c80a69ff603cbfd7
2019-03-13 17:41:39 -07:00
Elliott Hughes
bfe0513107 Merge "run-as: improve diagnostics on failure."
am: e5de6db1dd

Change-Id: I61e98d37cdff9ce9b65820e773c17e9a62c9084a
2019-03-13 17:37:26 -07:00
Elliott Hughes
e5de6db1dd Merge "run-as: improve diagnostics on failure." 2019-03-14 00:26:32 +00:00
Christopher Ferris
02a6c448c3 Add support for displaying soname in an apk.
Changes:
- Change GetSoname to always returns a std::string.
- Added new unit tests for the soname printing.
- Modify the GetElf() function to save the same elf when we see rosegment
  linkers that split the read-only and read-write across a map. This
  avoids creating multiple elf objects for each map.
- Fixed a few offline unwind tests.

Bug: 29218999

Test: Unit tests pass.
Change-Id: Iad7c38b5c2957a8c5fd4ba94ebec335bafcad57d
2019-03-13 17:07:46 -07:00
Mark Salyzyn
37bbf800fa init: epoll: add events argument to RegisterHandler
Allow caller to specify events other than EPOLLIN default.

Test: boot
Bug: 124072565
Change-Id: Id4e582a6abc74c5fdb26fea7dcbd3ba2150dadd6
2019-03-13 16:51:31 -07:00
Tim Murray
8f66fc9000 Merge "lmkd: set PSI_POLL_PERIOD to 40ms" am: 92dcfb3187
am: 90cfb547d2

Change-Id: I3bcad580bb095c186d990de98723ec78463ba2d4
2019-03-13 16:39:49 -07:00
Tim Murray
90cfb547d2 Merge "lmkd: set PSI_POLL_PERIOD to 40ms"
am: 92dcfb3187

Change-Id: Ib8d6a2dc535e9cccad95c790da9454d5550b4cd2
2019-03-13 16:35:39 -07:00
Tim Murray
92dcfb3187 Merge "lmkd: set PSI_POLL_PERIOD to 40ms" 2019-03-13 23:27:13 +00:00
Jiyong Park
fc97d2a116 Revert "Handle adb sync with Bionic under /bionic"
This reverts commit 7c7189c469.

Bug: 125549215
Test: system/core/fs_mgr/tests/adb-remount-test.sh
Change-Id: I4ee40cda9c3b94b116dc822c7b9736cfe2c9c9f0
2019-03-14 07:35:54 +09:00
Jiyong Park
7b4801a921 Don't bind-mount bionic files
Bind-mounting of the bionic files on /bionic/* paths no longer required
as there are direct symlinks from bionic files in /system partition to
the corresponding bionic files in the runtime APEX. e.g.,

/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so

Bug: 125549215
Test: m; devices boots
Change-Id: I4a43101c3e3e2e14a81001d6d65a8a4b727df385
2019-03-14 07:35:54 +09:00
David Anderson
5df0092353 libfiemap_writer: Fix the progress bar on VFAT partitions.
We allocate VFAT file space by seeking and writing a single byte. It
turns out this is not fast enough to avoid invoking the progress
callback, so instead, we should seek in increments.

Bug: 126230649
Test: fiemap_writer_test gtest
Change-Id: I2b363af4ebde873411e8a3acd22ca68d175afe3f
2019-03-13 13:58:12 -07:00
Hans Boehm
6e75ad6e13 Revert "Revert "Fix wp and sp comparison bugs""
Fix wp and sp comparison bugs

Make clear() actually clear wp m_refs, so that nulls compare equal.

Make equality consistent with < and >, ensuring that a weak pointer
cannot be both equal to and greater than another.

Don't rely on the built-in < and > operators to correctly order
different objects. The standard does not guarantee that, and there is
a risk of compiler relying on that lack of guarantee.

Remove unnecessary comparison overloads, especially those
comparing a wp<> to an sp<>.

Change the remaining wp<> to sp<> comparisons to check for equivalence
of the mRefs pointer instead of the object address, thus eliminating
the dubious equal comparison result for a dead wp<> and an sp<> that
happen to point to the same object address.

Add comparison tests.

This reverts commit a2a2ad8057.

The original code, and my original CL, both failed to initialize m_refs
in various wp<> constructors. This now became more important, since
comparisons now rely more on m_refs. However I believe it was always
a bug, since some comparisons always relied on m_refs.

Test: Treehugger, boot AOSP, atest RefBase
Bug: 126922090
This reverts commit a2a2ad8057.

Reason for revert: Reapply after constructor fixes.

Change-Id: I2c8917416a2306e36d2b6bb7b397f653020e5688
2019-03-13 13:26:35 -07:00