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 Clean up some mess by only building Android-specific code for the device. 2019-03-21 14:59:45 -07:00
android_get_control_file.cpp libcutils: android_get_control_file uses realpath. 2019-03-21 16:00:00 -07:00
android_get_control_file_test.cpp Clean up libcutils/libutils tests. 2019-02-11 13:15:56 -08:00
android_get_control_socket_test.cpp Clean up libcutils/libutils tests. 2019-02-11 13:15:56 -08:00
android_reboot.cpp libcutils: android_reboot command should be unsigned. 2019-04-02 09:19:46 -07:00
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 libcutils: route to /dev/ashmem<boot_id> instead of ashmemd 2019-09-25 12:50:16 -07:00
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 Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
fs.cpp Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
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 Actually make fs_path_config / fs_path_config_from_file private 2019-06-20 23:34:30 +00:00
fs_config_test.cpp libcutils: update fs_config tests for current behavior 2019-11-06 09:40:33 -08:00
hashmap.cpp cutils: move hashmap to <pthread.h>. 2018-07-13 10:54:49 -07:00
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 Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
load_file.cpp Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
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 Ignore nullptr in native_handle_close(). 2019-11-12 20:23:55 -08:00
NOTICE
OWNERS Add bug component to cutils 2023-07-27 10:16:05 -07:00
partition_utils.cpp Start using new C++ Fstab class widely 2018-12-12 17:08:09 +00:00
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 Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
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 Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
socket_inaddr_any_server_windows.cpp Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
socket_local_client_unix.cpp Stop defining local "unused" macros now this is C++. 2017-11-30 16:24:36 -08:00
socket_local_server_unix.cpp Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
socket_local_unix.h Add an include 2023-10-06 18:46:17 +00:00
socket_network_client_unix.cpp Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
socket_network_client_windows.cpp Move libcutils source to C++. 2017-11-10 13:18:10 -08:00
sockets.cpp libcutils: move cutils/files.h to cutils/android_get_control_file.h 2016-11-16 15:56:56 -08:00
sockets_test.cpp libcutils: remove unused socket_set_receive_timeout(). 2019-11-08 15:21:39 -08:00
sockets_unix.cpp libcutils: remove unused socket_set_receive_timeout(). 2019-11-08 15:21:39 -08:00
sockets_windows.cpp s/master/main/ 2023-10-04 23:31:09 +00:00
str_parms.cpp libcutils: remove some unused API. 2018-07-11 14:27:32 -07:00
str_parms_test.cpp Clean up libcutils/libutils tests. 2019-02-11 13:15:56 -08:00
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