1501 Commits

Author SHA1 Message Date
Dimitry Ivanov
efab1544d0 Renamed the function initialing nativeloader
Bug: http://b/27546414
Change-Id: Ia0b65540772ca4bd1cdab391973325b18cd278a0
(cherry picked from commit bf1082e9a1ae833718321ac58ab64e281d0e3614)
2016-03-17 11:16:32 -07:00
Tamas Berghammer
21bdaf14a2 [DO NOT MERGE] Add flag to "am start" to enable native debugging
[Backported form internal CL854980]

Specifying the new flag will enable several features in the runtime
required by the native debugger to debug Java and C++ code at the same
time.

The enabled features:
* Force JIT (never use the interpreter)
* Debug info generation
* Disable some optimizations

Change-Id: Iaf5ab649715a0c274bd1b0fc64e483705da53cd0
2016-03-14 11:48:40 +00:00
Nicolas Geoffray
1da1e5cd3b Fix ASAN builds after app_process change.
Bug:27245894

(cherry picked from commit 573895bbea7cf349d615606004cdb85ba2ca814d)

Change-Id: I1b879f23cd2bb49070cbfee40ae1b8a586a328dc
2016-02-26 13:36:20 +00:00
Dimitry Ivanov
204386e1c5 zygote to preload public native libraries
Preload public native libraries when starting a zygote
This lets other users of libnativeloader (like dex2oat)
avoid unnecessary cold loads of libandroid.so which could
take up to a second.

Bug: http://b/27245894

(cherry picked from commit b0824979be2653ba300382b52c1b1236fd44f0de)

Change-Id: I04a640c104dba5b585a59d63270e81b6c9ad6f7e
2016-02-26 10:25:06 +00:00
Dan Albert
22b7e496c2 Merge "Use std::unique_ptr instead of UniquePtr." 2015-11-05 19:32:43 +00:00
Brian Carlstrom
ffb15da518 Merge "Fixes for sm and pm usage" 2015-11-05 18:38:56 +00:00
Brian Carlstrom
82bfca4609 Fixes for sm and pm usage
sm showed IllegalArgumentException after usage.
pm inconsistently used "return showUsage()"

Bug: 20948199
Change-Id: I5828489a9d4ef2eabfb97dd408d66e1560a5a983
2015-11-05 10:33:40 -08:00
Dan Albert
b0624da118 Use std::unique_ptr instead of UniquePtr.
We're deprecating UniquePtr, so we need to move to the real thing.

Bug: http://b/22403888
Change-Id: I5b7fdf4924dd8c12a8c7dba89278714ca6fdc60a
2015-11-05 00:57:12 -08:00
Elliott Hughes
9bbe41642a Merge "Fix lseek argument order."
am: 12dccb8a24

* commit '12dccb8a2450152102b32bf4882200f6b08a5a5a':
  Fix lseek argument order.
2015-10-20 20:35:44 +00:00
Elliott Hughes
70bef1c4bd Fix lseek argument order.
Change-Id: Ibc2f98e4c26d0ac6ac7b4a73775c5213c4df4518
2015-10-20 13:23:18 -07:00
Brian Carlstrom
b9a28ae199 am f916524f: Merge "Add support for --user to "pm path" for work profile use"
* commit 'f916524f44c9955e7c747e5319d17c46a61a3c4c':
  Add support for --user to "pm path" for work profile use
2015-10-15 16:02:57 +00:00
Brian Carlstrom
f916524f44 Merge "Add support for --user to "pm path" for work profile use" 2015-10-15 15:55:45 +00:00
Adam Lesinski
651cb804b1 am fe1934e4: Merge "RRO: idmap: allow flock(2) to block"
* commit 'fe1934e470681ff7ec5b8ec0609ae9fe24bd7282':
  RRO: idmap: allow flock(2) to block
2015-10-12 19:34:43 +00:00
Adam Lesinski
287cd2d1e4 am bac309ca: Merge "RRO: idmap: fix sorting of overlays.list"
* commit 'bac309ca8f4ecd1a835aa36f4be2a1fa45577eab':
  RRO: idmap: fix sorting of overlays.list
