Verify that netlink messages are actually from the kernel,
and not from a userspace program.
This is a manual cherry-pick from b620a0b1c7
Change-Id: I237f0a5cb56393bb3aab64a7ae5898f2bdc95cef
Add support for the utime(2) family of system calls to change the modify
and access time of files. Requires an updated bionic with support for
the utimensat(2) system call.
Change-Id: I8cc0c0e6671c5708849752f47e4c3d4be2858b61
Backport Iee1ca9b7defd6
This now passes:
$ adb shell am instrument -w -e class android.os.SystemPropertiesTest \
com.android.frameworks.coretests.systemproperties/android.test.InstrumentationTestRunner
(which tests setting and re-reading back system properties in a loop)
This patch depends on I110b653a which moves property setting
from libcutils into bionic.
Bug: 3511230
Change-Id: I145e642bd13079677017bb64e361e176fc73b810
Otherwise the kernel will return an EINVAL error
Change-Id: I906472a4128eb26c5be7865142bc4a52464cf5f8
Bug: 4065217
Signed-off-by: Mike Lockwood <lockwood@android.com>
Fix for bug 3415286. The persistent properties are normally read early
in the boot process after /data is mounted. However, for an encrypted
system, at that point /data is a tmpfs ramdisk. This change adds a new
command to init (load_persist_props) to read the persistent properties,
and adds an action to init.rc to load the persistent properties. This
action is triggered by setting a property in vold, but that's in a
different CL.
Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
Ext4 filesystems like to be unmounted before rebooting. The Android system
doesn't have a traditional Linux init setup, and shutting down the system
was not much more than calling sync(2) and reboot(2). This adds a new
function to libcutils called android_reboot(). By default, it calls sync()
and then remounts all writable filesystems as read-only and marks them clean.
There is a flag parameter in which the caller can ask for sync() not to be
called, or to not remount the filesystems as read-only. Then it will call
reboot(2) as directed by the other parameters. This change also updates
adb, init and toolbox to call the new android_reboot() function.
Fixes bugs 3350709 and 3495575.
Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
This is to allow OpenGL ES rendering from the system process,
and help with debugging.
Bug: 4086003
Change-Id: I732e95f4fcaa358f430cc195d8e63a69263bffdc
The delta between start and end pointers in memory dump has to be
multiples of 4 or 16.
Bug: 3486787
Change-Id: Ie34aa79ffb704ca647805dbc6a16f2c35adf849c
This is for http://b/3482112 "adb interactions with device causing test harness failures".
This reverts commit 69c5c4c45b.
Change-Id: I630bf2e04d2ecf0223bd2af4e87136754ff880d3
* Handling of the subprocess and its FD.
This fixes http://b/3400254 "Many bugreports getting hung at the end in monkey"
- Start up a service thread that waits on the subprocess to terminate,
then closes the FD associated with it.
- Have the event handler select() with a timeout so that it can
detect the closed FD. Select() with no timeout does not return when an FD is closed.
- Have the event handler force a read on the closed FD to trigger the close sequence.
- Migrate the "shell:blabla" handling to "#if !ADB_HOST" sections.
* Fix the race around OOM adjusting.
- Do it in the child before exec() instead of the in the parent as the
child could already have started or not (no /proc/pid/... yet).
* Allow for multi-threaded D() invocations to not clobber each other.
- Allow locks across object files.
- Add lock within D()
* Add some missing close(fd) calls
- Match similar existing practices near dup2()
* Add extra D() invocations related to FD handling.
* Warn about using debugging as stderr/stdout is used for protocol.
Change-Id: Ie5c4a5e6bfbe3f22201adf5f9a205d32e069bf9d
Signed-off-by: JP Abgrall <jpa@google.com>
All tools (aapt, aidl, dexdump, etc.) need this flag to open()
binary files, or they risk reading corrupted data on Windows.
A bunch of these tools just conditionaly define O_BINARY in
their C files. Seems it would just make sense to define it globally.
Change-Id: Ia5c0a59e9e77bbdcbce235233555f611207abed8
getprop used to output a colon after the property name like:
[property.name]: [property.value]
Add back the colon that was missing, because
com.android.ddmlib.GetPropReceiver's regex expects it. Without
the colon, the GetPropReceiver doesn't parse the device's
properties causing CTS to not recognize the device.
Change-Id: I9bef5ab2b310c831c49c8c51cae7f129167c2dc5