Commit graph

168 commits

Author SHA1 Message Date
Elliott Hughes
c3a206ccda Revert "[LSC] Add LOCAL_LICENSE_KINDS to system/core"
This reverts commit 187b7d1950.

Reason for revert: system/core is multiple projects, not one.

Change-Id: I790ea41741f8cd9b8b6db2f59a49e71fb0958fd6
2021-02-16 20:01:20 +00:00
Bob Badour
187b7d1950 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  bootstat/Android.bp
  cli-test/Android.bp
  code_coverage/Android.bp
  cpio/Android.bp
  debuggerd/crasher/Android.bp
  debuggerd/proto/Android.bp
  diagnose_usb/Android.bp
  fs_mgr/libdm/Android.bp
  fs_mgr/libfiemap/Android.bp
  fs_mgr/liblp/Android.bp
  fs_mgr/libsnapshot/Android.bp
  fs_mgr/libstorage_literals/Android.bp
  fs_mgr/libvbmeta/Android.bp
  fs_mgr/tests/Android.bp
  fs_mgr/tools/Android.bp
  gatekeeperd/Android.bp
  healthd/Android.bp
  healthd/testdata/Android.bp
  init/Android.bp
  init/Android.mk
  init/sysprop/Android.bp
  init/test_kill_services/Android.bp
  init/test_service/Android.bp
  libappfuse/Android.bp
  libasyncio/Android.bp
  libbinderwrapper/Android.bp
  libcrypto_utils/Android.bp
  libcrypto_utils/tests/Android.bp
  libdiskconfig/Android.bp
  libgrallocusage/Android.bp
  libkeyutils/mini_keyctl/Android.bp
  libmodprobe/Android.bp
  libnetutils/Android.bp
  libpackagelistparser/Android.bp
  libprocessgroup/Android.bp
  libprocessgroup/cgrouprc/Android.bp
  libprocessgroup/cgrouprc_format/Android.bp
  libprocessgroup/profiles/Android.bp
  libprocessgroup/setup/Android.bp
  libqtaguid/Android.bp
  libsparse/Android.bp
  libstats/push_compat/Android.bp
  libsuspend/Android.bp
  libsync/Android.bp
  libsystem/Android.bp
  libsysutils/Android.bp
  libusbhost/Android.bp
  libutils/Android.bp
  libvndksupport/Android.bp
  libvndksupport/tests/Android.bp
  llkd/Android.bp
  llkd/tests/Android.bp
  property_service/libpropertyinfoparser/Android.bp
  property_service/libpropertyinfoserializer/Android.bp
  property_service/property_info_checker/Android.bp
  qemu_pipe/Android.bp
  reboot/Android.bp
  rootdir/Android.bp
  rootdir/Android.mk
  rootdir/avb/Android.bp
  rootdir/avb/Android.mk
  run-as/Android.bp
  sdcard/Android.bp
  set-verity-state/Android.bp
  shell_and_utilities/Android.bp
  storaged/Android.bp
  toolbox/Android.bp
  trusty/apploader/Android.bp
  trusty/confirmationui/Android.bp
  trusty/confirmationui/fuzz/Android.bp
  trusty/coverage/Android.bp
  trusty/fuzz/Android.bp
  trusty/fuzz/test/Android.bp
  trusty/gatekeeper/Android.bp
  trusty/gatekeeper/fuzz/Android.bp
  trusty/keymaster/Android.bp
  trusty/keymaster/fuzz/Android.bp
  trusty/libtrusty/Android.bp
  trusty/libtrusty/tipc-test/Android.bp
  trusty/secure_dpu/Android.bp
  trusty/storage/interface/Android.bp
  trusty/storage/lib/Android.bp
  trusty/storage/proxy/Android.bp
  trusty/storage/tests/Android.bp
  trusty/utils/spiproxyd/Android.bp
  trusty/utils/trusty-ut-ctrl/Android.bp
  usbd/Android.bp
  watchdogd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  debuggerd/Android.bp
  fastboot/Android.bp
  libkeyutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-MIT
