Commit graph

100 commits

Author SHA1 Message Date
Narayan Kamath
8d56ff5d12 am c5aff686: am cda31324: am 4706320e: Merge "Include 64bit valgrind in the android_filesystem_config."
* commit 'c5aff68693dee788a28a0d0256782cc8521aa2a5':
  Include 64bit valgrind in the android_filesystem_config.
2014-04-14 16:05:11 +00:00
Narayan Kamath
6b7ab90ca9 Include 64bit valgrind in the android_filesystem_config.
Required so that we set the exectuable bit correctly.

Change-Id: If59bd0ff47d2b4b2b8f92a1c007b4ba414ea1876
2014-04-12 09:11:16 +01:00
Mark Salyzyn
0175b0747a logd: initial checkin.
* Create a new userspace log daemon for handling logging messages.

Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
Signed-off-by: Nick Kralevich <nnk@google.com>

* Merge conflicts
* rename new syslog daemon to logd to prevent confusion with bionic syslog
* replace racy getGroups call with KISS call to client->getGid()
* Timestamps are filed at logging source
* insert entries into list in timestamp order
* Added LogTimeEntry tail filtration handling
* Added region locking around LogWriter list
* separate threads for each writer
* /dev/socket/logd* permissions

Signed-off-by: Mark Salyzyn <salyzyn@google.com>

(cherry picked from commit 3e76e0a497)

Author: Nick Kralevich <nnk@google.com>
Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
2014-02-26 09:52:35 -08:00
Nick Kralevich
3e76e0a497 logd: initial checkin.
* Create a new userspace log daemon for handling logging messages.

Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
Signed-off-by: Nick Kralevich <nnk@google.com>

* Merge conflicts
* rename new syslog daemon to logd to prevent confusion with bionic syslog
* replace racy getGroups call with KISS call to client->getGid()
* Timestamps are filed at logging source
* insert entries into list in timestamp order
* Added LogTimeEntry tail filtration handling
* Added region locking around LogWriter list
* separate threads for each writer
* /dev/socket/logd* permissions

Signed-off-by: Mark Salyzyn <salyzyn@google.com>

Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
2014-02-14 11:07:54 -08:00
Doug Zongker
9526202d84 set permissions of recovery install script
The script that writes the recovery partition after a successful
update of system needs to be made executable.  This change also moves
it from /system/etc to /system/bin.

Bug: 12893978
Change-Id: I686e2392a2392515a6859a7381b735de1007b7ea
2014-02-04 12:33:08 -08:00
Doug Zongker
7baebf1345 add the pre-recovery service
Add a service called "pre-recovery" which is normally stopped but can
be started by the system server when we want to go into recovery.  It
will do any preparation needed (currently needed to handle update
packages that reside on an encrypted /data partition) and then set
sys.powerctl when it's ready to actually reboot.

Bug: 12188746
Change-Id: I894a4cb200395a0f6d7fe643ed4c2ac0a45d2052
2014-01-16 08:54:59 -08:00
Elliott Hughes
fed76f8515 am 63824e92: am 980093ca: am 348856fa: am 532f4658: Merge "AArch64: Correction of struct surface_t"
* commit '63824e923aca6fe15942beee00b258ea6119e459':
  AArch64: Correction of struct surface_t
2013-12-16 20:03:17 +00:00
Elliott Hughes
c29664284b am 49a88c3c: am 410a1966: am fd382f2e: am fd7eabe4: Merge "Pixelflinger: Add AArch64 support to pixelflinger JIT."
* commit '49a88c3cf38e9c17a756434880fb01971018a9c6':
  Pixelflinger: Add AArch64 support to pixelflinger JIT.
2013-12-16 19:55:21 +00:00
Elliott Hughes
532f465823 Merge "AArch64: Correction of struct surface_t" 2013-12-16 19:50:17 +00:00
Elliott Hughes
260854c0b0 am ed20fef0: am a99f0b6e: am 5b8daae0: am a67b39cb: Merge "Pixelflinger: Fix issue of pointers being stored in ints"
* commit 'ed20fef0630d02395abab6a073a5717ddfbfaa8d':
  Pixelflinger: Fix issue of pointers being stored in ints
2013-12-12 21:33:04 +00:00
Ashok Bhat
658f89dc5c Pixelflinger: Add AArch64 support to pixelflinger JIT.
See the comment-block at the top of Aarch64Assembler.cpp
for overview on how AArch64 support has been implemented

In addition, this commit contains
[x] AArch64 inline asm versions of gglmul series of
    functions and a new unit test bench to test the
    functions

[x] Assembly implementations of scanline_col32cb16blend
    and scanline_t32cb16blend for AArch64, with unit
    test bench

