Commit Graph

3484 Commits

Author SHA1 Message Date
Nick Kralevich 3439cc6145 change files in /dev/log/ to 666
With newer Android kernels, anyone can read from the files in
/dev/log. If you're in the logs group (have the READ_LOGS) permission,
you'll see all entries. If you're not in that group, you'll see
log messages associated with your UID.

Relax the permissions on the files in /dev/log/ to allow an application
to read it's own log messages.

Bug: 5748848
Change-Id: Ie740284e96a69567dc73d738117316f938491777
2012-03-29 09:32:33 -07:00
Colin Cross b6428c07f2 Merge "Add handling for DEVNAME for usb devices" 2012-03-27 14:08:26 -07:00
Kenny Root 60733e9280 Make sure "adb install" work is cleaned after error
If an error occurs during the verification of an APK, it could be left
in the temporary installation directory.

Change-Id: I4afa5535fc0b978532b31d5b8fb63776963c39db
2012-03-26 16:14:07 -07:00
Glenn Kasten 31af5f7beb Add AUDIO_POLICY_OUTPUT_FLAG_FAST
Change-Id: I513b84de9c08957e22bff1fc2f25e4f4098111ef
2012-03-26 14:08:34 -07:00
Nick Kralevich 31fb858654 Merge "drmserver: add group drm" 2012-03-26 13:06:12 -07:00
Benoit Goby 4d668e013b Merge "adb: Don't synchronize with transport using sleep" 2012-03-26 12:56:56 -07:00
Benoit Goby 62e5cbaebc Merge "Revert "Reimplement the "adb root" command to more closely match its previous behavior"" 2012-03-26 12:56:49 -07:00
Nick Kralevich 3c9eed88c5 drmserver: add group drm
Make the drm server run as UID=drm, GID=drm. This ensures that
any files created by the drmserver app do not have GID=system.

Bug: 5834297
Change-Id: I3409ad350e9cc82bb0982cdbe470ec1f10b1ca67
2012-03-26 11:30:03 -07:00
Wei Zhong f97b887848 Add handling for DEVNAME for usb devices
When creating device node, user-space handler should honor device
node provided by kernel if present.

Bug: 6105248

Change-Id: I9ab3810563f29f065c239e15149882db28f08893
Signed-off-by: Wei Zhong <wzhong@google.com>
2012-03-23 14:16:37 -07:00
Andrew Hsieh 8ee361cb01 Remove duplicated VENDOR_ID_INTEL
VENDOR_ID_INTEL defined and appear in builtInVendorIds[] twice.
Remove the 2nd one.

Change-Id: I62f7bba392012aafb8ea9730959362db4bc6c669
2012-03-23 15:28:56 +08:00
Nick Kralevich 6756a0c9fe logger: Add the update kernel struct to userspace
Android's kernel logger can optionally return UID information
in addition to the previously returned information. This
information is available by telling the kernel to use the
updated structure via the newly introduced LOGGER_SET_VERSION
ioctl.

int fd = open("/dev/log/main", O_RDONLY);
int version = 2;
ioctl(fd, LOGGER_SET_VERSION, &version);

Change-Id: I6bfe7bfb9df45a56124aa8d0d19e7d7a18e06862
2012-03-22 15:51:24 -07:00
Andrew Hsieh e148601ee2 am bd52ff3e: am 4b91e332: am ef3eb5f7: Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
* commit 'bd52ff3e9362af7747c9442872d23a7d30dc057d':
  Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
2012-03-22 10:28:17 -07:00
Andrew Hsieh bd52ff3e93 am 4b91e332: am ef3eb5f7: Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
* commit '4b91e3328c79383bcebed982ce536046ea316456':
  Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
2012-03-22 10:24:51 -07:00
Andrew Hsieh 4b91e3328c am ef3eb5f7: Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
* commit 'ef3eb5f74022050666168922d96c79531401a16d':
  Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
2012-03-22 10:18:56 -07:00
Nick Kralevich 10331ed16c Revert "logger: Add the update kernel struct to userspace"
This reverts commit 56c3065b79.

