Commit graph

8934 commits

Author SHA1 Message Date
Josh Gao
3261cbcf9b Merge "Track rename of adbd_system_binaries." am: a9fff2f021 am: bd8f33763f am: 028fd7a25f
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1322003

Change-Id: Ia139c9d3aaec95c3b1c89f5844a4dab6ab51186c
2020-06-08 21:52:12 +00:00
Josh Gao
028fd7a25f Merge "Track rename of adbd_system_binaries." am: a9fff2f021 am: bd8f33763f
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1322003

Change-Id: I7478dcf638dabf81ef4f31753d61274d35cc0764
2020-06-08 21:31:27 +00:00
Josh Gao
bd8f33763f Merge "Track rename of adbd_system_binaries." am: a9fff2f021
Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1322003

Change-Id: Icd0ed4a93ac687f8e6c12a036cfc4a5d6eeeeebb
2020-06-08 21:16:39 +00:00
Josh Gao
a9fff2f021 Merge "Track rename of adbd_system_binaries." 2020-06-08 21:00:18 +00:00
Xin Li
93b2650a81 [automerger skipped] Merge "Merge QQ3A.200605.002 into master" am: 3e72aaf11c -s ours am: 90a22f36f9 -s ours am: 774e6307df -s ours
am skip reason: Change-Id Ia91690b4826ce358a08766ebe6e756cb1fec0ba1 with SHA-1 fb9d4fc54b is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1323300

Change-Id: Iaad713ffb22bea494bee48895ee0984e05f4fc4d
2020-06-08 16:29:18 +00:00
Xin Li
774e6307df [automerger skipped] Merge "Merge QQ3A.200605.002 into master" am: 3e72aaf11c -s ours am: 90a22f36f9 -s ours
am skip reason: Change-Id Ia91690b4826ce358a08766ebe6e756cb1fec0ba1 with SHA-1 fb9d4fc54b is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1323300

Change-Id: I788225ab50338d17b34bf615b117ef9c2429ad64
2020-06-08 16:07:59 +00:00
Xin Li
90a22f36f9 [automerger skipped] Merge "Merge QQ3A.200605.002 into master" am: 3e72aaf11c -s ours
am skip reason: Change-Id Ia91690b4826ce358a08766ebe6e756cb1fec0ba1 with SHA-1 fb9d4fc54b is in history

Original change: https://android-review.googlesource.com/c/platform/bootable/recovery/+/1323300

Change-Id: Id0541da5f14ad32b40bfb85389fc3f3268135fb6
2020-06-08 15:56:44 +00:00
Xin Li
3e72aaf11c Merge "Merge QQ3A.200605.002 into master" 2020-06-06 01:41:22 +00:00
Xin Li
674edaf2ed Merge QQ3A.200605.002 into master
Bug: 158095402
Merged-In: Ia91690b4826ce358a08766ebe6e756cb1fec0ba1
Change-Id: Ic755f590685f40ee90c08c7c8be3a62e56b98cd5
2020-06-03 10:44:41 -07:00
Josh Gao
d4a964f121 Track rename of adbd_system_binaries.
Bug: http://b/157709367
Test: treehugger
Change-Id: Ic205acc56a763c38ba689b2b895609b5e878d813
2020-06-01 18:58:57 -07:00
Jiyong Park
bfa93a9472 Merge "Use ro.build.fingerprint instead of ro.bootimage.*" am: d081fbceba am: fb9d4fc54b am: 941bf55f9d
Change-Id: Id21167f5d7fd952b788344580ddcc676fce3d133
2020-05-29 21:54:26 +00:00
Jiyong Park
941bf55f9d Merge "Use ro.build.fingerprint instead of ro.bootimage.*" am: d081fbceba am: fb9d4fc54b
Change-Id: Idb4ae52052578e578d0844b479a4d0ede190337e
2020-05-29 21:52:11 +00:00
Jiyong Park
fb9d4fc54b Merge "Use ro.build.fingerprint instead of ro.bootimage.*" am: d081fbceba
Change-Id: Ia91690b4826ce358a08766ebe6e756cb1fec0ba1
2020-05-29 21:43:04 +00:00
Jiyong Park
d081fbceba Merge "Use ro.build.fingerprint instead of ro.bootimage.*" 2020-05-29 01:01:52 +00:00
Jiyong Park
bfd6764bf6 Use ro.build.fingerprint instead of ro.bootimage.*
ro.bootimage.* sysprops will be removed as they are redundant. Read
ro.build.fingerprint instead.