Change-Id: I915cded9e1d39d9a2a70bf8a0394b8a0064d1eb4
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-12 17:30:13 +00:00
Ashok Bhat
d10afb1748 Pixelflinger: Fix issue of pointers being stored in ints
Pixelflinger's code makes assumptions, at certain places,
that pointers can be stored as ints. This patch makes use
of uintptr_t wherever pointers are stored as int or cast
to int.

Change-Id: Ie76f425cbc82ac038a747f77a95bd31774f4a8e8
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2013-12-12 17:30:13 +00:00
Marcus Oakland
6053564160 AArch64: Correction of struct surface_t
The struct in the union with GGLSurface in struct surface_t assumed
that the reserved field, which corresponds to the GGLsizei version
field in the GGLSurface structure (where GGLsizei is define as being
ssize_t in the system/core/include/pixelflinger/pixelflinger.h header
file) is uint32_t. That is appropriate to the 32-bit system but is
not appropriate to the 64-bit system, where ssize_t is 64-bits rather
than 32-bits.

The 32-bit system has also been tested and has no regression
because of this change.

Change-Id: I5cd84fd4a18fa0e63e27975f7b3d3e95b99cea58
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2013-12-10 18:13:26 +00:00
Todd Poynor
fea5b4d44b healthd: move charger executable to healthd charger mode
* Add healthd charger mode ops
* Check for executable invocation as "charger", set charger mode if so
* Incorporate charger executable as healthd charger mode

Change-Id: I4a44e7a4c3a65ae9be94491f7f498aa48d4f8a84
2013-09-17 14:41:07 -07:00
Jeff Sharkey
dfe0cbab3f Richer SD card permissions through FUSE.
Changes the FUSE daemon to synthesize an Android-specific set of
filesystem permissions, even when the underlying media storage is
permissionless.  This is designed to support several features:

First, apps can access their own files in /Android/data/com.example/
without requiring any external storage permissions.  This is enabled
by allowing o+x on parent directories, and assigning the UID owner
based on the directory name (package name).  The mapping from package
to appId is parsed from packages.list, which is updated when apps are
added/removed.  Changes are observed through inotify.  It creates
missing package name directories when requested and valid.

Second, support for separate permissions for photos and audio/video
content on the device through new GIDs which are assigned based on
top-level directory names.

Finally, support for multi-user separation on the same physical media
through new /Android/user/ directory, which will be bind-mounted
into place.  It recursively applies the above rules to each secondary
user.

rwxrwx--x root:sdcard_rw     /
rwxrwx--- root:sdcard_pics   /Pictures
rwxrwx--- root:sdcard_av     /Music

rwxrwx--x root:sdcard_rw     /Android
rwxrwx--x root:sdcard_rw     /Android/data
rwxrwx--- u0_a12:sdcard_rw   /Android/data/com.example
rwxrwx--x root:sdcard_rw     /Android/obb/
rwxrwx--- u0_a12:sdcard_rw   /Android/obb/com.example

rwxrwx--- root:sdcard_all    /Android/user
rwxrwx--x root:sdcard_rw     /Android/user/10
rwxrwx--- u10_a12:sdcard_rw  /Android/user/10/Android/data/com.example

These derived permissions are disabled by default.  Switched option
parsing to getopt().

Change-Id: I21bf5d79d13f0f07a6a116122b16395f4f97505b
2013-08-08 17:26:41 -07:00
Jeff Tinker
7629bf19a1 am 9e9ed1b4: am 131ee07b: Merge "Add a new group for MediaDrm engine plugins" into jb-mr2-dev
* commit '9e9ed1b40010745e709157a6977ba6d053d46c49':
  Add a new group for MediaDrm engine plugins
2013-04-24 21:56:49 -07:00
Jeff Tinker
131ee07b77 Merge "Add a new group for MediaDrm engine plugins" into jb-mr2-dev 2013-04-25 04:54:02 +00:00
Matthew Xie
af1cbd4c10 am 0db6600a: am 7ee2e26e: Remove DBUS from make and header files
* commit '0db6600a60e8d604aaef5e43db9ae52ed7380979':
  Remove DBUS from make and header files
2013-04-24 14:24:30 -07:00
Jeff Tinker
08d64308b9 Add a new group for MediaDrm engine plugins
bug: 8702754
Change-Id: I3b7988b64b1dcf4685624e4c1af938e132b82696
2013-04-23 19:54:17 -07:00
Matthew Xie
7ee2e26eb9 Remove DBUS from make and header files
DBUS had been needed by bluetooth bluz stack. It is not needed after
we replaced bluez stack with bluedroid stack.
bug 6872904

