pm install: clarify when --multi-package can be used
The package manager shell commands 'install', 'install-streaming',
'install-incremental' and 'install-create' all use the same method to
parse their command line options, but the commands expect slightly
different input. Passing in an unexpected option will lead to
implementation defined behaviour: 'pm install --multi-package' will try
(and fail) to write a file to the root directory, which is reported to
the end user as:
Error: failed to write; open failed: EROFS (Read-only file system)
Reduce confusion by explicitly preventing --multi-package outside of
'install-create'.
Also, remove -w from the usage text: -w was replaced by
--restrict-permissions in commit 83a3a4a9db7.
Bug: 223171705
Test: adb shell pm install --multi-package /path/to/apk # fails and complains about --multi-package
Test: adb shell pm install /path/to/apk # succeeds
Test: atest PackageManagerServiceTest
Change-Id: Idb098e2197f02de2a42cc3d010ffb8968a6fbd29
1 file changed