This is safe because:
2) ro.bootimage.build.fingerprint is the same as other
ro.<partition>.build.fingerprint all of which are from
$(BUILD_FINGERPRINT_FILE).
3) BUILD_FINGERPRINT_FILE is composed of PRODUCT_BRAND, TARGET_PRODUCT,
TARGET_DEVICE, etc.
4) ro.build.fingerprint is auto-composed by init at runtime by the same
rule as #3.

Bug: 117892318
Test: enter into the recovery mode and manually inspect the title line
Change-Id: If28d710f45b98a0effc0159851bca6afb2aa5735
2020-05-25 18:14:53 +09:00
Hongguang Chen
b6d0b82aa6 [automerger skipped] Add EthernetDevice to manage ethernet connection. am: 4d0df88d88 -s ours am: f3f4f9f021 -s ours
am skip reason: Change-Id I73fe44be3790bdba5a6059fbba3f7264b21eed99 with SHA-1 4d0df88d88 is in history

Change-Id: Id9ba3c82c58b5a6b3aba2501bfd47163e3b91cf8
2020-05-20 17:00:00 +00:00
Hongguang Chen
2de11c0389 [automerger skipped] Add EthernetDevice to manage ethernet connection. am: 4d0df88d88 am: b3cd9fad22 -s ours
am skip reason: Change-Id I73fe44be3790bdba5a6059fbba3f7264b21eed99 with SHA-1 042672729c is in history

Change-Id: I6559a50c1d89fbdfd9e5b415b78f8051fbc5cf9e
2020-05-20 16:59:50 +00:00
Hongguang Chen
b3cd9fad22 Add EthernetDevice to manage ethernet connection. am: 4d0df88d88
Change-Id: Ic49ffc0224223c3d6f0d9c65333097ac3e3c1760
2020-05-20 16:43:10 +00:00
Hongguang Chen
f3f4f9f021 [automerger skipped] Add EthernetDevice to manage ethernet connection. am: 4d0df88d88 -s ours
am skip reason: Change-Id I73fe44be3790bdba5a6059fbba3f7264b21eed99 with SHA-1 042672729c is in history

Change-Id: I806e1f57f9d94643166558624546ea2cab6ad752
2020-05-20 16:42:35 +00:00
Treehugger Robot
caab315bdb [automerger skipped] Merge changes from topic "nonab_pkg" am: 31deac96f4 am: fa6c4eaf3e -s ours am: c1b87ecdc0 -s ours
am skip reason: Change-Id I28a4047b5f2051acc039084f65a71deb492d9dcb with SHA-1 dff8004275 is in history

Change-Id: Ic1323152bda71e5370d886ff806380f4926edb5f
2020-05-20 01:29:44 +00:00
Yifan Hong
836342a972 [automerger skipped] Add slot suffix to DAP ops am: 35d5e9f4cf am: 9f8b386056 -s ours am: bd312b8c65 -s ours
am skip reason: Change-Id Idbd0bfea142529a33dddb4d2debfc74513290730 with SHA-1 bc7e1db211 is in history

Change-Id: Ie04ea27ebc39d355d17c8da2ff0dd2d03d57a865
2020-05-20 01:29:42 +00:00
Yifan Hong
59c7a40229 [automerger skipped] Detect non-A/B vs. A/B packages correctly. am: f2af5629d2 am: d5c56cee29 -s ours am: 3e5cc2207c -s ours
am skip reason: Change-Id I629a533a67966d46d9cd87a59c6b9af26daf1667 with SHA-1 2a4afd29a1 is in history