Change-Id: I3fa41c1dd4ac80bc679d5950b3b20c7f6d12265f
2013-04-23 14:02:16 -07:00
Nick Kralevich
ca8e66a8b0 Make init handle reboots
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
2013-04-23 13:21:40 -07:00
Benoit Goby
c6d7e200ed toolbox: Make reboot a separate command from toolbox
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
2013-03-26 12:24:10 -07:00
Colin Cross
0b56fc769d android_filesystem_config: add /vendor
Make /vendor have the same permissions as /system/vendor for devices
that have a vendor partition.

Bug: 8341435
Change-Id: I077a2caf9da41fc072a4d3e334be28c24b70c7cd
2013-03-20 19:06:11 +00:00
Nick Kralevich
fe8135739c android_filesystem_config.h: change ping and run-as
/system/bin/ping no longer requires CAP_NET_RAW, as we're now
using IPPROTO_ICMP. Please see the following for more details:

* http://lwn.net/Articles/443051/
* https://android-review.googlesource.com/52090
* https://android-review.googlesource.com/52072

We can now make ping a normal, unprivileged program.

/system/bin/run-as only requires CAP_SETUID and CAP_SETGID.
Explicitly set the capabilities of this file, and remove
the setuid bit.

This is equivalent to running the following commands:

  * chmod 750 /system/bin/run-as
  * chown root:shell /system/bin/run-as
  * setcap cap_setgid,cap_setuid+ep /system/bin/run-as

Change-Id: I65df858b45e6de4e2190ac9d6d592c06ea9d28cf
2013-03-01 13:18:41 -08:00
Nick Kralevich
bb05a92cb1 fix mac sdk build.
For now, remove linux/capability.h . We're haven't started using
capabilities yet, and this file doesn't exist on mac builds.

Change-Id: Id6ec7fdb408bcdfdd538dac65187194c8ee226ff
2013-02-22 20:32:35 -08:00
Nick Kralevich
e9e74f3c88 Add support for filesystem capabilities.
Modify android_filesystem_config.h and add a capabilities
field. This field can be used to add filesystem capabilities
to a particular file.

Change-Id: If8953a322457ea7275aa6df75660b714e6dc678a
2013-02-20 12:51:28 -08:00
Doug Zongker
8cc97302b2 resolved conflicts for merge of 0fe9742e to jb-mr1-dev-plus-aosp
Change-Id: Ie7a8b642dec0f07d4c8bfd9d8f736fd66c4febe0
2013-01-29 10:50:22 -08:00
Doug Zongker
0fe9742e38 add AID_LOOP_RADIO for control of loop radio device
Change-Id: I1e996dfbaa0f187ec87b5318a214ab0b852193cc
2013-01-29 10:37:51 -08:00
Colin Cross
04aaf5a424 android_filesystem_config: allow absolute paths
SELinux policies use absolute paths, allow absolute paths in fs_config
as well.

Change-Id: Ic97ee0b4eb4df9eac965a8e819fde01df473de7e
2012-12-21 12:51:17 -08:00
jp abgrall
3ddc0059bb am ee854b07: Merge "Allocate a UID for clatd"
* commit 'ee854b077766a85279fa1849b537c50837d1a204':
  Allocate a UID for clatd
2012-11-12 15:57:02 -08:00
Daniel Drown
b49183f122 Allocate a UID for clatd
clatd(464xlat) runs as its own UID after it drops root privs

Change-Id: I2392f8127dcd90d16b0f20ff31bcc5aa096db464
Signed-off-by: Daniel Drown <dan-android@drown.org>
2012-10-15 20:22:53 -05:00
Matthew Xie
971153aa4a Create bluetooth stack aid for sharing gid between all bluetooth processes
bug 6925422

Change-Id: I8d371f8307dd6bea3909a56643819413ea829a98
2012-10-04 12:38:51 -07:00
Zhihai Xu
c2f59d87d8 ISSUE 6849488 Bluedroid stack, remove system/bluetooth.
remove system/bluetooth stuff.

bug 6849488
Change-Id: I81a94d34a4363562a74fa2e574828fd919cfe18c
2012-09-20 10:55:06 -07:00
Kenny Root
7e41c8420e Add shared app gid to fs config
This will allow native tools to be able to know where the shared app
gids start and end.

Change-Id: Ie4529baf36b361c51c42f079b259c352e316647f
2012-09-13 11:23:55 -07:00
Elliott Hughes
605f8706c8 Merge "Add Mips architecture to system/core/include" 2012-08-11 09:56:47 -07:00
Duane Sand
096041174b Add Mips architecture to system/core/include
Change-Id: Ief7bdbd8d09cabe3f11f3ed47a932a7faa81cad9
2012-05-29 16:18:42 -07:00
Doug Zongker
0e6056d012 change /fstab.* perms to 0640
It's safe to change the permissions on files in the root partitions;
incremental OTA now knows how to handle this case.