to:
  Android.bp
  libcutils/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  fs_mgr/Android.bp
  fs_mgr/libfs_avb/Android.bp
  trusty/utils/rpmb_dev/Android.bp

Added SPDX-license-identifier-BSD
to:
  fastboot/fuzzy_fastboot/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I5bd81adb5cdcf2b4dd4141b204eb430ff526af8f
2021-02-16 04:10:03 -08:00
Paul Crowley
26aabfd1ed Move layout_version to /data/misc/installd
Bug: 139543295
Test: Boot, ensure file is properly created
Change-Id: I919b5599484b4c77f222e640a1f1b5d65198a0c7
2019-08-21 10:12:18 -07:00
Sudheer Shanka
cabc52646a Allow callers to pass a flag to not link obb dirs of multiple users.
Bug: 110960295
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: I738e7e6365fb4917f1172c578281e1835a5012c2
2019-03-05 14:41:54 -08:00
Sudheer Shanka
81c687dff8 Reland "Create new mount directory /mnt/runtime/full."
This will be used for system internals to access
secondary volumes without having to bypass sdcardfs.

This reverts commit 54b8844b13

Bug: 121277410
Test: manual
Change-Id: Id5b995dc5899b5999f1dea662ba1c3ee475a0e46
2019-01-19 00:21:10 +00:00
Daniel Rosenberg
c336f86284 Add support for esdfs mounting
If sdcardfs is turned off, try mounting esdfs.

Test: Override ro.sys.sdcardfs to be false, or run
      sm set-sdcardfs off. If the kernel contains
      esdfs, it will use it.
Bug: 63876697
Change-Id: I4db8bf336743edf62edfae41d753b1e3af163950
2018-01-19 12:58:42 -08:00
Jeff Sharkey
68e1093028 Remove FUSE logic; it's only a sdcardfs wrapper.
Leaving the FUSE logic intact was confusing to OEMs, who expected
that it would still work and pass CTS.  Remove all the FUSE logic
and leave a comment block about why the wrapper exists.

Also use new Android.bp makefile format.

Test: builds, boots
Bug: 63524725
Change-Id: I8b2a4fa0227109d65689c43302dc6fa40394ff58
2018-01-12 15:41:55 -07:00
Jeff Sharkey
e2e3610e6e Add "default_normal" support for sdcardfs.
Also cleans up fallback-retry logic for older kernels by
progressively removing each newer flag with each retry.

Test: internal CTS
Bug: 64672411
Change-Id: I3de3b64b68838fb2ef4505fe73c4e9865b2f9026
2018-01-12 13:11:31 -07:00
Ryo Hashimoto
d2d8eabf67 sdcard: Use AID_ROOT constant
To be consistent with the other parts of the code,
and to make it easy to use a differnt value when running in a container.

Bug: 69142822
Test: build
Change-Id: I9b2c7744e3867bb15511dd4ddd7bce281d758a7b
2018-01-12 13:09:54 -07:00
Elliott Hughes
3289b9c928 Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
Elliott Hughes
693d63f9cf Add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
2017-12-07 13:30:03 -08:00
Rom Lemarchand
9813914a3b Revert "Revert "Add derive_gid flag for mounting sdcardfs""
This reverts commit 28dbcaa23b.

Reason for revert: All kernel prebuilts merged

(cherry picked from commit ac8dc7e76f)

Bug: 65600849
Bug: 65573871
Test: m
Change-Id: Ib3cae2908c9e8f2b69d8effe618a6f1ac94f44e2
2017-09-22 14:30:30 -07:00
Richard Uhler
f09f965f9f Revert "Add derive_gid flag for mounting sdcardfs"
This reverts commit 8ca02bbeb5.

Causes boot loop on bullhead.

(cherry picked from commit 28dbcaa23b)

Bug: 63245673
Bug: 65660058
Test: m
Merged-In: Ife5f83ebf56fb956e5015d2797b5b47a515ec171
Change-Id: Ife5f83ebf56fb956e5015d2797b5b47a515ec171
2017-09-22 09:03:18 -07:00
Daniel Rosenberg
b7c118522f Add derive_gid flag for mounting sdcardfs
Turns on the derive_gid feature for sdcardfs. This was moved
under a mount flag in the kernel.

