Commit graph

51600 commits

Author SHA1 Message Date
Yifan Hong
a716e1d0ff Merge "libsnapshot: correct DeviceInfo paths"
am: f9d5327287

Change-Id: Ifd9441bd8fc26289fc89293f6ecb66feadffd071
2019-08-06 15:43:45 -07:00
Treehugger Robot
f9d5327287 Merge "libsnapshot: correct DeviceInfo paths" 2019-08-06 22:12:53 +00:00
Elliott Hughes
09529e67cb Merge "adb: fail better in install-multiple."
am: 91a531897a

Change-Id: I6ec95d607c686c380fcdcad55bf6afb7bf0c44e3
2019-08-06 12:46:22 -07:00
Elliott Hughes
62d73aba8d Merge "adb: add --abi to the adb install help."
am: dad291fc46

Change-Id: Ib6d5bef802f05abeb680ed1f406925ceb32053a7
2019-08-06 12:40:57 -07:00
Elliott Hughes
b2b26672d0 Merge "Fix adb install on very old Android releases."
am: 8c4db55f66

Change-Id: Ie7328c2ec7aa9e8983824afb6239fce5d984847d
2019-08-06 12:40:23 -07:00
Elliott Hughes
022aafebb1 Merge "libstats: remove _USING_LIBCXX."
am: 5b3672a8a2

Change-Id: Ia3576ee301cd9df679f8559f2c0b233204fdf4a4
2019-08-06 12:39:52 -07:00
Elliott Hughes
91a531897a Merge "adb: fail better in install-multiple." 2019-08-06 19:33:34 +00:00
Elliott Hughes
dad291fc46 Merge "adb: add --abi to the adb install help." 2019-08-06 19:31:54 +00:00
Elliott Hughes
8c4db55f66 Merge "Fix adb install on very old Android releases." 2019-08-06 19:31:44 +00:00
Elliott Hughes
5b3672a8a2 Merge "libstats: remove _USING_LIBCXX." 2019-08-06 19:28:42 +00:00
Steve Muckle
c4e1e4e372 Merge "libmodprobe: add OWNERS file"
am: c6c574a9a4

Change-Id: Ic1c20781b853d20eeb354f9ea9aace1601f863f0
2019-08-06 09:22:47 -07:00
Treehugger Robot
c6c574a9a4 Merge "libmodprobe: add OWNERS file" 2019-08-06 16:02:27 +00:00
Yifan Hong
7543201add Merge "libsnapshot: forward declare IImageManager"
am: bb89da85c4

Change-Id: I00dc4e71aa4359199d8d5a8175ded5586a325736
2019-08-06 08:44:57 -07:00
Tom Cherry
fe837fe0ee Merge "init: Check onrestart commands"
am: 980cbef0c5

Change-Id: Ie0a36c3a803dc30697b0f8da2324c99c0db1770d
2019-08-06 08:44:25 -07:00
Tom Cherry
82b48d2023 Merge "init: ignore ENOENT from fewer builtins"
am: e269a721dc

Change-Id: I884f8bb2ab23950e24e345b55afe3f7a00b37aff
2019-08-06 08:43:15 -07:00
Treehugger Robot
bb89da85c4 Merge "libsnapshot: forward declare IImageManager" 2019-08-06 15:28:47 +00:00
Tom Cherry
980cbef0c5 Merge "init: Check onrestart commands" 2019-08-06 15:20:11 +00:00
Tom Cherry
e269a721dc Merge "init: ignore ENOENT from fewer builtins" 2019-08-06 15:19:48 +00:00
Vic Yang
d25fda0765 Merge "liblp: Make kDefaultGroup a string_view"
am: e5fa9b80ac

Change-Id: Ia1b6b26e2db72d4168b1295fc4ca7ef7bd1261ea
2019-08-05 21:35:31 -07:00
Treehugger Robot
e5fa9b80ac Merge "liblp: Make kDefaultGroup a string_view" 2019-08-06 03:59:33 +00:00
Yifan Hong
6250360390 libsnapshot: correct DeviceInfo paths
Test: pass
Bug: 135752105
Change-Id: Icb8eb35db9c297537131076721eb7ce868d59625
2019-08-06 02:45:10 +00:00
Elliott Hughes
541d7408c1 adb: fail better in install-multiple.
If we're failing out, don't print any messages from the shutdown code:
it's not interesting (and actively confusing!) to talk about the
"Success" of finalizing an aborted session.