Breaks win_sdk build.
2012-03-22 10:18:20 -07:00
Nick Kralevich 3076bfd036 Merge "logger: Add the update kernel struct to userspace" 2012-03-22 09:25:18 -07:00
Andrew Hsieh ef3eb5f740 Added rules to build 64-bit libraries: lib64cutils.a and lib64log.a
Both libraries are needed to build four shared libraries in 64-bit
for 64-bit emulator with "-gpu on"
  lib64OpenglRender.so
  lib64EGL_translator.so
  lib64GLES_CM_translator.so
  lib64GLES_V2_translator.so

Change-Id: If57f72d4661a74f1d5e537568881f39132e0b43d
2012-03-22 08:56:06 -07:00
Kenny Root 2affe824ba Merge "Put keystore into the drmrpc group" 2012-03-21 17:54:16 -07:00
Mike Lockwood a4d9828aea Merge "Merge commit '19155b5'" 2012-03-21 17:11:28 -07:00
Mike Lockwood 2f78d81a1f Merge "Merge commit '5383476727659544875b90d49a5371886a31c1fe'" 2012-03-21 17:11:18 -07:00
Mike Lockwood 2abac4c303 Merge "Merge commit '9dd2eef'" 2012-03-21 17:11:08 -07:00
Mike Lockwood 4aade437d0 Merge "Merge commit 'c4fd60b'" 2012-03-21 17:10:57 -07:00
Mike Lockwood 9865be95cf Merge commit '19155b5'
Do not start sshd by default

Change-Id: I22e6dbb6834321709e9b7c5ae49846d7f9f7c67a
2012-03-21 16:30:54 -07:00
Mike Lockwood ddd48d1c00 Merge commit '5383476727659544875b90d49a5371886a31c1fe'
empty -s ours merge

Change-Id: Ie70e28bcea06dffeebee3887145a30e89626cb62
2012-03-21 16:30:33 -07:00
Mike Lockwood a9bb7261b4 Merge commit '9dd2eef'
sshd to init.rc

Change-Id: I8eedc3b47f1260502034067d9006cac827cb1089
2012-03-21 16:28:04 -07:00
Mike Lockwood 0e5667c18d Merge commit 'c4fd60b'
empty -s ours merge

Change-Id: I148e9138d71a962e463c3252f888c2eccd2bdc4c
2012-03-21 16:27:40 -07:00
Geremy Condra 054de5cc5b Merge "init: make chmod/mkdir/chown not follow symlinks" 2012-03-21 16:03:13 -07:00
Geremy Condra 9ed1fe7732 init: make chmod/mkdir/chown not follow symlinks
This change brings init's do_chmod, mkdir, and do_chown into line
with open's O_NOFOLLOW semantics, causing them to fail when the
last element of their target path is a symlink.

Change-Id: If00e1a25cfe17ef6f738af4bf0541abd0c1b084b
2012-03-21 15:13:08 -07:00
Mike Lockwood 19155b5cd3 init.rc: Do not start sshd by default
Change-Id: Ieacd4e8fbfcd91ed2342b7a104a9b1f4114fc6d5
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-03-21 11:58:05 -07:00
The Android Open Source Project d1fe0d83fa am 17680510: am 7967e4c0: Reconcile with ics-mr1-release
* commit '176805101c10d44f21a65402c9926922b20e1de0':
2012-03-21 09:09:00 -07:00
The Android Open Source Project 176805101c am 7967e4c0: Reconcile with ics-mr1-release
* commit '7967e4c021b8790eaac08ab3fb035431ec118cae':
2012-03-21 09:06:31 -07:00
The Android Open Source Project 7967e4c021 Reconcile with ics-mr1-release
Change-Id: I543778af0009368aa57aba5e0861d981b4351e61
2012-03-21 09:01:27 -07:00
The Android Open Source Project eac5a25f5f am 049a7882: am 3ebb3dad: Reconcile with ics-mr1-release
* commit '049a78828418c9581b2926a41633dd1b441b2ee8':
2012-03-21 08:29:29 -07:00
The Android Open Source Project 049a788284 am 3ebb3dad: Reconcile with ics-mr1-release
* commit '3ebb3dad6e8da55b2057d064c2c0275f478b4f61':
2012-03-21 08:26:53 -07:00
The Android Open Source Project 3ebb3dad6e Reconcile with ics-mr1-release
Change-Id: I5e32c5ab33c5beeab7576a1984dc0add942c590b
2012-03-21 08:23:48 -07:00
Arve Hjønnevåg 1670f831a5 init.rc: Fix permissions on /sys/power/state and /sys/power/wakeup_count
Change-Id: I06a1a2affebdf64f008eaa61a0851f1e832059c5
2012-03-20 20:34:24 -07:00
Nick Kralevich 56c3065b79 logger: Add the update kernel struct to userspace
Android's kernel logger can optionally return UID information
in addition to the previously returned information. This
information is available by telling the kernel to use the
updated structure via the newly introduced LOGGER_SET_VERSION
ioctl.

