Commit graph

50059 commits

Author SHA1 Message Date
Wei Wang
3251fb09a8 Merge "init.rc: set fsck log permission on post-fs-data" am: e7d0c83d3c
am: d830060459

Change-Id: I3dab19fc19f47d43ca0c28b56e2abf34c4d502a8
2019-04-19 18:13:46 -07:00
Bowgo Tsai
619e646ec2 Merge "Copying debug ramdisk files to /debug_ramdisk/*" am: 72d8d2f2c6
am: b1eba916f1

Change-Id: I93308b3ef9f969031ebe86ef973d81680736a7b3
2019-04-19 17:46:24 -07:00
Wei Wang
d830060459 Merge "init.rc: set fsck log permission on post-fs-data"
am: e7d0c83d3c

Change-Id: I75bd75fc024c583516ed5aabd669b1c76e637f6f
2019-04-19 17:45:40 -07:00
Christopher Ferris
8f1686762b [automerger skipped] Merge "Add indicator that an elf is memory backed." into qt-dev
am: 43ca2e9ec7 -s ours
am skip reason: change_id Ibc4fe1d117e9b5840290454e90914ddc698d3cc2 with SHA1 4ae266ccbd is in history

Change-Id: Ie9441ec0f782bfba8dea3a2fc94bac95a7a93883
2019-04-19 17:29:31 -07:00
Alistair Strachan
0f33a5c61a [automerger skipped] Merge "Don't assume an A/B device when overriding the super partition name." into qt-dev
am: b10d1ac14a -s ours
am skip reason: change_id I1ea309d448866a8914f58be98d860eca36d47062 with SHA1 0b0ee7af2f is in history

Change-Id: Ib0a916ec9daa9a6b8d1b0ddd58a1645c075bb790
2019-04-19 17:22:27 -07:00
Bowgo Tsai
b1eba916f1 Merge "Copying debug ramdisk files to /debug_ramdisk/*"
am: 72d8d2f2c6

Change-Id: I0ac5afba180f117c0da4df042f712a2c5bd5b76b
2019-04-19 17:13:19 -07:00
Treehugger Robot
e7d0c83d3c Merge "init.rc: set fsck log permission on post-fs-data" 2019-04-20 00:12:47 +00:00
Treehugger Robot
72d8d2f2c6 Merge "Copying debug ramdisk files to /debug_ramdisk/*" 2019-04-19 23:54:53 +00:00
Christopher Ferris
43ca2e9ec7 Merge "Add indicator that an elf is memory backed." into qt-dev 2019-04-19 23:28:27 +00:00
Alistair Strachan
b10d1ac14a Merge "Don't assume an A/B device when overriding the super partition name." into qt-dev 2019-04-19 22:14:08 +00:00
Wei Wang
a91c5f700e init.rc: set fsck log permission on post-fs-data
Fixes: 130829745
Test: build and trigger fsck
      crosshatch:/ # ls -l /dev/fscklogs/log
      -rwxrwx--- 1 root system 1584 1970-04-08 14:48 /dev/fscklogs/log
Change-Id: Ifd0734e121d07b941a73d7cabde04928ce5e5c59
2019-04-19 11:46:21 -07:00
Christopher Ferris
b7b0cecce4 Add indicator that an elf is memory backed.
Modify the unwinder library to indicate that at least one of the stack
frames contains an elf file that is unreadable.

Modify debuggerd to display a note about the unreadable frame and a possible
way to fix it.

Bug: 129769339

Test: New unit tests pass.
Test: Ran an app that crashes and has an unreadable file and verified the
Test: message is displayed. Then setenforce 0 and verify the message is
Test: not displayed.
Change-Id: Ibc4fe1d117e9b5840290454e90914ddc698d3cc2
Merged-In: Ibc4fe1d117e9b5840290454e90914ddc698d3cc2
(cherry picked from commit 4ae266ccbd)
2019-04-19 10:57:11 -07:00
Wei Wang
f1d32acedc Merge "init: set oom_adj early before fork vendor_init" into qt-dev
am: 50b7b4c113

Change-Id: I1498939b5b6115454cf76bfc314d804deb2000ca
2019-04-19 10:37:32 -07:00
Wei Wang
50b7b4c113 Merge "init: set oom_adj early before fork vendor_init" into qt-dev 2019-04-19 17:13:39 +00:00
Tom Cherry
8948089c5f Merge "init: small header clean up" am: 9b33cbc0cb
am: d7d98803b2

Change-Id: Ic89a48fde921edd7726d8d95076a64f1b60195a4
2019-04-18 21:42:14 -07:00
Tom Cherry
d7d98803b2 Merge "init: small header clean up"
am: 9b33cbc0cb

Change-Id: I32c5f58a4bb7cbed6f6e8455f8d50b413ef3a4a3
2019-04-18 21:37:03 -07:00
Treehugger Robot
9b33cbc0cb Merge "init: small header clean up" 2019-04-19 04:23:24 +00:00
David Anderson
4694b5caef Merge "Don't assume an A/B device when overriding the super partition name." am: 8f37d23faf
am: da9d1a666a