2015-10-12 19:34:37 +00:00
Adam Lesinski
6382a950cd am 2327239d: Merge "Handle \'root\' pseudo-package in the appops command"
* commit '2327239d65525d8ba2bdbedd6e59809fef447a12':
  Handle 'root' pseudo-package in the appops command
2015-10-12 19:34:28 +00:00
Adam Lesinski
fe1934e470 Merge "RRO: idmap: allow flock(2) to block" 2015-10-12 19:30:23 +00:00
Adam Lesinski
bac309ca8f Merge "RRO: idmap: fix sorting of overlays.list" 2015-10-12 19:29:39 +00:00
Adam Lesinski
2327239d65 Merge "Handle 'root' pseudo-package in the appops command" 2015-10-12 19:29:14 +00:00
Adam Lesinski
6029dfa81a am 7caa8f14: Merge "Make \'idmap --scan\' accept more than one input directory"
* commit '7caa8f14a78d279e0392089dca2f54f27e7f5d15':
  Make 'idmap --scan' accept more than one input directory
2015-10-12 18:59:03 +00:00
Snild Dolkow
3875bf6c04 Handle 'root' pseudo-package in the appops command
The AppOpsService handles the 'root' pseudo-package as any other; it
gets no automatic allowances. This is reasonable, but it blocked me from
accessing the mms-sms provider through the 'content' command, even in a
root shell.

So I tried to change the rules:

$ adb root
$ adb shell appops set root WRITE_SMS allow
Error: No UID for root in user 0

This error occurs in the appops command because there isn't really a
package called root, so the UID lookup via PackageManager fails.

But we know that root is UID 0, so we can just skip the lookup.
(Also, AppOpsService handles the other way around in getOpsLocked method.)

Change-Id: Ie0cad67efa438a74a4d9921d29933610cfb13974
2015-10-07 19:58:17 +02:00
Mårten Kongstad
7197d91eb7 RRO: idmap: fix sorting of overlays.list
Multiple overlay packages with targetPackage="android" are loaded in the
wrong order due to the incorrect order they are listed in overlays.list.
This will cause runtime resource overlay to fail when multiple overlay
packages target the same resources in framework-res.apk.

Correct the order in which overlays are loaded by changing the sorting
of overlays.list.

Background: commit f90f2f8d changed the order in which overlay packages
should be added to ResTables. The expected order is now in ascending
priority. This must be reflected in overlays.list.

Change-Id: I249984c0e34b6009e7280ce2777750c76ab16e37
2015-10-07 19:51:50 +02:00
Mårten Kongstad
83ab0d7c18 Make 'idmap --scan' accept more than one input directory
The 'idmap --scan' command was limited to only scan a single directory
for overlay packages. Update idmap to support any number of directories.

Change-Id: I851f5720a3c1d844235911a0833670652a20a3c8
2015-10-07 19:45:09 +02:00
Mårten Kongstad
df1a5b22cd RRO: idmap: allow flock(2) to block
During creation of an idmap an advisory lock is applied on the
output file using flock(2). This commit removes the LOCK_NB flag
from the call to flock(2).

The reason for this is that if the function were to return
EWOULDBLOCK, the entire idmap operation would be aborted leading
to the device booting without the correct overlay packages applied.

Change-Id: Iad319779976e950d4354e4f60b30439f6f208b77
2015-10-07 19:02:09 +02:00
Brian Carlstrom
f83612b295 Add support for --user to "pm path" for work profile use
Change-Id: Ic8bb923e15a40f32cc7daa6a344250abfc81e423
2015-09-25 13:08:35 -07:00
Guang Zhu
4f3a2d47a1 am 8bc9238f: am 9e4a4606: am fe74fb95: extend svc command to control NFC state
* commit '8bc9238f1438c1c9359b3c8959399c0168dbfc74':
  extend svc command to control NFC state
