summaryrefslogtreecommitdiffstats
path: root/adb
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | am 66e95d76: Merge "Fix adb forward --list when forwarding a lot"JP Abgrall2014-03-073-19/+24
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | * commit '66e95d76c47a3a099931bbebe7f4a0af4d3f7fbb': Fix adb forward --list when forwarding a lot
| * | | | | | Fix adb forward --list when forwarding a lotSnild Dolkow2014-02-213-19/+24
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The list action had some problems with large numbers of forwards: * adb_query() limited replies to 1024 B (and the print was useless) * the reply header's length could overflow (also in other commands) * ...and the client had no way of detecting it * writex() didn't retry on EAGAIN ("Resource temporarily unavailable") This patch makes all "OKAY%04x" replies use a common function which checks the length and limits it to 0xffff. This means that the client can easily check for truncated replies. Before: forward --list starts failing at 15-30 forwards (depending on device serial and forward spec lengths). After: no problems with forward --list. Change-Id: Ie1e82c4d622f5c56e51abb26533ba17d40459914
* | | | | | am 2e7347d6: Merge "Convert all selinux_android_restorecon and _setfilecon ↵Nick Kralevich2014-02-121-2/+2
|\ \ \ \ \ \ | |/ / / / / | | / / / / | |/ / / / |/| | | | | | | | | | | | | | calls to new API." * commit '2e7347d617b02b13d227bb4cecf6bd69b7b20fa9': Convert all selinux_android_restorecon and _setfilecon calls to new API.
| * | | | Convert all selinux_android_restorecon and _setfilecon calls to new API.Stephen Smalley2014-02-071-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libselinux selinux_android_restorecon API is changing to the more general interface with flags and dropping the older variants. Also get rid of the old, no longer used selinux_android_setfilecon API and rename selinux_android_setfilecon2 to it as it is the only API in use. Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | | | am 7b9bb36a: am 0256e1f6: am d2acdd82: Merge changes ↵Mark Salyzyn2014-01-285-104/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I70ab37d5,I716f89c0,I34c96adf,I77650923,I35b0d1ee, ... * commit '7b9bb36ade6c8fa2e77416143847b019ddda9e95': (29 commits) libsysutils: SocketListener export release libsysutils: Add iovec/runOnEachSocket liblog: support struct logger_event_v2 format liblog: update timestamp on NOTICE file libcutils: resolve warning in iosched_policy.c liblog: Add const pedantics logcat: Add -T flag (-t w/o assumption of -d) logcat: Add logcat test suite liblog: Add cpu utilization test liblog: Add liblog test suite debuggerd: Support newline split in log messages liblog: deprecate export LOGGER ioctl definitions liblog: deprecate export of LOGGER_LOG_* defines liblog: Add README liblog: resolve build warning messages liblog: high CPU usage from logcat liblog: fix build again liblog: drop use of sys/cdefs.h liblog: git_master@964770 build problem logcat: Incorporate liblog reading API ...
| * | | Merge changes I70ab37d5,I716f89c0,I34c96adf,I77650923,I35b0d1ee, ...Mark Salyzyn2014-01-285-104/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: libsysutils: SocketListener export release libsysutils: Add iovec/runOnEachSocket liblog: support struct logger_event_v2 format liblog: update timestamp on NOTICE file libcutils: resolve warning in iosched_policy.c liblog: Add const pedantics logcat: Add -T flag (-t w/o assumption of -d) logcat: Add logcat test suite liblog: Add cpu utilization test liblog: Add liblog test suite debuggerd: Support newline split in log messages liblog: deprecate export LOGGER ioctl definitions liblog: deprecate export of LOGGER_LOG_* defines liblog: Add README liblog: resolve build warning messages liblog: high CPU usage from logcat liblog: fix build again liblog: drop use of sys/cdefs.h liblog: git_master@964770 build problem logcat: Incorporate liblog reading API debuggerd: Incorporate liblog reading API liblog: Interface to support abstracting log read adb: deprecate legacy log service interface adb: regression from Move list.c to inlines liblog: whitespace cleanup libcutils: bug str_parms.c:str_parms_get_float(). libcutils: UNUSED argument warnings libsysutils: Get rid of warnings libcutils: Move list.c to inlines on list.h
| | * | | adb: deprecate legacy log service interfaceMark Salyzyn2014-01-275-103/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked form commit c66a7537df987715acc77eed952111cc56b7e72b) Change-Id: If96019cc13b3d7a4dcd7785c7137e0cbcc622981
| | * | | adb: regression from Move list.c to inlinesMark Salyzyn2014-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 5f64d528be2ca7229c0e9ce00837ac0fa4da2e54) Change-Id: I057dbe3db80b1460f774e9f9ade11e0929529ec6
* | | | | am bbc92ee7: am 68a74ec4: am 6ddabb7a: Merge "adbd: Don\'t close/reopen FFS ↵Benoit Goby2014-01-281-19/+24
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | ep0 on disconnect" * commit 'bbc92ee7e4d05571e734022894afa2236ccbf9a4': adbd: Don't close/reopen FFS ep0 on disconnect
| * | | | Merge "adbd: Don't close/reopen FFS ep0 on disconnect"Benoit Goby2014-01-281-19/+24
| |\ \ \ \
| | * | | | adbd: Don't close/reopen FFS ep0 on disconnectJack Pham2014-01-071-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of bulk read/write failure or disconnect, transport_usb calls usb_ffs_kick in order to force the daemon to re-open the FunctionFS ep files as a way to soft restart the kernel driver. However, there's no reason to always close the ep0 file, as it would need to be reopened and the descriptors rewritten--this is unnecessary, especially in the simple/frequent case of cable disconnect, and causes the kernel driver to unbind and bind *all* of the function drivers. This is causing USB Chapter 9 tests to fail. Thus, try to reuse the same ep0 file handle across reconnects. In case there is a failure, the ep1/ep2 opens would fail and all the file handles get dropped. For the adb root case, the entire daemon gets restarted anyway. Change-Id: I0840085c52a0795dcb2d751c39aa4a436c039ee2
| * | | | | Fix overflow in adb_clientNick Kralevich2014-01-271-2/+2
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Credit: Joshua Drake Bug: 12060953 (cherry picked from commit e89e09dd2b9b42184973e3ade291186a2737bced) Change-Id: I8a9b2592a5e4f7527c607abfe4ea6df6eb550aa8
* | | | | am c7e28899: am 16384312: am 0620e3dd: Merge "adbd: switch to su domain when ↵Nick Kralevich2014-01-241-7/+29
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | running as root" * commit 'c7e28899c3917ad6e72d5dc99401bcd133cbd475': adbd: switch to su domain when running as root
| * \ \ \ \ am 0620e3dd: Merge "adbd: switch to su domain when running as root"Nick Kralevich2014-01-241-7/+29
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '0620e3ddb85582f66612d046d1295dc20bf1a4f5': adbd: switch to su domain when running as root
| | * | | | adbd: switch to su domain when running as rootNick Kralevich2014-01-221-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adbd runs as root, it should transition into the su domain. This is needed to run the adbd and shell domains in enforcing on userdebug / eng devices without breaking developer workflows. Introduce a new device_banner command line option. Change-Id: Ib33c0dd2dd6172035230514ac84fcaed2ecf44d6
* | | | | | am 55537633: am 78af6c4c: am 0a72d293: Merge "Fix "adb push /sdcard/filename""Nick Kralevich2014-01-181-13/+13
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | * commit '555376331f436fb519c182677c22d8299ead5523': Fix "adb push /sdcard/filename"
| * | | | | am 0a72d293: Merge "Fix "adb push /sdcard/filename""Nick Kralevich2014-01-171-13/+13
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '0a72d2930adcd3b3504448f71b25ebb88c2cc3cf': Fix "adb push /sdcard/filename"
| | * | | | Fix "adb push /sdcard/filename"Nick Kralevich2014-01-171-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't assume that calling chown(filename, getuid(), getgid()) will always succeed. In the case of /sdcard, a file you create will be owned by root, so the chown call will fail. Instead, use uid=gid=-1 so that the chown call is truly a no-op. Ignore the results of calling chmod. Again, for /sdcard, the chmod call will never succeed, because the file isn't owned by the shell user. Bug: 12441485 Change-Id: I11eaf1d6f6049c1158afc29754fbb7af2baf2c78
* | | | | | am 8940c0a0: am 97373bbc: am 7cd15614: Merge "system/core 64-bit cleanup."Elliott Hughes2014-01-166-13/+13
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | * commit '8940c0a07f8d6682712e2d2ee387e78096602f99': system/core 64-bit cleanup.
| * | | | | am 7cd15614: Merge "system/core 64-bit cleanup."Elliott Hughes2014-01-166-13/+13
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | * commit '7cd1561410473c71d40cec822fb53a282b5b3279': system/core 64-bit cleanup.
| | * | | | system/core 64-bit cleanup.Elliott Hughes2014-01-166-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleans up most of the size-related problems in system/core. There are still a few changes needed for a clean 64-bit build, but they look like they might require changes to things like the fastboot protocol. Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
* | | | | | Remove obsolete vdc call.Nick Kralevich2014-01-142-16/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since ca8e66a8b0f843812014a28d49208f9f6f64ecbc, init has been handling reboots and filesystem unmounts. Remove obsolete call to vdc. Bug: 12504045 Change-Id: If8704ca042cb3a68857743b9973e48c52e7eb881
* | | | | am e76343ef: Merge "Emerson USB ID"Colin Cross2014-01-111-0/+3
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit 'e76343ef72458aff8fdc25c57f4e84407c05a2f2': Emerson USB ID
| * | | | Merge "Emerson USB ID"Colin Cross2014-01-121-0/+3
| |\ \ \ \
| | * | | | Emerson USB IDJon Sawyer2014-01-111-0/+3
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds Emerson's USB id to the known USB Devices. Change-Id: If6115c2551c1f30a5c190690f2aeaaf2adff7ee1 Signed-off-by: Jon Sawyer <jon@cunninglogic.com>
* | | | | am b0751101: Merge "HP USB ID"Colin Cross2014-01-091-0/+3
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit 'b0751101b090a8732c62ad261fa44e5d6a69a2cc': HP USB ID
| * | | | HP USB IDJon Sawyer2014-01-081-0/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Adds HP's USB id to the know USB Devices Change-Id: I975126f3ae5e53f25e18dea7cc43c29076bfc965 Signed-off-by: Jon Sawyer <jon@cunninglogic.com>
* | | | am 491ecd0b: Merge changes ↵Colin Cross2014-01-061-150/+175
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Id8bec8a3,Ied42e4d0,Iea3f7cc6,Ic7f7c984,Ic77d5f71, ... * commit '491ecd0b7275a98b7fda9b1e807724f7f06b1469': adb: Add USB vendor ID for YotaDevices adb: Add USB vendor ID for TechFaith adb: Add USB vendor ID for Rockchip adb: Add USB vendor ID for EMERGING Technology (Holdings) Ltd. adb: Add USB vendor ID for Allwinner adb: Add USB vendor ID for Amlogic added Gigaset's USB vendor ID adb: alphabetically sort usb vendors lists
| * | | adb: Add USB vendor ID for YotaDevicesDanielMo2014-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Id8bec8a35edd0d21ae52e8469f7a65b5f4433bc2 Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
| * | | adb: Add USB vendor ID for TechFaithDanielMo2014-01-061-0/+3
| | | | | | | | | | | | | | | | Change-Id: Ied42e4d011b736ee990ed75e7d81bc6a16db47f9
| * | | adb: Add USB vendor ID for RockchipDanielMo2014-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Iea3f7cc6ed463684fe30a73c39445b3ca36854d9 Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
| * | | adb: Add USB vendor ID for EMERGING Technology (Holdings) Ltd.DanielMo2014-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic7f7c984db19050d2ce4da8ae87683ce42dc9094 Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
| * | | adb: Add USB vendor ID for AllwinnerDanielMo2014-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic77d5f71c9e329e33cd31fa0854e692ad794a609 Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
| * | | adb: Add USB vendor ID for AmlogicDanielMo2014-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I35fad82214f2b5a82b0150821326aaea15784de1 Signed-off-by: DanielMo <DanielMo@fih-foxconn.com>
| * | | added Gigaset's USB vendor IDVolker Moesker2014-01-061-1/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Iebb0f352eec4530ee1e972527fc76bbb9dad5cc3 Signed-off-by: Volker Moesker <volker.moesker@gigaset.com>
| * | | adb: alphabetically sort usb vendors listsColin Cross2014-01-061-150/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort the lists of usb vendor ids alphabetically to reduce future conflicts. Change-Id: I682c18a1d97adf3a4aa9c00de9fed932c83e4646
* | | | am e1095e1d: Merge "Modify BYD\'s USB Vendor ID"Colin Cross2014-01-031-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'e1095e1da12de9d6dc219f497f7c19d1c1f7a41b': Modify BYD's USB Vendor ID
| * | | Merge "Modify BYD's USB Vendor ID"Colin Cross2014-01-031-1/+1
| |\ \ \
| | * | | Modify BYD's USB Vendor IDkongfanqing2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I391487a12ba7ed86aac81457f8026acd3fd7576c
* | | | | am fcf3d207: Merge "adb: configure /system file permission with fs_config"Nick Kralevich2014-01-032-10/+65
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit 'fcf3d207c51f1e734137a08ae2fdb1bb37a50b87': adb: configure /system file permission with fs_config
| * | | | adb: configure /system file permission with fs_configLiang Cheng2014-01-022-10/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adbd changes the permissions of files uploaded by copying owner's permission to group and other. This causes kernel load failure if any changes are made to kernel modules followed by ``adb push'' or ``adb sync'' because file mode 644 would become 666. The change uses fs_config to get the target mode of files. In addition, the SELinux file label is set incorrectly on synced files. Set the label properly. Change-Id: I354db848f39adfbf189d7e8d3b028e8d763c772f Signed-off-by: Liang Cheng <licheng@nvidia.com> Bug: 12264775
* | | | | am 67cb61ee: Merge "adb: Check sender\'s socket id when receiving packets."Nick Kralevich2013-12-193-21/+88
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | * commit '67cb61ee5a8b8f5c967361430fff250e76c3a1dc': adb: Check sender's socket id when receiving packets.
| * | | | adb: Check sender's socket id when receiving packets.David 'Digit' Turner2013-12-163-21/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handle_packet() in adb.c didn't check that when an A_WRTE packet is received, the sender's local-id matches the socket's peer id. This meant that a compromised adbd server could sent packets to the host adb server, spoofing the identity of another connected device if it could "guess" the right host socket id. This patch gets rid of the issue by enforcing even more checks to ensure that all packets comply with the description in protocol.txt. + Fix a bug where closing a local socket associated with a remote one would always send an A_CLSE(0, remote-id, "") message, though protocol.txt says that should only happen for failed opens. The issue was that local_socket_close() called remote_socket_close() after clearing the remote socket's 'peer' field. The fix introduces a new asocket optional callback, named 'shutdown' that is called before that, and is used to send the A_CLSE() message with the right ID in remote_socket_shutdown(). Also add some code in handle_packet() to detect invalid close commands. Change-Id: I9098bc8c6e81f8809334b060e5dca4fc92e6fbc9
* | | | | am b2dfa7ec: am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ↵Nick Kralevich2013-12-101-2/+2
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | | | | | | | | | ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client * commit 'b2dfa7ece7fb69d2ce5ae517eb35492beb646385': Fix overflow in adb_client
| * | | am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am ↵Nick Kralevich2013-12-101-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client * commit '02d90b92ce65ad4e7f49565f0e97373e1d8b0fbf': Fix overflow in adb_client
| | * \ \ am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am ↵Nick Kralevich2013-12-101-2/+2
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client * commit '33e7f915d6a27880dd4c4c0709dcc921f549eea2': Fix overflow in adb_client
| | | * \ \ am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am ↵Nick Kralevich2013-12-101-2/+2
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d63fb078: am e89e09dd: Fix overflow in adb_client * commit '54a80bcf88060b21f527c631c7ec911171bdb13f': Fix overflow in adb_client
| | | | * \ \ am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am ↵Nick Kralevich2013-12-101-2/+2
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e89e09dd: Fix overflow in adb_client * commit 'cd072e94cf7e546cd6d333cd65641edcd69402b7': Fix overflow in adb_client
| | | | | * \ \ am d63fb078: am e89e09dd: Fix overflow in adb_clientNick Kralevich2013-12-101-2/+2
| | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd63fb078aea697c536b19c03d29d4dde4ac087fc': Fix overflow in adb_client
| | | | | | * \ \ am e89e09dd: Fix overflow in adb_clientNick Kralevich2013-12-101-2/+2
| | | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e89e09dd2b9b42184973e3ade291186a2737bced': Fix overflow in adb_client