Also fail early if stat fails the first time (we have to tell
PackageManager how much data to expect, for some reason).

Also use `bool` as the boolean type and add quotes around filenames in
error messages.

`install_multi_package` looks like the same nonsense copy & pasted, but
I don't know what that is, and haven't seen any bug reports, so I'm
ignoring that for now.

Bug: http://b/133522725
Test: manual
Change-Id: Id054dff44f21f4c4cc5877dcc2735fc1eb25f9a0
2019-08-05 17:06:04 -07:00
Yifan Hong
6917c638b9 libsnapshot: forward declare IImageManager
to avoid header dependency.
Test: builds
Bug: 134536978

Change-Id: I3749f3106812f68b83c96af850bd6e4e16482c39
2019-08-05 15:36:25 -07:00
Tom Cherry
6737a6bf3f init: Check onrestart commands
Test: have bad users/groups in onrestart chown commands fail the build
Change-Id: Ic7fea6395c1f6e09f06800ba373d402a81cb774c
2019-08-05 15:03:58 -07:00
Vic Yang
f3a7988e30 liblp: Make kDefaultGroup a string_view
Changing the type of kDefaultGroup from std::string to std::string_view
allows us to make it a constexpr object.  Since kDefaultGroup is the
only dirty object in liblp .bss at runtime, this change turns the .bss
page clean and thus saves 4KB per library load.

Bug: 138856262
Test: Boot cuttlefish and check liblp bss is clean for all 5 processes
      that are using it.
Change-Id: I7d7c0992e0ab769f070807f24e1275ffed424b5b
2019-08-05 13:02:50 -07:00
Steve Muckle
025cad4269 libmodprobe: add OWNERS file
Change-Id: I812c0420d982d2c927f40ca43545bdd15bc7b8be
2019-08-05 11:29:01 -07:00
Elliott Hughes
a1f2005121 libstats: remove _USING_LIBCXX.
Bug: http://b/137876753
Test: treehugger
Change-Id: I1a1162a931c2cbbe3883eb9925993d48ce7bb8cf
2019-08-05 08:15:17 -07:00
David Anderson
aa6b5176fb Merge "Implement basic libsnapshot functionality."
am: 23a87716b5

Change-Id: I2c29c0839d7cfefbc4791ab9a447c648e3ed73c0
2019-08-04 01:24:24 -07:00
David Anderson
23a87716b5 Merge "Implement basic libsnapshot functionality." 2019-08-03 01:30:49 +00:00
Elliott Hughes
c0ebd59073 adb: add --abi to the adb install help.
A bit of a break with convention, but we do already document `-t` which
is actually a PackageManager option, not an adb option, and `--abi`
seems like it'll be seeing increased usage these next few years.

Also add a pointer to `adb shell pm help` for full details of
PackageManager options.

Bug: http://b/122487331
Test: manual
Change-Id: I93f48d202e5707b27caadb5af2a65c485c6d3407
2019-08-02 17:09:30 -07:00
Elliott Hughes
94350737e3 Fix adb install on very old Android releases.
See the code comment for the gory details.

Bug: https://issuetracker.google.com/37035817
Bug: http://b/37704384
Test: manual testing on a variety of devices & emulators
Change-Id: If9e481924a8a2f3ec1e926342b2ecd522fa933a2
2019-08-02 16:10:45 -07:00
Daniel Norman
09ef370c20 Merge "Fixes incorrect flag info for the inheritance hierarchy file."
am: a022e47a0b

Change-Id: Ia23b92d8ff16f54d8be28ea222ea1caeb08e46b5
2019-08-02 16:09:40 -07:00
Daniel Norman
a022e47a0b Merge "Fixes incorrect flag info for the inheritance hierarchy file." 2019-08-02 23:00:27 +00:00
Daniel Norman
e6586c4c8e Fixes incorrect flag info for the inheritance hierarchy file.
Test: n/a
Change-Id: I65d6437f4192d969932e01019826827c98a2669c
2019-08-02 15:22:13 -07:00
Daniel Norman
265a39e990 Merge changes from topic "services_serve_interfaces_test"
am: fb54b74fa0