Change-Id: Ibb4ac10ebf5910a4d22e9d82937b8efcb4272900
2020-05-20 01:29:41 +00:00
Treehugger Robot
c1b87ecdc0 [automerger skipped] Merge changes from topic "nonab_pkg" am: 31deac96f4 am: fa6c4eaf3e -s ours
am skip reason: Change-Id I28a4047b5f2051acc039084f65a71deb492d9dcb with SHA-1 dff8004275 is in history

Change-Id: Idbda5877ced40ad6e72d9c92416112bacbc3040e
2020-05-20 01:11:12 +00:00
Yifan Hong
bd312b8c65 [automerger skipped] Add slot suffix to DAP ops am: 35d5e9f4cf am: 9f8b386056 -s ours
am skip reason: Change-Id Idbd0bfea142529a33dddb4d2debfc74513290730 with SHA-1 bc7e1db211 is in history

Change-Id: I8415babf316f8e903ce64a9d5e35867a4381c99a
2020-05-20 01:11:10 +00:00
Yifan Hong
3e5cc2207c [automerger skipped] Detect non-A/B vs. A/B packages correctly. am: f2af5629d2 am: d5c56cee29 -s ours
am skip reason: Change-Id I629a533a67966d46d9cd87a59c6b9af26daf1667 with SHA-1 2a4afd29a1 is in history

Change-Id: Ifa8914b5d2568de6f2da218ec3708a7390d7e5ef
2020-05-20 01:11:07 +00:00
Treehugger Robot
fa6c4eaf3e Merge changes from topic "nonab_pkg" am: 31deac96f4
Change-Id: Ia8346a98754029a04a88d7d26f3c789530583e1f
2020-05-20 00:55:04 +00:00
Yifan Hong
9f8b386056 Add slot suffix to DAP ops am: 35d5e9f4cf
Change-Id: Ie7e42640c29a9024b6602367b998cfba3be9bd57
2020-05-20 00:55:02 +00:00
Yifan Hong
d5c56cee29 Detect non-A/B vs. A/B packages correctly. am: f2af5629d2
Change-Id: I7e5e67f90fbc49fbc99e1e251c06ceaa93f6c2d9
2020-05-20 00:55:00 +00:00
Treehugger Robot
31deac96f4 Merge changes from topic "nonab_pkg"
* changes:
  Add add_slot_suffix function.
  Add slot suffix to DAP ops
  Detect non-A/B vs. A/B packages correctly.
2020-05-20 00:30:31 +00:00
Yifan Hong
35d5e9f4cf Add slot suffix to DAP ops
If device supports both A/B and non-A/B, when applying a
non-A/B package, add current slot suffix and apply the update
to the partition at current slot.

This includes:
- (un)map_partition in edify script. For example,
  map_partition("system") will automatically append slot suffix
  to "system" before calling CreateLogicalPartition.
- All operations in dynamic_partitions_op_list. For example,
  add foo group_foo
  will automatically append slot suffix to foo and group_foo
  before editing the super partition metadata.

Test: apply update
Bug: 153581609
Change-Id: Idbd0bfea142529a33dddb4d2debfc74513290730
(cherry picked from commit bc7e1db211)
Merged-In: Idbd0bfea142529a33dddb4d2debfc74513290730
2020-05-19 15:20:14 -07:00
Yifan Hong
f2af5629d2 Detect non-A/B vs. A/B packages correctly.
Check the package metadata to determine whether this is an
A/B or non-A/B update package. This is more accurate.

Also checks ro.virtual_ab.allow_non_ab flag. This is useful for
continuously supporting (and testing) non-A/B.

Bug: 153581609
Test: apply non-A/B update on cuttlefish

Change-Id: I629a533a67966d46d9cd87a59c6b9af26daf1667
(cherry picked from commit 2a4afd29a1)
Merged-In: I629a533a67966d46d9cd87a59c6b9af26daf1667
2020-05-19 15:20:14 -07:00
Yifan Hong
0c328d02c1 Add add_slot_suffix function.
This function appends androidboot.slot_suffix to the
value of the argument.