2015-09-15 21:38:05 +00:00
Guang Zhu
fe74fb95b9 extend svc command to control NFC state
Change-Id: I599e4000fa17384089410e63b3150f25aa9458f7
2015-09-15 13:43:22 -07:00
Chris Tate
748dd8736f am 8d662a07: am e49dcfed: am 9b7a4ac5: am e62421f1: Merge "Teach Pm about the "always ask" link-handling state" into mnc-dev
* commit '8d662a074296923d417f833e9c12b2b0bd50cfa3':
  Teach Pm about the "always ask" link-handling state
2015-08-26 00:40:19 +00:00
Chris Tate
9b7a4ac584 am e62421f1: Merge "Teach Pm about the "always ask" link-handling state" into mnc-dev
* commit 'e62421f1fbc1ea44e7737989e134fdf9fc1ec4cc':
  Teach Pm about the "always ask" link-handling state
2015-08-26 00:20:50 +00:00
Chris Tate
555f91db7c am e62421f1: Merge "Teach Pm about the "always ask" link-handling state" into mnc-dev
* commit 'e62421f1fbc1ea44e7737989e134fdf9fc1ec4cc':
  Teach Pm about the "always ask" link-handling state
2015-08-26 00:20:03 +00:00
Christopher Tate
47dd08d7fb Teach Pm about the "always ask" link-handling state
Bug 23511867

Change-Id: I74b3c8222a7d22541a96b698edd1a175d378e48f
2015-08-25 12:39:04 -07:00
Tom Cherry
fe0fcf5cad am b9ac485a: am 49948146: Merge "bundle init.rc contents with its service"
* commit 'b9ac485a8e49a4db080bab8ea684a9b262215563':
  bundle init.rc contents with its service
2015-08-21 18:24:35 +00:00
Tom Cherry
9f5e9ec76a am b9ac485a: am 49948146: Merge "bundle init.rc contents with its service"
* commit 'b9ac485a8e49a4db080bab8ea684a9b262215563':
  bundle init.rc contents with its service
2015-08-21 18:20:32 +00:00
Tom Cherry
c2de7a7e87 bundle init.rc contents with its service
Bug: 23186545
Change-Id: I080e73d6a124873c2ddd0fba85315d7082faf3f5
2015-08-19 17:24:47 -07:00
Jorim Jaggi
fc010d00f3 am 1d9a8c58: am 2591d6ff: am 358fcc79: Do not start with a black frame in bootanimation
* commit '1d9a8c58d8a68027eec950875700550600e3e46b':
  Do not start with a black frame in bootanimation
2015-08-19 01:43:06 +00:00
Jorim Jaggi
358fcc795e Do not start with a black frame in bootanimation
Bug: 23128307
Change-Id: I0ec044f983c1c30960be046e43a882c63205dc5f
2015-08-18 20:26:47 +00:00
Sebastien Hertz
60a2716f72 am 3244dc22: am 677cd087: am e9de1b4c: am 9a010d0a: Merge "Allow debugging only for apps forked from zygote" into mnc-dev
* commit '3244dc229af4d4c8b764bf9ca1e108b5cd933d90':
  Allow debugging only for apps forked from zygote
2015-08-18 09:52:46 +00:00
Sebastien Hertz
e95386852e am 9a010d0a: Merge "Allow debugging only for apps forked from zygote" into mnc-dev
* commit '9a010d0a4157f97870bc38bd3dd0a8f4fd18a172':
  Allow debugging only for apps forked from zygote
2015-08-18 07:50:27 +00:00
Sebastien Hertz
9a010d0a41 Merge "Allow debugging only for apps forked from zygote" into mnc-dev 2015-08-18 07:41:50 +00:00
Chris Tate
14e122582c am 13845aea: am b2d4c550: am b47890c4: am 7e7d79ef: Merge "Make "Ask every time" actually work that way" into mnc-dev
* commit '13845aeae3fc3044f3fc279ca421df6d4f78ee35':
  Make "Ask every time" actually work that way