Change-Id: I9fd31cebbb82333d24d1a7675d817b65988f03db
2019-08-02 15:21:38 -07:00
Daniel Norman
fb54b74fa0 Merge changes from topic "services_serve_interfaces_test"
* changes:
  Adds new property for service name -> PID.
  Adds a library to parse service info from init_rc files for use in tests.
  Adds a visibility rule for init defaults.
2019-08-02 21:51:17 +00:00
Steven Moreland
50b137c86e Merge "logcat: error on multiple PID argument"
am: 41a5c022b4

Change-Id: Idc6b3283854cef283ef37c0b8d8c4e8204a9e7f5
2019-08-02 14:29:55 -07:00
Treehugger Robot
41a5c022b4 Merge "logcat: error on multiple PID argument" 2019-08-02 21:09:49 +00:00
David Anderson
456e50193b Implement basic libsnapshot functionality.
This CL implements some of the libsnapshot internals necessary to work
with update_engine. In particular it implements snapshot and update
state, as well as creating and mapping snapshot devices. It does not
implement anything related to merging, nor does it implement the full
update_engine flow.

Update state is stored in /metadata/ota/state. To synchronize callers of
libsnapshot, we always flock() this file at the top of public functions
in SnapshotManager. Internal functions are only called while the lock is
held, and a "LockedFile" guard object is always passed through to
indicate proof-of-lock.

Low-level functions, such as snapshot management, have been moved to
private methods. Higher-level methods designed for update_engine will
ultimately call into these.

This CL also adds some functional tests for SnapshotManager. Test state
is stored in /metadata/ota/test to avoid conflicts with the rest of the
system.

Bug: 136678799
Test: libsnapshot_test gtest
Change-Id: I78c769ed33b307d5214ee386bb13648e35db6cc6
2019-08-02 13:30:08 -07:00
Elliott Hughes
707074b402 Merge "Remove two more unused utf32 functions."
am: d7546f1d57

Change-Id: Iae9dda4eefa267e1314003a9ea3f6aa7d85b6e6c
2019-08-02 12:47:38 -07:00
Alessio Balsini
20315e7955 Merge "dmctl: add replace command"
am: 77a4f372c4

Change-Id: Idbd6dfd360c5e1ad029044df50bcc8e606e72c05
2019-08-02 12:47:02 -07:00
Treehugger Robot
d7546f1d57 Merge "Remove two more unused utf32 functions." 2019-08-02 19:29:45 +00:00
Treehugger Robot
77a4f372c4 Merge "dmctl: add replace command" 2019-08-02 19:24:14 +00:00
Steven Moreland
b0e867a1e6 logcat: error on multiple PID argument
Since they are dropped.

Bug: N/A
Test: manual try w/ 1 and 2 --pid arguments
Change-Id: I5945c12dc080a8c046b8071106f7d87ecb2b018c
2019-08-02 10:14:37 -07:00
Alessio Balsini
81d4ea79e2 dmctl: add replace command
The replace command is used to substitute the current table of a
device-mapper with the provided one.
The new table will be available as soon as the command returns
successfully.

Bug: 137759376
Test: manual
Change-Id: Iaf258d9043fab3a8770702f4e1c8c0e583c81519
Signed-off-by: Alessio Balsini <balsini@google.com>
2019-08-02 03:27:00 +01:00
David Anderson
4c03b47720 Merge "Fix storaged memory leak"
am: f7970cee69

Change-Id: Ia51fe075a343d75d12f6bda3d996bf999de5530f
2019-08-01 17:46:02 -07:00
David Anderson
f7970cee69 Merge "Fix storaged memory leak" 2019-08-02 00:15:28 +00:00
Alessio Balsini
d83a360b9a Merge "libdm: compute percentage of snapshot-merge"
am: ab80f54949

Change-Id: Iceb39910a5f1121efa23b7423bd9555206fe0704
2019-08-01 16:52:01 -07:00
Treehugger Robot
ab80f54949 Merge "libdm: compute percentage of snapshot-merge" 2019-08-01 23:32:16 +00:00
Tom Cherry
f38699f28c Merge changes Ied888249,Id8857c45
am: 549ea4801b

Change-Id: I6c6823bfe0d2a14d7ef7371d331a6bd672c6c7ff
2019-08-01 15:44:52 -07:00