Test: If the derive_gid flag is supported, the first mount
      should succeed. If the flag is not, the second should
      succeed.
Bug: 63245673
Change-Id: If1c1bce13d14120732e420252cb5605d33ce7c40
2017-09-20 16:04:50 -07:00
Treehugger Robot
cb4e164562 Merge "sdcard: mute false compiler alarm" 2017-08-30 02:31:54 +00:00
Ting-Yuan Huang
1991ae9459 sdcard: mute false compiler alarm
Clang static analyzer worries that strcpy to a field may overwrites
other fields.  Use snprintf() instead.

Test: built without seeing the warning.

Change-Id: I75d8edf1353b5d052fd14a954362bd0632c258fa
2017-08-29 17:21:13 -07:00
Lennart Wieboldt
f7b315c985 Merge "Remove LOCAL_CLANG and clang: true"
am: 80ec81cf4b

Change-Id: Ia7f79d8e25ee9870fe44d198568d0e5dabdff811
2017-07-25 22:28:56 +00:00
Lennart Wieboldt
cd15fc7ba8 Remove LOCAL_CLANG and clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-07-25 14:29:50 +02:00
Daniel Rosenberg
cd59181387 Make sdcardfs the default
This will cause devices to default to sdcardfs if the kernel
supports it.

Test: Booted a wiped device, ensured sdcardfs was enabled
Change-Id: Ibce012b841b78d37ade668a38e91dca74a637867
2017-03-20 13:11:10 -07:00
Daniel Rosenberg
b8ecb8255a Merge "Switch sdcardfs over to bind mounts." am: 94b9e4df04 am: 895cd44bd9 am: 8c0d6338f3
am: 5ef19d04de

Change-Id: I4a7936b483e84ef670bdb020e4ba3c05c731bfba
2016-11-30 05:38:12 +00:00
Daniel Rosenberg
895cd44bd9 Merge "Switch sdcardfs over to bind mounts."
am: 94b9e4df04

Change-Id: I2dc89613d382ea5fd86bd1a1736310d3e8e49dbc
2016-11-30 05:20:40 +00:00
Daniel Rosenberg
9da6a7da1b Merge "Revert "Switch sdcardfs over to bind mounts."" 2016-11-30 00:25:04 +00:00
Daniel Rosenberg
1acb5086dc Revert "Switch sdcardfs over to bind mounts."
This reverts commit 912c27f63c.

Change-Id: Id5c5b03518fb24ddf832e8a3a88679c2727ae4de
2016-11-30 00:22:25 +00:00
Daniel Rosenberg
7175584186 Merge "Switch sdcardfs over to bind mounts." 2016-11-30 00:22:17 +00:00
Daniel Rosenberg
fc592327a9 Switch sdcardfs over to bind mounts.
Sdcardfs has been modified to use bind mounts
in place of three separate mounts. This lowers
resource usage, and removes a number of race
conditions around updates via differnt views.

Test: Run storage cts tests with sdcardfs enabled
Change-Id: Icdc196ba3d6f46d54d27ef91c01ffebcf81dd47e
2016-11-28 20:07:54 -08:00
Daichi Hirono
9b2c085c47 Merge "Use FUSE_COMPAT_22_INIT_OUT_SIZE always as the resopnse size of FUSE_INIT." am: 0673412bb9 am: 357876455c am: 5f7ed2dd60
am: 2b73980091

Change-Id: Ibad52be01df7077ce06b86c15c7bb4ad44be1408
2016-11-16 08:17:54 +00:00
Daichi Hirono
357876455c Merge "Use FUSE_COMPAT_22_INIT_OUT_SIZE always as the resopnse size of FUSE_INIT."
am: 0673412bb9