int fd = open("/dev/log/main", O_RDONLY);
int version = 2;
ioctl(fd, LOGGER_SET_VERSION, &version);

Change-Id: I3914be41de55342c2918f8978fcd4d2b96a09288
2012-03-20 16:21:22 -07:00
Benoit Goby 3236b7a4d3 Merge "adb: Remove unused flags" 2012-03-20 16:11:42 -07:00
Kenny Root 77a62ceac5 MinGW does not have sys/cdefs.h
Change-Id: I5cafafce8488d355ed3865a9fd1173fbebbc5b03
2012-03-20 13:46:30 -07:00
Colin Cross e888674074 Merge "init: manually set controlling tty for console services" 2012-03-19 23:56:00 -07:00
Kenny Root 418fbe66e0 Merge "Add cdefs decoration to list.h" 2012-03-19 17:42:15 -07:00
Jeff Brown 5e0621f78a qsort_t was only defined in glibc 2.8
Change-Id: I646bac8ed4d94bf75a33b886e700c91c3837bc32
2012-03-19 15:39:08 -07:00
Jeff Brown 4a6b384f60 Provide portable wrapper for qsort_r.
qsort_r() is declared differently on BSD and GNU libc and
may be absent on other platforms.

Provide qsort_r_compat() which should work everywhere.

Change-Id: I17a9026573b1ed971ff7d79895e7eb41ba108807
2012-03-19 14:07:26 -07:00
Jeff Brown 14d0c6c7c0 Add missing includes.
Caused warnings about implicitly defined malloc() and sprintf().

Change-Id: Ia56309adc11caf5801ffd88e374c512b785cfd93
2012-03-19 14:06:50 -07:00
Dima Zavin c4edb9ec90 Merge "cutils: str_parms: when deleting entry, need to also remove key" 2012-03-19 09:56:14 -07:00
Glenn Kasten b1108c8594 Merge "audio_channel_in/out_mask_from_count" 2012-03-19 07:31:50 -07:00
Colin Cross 50fb5a6933 init: manually set controlling tty for console services
Normally, calling open on a tty will set that tty as the process
group controlling tty if none already exists.  However, if the tty
is /dev/console, the kernel will never automatically set it as the
controlling tty.  Call the TIOCSCTTY manually on the fd, which will
always attempt to set it as the controlling tty.

Fixes ctrl-c on the console shell when androidboot.console is not
passed on the kernel command line and the default /dev/console is
used.

Change-Id: I449cc41b47e93ac38ad6987413bb54131e1ec0cd
2012-03-18 15:39:59 -07:00
Benoit Goby f366b3698b adb: Don't synchronize with transport using sleep
Services that cause adbd to reboot are currently implemented this way:
    write(fd, response)
    close(fd)
    sleep(1)
    exit(1)
sleep(1) is necessary to leave time for the transport to transmit
the response before the daemon exits. This is slow and unreliable.
Instead, add a flag to the asocket to make it exit the daemon only
after the socket is closed.

Change-Id: I9df45ea6221f0d9b828703b9b2316a5d4fe59352
2012-03-16 15:30:05 -07:00
Benoit Goby 7941cf87f6 Revert "Reimplement the "adb root" command to more closely match its previous behavior"
This reverts commit 535164e9d9.
2012-03-16 15:30:05 -07:00
Benoit Goby 9f1af8cde9 adb: Remove unused flags
BUILD_ADBD is always true

ANDROID_GADGET is not used in the code anymore. adbd now checks at
runtime if /dev/android_adb is present

Change-Id: If6c3278606c79cc74d1ef5978e7b8e3a4513aef8
2012-03-16 15:29:34 -07:00