Test: apply update
Bug: 153581609
Change-Id: I28a4047b5f2051acc039084f65a71deb492d9dcb
(cherry picked from commit dff8004275)
Merged-In: I28a4047b5f2051acc039084f65a71deb492d9dcb
2020-05-19 15:20:14 -07:00
Hongguang Chen
4d0df88d88 Add EthernetDevice to manage ethernet connection.
The current fastbootd only supports USB protocol. But some Android TV
devices are built without USB port. The fastbootd cannot be used on
those ATV devices due to it. aosp/1295566 enables fastbootd over
ethernet.

This change adds an EthernetDevice to manage ethernet connection and set
fastbootd protcol property fastbootd.protocol to enable fastbootd over
ethernet in recovery mode. It uses IPv6 link-local address to not expose
the devices out of the network segment. The devices who want to use this
EthernetDevice should add
“TARGET_RECOVERY_UI_LIB := librecovery_ui_ethernet” into BoardConfig.mk.

BUG: 152544169
BUG: 155198345
Test: Enter and exit fastboot mode and check eth0 IPv6 link-local address
on screen UI.

Change-Id: I73fe44be3790bdba5a6059fbba3f7264b21eed99
Merged-In: I73fe44be3790bdba5a6059fbba3f7264b21eed99
2020-05-19 19:11:13 +00:00
Treehugger Robot
aea68665ee Merge "recovery: fastbootd: retry opening graphics" am: 082bea6325 am: 0608d71169 am: 5e7b0704e4
Change-Id: I53fc758c8b365770e82675c6124af8999c15fd46
2020-05-19 13:52:34 +00:00
Treehugger Robot
5e7b0704e4 Merge "recovery: fastbootd: retry opening graphics" am: 082bea6325 am: 0608d71169
Change-Id: I844355f11554eb5d4283cf1cb7e57889ffaff957
2020-05-19 13:36:47 +00:00
Treehugger Robot
0608d71169 Merge "recovery: fastbootd: retry opening graphics" am: 082bea6325
Change-Id: Ie757c94038673fec1555fb5cd1570e1551180986
2020-05-19 13:18:51 +00:00
Treehugger Robot
082bea6325 Merge "recovery: fastbootd: retry opening graphics" 2020-05-19 12:47:19 +00:00
Treehugger Robot
7610edbcf6 Merge "Add EthernetDevice to manage ethernet connection." am: 78c41b6414 am: f9712d6d40 am: e4ea6a9a3f
Change-Id: I81b456d2d617b5959376d2ebffc3b2c88d033523
2020-05-18 18:30:28 +00:00
Treehugger Robot
e4ea6a9a3f Merge "Add EthernetDevice to manage ethernet connection." am: 78c41b6414 am: f9712d6d40
Change-Id: I30c22e120d167dff92ca53f72b77cb9181a1ccd5
2020-05-18 17:43:39 +00:00
Treehugger Robot
f9712d6d40 Merge "Add EthernetDevice to manage ethernet connection." am: 78c41b6414
Change-Id: Ia776436b4f62db1e6c21125ca2d064a500f4ed06
2020-05-18 17:26:15 +00:00
Treehugger Robot
78c41b6414 Merge "Add EthernetDevice to manage ethernet connection." 2020-05-18 17:05:43 +00:00
Hongguang Chen
042672729c Add EthernetDevice to manage ethernet connection.
The current fastbootd only supports USB protocol. But some Android TV
devices are built without USB port. The fastbootd cannot be used on
those ATV devices due to it. aosp/1295566 enables fastbootd over
ethernet.

This change adds an EthernetDevice to manage ethernet connection and set
fastbootd protcol property fastbootd.protocol to enable fastbootd over
ethernet in recovery mode. It uses IPv6 link-local address to not expose
the devices out of the network segment. The devices who want to use this
EthernetDevice should add
“TARGET_RECOVERY_UI_LIB := librecovery_ui_ethernet” into BoardConfig.mk.

BUG: 152544169
Test: Enter and exit fastboot mode and check eth0 IPv6 link-local address
on screen UI.

Change-Id: I73fe44be3790bdba5a6059fbba3f7264b21eed99
2020-05-15 15:18:41 -07:00
Mark Salyzyn
30017e78bc recovery: fastbootd: retry opening graphics
Recovery and fastbootd hardening.