2015-08-14 17:35:28 +00:00
Chris Tate
d7a164bf3f am 7e7d79ef: Merge "Make "Ask every time" actually work that way" into mnc-dev
* commit '7e7d79ef2f4aa6a8da86af459d419bd24c47b440':
  Make "Ask every time" actually work that way
2015-08-14 17:15:18 +00:00
Christopher Tate
56f0ff3c48 Make "Ask every time" actually work that way
..in link-opening behavior.  If a candidate is marked as "ask
every time," then the user is guaranteed to get a disambiguation
prompt including that candidate even when some other candidate
app is in the "always prefer this over a browser" state.

Bug 23147746

Change-Id: I904d8697a992b3f16f32b1c1b49c2bf9424c7137
2015-08-13 18:56:05 -07:00
Sebastien Hertz
7a09b8322c Allow debugging only for apps forked from zygote
When starting the runtime from app_process, we only pass JDWP options
if starting zygote. It prevents from opening a JDWP connection in
non-zygote programs while Android apps (forked from zygote) remain
debuggable.

Bug: 23050463
Change-Id: If8ea719063a65db4cdeed69a838b52e87b078b08
2015-08-10 20:39:13 +02:00
Yusuke Sato
82e7807430 am b98e2353: am 158560ad: Merge "Distinguish user-requested shutdown from power-related ones"
* commit 'b98e235364c2b221521f622c546733b2862e4677':
  Distinguish user-requested shutdown from power-related ones
2015-08-03 17:56:37 +00:00
Yusuke Sato
c2369c5301 am b98e2353: am 158560ad: Merge "Distinguish user-requested shutdown from power-related ones"
* commit 'b98e235364c2b221521f622c546733b2862e4677':
  Distinguish user-requested shutdown from power-related ones
2015-07-31 23:34:06 +00:00
Yusuke Sato
705ffd1efe Distinguish user-requested shutdown from power-related ones
With this patch, when the user requested shutdown,
PowerManagerService sets sys.powerctl is set to
"shutdown,userrequested", and init runs fsck on shutdown.

When shutdown is triggered due to a low power state etc.,
the service sets the property to "shutdown,", and init
immediately shuts down the system without running the
command.

This is a follow-up CL for http://r.android.com/158525.

Bug: 21853106
Change-Id: Iae72990130fe9aa479c802f77301438190dbbfb3
2015-07-30 23:47:13 -07:00
Roshan Pius
231efff579 am bc25174b: am 51a193a3: am 5d573ed8: am 944b6362: Merge "Add a command to register SIM Phone account." into mnc-dev
* commit 'bc25174bd1ce3191ff05e29298e60d79a1a53518':
  Add a command to register SIM Phone account.
2015-07-29 20:04:36 +00:00
Roshan Pius
d26bc1c0b4 am 944b6362: Merge "Add a command to register SIM Phone account." into mnc-dev
* commit '944b63624b40c96f4a31af750e1678c0b9c88ad1':
  Add a command to register SIM Phone account.
2015-07-29 19:16:16 +00:00
Roshan Pius
d3586e174f Add a command to register SIM Phone account.
Phone accounts with SIM_SUBSCRIPTION capabiltiy needs system permission.
Hence adding a command to add sunc phone accounts for CTS testing of
remote connections.

BUG: 20303674
Change-Id: Ieb7349f906ec8209776ffbe39ed3633f01ba1e7c
2015-07-28 15:49:42 -07:00
John Reck
0e5a5161e6 am d79117c4: am 9ba771bb: am c2db381e: am 6b66a4a8: use findProcess instead of getProcess
* commit 'd79117c405fab2c7a64d7307a941df05a713814d':
  use findProcess instead of getProcess
2015-07-24 04:07:12 +00:00
Tim Kilbourn
4d2c2583df am a714a4a7: am 2f778da1: am 46638832: am a2bf7616: Merge "Add a wm command to dismiss the keyguard." into mnc-dev
* commit 'a714a4a77020303c5ab9464781464bd050110525':
  Add a wm command to dismiss the keyguard.
2015-07-24 04:06:09 +00:00