This reverts commit 08c370cc50.

Change-Id: I503bf8ebd037fa9715494c6539e5430eee47acfe
2012-05-07 16:49:24 -07:00
Doug Zongker
08c370cc50 change /fstab.* perms back to 0644, to unbreak incremental OTAs
Change-Id: I21a991148fd1de604ecf87abad0b49970d2abe84
2012-05-03 14:16:54 -07:00
Ken Sumrall
c1bf89663c A filesystem manager library to mount filesystems for init.
Instead of specifying in init what to mount, and having various hacks in init
itself to deal with encryption, use a filesystem manager library to do the
work, that can also be invoked by vold when mounting an encrypted volume.
Keep all the magic filesystem info an a device specific fstab file.

Change-Id: Ib988f1e4fb0638ba1d5fd98407fa6d8cf862aaca
2012-05-01 13:14:14 -07:00
Robert Greenwalt
1d91fcf7c0 Add MDNS service
Adds both the new service and another socket for netd.

Change-Id: Ie0271a2c48aa55217ae3fcdcc8e121b86b5a589b
2012-04-06 15:38:21 -07:00
Dianne Hackborn
5d3aadbeca Forget name for AID_SDCARD_R.
Change-Id: Ib65fdf4211bef77057009e31295e610f8ba64b44
2012-03-12 11:15:38 -07:00
Dianne Hackborn
50458cf76e Add AID_SDCARD_R.
Change-Id: I47f650e415e06c0b69790ffefea7f208c910ebd7
2012-03-08 14:30:32 -08:00
Dianne Hackborn
ca185abcb5 New user definitions for isolated sandboxes.
Change-Id: I302f89c102bc35dcd70168748e205b41fdbf6576
2012-02-09 11:19:00 -08:00
Nick Pelly
097b4ed410 Replace vendor specific NfcGoogle.apk with generic Nfc.apk
The access control changes allow us to just use Nfc.apk with
the regular platform certificate, instead of the custom signed
NfcGoogle.apk. So we can compeltely get rid of vendor/google/apps/NfcGoogle
and just build it out of packages/apps/Nfc now.

The package name is also reverted from com.android.nfc3 to com.android.nfc

The NFC uid needs to get bumped (25 to 27) to allow the cert change.

Bug: 5608249
Change-Id: I5e178b469e5210cd231ba5f4ea57aa666b3d8893
2011-11-21 14:55:59 -08:00
Jeffrey Tinker
7005c03754 Create drmrpc group for security services
Bug 4598045

Change-Id: I5550203927146fd6864408b3ac2f5e6f5d2b1d77
2011-09-30 12:40:25 -07:00
Dima Zavin
f48b23688c core: Add a standalone charger UI binary
This can be launched from an 'on charger' section in init, which
is processed if androidboot.mode=charger is supplied on kernel
command line.

This is a standalone binary that has a simple "user interface"
and allows the standard production kernel to run while charging.
This removes the burden from the bootloader to get low-power mode
working.

Currently, the device will "power-on" (i.e. reboot) into normal
mode if the power key is pressed for X seconds, and will also
power down the device if the usb/ac cable is removed for Y seconds.

Change-Id: I780594b99211cb09de7f8519a69c5962eb91348a
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-04 15:41:36 -07:00
Brian Carlstrom
0491893023 Revert "Add keychain user"
This reverts commit 6541ef1562.

Bug:4970237
Change-Id: I23a90eb89c1d19893d2ba7065fc624c0521cb06e
2011-07-01 09:50:31 -07:00
Jeff Sharkey
4f1df18766 Create groups to protect bandwidth statistics.
Introduces new "net_bw_stats" group which will protect reading
detailed bandwidth statistics.  Also introduce "net_bw_acct" group
which will enable specific applications to request that their network
traffic be counted against other UIDs.

Change-Id: Ic0ec04e0d2bb9573f3c2a094ebd6d6a8cae0aae6
2011-06-22 10:01:29 -07:00
Brian Carlstrom
6541ef1562 Add keychain user
Change-Id: Id6738d7c97dd58b2043e2cba018797e3b2b4d77a
2011-04-08 14:06:16 -07:00
Jeff Hamilton
ee3420bc12 resolved conflicts for merge of 65475f89 to honeycomb-plus-aosp
Change-Id: I9f77e84d887dbe84bb94de0fdd369d8de24fbec3
2011-04-05 12:32:50 -05:00