android_system_core/adb
Luis Hector Chavez 0db4b7a95b Change the remount command to be more container-friendly
Passing in MS_REMOUNT | MS_BIND tells the kernel to only remove the
MS_RDONLY flag and keep all the other flags the same. This is also the
only kind of remount that is allowed in Linux containers (to be more
precise, within user namespaces).

This change also attempts to always run the remount command when dealing
with /, since containers will almost always run a loop device, and since
the number of the device changes, it is not convenient to put it in the
fstab. Plus, the container won't have permission to modify it, but might
be able to perform the remount.

Bug: 72178046
Test: `adb remount` works in both sailfish and Chrome OS
Change-Id: I9e8ec8afcd57f67875a312824667768b3aa89faa
2018-02-27 14:37:26 -08:00
..
client adb: add missing condition_variable include 2018-01-02 02:25:02 -05:00
daemon Don't include the build number in the adbd binary. 2017-11-07 10:57:36 -08:00
sysdeps adb: don't try to resolve 'localhost' 2017-04-12 16:07:49 -07:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
adb.cpp adb: switch asocket::enqueue to std::string. 2018-02-06 12:59:06 -08:00
adb.h adb: switch asocket::enqueue to std::string. 2018-02-06 12:59:06 -08:00
adb_auth.h adb: rationalize types. 2016-10-06 14:50:02 -07:00
adb_auth_host.cpp Stop writing NUL bytes in adbkey.pub. 2017-05-01 16:05:16 -07:00
adb_client.cpp adb: allow selection of a specific transport. 2017-08-21 14:15:06 -07:00
adb_client.h adb: allow selection of a specific transport. 2017-08-21 14:15:06 -07:00
adb_io.cpp adb: increase the shell command length limit. 2017-06-16 18:01:11 -07:00
adb_io.h
adb_io_test.cpp adb: disable tests that are expected to fail on Win32. 2016-04-18 14:33:38 -07:00
adb_listeners.cpp adb: fix erase-remove_if idiom. 2017-10-20 18:03:48 -07:00
adb_listeners.h adb: move all cleanup to a function with defined ordering. 2017-05-09 14:32:47 -07:00
adb_listeners_test.cpp adb: support forwarding TCP port 0. 2016-05-09 16:55:10 -07:00
adb_mdns.h Add mDNS device discovery for adb client 2017-03-07 14:45:51 -08:00
adb_trace.cpp adb: don't spew to logcat when tracing is enabled. 2018-02-06 15:55:06 -08:00
adb_trace.h adb: don't spew to logcat when tracing is enabled. 2018-02-06 15:55:06 -08:00
adb_unique_fd.h adb: extract the adb-specific unique_fd out into its own header. 2016-09-01 15:49:06 -07:00
adb_utils.cpp Indicate that a packet was truncated. 2017-06-27 13:26:14 -07:00
adb_utils.h Give a clear error message if we can't start the server. 2017-06-20 14:21:41 -07:00
adb_utils_test.cpp adb: allow symlinks to directories in directory_exists. 2017-03-23 16:19:55 -07:00
adbd_auth.cpp adbd: add logging to troubleshoot usb issues. 2017-07-26 11:08:15 -07:00
Android.bp bpfmt. 2018-02-16 17:58:14 -08:00
Android.mk adb: extract atransport's connection interface. 2018-01-30 15:22:41 -08:00
bugreport.cpp Merge "Don't preserve file attributes when pulling bugreport file..." 2017-08-22 22:41:26 +00:00
bugreport.h adb: allow selection of a specific transport. 2017-08-21 14:15:06 -07:00
bugreport_test.cpp Merge "Don't preserve file attributes when pulling bugreport file..." 2017-08-22 22:41:26 +00:00
commandline.cpp Fix adb tcpip tests. 2017-08-23 15:43:34 -07:00
commandline.h adb: allow selection of a specific transport. 2017-08-21 14:15:06 -07:00
console.cpp adb: add helper to get the ~/.android directory. 2016-09-01 15:43:22 -07:00
CPPLINT.cfg
diagnose_usb.cpp Improve udev failure diagnostics. 2017-05-05 12:50:16 -07:00
diagnose_usb.h
fdevent.cpp adb: add fdevent_run_on_main_thread. 2017-05-04 16:03:12 -07:00
fdevent.h adb: add fdevent_run_on_main_thread. 2017-05-04 16:03:12 -07:00
fdevent_test.cpp adb: add fdevent_run_on_main_thread. 2017-05-04 16:03:12 -07:00
fdevent_test.h adb: add fdevent_run_on_main_thread. 2017-05-04 16:03:12 -07:00
file_sync_client.cpp adb: Use kernel aio for functionfs. 2017-08-10 15:12:47 -07:00
file_sync_service.cpp Standarize on VFS_CAP_REVISION_2 2017-11-27 14:17:42 -08:00
file_sync_service.h Add --sync support to push. 2017-05-19 11:09:58 -07:00
framebuffer_service.cpp Send color space information with screenshots 2017-05-31 19:13:47 -07:00
jdwp_service.cpp Merge "adbd: receive jdwp pids from art as raw integers." 2018-02-13 23:34:49 +00:00
line_printer.cpp adb: add missing newline when printing transfer rate. 2016-08-04 14:56:53 -07:00
line_printer.h
MODULE_LICENSE_APACHE2
NOTICE adb: append the libwinpthread COPYING to adb's NOTICE. 2017-03-08 21:27:59 -08:00
OVERVIEW.TXT Fix typos in ADB documentation 2017-11-30 10:57:51 -08:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
protocol.txt Precise command constants on adb/protoxol.txt 2016-08-30 01:30:12 +02:00
range.h adb: switch asocket::enqueue to std::string. 2018-02-06 12:59:06 -08:00
remount_service.cpp Change the remount command to be more container-friendly 2018-02-27 14:37:26 -08:00
remount_service.h
security_log_tags.h
services.cpp Fix a memory leak 2018-02-19 01:05:56 -08:00
services.h
SERVICES.TXT
set_verity_enable_state_service.cpp DO NOT MERGE ANYWHERE Add comments and code about ro.boot.slot back 2017-11-10 16:20:27 -08:00
shell_service.cpp Set $TMPDIR for adb shell. 2017-12-11 10:40:57 -08:00
shell_service.h
shell_service_protocol.cpp
shell_service_protocol_test.cpp adb: fix undefined behavior 2016-10-19 19:39:44 -07:00
shell_service_test.cpp
socket.h adb: fix build breakage. 2018-02-12 18:03:49 -08:00
socket_spec.cpp Add std::string StartsWith*/EndsWith* overloads. 2017-12-20 09:42:22 -08:00
socket_spec.h adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_spec_test.cpp adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_test.cpp adb: switch asocket::enqueue to std::string. 2018-02-06 12:59:06 -08:00
sockets.cpp adb: use delete on objects with destructors. 2018-02-12 17:31:39 -08:00
sockets.dia
SYNC.TXT Fix typos in ADB documentation 2017-11-30 10:57:51 -08:00
sysdeps.h Remove a duplicate TEMP_FAILURE_RETRY. 2017-11-28 18:05:27 -08:00
sysdeps_test.cpp adb: enable -Wthread-safety on linux/darwin. 2017-05-03 14:28:21 -07:00
sysdeps_unix.cpp adb: use TCP keepalive. 2016-03-03 15:42:11 -08:00
sysdeps_win32.cpp Revert "adb: check our socketpair ends in our win32 emulation." 2017-03-30 13:12:37 -07:00
sysdeps_win32_test.cpp adb: add script to trace adbd. 2016-12-13 14:31:17 -08:00
test_adb.py Fix adb tcpip tests. 2017-08-23 15:43:34 -07:00
test_device.py Move GetDeviceTest from adb's test_device.py to adb package. 2017-11-08 14:39:06 -08:00
trace.sh adb: add script to trace adbd. 2016-12-13 14:31:17 -08:00
transport.cpp adb: use delete on objects with destructors. 2018-02-12 17:31:39 -08:00
transport.h adb: extract atransport's connection interface. 2018-01-30 15:22:41 -08:00
transport_local.cpp adb: extract atransport's connection interface. 2018-01-30 15:22:41 -08:00
transport_mdns.cpp adb: initialize mDNS asynchronously. 2017-05-04 16:03:12 -07:00
transport_mdns_unsupported.cpp Don't include mDNS support on platforms other than Linux 2017-03-07 14:45:52 -08:00
transport_test.cpp adb: extract atransport's connection interface. 2018-01-30 15:22:41 -08:00
transport_usb.cpp adb: restore packet data length checks. 2018-02-06 12:59:06 -08:00
usb.h adb: get libusb compiling on Windows. 2017-12-08 13:11:15 -08:00