summaryrefslogtreecommitdiffstats
path: root/adb/remount_service.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Failure to find an oem partition should not be a remount failure.Elliott Hughes2015-05-111-29/+18
| | | | | | | | | | | | Many devices don't have an /oem partition, so find_mount should be expected to fail, but shouldn't cause the overall remount to fail. Also clean up all the error handling and reporting, and remove the dead int* globals. Bug: http://b/21024141 Change-Id: Ie31021b03c9cab8e972269d7d1ffe383cd30ee9e (cherry picked from commit 9aa4fda4e64c1882faf019cc2a483ee4917e0c85)
* Fix "adb remount" for devices without an oem partition.Elliott Hughes2015-05-081-31/+22
| | | | | | | | | | | | | | | | On a device without an oem partition, we now have an /oem directory anyway. This causes find_mount to fail, and that was returning nullptr from a std::string-returning function. Boom! Also clean up the bits of code I had to trace through between "adb remount" on the host to the crash on the device as I debugged this. The only other meaningful change is the error checking in adb_connect_command --- adb_connect can also return -2. Bug: http://b/20916855 Change-Id: I4c3b7858e13f3a3a8bbc7d30b3c0ee470bead587 (cherry picked from commit 5677c23e8d0c085be8d8429a5d125147d11e9bb2)
* Add WriteFdFmt and clean up more code.Elliott Hughes2015-05-011-11/+7
| | | | | | | | Also say *which* device wasn't found. Bug: http://b/20666660 Change-Id: I50e234ad89e39ae0a8995083c0b642c61275c5a3 (cherry picked from commit ab52c181fa4c1c9891644635dc5653cda5b90e2b)
* More adb buffer fixes.Elliott Hughes2015-05-011-9/+8
| | | | | | | | | | | | | | This patch factors out a lot of the basic protocol code: sending OKAY, sending FAIL, and sending a length-prefixed string. ADB_TRACE has been non-optional for a long time, so let's just remove the #ifs. Also actually build the device tracker test tool (and remove its duplicate). Bug: http://b/20666660 Change-Id: I6c7d59f18707bdc62ca69dea45547617f9f31fc6 (cherry picked from commit e67f1f87d9b1188ec8617035db7006c37ee7b21e)
* Fix more buffer overruns.Elliott Hughes2015-04-171-6/+2
| | | | | | | Also add some tests. Bug: 20323050 Change-Id: I9eaf3dc04efd85206663c4cca4f8c1208620a89a
* Set verity mode as the verified property valueSami Tolvanen2015-03-311-4/+4
| | | | | | | Set the verity mode as the value for partition.%s.verified to make it easier for userspace to determine in which mode dm-verity was started. Change-Id: Icc635515f8a8ede941277aed196867351d8387cb
* File header cleanup.Dan Albert2015-03-191-3/+4
| | | | | | | | | * sysdeps.h should always be included first. * TRACE_TAG needs to be defined before anything is included. * Some files were missing copyright headers. * Save precious bytes on my SSD by removing useless whitespace. Change-Id: I88980e6e00b5be1093806cf286740d9e4a033b94
* Revert "Revert "adb: support /oem partition""Elliott Hughes2015-03-161-64/+45
| | | | | | | | | | This reverts commit 6084a0124f868c7ec43f6c415a27a168f27ff694. The original build breakage is fixed by (a) building the verity code for eng builds as well as userdebug builds and (b) moving the exported remount service functions into a new header file. Change-Id: Ice0c4f97d4db38ab7eb333c7a6e56bbd11123f5b
* Revert "adb: support /oem partition"Dan Albert2015-03-161-45/+64
| | | | | | | | This is broken on userdebug builds, and it isn't completely clear why. The declaration for make_block-device_writable in adb.h wasn't updated to match the definition (which uses a std::string instead of a char*). adb.h is currently extern "C", and it isn't clear why this is only broken for userdebug, so I'd like to revert while we investigate. This reverts commit 81416fdb186070fe4db3ca5fed2e713a4eecaac1. Change-Id: I47f321574f9f21052e2c7332e8b0f6ef9ab98277
* adb: support /oem partitionMÃ¥rten Kongstad2015-03-161-64/+45
| | | | | | Add support for /oem partition in commands 'adb remount' and 'adb sync'. Change-Id: I5defc74ccaa37feaef74b9268e22b4075f98a59f
* Move adb to C++.Dan Albert2015-03-091-0/+169
I keep trying to clean things up and needing std::strings. Might as well just do this now. usb_linux_client.c is going to stay as C because GCC isn't smart enough to deal with the designated initializers it uses (though for some reason it is in C mode). The Darwin files are staying as C because I don't have a way to test that they build. The Windows files are staying as C because while I can actually build for them, it's slow and painful. Change-Id: I75367d29205a9049d34460032b3bb36384f43941