platform_system_core/libcutils
Peter Collingbourne 4a57c8f4f2 adb: Do not use fs_config unless we are root (try 3).
This enables fs_config for /data when pushing files as root. Also,
without this, adb push to /tmp fails as the shell user.

When pushing to a directory that does not have an explicit
fs_config, such as /data/local/tmp or /tmp, use the original
file mode. Because adb copies u permissions into g and o
(and in general because the umask on the host may have
made these files world writable), this requires adding more
fs_config entries to cover directories that may contain dex files
i.e. /{odm,product,system,system_ext,vendor}/{framework,app,priv-app}
to avoid hitting a SecurityException caused by writable dex files, e.g.

04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: FATAL EXCEPTION: main
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: Process: android.test.app.system_priv, PID: 4815
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime: java.lang.SecurityException: Writable dex file '/system/priv-app/loadlibrarytest_system_priv_app/loadlibrarytest_system_priv_app.apk' is not allowed.
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime:  at dalvik.system.DexFile.openDexFileNative(Native Method)
04-01 21:22:16.980 10110  4815  4815 E AndroidRuntime:  at dalvik.system.DexFile.openDexFile(DexFile.java:406)

Bug: 171233429
Bug: 311263616
Change-Id: I18f70095c793d08a25ff59e1851f6dc7648ce4dc
2024-04-01 15:18:49 -07:00
..
abi-dumps adb: Do not use fs_config unless we are root (try 3). 2024-04-01 15:18:49 -07:00
include adb: Do not use fs_config unless we are root (try 3). 2024-04-01 15:18:49 -07:00
include_outside_system/cutils Revert "Revert "Remove cutils threads.h header completely."" 2023-08-16 22:37:14 +00:00
Android.bp Remove the redundant libcutils_sockets_test 2024-03-06 22:18:58 +00:00
android_get_control_env.h
android_get_control_file.cpp
android_get_control_file_test.cpp
android_get_control_socket_test.cpp
android_reboot.cpp
ashmem-dev.cpp Merge "Do not check with vendor vndk version" into main am: 6d01651ab9 am: 9062abf0e5 am: fcdbce7f33 am: 3147ebc654 am: b94f5ee99f 2023-09-23 17:50:46 +00:00
ashmem-host.cpp
ashmem_test.cpp ashmem: Remove hardcoded PAGE_SIZE usage in ashmem_test 2024-02-13 20:50:00 +00:00
canned_fs_config.cpp canned fs_config accepts multiple lines having the same path 2021-12-14 09:54:34 +09:00
config_utils.cpp
fs.cpp
fs_config.cpp adb: Do not use fs_config unless we are root (try 3). 2024-04-01 15:18:49 -07:00
fs_config.h
fs_config_test.cpp
hashmap.cpp
iosched_policy.cpp Don't duplicate uapi ioprio constants. 2023-09-22 14:51:26 +00:00
KernelLibcutilsTest.xml KernelLibcutilsTest: change test file push location 2023-06-02 23:39:48 +00:00
klog.cpp
load_file.cpp
MODULE_LICENSE_APACHE2
multiuser.cpp Create utility method for converting sdk_sandbox_uid to app_uid 2022-03-03 21:49:43 +00:00
multiuser_test.cpp Create utility method for converting sdk_sandbox_uid to app_uid 2022-03-03 21:49:43 +00:00
native_handle.cpp Add fdsan capabilities for native handles 2022-09-02 00:44:13 +00:00
native_handle_test.cpp
NOTICE
OWNERS Add bug component to cutils 2023-07-27 10:16:05 -07:00
partition_utils.cpp
properties.cpp libcutils: reimplement system property functions with libbase. 2020-05-21 16:20:16 -07:00
properties_test.cpp libcutils: reimplement system property functions with libbase. 2020-05-21 16:20:16 -07:00
qtaguid.cpp qtaguid.cpp - improvements 2023-01-26 22:39:04 +00:00
record_stream.cpp
sched_policy_test.cpp sched_policy_test: set_sched_policy also set the cpuset policy as fallback 2023-02-01 03:06:45 +00:00
socket_inaddr_any_server_unix.cpp
socket_inaddr_any_server_windows.cpp
socket_local_client_unix.cpp
socket_local_server_unix.cpp
socket_local_unix.h Add an include 2023-10-06 18:46:17 +00:00
socket_network_client_unix.cpp
socket_network_client_windows.cpp
sockets.cpp
sockets_test.cpp
sockets_unix.cpp
sockets_windows.cpp s/master/main/ 2023-10-04 23:31:09 +00:00
str_parms.cpp
str_parms_test.cpp
strlcpy.c
TEST_MAPPING TEST_MAPPING: enable KernelLibcutilsTest in kernel-presubmit 2023-05-31 17:29:17 +00:00
trace-container.cpp Updating ATRACE_ASYNC_FOR_TRACK_END to not require a name argument 2022-04-28 18:18:57 +00:00
trace-dev.cpp Updating ATRACE_ASYNC_FOR_TRACK_END to not require a name argument 2022-04-28 18:18:57 +00:00
trace-dev.inc Added trackName as additional argument to WRITE_MSG to handle trace 2022-03-17 21:40:15 +00:00
trace-dev_test.cpp Updating ATRACE_ASYNC_FOR_TRACK_END to not require a name argument 2022-04-28 18:18:57 +00:00
trace-host.cpp Make atrace_*_body explicitly a part of API. 2023-06-29 13:28:37 -07:00
uevent.cpp libcutils: use 0 for netlink socket port id 2020-08-14 21:29:17 +09:00