summaryrefslogtreecommitdiffstats
path: root/adb
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge "adb: Handle adb connect in a thread"Benoit Goby2013-04-254-122/+170
|\ \ \
| * | | adb: Handle adb connect in a threadBenoit Goby2013-04-254-122/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adb connect calls connect() in the event loop. If you pass a wrong ip address or the server is slow to respond, this will block the event loop and you can't even kill the adb server with adb kill-server. Handle connect requests in a service thread instead. Change-Id: I2ee732869a3dc22a6d3b87cf8ac80acaa7790037
* | | | Merge "fs_mgr: make block devices read-only"Nick Kralevich2013-04-251-0/+9
|\ \ \ \ | |/ / / |/| | |
| * | | fs_mgr: make block devices read-onlyNick Kralevich2013-04-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a filesystem is mounted read-only, make the underlying block device read-only too. This helps prevent an attacker who is able to change permissions on the files in /dev (for example, symlink attack) from modifying the block device. In particular, this change would have stopped the LG Thrill / Optimus 3D rooting exploit (http://vulnfactory.org/blog/2012/02/26/rooting-the-lg-thrill-optimus-3d/) as that exploit modified the raw block device corresponding to /system. This change also makes UID=0 less powerful. Block devices cannot be made writable again without CAP_SYS_ADMIN, so an escalation to UID=0 by itself doesn't give full root access. adb/mount: Prior to mounting something read-write, remove the read-only restrictions on the underlying block device. This avoids messing up developer workflows. Change-Id: I135098a8fe06f327336f045aab0d48ed9de33807
* | | | adb: Cleanup dead codeBenoit Goby2013-04-248-314/+7
|/ / / | | | | | | | | | | | | | | | | | | dns_service is unused and recover_service has been replaced by adb sideload Change-Id: Ie90000d7f672e8299ee1622a9690c7371b214dc1
* | | Make init handle rebootsNick Kralevich2013-04-232-21/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the responsibility for rebooting the system from the reboot command to init. Init is in a better position to take actions to bring the system down cleanly, including making sure filesystems are mounted read-only. The only UIDs which can perform an init triggered reboot are root, system, and shell. Modify the reboot command so that it calls into init to perform the reboot. The reboot command no longer requires CAP_SYS_BOOT. Remove the -n reboot option and code which supports it. Anyone needing to do an unclean shutdown can just do a 'echo c > /proc/sysrq-trigger'. Modify adb so that it calls into init to perform a shutdown. Bug: 8646621 Change-Id: I84c0513acb549720cb0e8c9fcbda0050f5c396f5
* | | am b544da0b: am d7cab8bf: Merge "adb : add missing connection states"Colin Cross2013-04-171-0/+4
|\ \ \ | |/ / | | | | | | | | | * commit 'b544da0be42cdd1e28d6562a26215d57c51b2f2b': adb : add missing connection states
| * | am d7cab8bf: Merge "adb : add missing connection states"Colin Cross2013-04-171-0/+4
| |\ \ | | |/ | | | | | | | | | * commit 'd7cab8bff1334ba48620a16d1b98f2ae623fee7d': adb : add missing connection states
| | * Merge "adb : add missing connection states"Colin Cross2013-04-171-0/+4
| | |\
| | | * adb : add missing connection statestrevd2013-04-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both CS_RECOVERY and CS_SIDELOAD where not being checked by connection_state_name which resulted in adb get-state returning unknown when a device is in those modes. Change-Id: I00716024d6a0bdb68d6e2380c8cd7b5d056bd15f Signed-off-by: trevd <trevd1234@gmail.com>
* | | | am ac76c1f1: am ffc5a4a5: Merge "Add OUYA VID to known VID list"Elliott Hughes2013-04-171-0/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'ac76c1f16f889140ec5c56faccd676c2ff15d7bc': Add OUYA VID to known VID list
| * | | am ffc5a4a5: Merge "Add OUYA VID to known VID list"Elliott Hughes2013-04-171-0/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit 'ffc5a4a529338c834954e58de2701572eb0752f0': Add OUYA VID to known VID list
| | * | Add OUYA VID to known VID listAl Sutton2013-04-171-0/+3
| | |/ | | | | | | | | | | | | | | | | | | Add the OUYA VID to the list of known USB VIDs to allow developers with OUYA consoles to have their device automatically recognized. Change-Id: I499114d8071747b972c24681fc0771f000ad9f9d
* | | mincrypt: support SHA-256 hash algorithmDoug Zongker2013-04-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - adds a library to compute the SHA-256 hash - updates the RSA verifier to take an argument specifying either SHA-1 or SHA-256 - updates DumpPublicKey to with new "key" version numbers for specifying SHA-256 - adds new argument to adb auth code to maintain existing behavior Change-Id: I5b1406cf57c2b8993f6032eda3e29139f7740839
* | | am 9f25178a: am 7f8fb3ff: Merge "adb: Prevent registering usb_disconnect ↵Benoit Goby2013-04-021-4/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | twice" into jb-mr2-dev * commit '9f25178a9dd0aa8fab5e74f785c9997ae230a325': adb: Prevent registering usb_disconnect twice
| * | am 7f8fb3ff: Merge "adb: Prevent registering usb_disconnect twice" into ↵Benoit Goby2013-04-021-4/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | jb-mr2-dev * commit '7f8fb3ffa2a234b704fc975fc9b1001f17df9cac': adb: Prevent registering usb_disconnect twice
| | * | adb: Prevent registering usb_disconnect twiceBenoit Goby2013-04-011-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adbd can receive multiple AUTH_RSAPUBLICKEY packets. This happens for example when booting with usb attached when we retry authenticating after the framework is done booting. Make sure usb_disconnect is only registered once, otherwise this creates a loop in the disconnects list. Bug: 8504991 Change-Id: Ia1f9a37005dd17b7eefee1493d622e1679263eea
* | | | am b1d20464: am f5562cb6: Merge "adb: Remove execute permission on usb_vendor.c"Colin Cross2013-03-291-0/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'b1d204648eb8061aa59bed189ce41938fa40197a': adb: Remove execute permission on usb_vendor.c
| * | | am f5562cb6: Merge "adb: Remove execute permission on usb_vendor.c"Colin Cross2013-03-291-0/+0
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit 'f5562cb66c1c15d65bc372ede4c180430e1ce9d7': adb: Remove execute permission on usb_vendor.c
| | * | adb: Remove execute permission on usb_vendor.cBenoit Goby2013-03-291-0/+0
| | | | | | | | | | | | | | | | Change-Id: Ia4f2e0171634764bde3593593b3c99184236528f
* | | | am 78420edc: resolved conflicts for merge of 35200422 to jb-mr2-dev-plus-aospBenoit Goby2013-03-291-0/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | * commit '78420edc0f3e99684c36f0d516744b4d9312a1c1': Add BYD's USB Vendor ID Add USB Vendor ID for Xiaomi Add vendor IDs to adb
| * | | resolved conflicts for merge of 35200422 to jb-mr2-dev-plus-aospBenoit Goby2013-03-291-0/+6
| |\ \ \ | | |/ / | | | / | | |/ | |/| Change-Id: I754b8b17a7e3a6e4ef3ccf0a02beca0fc72ba749
| | * Add BYD's USB Vendor IDsunxiaoqi2013-03-291-0/+3
| | | | | | | | | | | | Change-Id: I0694ed72d70638f0a4a252b1c802ae8f4e33385e
| | * Add USB Vendor ID for XiaomiGary Hua2013-03-291-0/+3
| | | | | | | | | | | | | | | Change-Id: I9f0622e05334a5074604bd88093172654b4c3e7d Signed-off-by: Gary Hua <huachengping@xiaomi.com>
| | * Add vendor IDs to adbSam Lin2013-03-291-0/+9
| | | | | | | | | | | | | | | | | | | | | Adding vendor IDs to adb for device partners: AnyDATA, Harris & Oppo Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
* | | toolbox: Make reboot a separate command from toolboxBenoit Goby2013-03-261-1/+2
|/ / | | | | | | | | | | | | | | Set the CAP_SYS_BOOT filesystem capability on the new reboot command and keep CAP_SYS_BOOT in adb bounding set so that the shell user can run it. Change-Id: I1dd6143445ee2a952254f0452ab6e544318431dd
* | Add vendor IDs to adbSam Lin2013-03-121-0/+9
| | | | | | | | | | | | | | Adding vendor IDs to adb for device partners: AnyDATA, Harris & Oppo Change-Id: Ib8c5196c53599bd6eb077871cd95ccac935c42e7
* | am 822ea9b3: am fd5c6b9f: Merge "Close adb_usb.ini after reading it"Elliott Hughes2013-03-081-0/+1
|\ \ | |/ | | | | | | * commit '822ea9b3d1cf240b16135e1b5c3bd926c02d17d6': Close adb_usb.ini after reading it
| * Merge "Close adb_usb.ini after reading it"Elliott Hughes2013-03-091-0/+1
| |\
| | * Close adb_usb.ini after reading itChris Dearman2012-11-161-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Chris Dearman <chris@mips.com> Change-Id: I7d3ee8cbd54af206dac89225c438e6c7322c571f
* | | DO NOT MERGE - Document new -obb flag for adb backupChristopher Tate2013-03-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Now that adb backup handles OBB file backup/restore. (Cherrypicked) Change-Id: Ie92b546e3898b62d74f552ab577b7756ad176ee6
* | | am 79d4381a: am 69f3ec84: Merge "Fix issues where the filename is referred ↵Colin Cross2013-03-051-4/+4
|\ \ \ | |/ / | | | | | | | | | | | | | | | to as \'sideload\'" * commit '79d4381a8e838d7ddbeda5b7dc90e0c5bca5a8c6': Fix issues where the filename is referred to as 'sideload'
| * | Fix issues where the filename is referred to as 'sideload'Magnus Eriksson2013-03-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The adb sideload utility referes to the filename as 'sideload' in some places. This patch changes the printouts to display the filename instead. Change-Id: I38ada01a08bed53a8d9697c03f55ce8cee2abe12 Signed-off-by: Magnus Eriksson <eriksson.mag@gmail.com>
* | | am 844306bd: am cc4499b6: Merge "adb: use correct header file."Nick Kralevich2013-02-281-1/+1
|\ \ \ | |/ / | | | | | | | | | * commit '844306bd9cb3c8b3e514e5d91e9514556e8f95f4': adb: use correct header file.
| * | adb: use correct header file.Nick Kralevich2013-02-281-1/+1
| | | | | | | | | | | | Change-Id: I7a66ced762dc077247fd7c2714ae8850ffdcaeb9
* | | Remove CAP_NET_RAW from adbNick Kralevich2013-02-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ping no longer needs CAP_NET_RAW. See: * http://lwn.net/Articles/443051/ * https://android-review.googlesource.com/52090 * https://android-review.googlesource.com/52072 Eliminate the CAP_NET_RAW special case in adb Change-Id: If9d32c5254291b123b06bededc94b64113f6b8f2
* | | Merge "adb: Fix secure adb when booting with usb attached"Benoit Goby2013-02-213-5/+29
|\ \ \
| * | | adb: Fix secure adb when booting with usb attachedBenoit Goby2013-02-023-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting with usb attached, the secure adb authentication happens long before the framework is done booting, so adb can't notify the framework to install the public key. Change-Id: Id2af6cebece345022f56cb0c4b5af24e1d7a425c
* | | | adb: drop capability bounding set on user buildsNick Kralevich2013-02-151-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | run-as: don't require CAP_DAC_OVERRIDE. Prevent an adb spawned application from acquiring capabilities other than * CAP_NET_RAW * CAP_SETUID * CAP_SETGID The only privileged programs accessible on user builds are * /system/bin/ping * /system/bin/run-as and the capabilities above are sufficient to cover those two programs. If the kernel doesn't support file capabilities, we ignore a prctl(PR_CAPBSET_DROP) failure. In a future CL, this could become a fatal error. Change-Id: I45a56712bfda35b5ad9378dde9e04ab062fe691a
* | | | am e149855a: am 523a2090: Merge "adb: Use 64 bit capabilities."Nick Kralevich2013-02-151-5/+8
|\ \ \ \ | |/ / / |/| / / | |/ / | | | * commit 'e149855a816c98149a95725139ae66f193049ddd': adb: Use 64 bit capabilities.
| * | adb: Use 64 bit capabilities.Nick Kralevich2013-02-151-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following kernel warning: $ adb shell dmesg | grep adb <6>[ 7.813003] warning: `adbd' uses 32-bit capabilities (legacy support in use) Change-Id: I3912302c5c577f1cb03f0c591834ab7b3a72ddf5
* | | am 282caf3b: am 260f3471: am f8afaebe: Merge "Windows adb: include stdint.h ↵Kenny Root2013-01-291-0/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | for uint8_t on MinGW-w64" # By Ray Donnelly # Via Android Git Automerger (2) and others * commit '282caf3bd0dfd81b92ac74e0b3ea970d195fee7b': Windows adb: include stdint.h for uint8_t on MinGW-w64
| * | Merge "Windows adb: include stdint.h for uint8_t on MinGW-w64"Kenny Root2013-01-301-0/+1
| |\ \
| | * | Windows adb: include stdint.h for uint8_t on MinGW-w64Ray Donnelly2013-01-081-0/+1
| | | | | | | | | | | | | | | | Change-Id: I84b8284bc034feb0acd313b0aad9e2fa5868854f
* | | | am 6c3d3ccf: am d033739d: am d40fd86e: Merge "Windows adb: initialize on to ↵Kenny Root2013-01-291-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 in disable_tcp_nagle" # By Ray Donnelly # Via Android Git Automerger (2) and others * commit '6c3d3ccfa5d1d77b80e5c7619909a48b976c69ec': Windows adb: initialize on to 1 in disable_tcp_nagle
| * | | Merge "Windows adb: initialize on to 1 in disable_tcp_nagle"Kenny Root2013-01-301-1/+1
| |\ \ \
| | * | | Windows adb: initialize on to 1 in disable_tcp_nagleRay Donnelly2013-01-111-1/+1
| | | | |
* | | | | Merge "adb: Add "unauthorized" connection state"Benoit Goby2013-01-293-0/+11
|\ \ \ \ \
| * | | | | adb: Add "unauthorized" connection stateBenoit Goby2013-01-153-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new connection state, so that devices, that require confirmation to allow adb, appear as "unauthorized" in the adb devices lists. Change-Id: Ib4264bc5736dedecf05bcf8e31896f4d7a91fad8
* | | | | | Merge "adb: Read secure adb keys on every auth request"Benoit Goby2013-01-282-14/+11
|\ \ \ \ \ \ | |/ / / / /