Update adevtool docs

This commit is contained in:
flawedworld 2022-04-21 09:50:41 +01:00 committed by Daniel Micay
parent 69d4037084
commit 2c22bc7c36

View File

@ -73,8 +73,8 @@
<li> <li>
<a href="#extracting-vendor-files-for-pixel-devices">Extracting vendor files for Pixel devices</a> <a href="#extracting-vendor-files-for-pixel-devices">Extracting vendor files for Pixel devices</a>
<ul> <ul>
<li><a href="#extracting-vendor-files-for-pixel-5-and-earlier">Pixel 5 and earlier</a></li> <li><a href="#extracting-vendor-files-for-pixel-3a-and-earlier">Pixel 3a and earlier</a></li>
<li><a href="#extracting-vendor-files-for-pixel-6-and-later">Pixel 6 and later</a></li> <li><a href="#extracting-vendor-files-for-pixel-4-and-later">Pixel 4 and later</a></li>
</ul> </ul>
</li> </li>
<li><a href="#setting-up-the-os-build-environment">Setting up the OS build environment</a></li> <li><a href="#setting-up-the-os-build-environment">Setting up the OS build environment</a></li>
@ -277,26 +277,22 @@
for OpenJDK despite it being a headless variant without GUI support</li> for OpenJDK despite it being a headless variant without GUI support</li>
<li>ncurses5 (provided by the source tree for some tools but not others)</li> <li>ncurses5 (provided by the source tree for some tools but not others)</li>
<li>openssl</li> <li>openssl</li>
<li>protobuf library for Python 3</li>
<li>rsync</li> <li>rsync</li>
<li>unzip</li> <li>unzip</li>
<li>yarn</li>
<li>node 17 or later</li>
<li>zip</li> <li>zip</li>
</ul> </ul>
<p>Additional dependencies for Pixel phones before the 6th generation:</p> <p>Additional dependencies for Pixel phones before the 4th generation:</p>
<ul> <ul>
<li>e2fsprogs (for debugfs)</li> <li>e2fsprogs (for debugfs image mounting)</li>
<li>OpenJDK (for the jar command)</li> <li>OpenJDK (for the jar command)</li>
<li>protobuf library for Python 3</li>
<li>jq</li> <li>jq</li>
</ul> </ul>
<p>Additional dependencies for 6th generation Pixel phones:</p>
<ul>
<li>yarn</li>
</ul>
<p>Additional Vanadium (Chromium) build dependencies not provided by the source tree:</p> <p>Additional Vanadium (Chromium) build dependencies not provided by the source tree:</p>
<ul> <ul>
@ -477,8 +473,12 @@ repo sync -j16</pre>
that the official builds match the sources, since it has signature verification (which that the official builds match the sources, since it has signature verification (which
is an important part of the verified boot and attestation security model).</p> is an important part of the verified boot and attestation security model).</p>
<section id="extracting-vendor-files-for-pixel-5-and-earlier"> <section id="extracting-vendor-files-for-pixel-3a-and-earlier">
<h4><a href="#extracting-vendor-files-for-pixel-5-and-earlier">Pixel 5 and earlier</a></h4> <h4><a href="#extracting-vendor-files-for-pixel-3a-and-earlier">Pixel 3a and earlier</a></h4>
<p>3rd generation Pixel devices will be using android-prepare-vendor for the remainder of
their lifetime on GrapheneOS.
</p>
<p>Extract the vendor files corresponding to the matching release with <p>Extract the vendor files corresponding to the matching release with
<code>DEVICE</code> and <code>BUILD_ID</code> replaced with the <code>DEVICE</code> and <code>BUILD_ID</code> replaced with the
@ -490,22 +490,23 @@ rm -rf vendor/google_devices/DEVICE
mv vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/* vendor/google_devices/</pre> mv vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/* vendor/google_devices/</pre>
</section> </section>
<section id="extracting-vendor-files-for-pixel-6-and-later"> <section id="extracting-vendor-files-for-pixel-4-and-later">
<h4><a href="#extracting-vendor-files-for-pixel-6-and-later">Pixel 6 and later</a></h4> <h4><a href="#extracting-vendor-files-for-pixel-4-and-later">Pixel 4 and later</a></h4>
<p>Starting with the Pixel 6, newer generation devices use the adevtool project to <p>The below commands need to only be run once to initially create a working environment.</p>
extract files from the stock operating system.
</p>
<pre>cd vendor/adevtool/ &amp;&amp; yarn install &amp;&amp; cd ../.. <pre>cd vendor/adevtool/ &amp;&amp; yarn install &amp;&amp; cd ../..
vendor/adevtool/bin/run download vendor/adevtool/dl/ -d DEVICE -b BUILD_ID -t factory source script/envsetup.sh
sudo vendor/adevtool/bin/run generate-all vendor/adevtool/config/DEVICE.yml -c vendor/state/DEVICE.json -s vendor/adevtool/dl/DEVICE-BUILD_ID-*.zip</pre> m aapt2</pre>
<p>OTA firmware extraction is currently a work-in-progress on adevtool. <p>Extract the vendor files corresponding to the matching release with
android-prepare-vendor is being temporarily used to make the process easier.</p> <code>DEVICE</code> and <code>BUILD_ID</code> replaced with the
appropriate values:</p>
<pre>vendor/android-prepare-vendor/execute-all.sh -d DEVICE -b BUILD_ID -o vendor/android-prepare-vendor <pre>vendor/adevtool/bin/run download vendor/adevtool/dl/ -d DEVICE -b BUILD_ID -t factory ota
cp -r vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/DEVICE/radio/* vendor/google_devices/DEVICE/firmware/</pre> sudo vendor/adevtool/bin/run generate-all vendor/adevtool/config/DEVICE.yml -c vendor/state/DEVICE.json -s vendor/adevtool/dl/DEVICE-BUILD_ID-*.zip
sudo chown -R $(logname):$(logname) vendor/google_devices
vendor/adevtool/bin/run ota-firmware vendor/adevtool/config/DEVICE.yml -f vendor/adevtool/dl/DEVICE-ota-BUILD_ID-*.zip</pre>
</section> </section>
</section> </section>