Commit graph

51611 commits

Author SHA1 Message Date
Steve Muckle
0459294c3f libmodprobe: support parameters in LoadWithAliases
am: 13700a69d3

Change-Id: I7de4448ea0120be156347131359f5db903ff750f
2019-08-07 10:42:43 -07:00
Steve Muckle
90947b9c42 libmodprobe: add support to remove modules
am: bb58b01574

Change-Id: Ib09a53985855f840a6d23a3c6c555e84c8f761cc
2019-08-07 10:42:10 -07:00
Steve Muckle
4395f58bd5 libmodprobe: make name canonical in LoadWithAliases
am: 73b2928b94

Change-Id: I849ca922250842ed47854c6d2e7dead57ae9fc9b
2019-08-07 10:41:36 -07:00
Steve Muckle
92a432a1e2 libmodprobe: make available in vendor
am: 4104b8803a

Change-Id: I30d6abcd0bcc53101029de024773d8120e41cc24
2019-08-07 10:40:51 -07:00
Daniel Norman
f45125137c Merge "Adds check_interface_{restart,start,stop} check_builtins."
am: 0d061b258a

Change-Id: If100261f522a25fe85a10396d65bc065dd786774
2019-08-06 16:44:49 -07:00
Daniel Norman
0d061b258a Merge "Adds check_interface_{restart,start,stop} check_builtins." 2019-08-06 23:21:29 +00:00
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
Steve Muckle
13700a69d3 libmodprobe: support parameters in LoadWithAliases
Add support to specify module parameters in LoadWithAliases. These
parameters will be appended to any which are specified for the module in
modules.options.

Change-Id: I9aff1656ea397826f815b658b3b52c1892748601
2019-08-06 13:58:13 -07:00
Steve Muckle
bb58b01574 libmodprobe: add support to remove modules
Add a remove method which will unload a given module from the kernel,
along with any modules it depended on, assuming those modules are now
unused.

Change-Id: Ie66dc153ef1771f50e26421d38d3656e95954780
2019-08-06 13:58:13 -07:00
Steve Muckle
73b2928b94 libmodprobe: make name canonical in LoadWithAliases
Make the module name canonical in LoadWithAliases so it may be used
more easily from outside the class.

Change-Id: I7ee496b77a2beea43a6b68daed7af42660747559
2019-08-06 13:58:13 -07:00
Steve Muckle
4104b8803a libmodprobe: make available in vendor
A toolbox implementation of modprobe will require libmodprobe.

Change-Id: I7790576b828ad8cd5fae0c51926d8da9fb540d30
2019-08-06 13:58:13 -07: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
Daniel Norman
d2533c3395 Adds check_interface_{restart,start,stop} check_builtins.
Includes refactoring out interface inheritance hierarchy logic to a new
interface_utils file.

Bug: 137397100
Test: 'm' with an init_rc that misspells an interface in an
interface_start, interface_restart, or interface_stop line.
Change-Id: I9f650289d64ae2b13435a81e1693c7ab5e6e9ecf
2019-08-06 11:10:42 -07: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