Change-Id: I8d13e597b8e0dee27939ee4cc48c6bd75effe797
2019-04-18 21:07:21 -07:00
Andreas Gampe
59b89404d3 Merge "Ziparchive: Enable -Wconversion" am: 5664489a31
am: e34eab047a

Change-Id: Icb915f69802080319425569b198742727c1929e2
2019-04-18 20:56:41 -07:00
David Anderson
da9d1a666a Merge "Don't assume an A/B device when overriding the super partition name."
am: 8f37d23faf

Change-Id: I6deea49e698bfc1ca40f3ea622c9ecc63f02cd3a
2019-04-18 20:56:21 -07:00
Andreas Gampe
e34eab047a Merge "Ziparchive: Enable -Wconversion"
am: 5664489a31

Change-Id: I608cffbcaddd1e6bdda85cdcf8af6f3936b9886f
2019-04-18 20:50:23 -07:00
Treehugger Robot
8f37d23faf Merge "Don't assume an A/B device when overriding the super partition name." 2019-04-19 03:49:42 +00:00
Treehugger Robot
5664489a31 Merge "Ziparchive: Enable -Wconversion" 2019-04-19 03:33:19 +00:00
Christopher Ferris
3308c77160 Merge "Add indicator that an elf is memory backed." am: 7908ff90d0
am: b00146717d

Change-Id: I3650d6a2c4159b166be642088d8eb92ee8287792
2019-04-18 20:10:53 -07:00
Christopher Ferris
b00146717d Merge "Add indicator that an elf is memory backed."
am: 7908ff90d0

Change-Id: Ifc607559f5d56199d575973138226c78000e38be
2019-04-18 20:05:43 -07:00
Christopher Ferris
7908ff90d0 Merge "Add indicator that an elf is memory backed." 2019-04-19 02:50:43 +00:00
Wei Wang
011f5a20d2 Merge "init: set oom_adj early before fork vendor_init" am: a7c103eb8e
am: 099ffa2f37

Change-Id: I8882ccf5f3532fd5da9b6d20bb019a10d65fd86b
2019-04-18 19:46:18 -07:00
Wei Wang
099ffa2f37 Merge "init: set oom_adj early before fork vendor_init"
am: a7c103eb8e