Change-Id: I85e6be67fdd5285c2abc26a097301c7136a676f9
2016-11-16 07:54:10 +00:00
Daichi Hirono
16d0b426a3 Use FUSE_COMPAT_22_INIT_OUT_SIZE always as the resopnse size of FUSE_INIT.
We return the minor version number 15 to FUSE_INIT since we don't handle
BATCH_FORGET. Thus the kernel does not accept the latest size of
fuse_init_out. Instead we need to use FUSE_COMPAT_22_INIT_OUT_SIZE.

Previously the code unintentionally used FUSE_COMPAT_22_INIT_OUT_SIZE always
because we override the minor version out->minor to 15. Because sdcard.c shares
the buffer for |in| and |out|, it overrides the version number of in->minnor as
well.

The if closure in the previous code "if (in->minor <= 22)" was always true. The
CL removes the if closure to explicitly use FUSE_COMPAT_22_INIT_OUT_SIZE always.

Bug: 32779923
Test: Manually boot Android and check if the storage shows up in Settings app.
Change-Id: Ibbc50da7fb82be148acfc5f1a3d46fefbe211f9d
2016-11-16 01:58:28 +00:00
Daniel Rosenberg
912c27f63c Switch sdcardfs over to bind mounts.
Sdcardfs has been modified to use bind mounts
in place of three separate mounts. This lowers
resource usage, and removes a number of race
conditions around updates via differnt views.

Test: Run storage cts tests with sdcardfs enabled
Change-Id: Icdc196ba3d6f46d54d27ef91c01ffebcf81dd47e
2016-10-27 18:20:47 -07:00
Christopher Ferris
bd615a56ce Merge "Small clean up of fuse code." am: 54c211db2e am: f620b87efe am: c2eaefdd15
am: 5e27cd514f

Change-Id: Ic323724c76b3df1af78d37bc0ced34257c142513
2016-10-10 19:48:20 +00:00
Christopher Ferris
5e27cd514f Merge "Small clean up of fuse code." am: 54c211db2e am: f620b87efe
am: c2eaefdd15

Change-Id: I800d48fb1d74531681cdcd35fcd3ea674e7c3025
2016-10-10 19:42:33 +00:00
Christopher Ferris
d6b0d37549 Small clean up of fuse code.
- Add TEMP_FAILURE_RETRY around all relevant system calls.
- Cleanup some of the read calls.
- Add error log messages when read/write calls do not actually read/write the
  expected number of bytes.
- Add error messages for write failures in fuse_status/fuse_replay.

Test: Attached to the sdcard process and stepped through most of the modified
Test: code. Also, create/read/write/delete files in /storage/emulated/0
Test: directory.

Change-Id: I73e4c0db861960f4c0af1bf96b06cd61fa74be69
2016-10-07 12:16:00 -07:00
Andreas Gampe
f1e65b449e Sdcard: Do not use fuse padding field
Instead default-initialize to 0. The third field, which is by
default padding, may be renamed and used in some implementations.

