Bernie Innocenti
2cc882c2f8
Merge "Fix bogus error checking on unique_fd" am: a0fe1227b8 am: 7367caad0f
...
am: 5e028e80cf
Change-Id: Ie850812c7050305c9ca987c63f088f655e250054
2019-03-28 21:30:50 -07:00
Bernie Innocenti
5e028e80cf
Merge "Fix bogus error checking on unique_fd" am: a0fe1227b8
...
am: 7367caad0f
Change-Id: I46a97ce8c85b186f8d7d5c4e7507b4063cc5c710
2019-03-28 21:14:37 -07:00
Bernie Innocenti
7367caad0f
Merge "Fix bogus error checking on unique_fd"
...
am: a0fe1227b8
Change-Id: I90f7429cf22cd2a400054a9b3eed4fc4d79436a6
2019-03-28 21:08:33 -07:00
Treehugger Robot
a0fe1227b8
Merge "Fix bogus error checking on unique_fd"
2019-03-29 03:52:46 +00:00
Tao Bao
8c9e2206b8
Merge "Remove the extern declaration of sehandle from roots.cpp." am: 047582b506 am: 9e23616e2e
...
am: a799e66faa
Change-Id: I212e5a5ba2ddf4770ff3a31158c37541f192ed52
2019-03-28 09:27:30 -07:00
Tao Bao
a799e66faa
Merge "Remove the extern declaration of sehandle from roots.cpp." am: 047582b506
...
am: 9e23616e2e
Change-Id: I7428247a802c20ea28832e281ecc1c658f6dd995
2019-03-28 09:18:55 -07:00
Tao Bao
9e23616e2e
Merge "Remove the extern declaration of sehandle from roots.cpp."
...
am: 047582b506
Change-Id: I19b4158f57b6fb6e562872b2c2cf9d5de4fef820
2019-03-28 09:14:50 -07:00
Treehugger Robot
047582b506
Merge "Remove the extern declaration of sehandle from roots.cpp."
2019-03-28 15:49:44 +00:00
Bernie Innocenti
8bd6f455d2
Fix bogus error checking on unique_fd
...
The expression "!fd" calls the implicit conversion to int, but comparing
the raw fd against 0 does not work, since open() and other POSIX calls
returning a file descriptor use -1 to signal an error.
Test: m recovery
Change-Id: I0847c276f39cb9dd09c7ffb96951276113418fc8
2019-03-28 17:28:13 +09:00
Tao Bao
fd7d835fd9
Remove the extern declaration of sehandle from roots.cpp.
...
It has become obsolete since we replaced the call to make_ext4 with
e2fsprogs (commit ded2dac082 , which landed
into P).
Test: mmma -j bootable/recovery
Change-Id: I09141322874213dcb0f1280bba239376e71a4d17
2019-03-27 23:29:38 -07:00
Tianjie Xu
e7dd308591
Merge "Allow RSA 4096 key in package verification" am: 3168ddf79d am: 3de9ee62b8
...
am: 66afbbd536
Change-Id: I9cd59c456a5bf903e2779a274b75b38ba3b76028
2019-03-27 11:32:26 -07:00
Tianjie Xu
66afbbd536
Merge "Allow RSA 4096 key in package verification" am: 3168ddf79d
...
am: 3de9ee62b8
Change-Id: Iee0a4a2d61a086234bdcb925a4fedee6c43e49b9
2019-03-27 11:24:07 -07:00
Tianjie Xu
3de9ee62b8
Merge "Allow RSA 4096 key in package verification"
...
am: 3168ddf79d
Change-Id: Ie22fb0caddbf3185d5ee52ae883fc933c35e8cc4
2019-03-27 11:21:01 -07:00
Tianjie Xu
3168ddf79d
Merge "Allow RSA 4096 key in package verification"
2019-03-27 17:57:38 +00:00
Tianjie Xu
4c3d68f7c8
Merge "Move out the code to parse block map in MemMap" am: f1cbd2f7f2 am: 67a3ffc22f
...
am: 0a6518b79b
Change-Id: Ic0c1b0224c1c68343c0a607a1abe34c79c819165
2019-03-26 17:37:16 -07:00
Tianjie Xu
0a6518b79b
Merge "Move out the code to parse block map in MemMap" am: f1cbd2f7f2
...
am: 67a3ffc22f
Change-Id: I7b67c62c39e202fed0f1a999ecccaa96fa84e10a
2019-03-26 17:05:40 -07:00
Tianjie Xu
67a3ffc22f
Merge "Move out the code to parse block map in MemMap"
...
am: f1cbd2f7f2
Change-Id: I630bae5c6be83a4e3f300542b45a10c4b31967a6
2019-03-26 16:09:33 -07:00
Tianjie Xu
f1cbd2f7f2
Merge "Move out the code to parse block map in MemMap"
2019-03-26 21:52:40 +00:00
xunchang
908ad77af8
Allow RSA 4096 key in package verification
...
The RSA_verify sitll works for 4096 bits keys. And we just
need to loose the check on modulus.
Sample commands to generate the key & package:
1. openssl genrsa -out keypair.pem 4096
2. openssl pkcs8 -topk8 -inform PEM -outform DER -nocrypt \
-in keypair.pem -out private.pk8
3. openssl req -new -x509 -key keypair.pem -out public.x509.pem \
-days 365
4. java -Djava.library.path=prebuilts/sdk/tools/linux/lib64 -jar \
prebuilts/sdk/tools/lib/signapk.jar -w public.x509.pem private.pk8 \
unsigned.zip signed.zip
Bug: 129163830
Test: unit tests pass
Change-Id: I5a5ff539c9ff1955c02ec2ce4b17563cb92808a4
2019-03-26 12:28:23 -07:00
xunchang
625c588c0f
Move out the code to parse block map in MemMap
...
We will reuse them to implement the fuse provider from block maps.
Test: unit tests pass, sideload an OTA
Change-Id: Iaa409d19569c4ccc0bb24e12518044fcddb45c69
2019-03-26 11:47:27 -07:00
Tianjie Xu
62909cd90a
Merge "Move librecovery_ui to a sub-directory" am: 6287253eb4 am: 45898d8bb4
...
am: be1485faec
Change-Id: I7b02a0c6081086b7765bfecd9f53a207bd93f75d
2019-03-22 08:31:32 -07:00
Tianjie Xu
be1485faec
Merge "Move librecovery_ui to a sub-directory" am: 6287253eb4
...
am: 45898d8bb4
Change-Id: I426c6b2bd4731d913772b188cb41e7b9323a7330
2019-03-22 08:23:03 -07:00
Tianjie Xu
45898d8bb4
Merge "Move librecovery_ui to a sub-directory"
...
am: 6287253eb4
Change-Id: Ib055c175eab1857713d5d5bed63fd91ed43e881b
2019-03-22 08:15:37 -07:00
Tianjie Xu
6287253eb4
Merge "Move librecovery_ui to a sub-directory"
2019-03-22 15:05:00 +00:00
Tianjie Xu
8f397309b4
Move librecovery_ui to a sub-directory
...
This helps to expose librecovery_ui for device specific RecoveryUi.
Bug: 76436783
Test: mma, unit tests pass
Change-Id: Ic6c3d301d5833e4a592e6ea9d9d059bc4e4919be
(cherry picked from commit b5108c372c )
2019-03-21 10:46:11 -07:00
Tianjie Xu
b5108c372c
Move librecovery_ui to a sub-directory
...
This helps to expose librecovery_ui for device specific RecoveryUi.
Bug: 76436783
Test: mma, unit tests pass
Change-Id: Ic6c3d301d5833e4a592e6ea9d9d059bc4e4919be
2019-03-21 00:45:37 -07:00
Tianjie Xu
9d2a945e9b
Merge "Move apply_from_sdcard to fuse_sdcard_install" am: 3c61cd02cf am: 3c21700fcd
...
am: c1dfb51ae3
Change-Id: I273c41fe713965485d604344d1d44f31a852e892
2019-03-20 11:34:19 -07:00
Tianjie Xu
c1dfb51ae3
Merge "Move apply_from_sdcard to fuse_sdcard_install" am: 3c61cd02cf
...
am: 3c21700fcd
Change-Id: I11dd7813aa0d43688b4856ee9a1508fe1de9fdee
2019-03-20 11:17:10 -07:00
Tianjie Xu
9b177eb32d
Merge "Remove the provider_vtab" am: 2037c60de4 am: d7eba6248b
...
am: b3025d752d
Change-Id: If5419d0e263442b7ebd7ec95e972fb67e2f6fc94
2019-03-20 11:10:04 -07:00
Tianjie Xu
3c21700fcd
Merge "Move apply_from_sdcard to fuse_sdcard_install"
...
am: 3c61cd02cf
Change-Id: Idd0f65f979145b572e30bd9b8b38d477f2b7e185
2019-03-20 11:07:00 -07:00
Tianjie Xu
b3025d752d
Merge "Remove the provider_vtab" am: 2037c60de4
...
am: d7eba6248b
Change-Id: Idf8762f7e39c165514710f0afd98bc485c5e9d9b
2019-03-20 11:05:51 -07:00
Tianjie Xu
d7eba6248b
Merge "Remove the provider_vtab"
...
am: 2037c60de4
Change-Id: I691e88cc2b12ac142b694b83e5756df208677dc5
2019-03-20 11:01:35 -07:00
Tianjie Xu
3c61cd02cf
Merge "Move apply_from_sdcard to fuse_sdcard_install"
2019-03-20 17:43:46 +00:00
Tianjie Xu
2037c60de4
Merge "Remove the provider_vtab"
2019-03-20 17:43:30 +00:00
xunchang
3cc23d5eac
Move apply_from_sdcard to fuse_sdcard_install
...
Move the sdcard installation function and all helper functions to a
separate file, and drop the dependency on common.h.
In the future, we want to move these functions into the install class.
Bug: 127071893
Test: unit tests pass
Change-Id: I0b7f7cbf0b68918e638e13878ca28bfca367088a
2019-03-19 23:05:13 -07:00
Tianjie Xu
61307a2e3c
Merge "Create a FuseDataProvider base class" am: eeea86f5fd am: 4aa4bf5e19
...
am: 77a2ff12d7
Change-Id: I851a7a2947b7abfbad6e0331b581d8eb320ea89d
2019-03-19 14:00:22 -07:00
Tianjie Xu
77a2ff12d7
Merge "Create a FuseDataProvider base class" am: eeea86f5fd
...
am: 4aa4bf5e19
Change-Id: I7fd63a6d23c2e17ffc4fe403c15df86b4e2c76da
2019-03-19 13:56:19 -07:00
Tianjie Xu
4aa4bf5e19
Merge "Create a FuseDataProvider base class"
...
am: eeea86f5fd
Change-Id: I9a7fc19e2897cb123a27a66f6a291a92b4653fe1
2019-03-19 13:52:17 -07:00
Tianjie Xu
eeea86f5fd
Merge "Create a FuseDataProvider base class"
2019-03-19 20:34:58 +00:00
xunchang
5e6832a24d
Remove the provider_vtab
...
It's no longer needed with the newly added FuseDataProvider class. Also
cleans up the parameters for run_fuse_sideload.
Bug: 127071893
Test: unit tests pass, run a sideload
Change-Id: I1ccd6798d187cfc6ac9f559ffb3f3edf08dad55c
2019-03-19 13:03:59 -07:00
xunchang
ea2912f187
Create a FuseDataProvider base class
...
The fuse data provider for adb/sdcard shares common code and structures.
This cl creates a FuseDataProvider base class and provides
implementations for adb and sdcard.
In the follow cls, we can kill the provider_vtab struct; and also add
another implementation to parse a block map file and provides data.
Test: unit tests pass, sideload a package, apply a package from sdcard
Change-Id: If8311666a52a2e3c0fbae0ee9688fa6d01e4ad09
2019-03-19 11:11:58 -07:00
Tao Bao
c5f06d7dc8
Merge "Skip calling verify_package_compatibility when resuming." am: 98beb6414b am: c4148b529a
...
am: db9dabb826
Change-Id: Ic4948239024645f99c96bda5e41524bfe4d07d7d
2019-03-18 16:39:28 -07:00
Tao Bao
db9dabb826
Merge "Skip calling verify_package_compatibility when resuming." am: 98beb6414b
...
am: c4148b529a
Change-Id: I7f59a1eb51e83443b77f8ae61139af12149eaca8
2019-03-18 16:27:01 -07:00
Tao Bao
c4148b529a
Merge "Skip calling verify_package_compatibility when resuming."
...
am: 98beb6414b
Change-Id: I32bc699f4f009bee490ff509bd8503d81766bf30
2019-03-18 16:21:59 -07:00
Treehugger Robot
98beb6414b
Merge "Skip calling verify_package_compatibility when resuming."
2019-03-18 23:10:10 +00:00
Tao Bao
032403fb75
Skip calling verify_package_compatibility when resuming.
...
android::vintf::VintfObjectRecovery::CheckCompatibility() may try to
mount partitions in order to read the needed files, which may not be
feasible when resuming an interrupted update. This CL changes the logic
to enforce compatibility check on fresh install only.
Fix: 122864541
Test: Sideloading on taimen keeps working.
Test: Sideload a package by setting the retry bit. Check that
compatibility check is skipped.
Change-Id: I018a0c802c85a0e84a6f2aac50630a677d64382a
2019-03-18 13:32:04 -07:00
Tianjie Xu
b44a946380
Merge "Implement FilePackage class" am: 698dc08561 am: cd73207f50
...
am: 8a9a4a1e05
Change-Id: I91b9d1f03cfc92a12e87b95fab750ccad69c8213
2019-03-15 11:07:10 -07:00
Tianjie Xu
8a9a4a1e05
Merge "Implement FilePackage class" am: 698dc08561
...
am: cd73207f50
Change-Id: I622cf88e2c2f5a431e20499bb03537c0ad2f84e1
2019-03-15 11:03:07 -07:00
Tianjie Xu
cd73207f50
Merge "Implement FilePackage class"
...
am: 698dc08561
Change-Id: Ie64018611e6e36ca0e9ed1539152d425c65307b3
2019-03-15 10:55:04 -07:00
Tianjie Xu
698dc08561
Merge "Implement FilePackage class"
2019-03-15 17:40:52 +00:00