summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Enable lmkd kill tracing everywhere"HEADmasterSuren Baghdasaryan2018-08-032-12/+3
|\
| * Enable lmkd kill tracing everywhereDaniel Colascione2018-08-032-12/+3
|/ | | | | | | Test: asdf Exempt-From-Owner-Approval: vacation Merged-In: If6af7df74d303466aac4a69cdfe558e9748f72b9 Change-Id: If6af7df74d303466aac4a69cdfe558e9748f72b9
* Merge "lmkd: Disable memory.stat usage when per-application memcgs are not used"Treehugger Robot2018-08-031-1/+4
|\
| * lmkd: Disable memory.stat usage when per-application memcgs are not usedSuren Baghdasaryan2018-08-031-1/+4
|/ | | | | | | | | | | | | | | | | | Per-application memory.stat files are not available when per-application memcgs are not used (per_app_memcg=false). Disable its usage based on ro.config.per_app_memcg property. minchan: * correct indentation of memory_stat_parse * move per_app_memcg check into memory_stat_parse inside * change low_ram_device to per_app_memcg Bug: 110384555 Test: manual test to see lkmd log message with memory hogger Merged-In: Ib6dd7586d3ef1c64cb04d16e2d2b21fa9c8e6a3a Change-Id: Ib6dd7586d3ef1c64cb04d16e2d2b21fa9c8e6a3a Signed-off-by: Minchan Kim <minchan@google.com> Signed-off-by: Suren Baghdasaryan <surenb@google.com>
* Merge "Remove dead gglFastDivx."Elliott Hughes2018-08-032-12/+0
|\
| * Remove dead gglFastDivx.Elliott Hughes2018-08-022-12/+0
| | | | | | | | | | | | | | Bug: http://b/112155920 Bug: https://www.viva64.com/en/b/0579/ Test: builds Change-Id: Ia55245ce4484d5376abef16c9863015b0a0ca2b1
* | Merge "Minor fixes to fastboot_driver"Treehugger Robot2018-08-022-7/+12
|\ \
| * | Minor fixes to fastboot_driverAaron Wisner2018-08-022-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make RCString() static - Add clearer error message for 0 length upload error - Fix regex hex matching for partition-size - Move ZLP packet checking to SparseWriteCallback() Test: build fastboot on glinux Change-Id: I51a040e07b9698a41f64b35a9e2baa8d575527a9
* | | Merge "adb: delete hellish hodgepodge."Treehugger Robot2018-08-023-17/+10
|\ \ \
| * | | adb: delete hellish hodgepodge.Josh Gao2018-08-023-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was unreachable, since all of the callers were calling register_socket_transport with foo.c_str() as the serial. Lift this assumption into the type system by switching from char* to std::string for the argument type. Bug: http://b/112147760 Bug: https://www.viva64.com/en/b/0579/ Test: mma Change-Id: I5a6ee265feee6b83bc933a64d895eed39fce68e7
* | | | Merge "adbd: when rebooting, don't close socket before pausing."Treehugger Robot2018-08-021-11/+4
|\ \ \ \
| * | | | adbd: when rebooting, don't close socket before pausing.Josh Gao2018-08-021-11/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An accidental side-effect of the change to unique_fd was that we started closing the reboot service socket before pausing and waiting for our death. This results in the client immediately returning, which means they might get a chance to run other commands before we actually manage to reboot. Bug: http://b/112104037 Test: adb reboot; adb devices Change-Id: Id61321da0c08ebd1ab57f1ce926bafd9109dd9c2
* | | | Merge "ueventd: require opt-in for modalias handling"Tom Cherry2018-08-0211-44/+122
|\ \ \ \
| * | | | ueventd: require opt-in for modalias handlingTom Cherry2018-08-0111-44/+122
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices have modules.alias and modules.dep for modprobe and other purposes but do not want to opt into ueventd auto loading their modules. Therefore we add a flag that can be added to ueventd configuration files to opt into this behavior. Bug: 111916071 Bug: 112048758 Test: check that modules are loaded with this opt-in Test: check that modules are not loaded without this opt-in Change-Id: Ifb281b273059b4671eea1ca5bc726c9e79f3adfb
* | | | Merge changes from topic "liblp-blocksize"Treehugger Robot2018-08-025-77/+157
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | * changes: liblp: Require block-aligned partition sizes. liblp: Simplify GrowPartition().
| * | | liblp: Require block-aligned partition sizes.David Anderson2018-08-025-35/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DM_TABLE_LOAD will reject dm-linear entries if their size is not a multiple of the backing device's logical block size. For example, a partition of 10GiB+512 bytes will fail to map in device-mapper if the logical block size is 4096 bytes. To address this, this patch adds a few changes to liblp: The block size given to lpmake is now recorded in LpGeometryMetadata. The block size must be a multiple of the sector size. In addition, partiton sizes are now aligned to the block size, and the super partition must have enough free space to allocate at least one block (in addition to storing metadata). GrowPartition now has multiple checks that the block-size invariant is not violated, to ensure that no invalid partition tables will be created. Bug: 79173901 Test: liblp_test gtest Change-Id: I484aac1f9b90ebd92dc1c89ce1e09cd89bbb441e
| * | | liblp: Simplify GrowPartition().David Anderson2018-08-021-48/+38
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The partition resize algorithm duplicates a lot of logic because it handles the final free interval separately from other free intervals. This is unnecessary and makes it harder to change the actual algorithm. This change makes GrowPartition() treat the final free space region the same as free gaps in between partitions. It does this by converting the extent list into a gap list, and then adds a final gap for the remainder of the free space. The resize function no longer has to treat the end of the disk separately. This patch does not change the way partitions are allocated, it is purely a refactoring. Bug: 79173901 Test: liblp_test gtest Change-Id: I4780f20b23fe021eac62de874b061857712c04fe
* | | Merge "liblp: Add a ResizePartition helper to MetadataBuilder."Treehugger Robot2018-08-024-66/+57
|\ \ \
| * | | liblp: Add a ResizePartition helper to MetadataBuilder.David Anderson2018-08-014-66/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is to assist with implementing the fastbootd "resize-partition" command. The GrowPartition and ShrinkPartition functions are now private. Bug: 78793464 Test: N/A Change-Id: Ic66a3052359e2558663272ff6e014704206b197e
* | | | Merge "liblog: Add functions to reset log context"Treehugger Robot2018-08-014-11/+73
|\ \ \ \
| * | | | liblog: Add functions to reset log contextSuren Baghdasaryan2018-08-014-11/+73
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add android_log_parser_reset and android_log_reset to reset reader/writer log context. This allows to generate multiple log messages of the same format without context reallocation. Change-Id: Icb0f15855378aa4e66fc671ffefd15d9df6fee1e
* | | | Merge "fs_mgr: Always mount tmpfs with MS_NOEXEC"Treehugger Robot2018-08-011-2/+2
|\ \ \ \
| * | | | fs_mgr: Always mount tmpfs with MS_NOEXECLuis Hector Chavez2017-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds MS_NOEXEC to the list of flags used in fs_mgr_do_tmpfs_mount(). Bug: 62419743 Test: aosp_bullhead-eng still boots Change-Id: I3ee3bb825a59437eba48e3a5b898dd2e385a9ab7
* | | | | Merge "init: run fsck for early mount partitions"Tom Cherry2018-08-013-0/+9
|\ \ \ \ \
| * | | | | init: run fsck for early mount partitionsTom Cherry2018-07-313-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 111883560 Test: fsck runs successfully during early mount Change-Id: I19bcd2610f87f5331f94c228fcbec8f9379fc5e8
* | | | | | Merge "Flash super partition with fastboot flashall"Treehugger Robot2018-08-011-0/+1
|\ \ \ \ \ \
| * | | | | | Flash super partition with fastboot flashallHridya Valsaraju2018-08-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 111763923 Test: fastboot flashall Change-Id: I9b89825bac00d1237972a61715da05f933ac35ce
* | | | | | | Merge "Move back to BSD grep, and make it available for recovery too."Elliott Hughes2018-08-012-3/+23
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | |
| * | | | | | Move back to BSD grep, and make it available for recovery too.Elliott Hughes2018-08-012-3/+23
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: http://b/111849261 Bug: https://bugs.exim.org/show_bug.cgi?id=2294 Test: manual Change-Id: Ia4f67b9f803c4f039d170f6d015a1bd2bb0ef23d
* | | | | | Merge "Remove unused logging symbols."Tomasz Wasilczyk2018-08-012-14/+0
|\ \ \ \ \ \
| * | | | | | Remove unused logging symbols.Tomasz Wasilczyk2018-07-312-14/+0
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 35361699 Test: flash sailfish, it boots Change-Id: Ie545145789faa299e1228b6c91566e0767f7ea79
* | | | | | Merge "adb: win32: fix Unicode console output"Treehugger Robot2018-08-011-2/+2
|\ \ \ \ \ \
| * | | | | | adb: win32: fix Unicode console outputSpencer Low2018-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commandline.cpp includes commandline.h which defines StandardStreamsCallbackInterface which calls fwrite(). In the compilation unit for commandline.cpp, fwrite is getting remapped to adb_fwrite (good), but the compilation unit for bugreport.cpp includes sysdeps.h pretty late, which prevents fwrite from getting remapped to adb_fwrite. Apparently when linking, the version of StandardStreamsCallbackInterface that gets used is the one from bugreport.cpp's compilation unit, which doesn't call adb_fwrite(). And it's necessary to call adb_fwrite() to get Unicode console output on Windows. The fix is to #include "sysdeps.h" earlier in bugreport.cpp. I searched the other object files for other unremapped calls to printf/fwrite/etc. and didn't find any. Bug: https://issuetracker.google.com/issues/111972753 Test: mma, manual test on Windows 10 x64 Change-Id: I322dff75a878397f5e10227e746e77b0024129d0 Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
* | | | | | | Merge changes Ib55d304d,I6fa078ea,I18e9213d,Ife58f0aa,Iccc55557Treehugger Robot2018-07-315-57/+105
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: adb: disable ReconnectHandler in adbd. adb: fix error message for `adb {forward,reverse}` adb: more immediately try to reconnect connections. adb: don't pass time_point::max to condition_variable::wait_until. adb: move list-forward, kill-forward back into handle_forward_request.
| * | | | | | | adb: disable ReconnectHandler in adbd.Josh Gao2018-07-311-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a TCP connection was disconnected from adbd, we were registering it with ReconnectHandler, which led to the transport sticking around after the socket was closed. Due to the naming of TCP transports in adbd (host-<fd number>), this results in incoming connections being immediately closed if their file descriptor number ends up being the same as a TCP transport that had previously disconnected. Guard all of the reconnect logic with ADB_HOST, to fix this. Bug: http://b/112054041 Test: while true; do adb connect <device>; adb connect <device>; adb shell true; done Change-Id: Ib55d304d7e07d6d744e8321d34671bb6d4b91afe
| * | | | | | | adb: fix error message for `adb {forward,reverse}`Josh Gao2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test: `adb reverse` Change-Id: I6fa078ea7a0e019df5c6309df99ffdf2a3219194
| * | | | | | | adb: more immediately try to reconnect connections.Josh Gao2018-07-311-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most disconnects we're likely to encounter are cases where either we notice immediately and can start reconnecting almost immediately (adbd restarting because of `adb root`, etc.), or where we won't notice for a while anyway, so a 10 second sleep is somewhat meaningless. Test: adb root; time adb wait-for-device shell Change-Id: I18e9213dc4e84d735e9240118a368dcb38f21c78
| * | | | | | | adb: don't pass time_point::max to condition_variable::wait_until.Josh Gao2018-07-311-12/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libstdc++ implements wait_until by calculating the offset between its default clock and the clock that it's given by calling now() on each and subtracting, and then adds that offset to the time_point argument. When time_point::max is used, this overflows, resulting in the reconnection thread spinning. Test: wine adb.exe server nodaemon Change-Id: Ife58f0aad14bc44c0804483d3ff2351c28b3d576
| * | | | | | | adb: move list-forward, kill-forward back into handle_forward_request.Josh Gao2018-07-313-38/+53
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The daemon-side reverse functions depended on handle_forward_request: move them back instead of duplicating the logic we had in handle_host_request. Accomplish what we originally wanted to do in this change by changing the transport argument of handle_forward_request to a std::function that acquires a transport, either via acquire_one_transport or immediately returning a value that we already have. As a side effect, fix a bug where we would emit spurious errors for host service requests. Bug: http://b/112009742 Test: echo "001chost:connect:127.0.0.1:5555" | nc localhost 5037 Test: python test_device.py Test: python test_adb.py Change-Id: Iccc555575df6dbd7de10382854c4ea2c6f4beeaa
* | | | | | | Merge "Add product-services.img for `fastboot flashall`."Treehugger Robot2018-07-311-2/+7
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Add product-services.img for `fastboot flashall`.Dario Freni2018-07-311-2/+7
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL is largely and adaptation of Ifd119650dd3316508870df0dfc770099e95ae1d1 Bug: 80741439 Test: Successfully built product-services.img with one module in it, and flashed on device. Also successfully built image with /system/product-services and no dedicated /product-services partition. Change-Id: I204a831e052d018018ab124d70ad1ff1610ee007
* | | | | | Merge "adb: Correctly detect deduplicated ext4 partitions."Treehugger Robot2018-07-311-4/+5
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | adb: Correctly detect deduplicated ext4 partitions.David Anderson2018-07-301-4/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fs_has_shared_blocks function had two problems. One, it called statfs() on the mount point, which will return information about the file system the mount point is on, rather than the filesystem mounted at that location. Second, the check for EXT4_SUPER_MAGIC was inverted. Bug: N/A Test: adb remount -R works on an ext4 deduplicated device Change-Id: I2e5ef895ea274cb7cc3c35295120da90a026d0d2
* | | | | Merge "fastboot: Fix hang when sparse images end in small chunks."android-n-iot-release-smart-display-r2Treehugger Robot2018-07-301-0/+4
|\ \ \ \ \
| * | | | | fastboot: Fix hang when sparse images end in small chunks.David Anderson2018-07-301-0/+4
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When host fastboot sends sparse blocks to the device, it tries to only send blocks in multiples of 1024 bytes. If a block is not aligned to this size, the excess bytes are prepended to the next write operation. This is implemented by doing the write in two steps: first the previous excess from the last write (plus new data up to alignment), then a second write for the aligned remainder of the new data. This logic has a bug if the final block plus the previous excess data contains >= 1024 but < 2048 bytes. In this case the first write will drain 1024 bytes from the data, and the second write will not have 1024 bytes to write. Instead of retaining this data for the next write, it tries to write 0 chunks (and thus 0 bytes), which hangs the ioctl() call. Bug: N/A Test: "fastboot flash super super.img" where super.img is generated by lpmake, containing system and product_services partitions and images. Change-Id: I9e8523c976ec84d5a57b36a28f4b1ca800edb7e7
* | | | | Merge "Make /acct have 0555 permissions after mounting"Treehugger Robot2018-07-301-0/+1
|\ \ \ \ \
| * | | | | Make /acct have 0555 permissions after mountingLuis Hector Chavez2018-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a `chmod 0555 /acct` just after mounting the cgroup fs on it. This makes it such that even on systems where the rootdir+system partitions are shared, the permissions allow for the system user to open files within /acct, which in turn makes libprocessgroup not complain that it can never do anything with those files. Bug: 111996377 Test: adb shell 'ls -ldZ /acct' # Before and after, on an aosp_sailfish dr-xr-xr-x 48 root root u:object_r:cgroup:s0 0 1971-12-29 17:41 /acct Change-Id: Iee6531126c6e81aa7794e44500555bd3c1cdf7b8
* | | | | | Merge "charger: minui error handling fixups"Tao Bao2018-07-302-95/+123
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | charger: minui error handling fixupsTodd Poynor2018-07-302-95/+123
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Log an error if minui init fails, and avoid subsequent calls to minui in this case (which are likely to crash). Warn if no system text font available. This is now expected on most devices, and the fallback text is not expected to be needed, but just in case. Avoid the attempt to print text if no system font available, log warnings instead. Bug: 80249440 Test: manual: charger mode with no system font Change-Id: Ib0c761d37e41a893b2a192438eebcf48c4827049 Merged-In: Ib0c761d37e41a893b2a192438eebcf48c4827049 (cherry picked from commit 8211515fbe81c49d1e53a903ef890718ff01cadc)
* | | | | Merge "BOARD_USES_PRODUCT_SERVICES_IMAGE => BOARD_USES_PRODUCT_SERVICESIMAGE"Treehugger Robot2018-07-301-1/+1
|\ \ \ \ \ | |/ / / / |/| | | |