Test: m
Change-Id: Iaf0a2b1bf9615f11256c0500fa3ca98b09e34d15
2016-09-27 08:39:48 -07:00
Thierry Strudel
55cec58703 [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available am: 738e0dcf0a
am: 5f4db94228

Change-Id: I05fbf1cffb44595d354219b1753cd7c2b37e10db
2016-09-26 21:25:32 +00:00
Daniel Rosenberg
9526819c70 sdcard: Fix bad merge
A few changes got dropped along merge resolution. This adds them back

Affected CLs:
Ie188cb044be2ad87166f2d43c32a1f6b97660de0
Ibdb72ad16a1e6c3a01edcb03d003c42de7a03cd6

Change-Id: I1924f5a4bd7564ceaf9bb3a45b7fb7804b3619d7
2016-08-31 00:04:22 +00:00
Thierry Strudel
738e0dcf0a [DO NOT MERGE] Use FUSE_SHORTCIRCUIT if available
Use a non yet maintainer reviewed kernel patch from QCOM that greatly
improves IO speed in case it is available from the device specific
kernel headers.

Bug: 24216004
Bug: 30222859
Change-Id: I4101d80082c9ad9d042dde5c620ddb309d193d52
2016-08-04 05:02:18 -07:00
Jorge Lucangeli Obes
8df46540b4 Fix one last use of TRACE().
Bug: 30222003
Change-Id: I3d0a29cb92e83416eb6851b54cb72886da4f7cf2
(cherry picked from commit a65f3e1a1f)
2016-07-29 22:02:41 +00:00
Jorge Lucangeli Obes
60b896c438 Merge \"Fix sdcard logging.\"
am: 47b077a44f

Change-Id: Ib0a0b5083d09d60bd0ee42bebcecced05b3645e5
2016-07-27 01:31:20 +00:00
Jorge Lucangeli Obes
e157b253d4 Fix sdcard logging.
Use C++ logging for everything.

Bug: 30222003
Change-Id: I5c5d85102b01df6965a515b59aa275ac85f50f00
2016-07-26 16:52:48 -04:00
Jorge Lucangeli Obes
e629ced86a resolve merge conflicts of c6e22ba to stage-aosp-master
Change-Id: I65550ff841d27f985a3ab8618ecdf4a3500fb0be
2016-07-21 23:14:46 -04:00
Jorge Lucangeli Obes
714ec9d1de sdcard: Fix compilation with FUSE_TRACE == 1.
"PRI{u,x}64" was not compiling on C++ because of macro expansions.
Implement DLOG the same way DCHECK is implemented in
<android-base/logging.h>, and mechanically replace the problematic
lines with C++ logging. Remaining TRACE() lines will be replaced in a
follow-up CL.

Bug: 30222003

Change-Id: I377a91722eb4c035093fc96b79438c4f638b9a45
2016-07-21 17:11:47 -04:00
Jorge Lucangeli Obes
0d039c4c44 Merge \"sdcard: Use std::map.\"
am: c15ab6e2c6

Change-Id: Icacd305ffdf501ce6d7a6bbdd73d5f245575d804
2016-07-20 02:11:47 +00:00
Jorge Lucangeli Obes
d6d8faa690 sdcard: Use std::map.
Having CaseInsensitiveCompare use strcasecomp is not ideal, but other
solutions are not prettier.

Also, add a TODO to fix FUSE_TRACE, broken by the switch to C++.

Bug: 27147273

Change-Id: I0017c3a7d0254eb81abd128b97cd06c5ad0d1dff
2016-07-19 17:01:15 -04:00
Jorge Lucangeli Obes
3ab30ecf4c Merge \"Use arraysize() for supplementary groups.\"
am: ddbcecec3a

Change-Id: Ia8405d8bc181b1cdbf1f0812c0dbe8f7701747ef
2016-07-18 20:06:19 +00:00
Jorge Lucangeli Obes
bae15b4f46 Use arraysize() for supplementary groups.
Also make adbd use ScopedMinijail.

Bug: 30191189
Change-Id: I5e259aa466817b51037912aba043ba75bd35f9e1
2016-07-18 13:46:42 -04:00
Jorge Lucangeli Obes
fe4f764e75 Merge \"Use Minijail for privilege dropping.\"
am: 97f49e5cb3

Change-Id: I032ea3fcdac1a16bf36d43731b8533214264fee2
2016-07-18 16:06:38 +00:00
Jorge Lucangeli Obes
c96f53e2fe Use Minijail for privilege dropping.
Having so many copies of privilege-dropping code leads to errors.
De-duplicate this code and use Minijail for it.

Bug: 30156807

Change-Id: I36c85962b913a12efe5648a23cbacc5bcbb3853c
2016-07-15 10:16:59 -04:00
Jorge Lucangeli Obes
da4bc7484f Merge \"Convert fuse.c to C++.\"
am: a17427cb1e

Change-Id: Ie112f67f724e511b6c8ffabd0db04f3e017132cc
2016-07-14 19:47:37 +00:00
Jorge Lucangeli Obes
29b874de70 Merge \"Use C++ logging in sdcard.cpp.\"
am: 2703425de8

Change-Id: I90103d0521bd2cd4de3710adf3bc6013721cb6f9
2016-07-14 19:47:36 +00:00
Treehugger Robot
a17427cb1e Merge "Convert fuse.c to C++." 2016-07-14 19:42:32 +00:00