With GKI we find in certain situations the timing of the drivers
loading is delayed as compared to a monolithic kernel.  This
exasperates an existing race where during second stage init, the
graphics driver might not have completely instantiated by the time
fastboot or recovery menu ui is being set up.

To address this, we call gr_init() every 10ms until either 5 seconds
timeout or success.  If we timeout, there will be no TUI (minui), but
this is better than if we just tried once and dropped the TUI and was
effectively running headless.  5 seconds timeout is arbitrary, based
on the default in init for wait for file; but makes sense as any
longer will impact flashstation and fastboot flashall enough to be
a cause for consternation.

It should be noted that both recovery and fastbootd can still service
adb or fastboot gadgets headless.  For instance if the device tree is
misconfigured as a permanent issue that would head for the timeout.
Prefering to give up after a timeout so that device can be flashed by
fastbootd, or rebooted by recovery adbd, over the protocol is
advantageous for tool stability.

Architectural Concern:

The graphics driver, if not well written, may panic the kernel if we
try to access it too soon while it is probing.  On such devices it
will be necessary to hold off in 'on init' or 'on early-init' phases
until the graphics drivers have completely probed.  Or better yet,
fix the driver.  This problem would happen in any case occasionally
even without this adjustments, but could conceivably be amplified by
the loop trying to open the graphics device.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: make sure user space fastbootd comes up reliably for a GKI kernel
Change-Id: I1ce31a01544a58cdf7b9d657c1146bee77894e46
2020-05-15 13:29:18 -07:00
TreeHugger Robot
78991c0282 Merge changes from topic "nonab_on_vab_r" into rvc-dev am: b62ff1abe3 am: 492abcd14b
Change-Id: I2a1fb43b4be3f3e3c90ca073afc4cb101e7a8e08
2020-05-13 18:34:47 +00:00
TreeHugger Robot
b4be26a02c Merge changes from topic "nonab_on_vab_r" into rvc-dev am: b62ff1abe3 am: fbe98bb122
Change-Id: Ia47d8a2e797924ec39900747c5d5891e37a0d1ca
2020-05-13 18:31:36 +00:00
TreeHugger Robot
fbe98bb122 Merge changes from topic "nonab_on_vab_r" into rvc-dev am: b62ff1abe3
Change-Id: I0bdcd42d6425483e24f040ca7a6cf098cb0f1080
2020-05-13 18:25:35 +00:00
TreeHugger Robot
492abcd14b Merge changes from topic "nonab_on_vab_r" into rvc-dev am: b62ff1abe3
Change-Id: I343c43fc5f9f18d2bc41f865cbbb8e6cf12a67bd
2020-05-13 17:42:08 +00:00
TreeHugger Robot
b62ff1abe3 Merge changes from topic "nonab_on_vab_r" into rvc-dev
* changes:
  Add add_slot_suffix function.
  Add slot suffix to DAP ops
  Detect non-A/B vs. A/B packages correctly.
2020-05-13 17:26:44 +00:00
Yifan Hong
dff8004275 Add add_slot_suffix function.
This function appends androidboot.slot_suffix to the
value of the argument.

Test: apply update
Bug: 153581609
Change-Id: I28a4047b5f2051acc039084f65a71deb492d9dcb
2020-05-07 19:25:26 -07:00
Yifan Hong
bc7e1db211 Add slot suffix to DAP ops
If device supports both A/B and non-A/B, when applying a
non-A/B package, add current slot suffix and apply the update
to the partition at current slot.

This includes:
- (un)map_partition in edify script. For example,
  map_partition("system") will automatically append slot suffix
  to "system" before calling CreateLogicalPartition.
- All operations in dynamic_partitions_op_list. For example,
  add foo group_foo
  will automatically append slot suffix to foo and group_foo
  before editing the super partition metadata.

Test: apply update
Bug: 153581609
Change-Id: Idbd0bfea142529a33dddb4d2debfc74513290730
2020-05-07 19:25:26 -07:00