Change-Id: Ic46fc421933d240231d0c6cea2cb454c677f3fc0
2019-04-18 19:41:04 -07:00
Treehugger Robot
a7c103eb8e Merge "init: set oom_adj early before fork vendor_init" 2019-04-19 02:17:50 +00:00
Bowgo Tsai
30afda71c0 Copying debug ramdisk files to /debug_ramdisk/*
In previous implementation, userdebug sepoilcy and property files are
loaded from the system.img. This CL changes this to:

  - first-stage init copies userdebug files from ramdisk to /debug_ramisk/*
  - second-stage init loads files from /debug_ramdisk/*.

Note: same as before, the above can only be triggered, if the device
is UNLOCKED

With this, we don't have to put userdebug related files into the USER
system.img.

Bug: 126493225
Test: boot device with a ramdisk with /force_debuggable, checks related
      files are loaded
Change-Id: I63f5f846e82ba78427062bf7615c26173878d8f3
2019-04-19 09:56:14 +08:00
Wei Wang
bb2bc1586d init: set oom_adj early before fork vendor_init
right now vendor_init is forked before we set oom_adj for init which
leaves a chance vendor_init could be killed in heavy memory pressure.

this CL set the oom_adj before forking everything to ensure all native
have correct oom_adj settings.

Fixes: 130824864
Test: procrank -o

(cherry picked from commit 45d8174fe7)

Change-Id: I68c18f9db24d55239f7f0608592fcc702f04542e
2019-04-18 16:31:11 -07:00
Wei Wang
45d8174fe7 init: set oom_adj early before fork vendor_init
right now vendor_init is forked before we set oom_adj for init which
leaves a chance vendor_init could be killed in heavy memory pressure.

this CL set the oom_adj before forking everything to ensure all native
have correct oom_adj settings.

Fixes: 130824864
Test: procrank -o
Change-Id: I8af129076c3efa29f7b781459449f8f2dc853c98
2019-04-18 16:14:08 -07:00
Christopher Ferris
4ae266ccbd Add indicator that an elf is memory backed.
Modify the unwinder library to indicate that at least one of the stack
frames contains an elf file that is unreadable.

Modify debuggerd to display a note about the unreadable frame and a possible
way to fix it.

Bug: 129769339

Test: New unit tests pass.
Test: Ran an app that crashes and has an unreadable file and verified the
Test: message is displayed. Then setenforce 0 and verify the message is
Test: not displayed.
Change-Id: Ibc4fe1d117e9b5840290454e90914ddc698d3cc2
2019-04-18 15:37:52 -07:00
Tao Bao
2b82b147c8 Merge "adb: Recognize rescue mode." am: f072aaffe0
am: ff460d7fa8

Change-Id: Id617e014b74d0f090aaf0ce04c44f4de743595d0
2019-04-18 15:11:11 -07:00
Tao Bao
ff460d7fa8 Merge "adb: Recognize rescue mode."
am: f072aaffe0

Change-Id: I61bb53aa38bf966c946ded011c0ace94a1208977
2019-04-18 15:06:10 -07:00
Tao Bao
f072aaffe0 Merge "adb: Recognize rescue mode." 2019-04-18 21:45:50 +00:00
David Anderson
cad2733f49 Don't assume an A/B device when overriding the super partition name.
Bug: 130750333
Test: launch cuttlefish with DAP enabled
Change-Id: I1ea309d448866a8914f58be98d860eca36d47062
Merged-In: I1ea309d448866a8914f58be98d860eca36d47062
2019-04-18 14:35:49 -07:00
Tom Cherry
030ef18580 init: small header clean up
Remove an unimplemented function from the header and clean up some
slight syntax mistakes.

Test: build
Change-Id: Ia82c6aee24fa0889a7595aabc564bef970a0863b
2019-04-18 14:18:36 -07:00
David Anderson
0b0ee7af2f Don't assume an A/B device when overriding the super partition name.
Bug: 130750333
Test: launch cuttlefish with DAP enabled
Change-Id: I1ea309d448866a8914f58be98d860eca36d47062
2019-04-18 14:16:54 -07:00
Dongwon Kang
a3dd891d20 [automerger skipped] Merge "Remove libandroid.so from media namespace." am: aa952fa545
am: 784935b9c2 -s ours
am skip reason: change_id Ia6366834613d1e12498fa90377e79f62a2149776 with SHA1 a8e4b89768 is in history

Change-Id: I67fc6a91f63086417c79b13c5403761bf6cf86e5
2019-04-18 14:14:03 -07:00
Dongwon Kang
784935b9c2 Merge "Remove libandroid.so from media namespace."
am: aa952fa545

Change-Id: I32af3044529b1bb07022538d77e82bd2cd66be14
2019-04-18 14:02:55 -07:00
Dongwon Kang
aa952fa545 Merge "Remove libandroid.so from media namespace." 2019-04-18 20:54:40 +00:00
Dongwon Kang
f34a08f8b7 Merge "Remove libandroid.so from media namespace." into qt-dev
am: 2b107b8b6b

Change-Id: I5b83476196221d71db4137b4cbc2a3f5f786c3b3
2019-04-18 10:30:23 -07:00
Dongwon Kang
2b107b8b6b Merge "Remove libandroid.so from media namespace." into qt-dev 2019-04-18 17:07:53 +00:00
Josh Gao
529c7eb5db debuggerd: call setsid in our children.
am: 6b8caf8eb7

Change-Id: Ifa61da91354666c8c42622e03b63e492124c8e8e
2019-04-17 22:05:59 -07:00
Josh Gao
bb0002274b adbd: reduce the USB buffer sizes to 16k.
am: 08ccc735a3

Change-Id: Ia42977ba7f0c269d7d11dc80e4dc378b708a3c20
2019-04-17 22:05:35 -07:00
Josh Gao
6b8caf8eb7 debuggerd: call setsid in our children.
There appears to be a kernel bug that causes SIGHUP and SIGCONT to be
sent to the parent process group we spawn from if the process group
contains stopped jobs (e.g. the parent itself, because of wait_for_gdb).

Call setsid in all of our children to prevent this from happening.

Bug: http://b/31124563
Test: adb shell 'setprop debug.debuggerd.wait_for_gdb 1; killall -ABRT surfaceflinger'
Change-Id: I1a48d70886880a5bfbe2deb80d48deece55faf09
(cherry picked from commit 18cb681247)
2019-04-17 17:53:43 -07:00
Josh Gao
08ccc735a3 adbd: reduce the USB buffer sizes to 16k.
Some USB controllers only support 16k writes, so drop down to that.

Bug: http://b/130622010
Test: treehugger
Change-Id: I836d5b2d0d6fcae05f290af11a6a19c6e8d7c1ba
(cherry picked from commit 770a6a4d46)
2019-04-17 17:53:34 -07:00
Tom Cherry
3b11c618c6 Merge "init: do not fork before doing (u)mount_all()" am: fc1749280c
am: 83cf2f5381

Change-Id: I5372299f7f6ac94c05754b40e7f5ecb8812b5df8
2019-04-17 17:48:15 -07:00
Sandeep Patil
eceeb5c924 Merge "procrank: do not keep process maps around" am: c3d5e609e0
am: 5c8fca352c

Change-Id: I27fb9a47ed6597ca00b3cffe9df74bac473144df
2019-04-17 17:47:23 -07:00