问题
I just built AOSP 6.0 for hammerhead and attempted to flash it. My phone froze at the Google logo and refused to boot. I'm assuming I need to use the proprietary binaries found here https://developers.google.com/android/nexus/drivers
How would I extract these and put them in to my build? Thanks.
回答1:
Be certain to download the Nexus 5 binaries that match the version of AOSP that you're building. For example, if you're building the most recent version of AOSP, when you initialized your repo you entered this command:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r72
Take that last branch code (everything after '-b') android-6.0.1_r72 and search for it over here: https://source.android.com/source/build-numbers.html#source-code-tags-and-builds
It matches build M4B30X
Now, take that build code M4B30X and search for it over here: https://developers.google.com/android/nexus/drivers
Download the corresponding binaries:$ cd ~/Downloads
$ wget https://dl.google.com/dl/android/aosp/broadcom-hammerhead-m4b30x-7c7b231f.tgz
$ wget https://dl.google.com/dl/android/aosp/lge-hammerhead-m4b30x-74fa3aa5.tgz $ wget https://dl.google.com/dl/android/aosp/qcom-hammerhead-m4b30x-158606cf.tgz
Verify the integrity of each download:
$ echo "01a03cf36b20ee2460d108c1d199f4b012b084368cddfbff1e40ff8270b54d6f broadcom-hammerhead-m4b30x-7c7b231f.tgz" | sha256sum -c
$ echo "a533f4c82d430181b97ab2321acf10ab1e2b126de7bb15437c969331541af7cb lge-hammerhead-m4b30x-74fa3aa5.tgz" | sha256sum -c
$ echo "9a2760bda79e3be7bbe7203c05273c80b0d043d9aaf15be20361e35b16ef8905 qcom-hammerhead-m4b30x-158606cf.tgz" | sha256sum -c
Extract each gzip file:
$ tar xzvf broadcom-hammerhead-m4b30x-7c7b231f.tgz
$ tar xzvf lge-hammerhead-m4b30x-74fa3aa5.tgz
$ tar xzvf qcom-hammerhead-m4b30x-158606cf.tgz
Execute the resulting self-extracting files from the source tree's root folder(~/AOSP)
$ cd ~/AOSP
$ ~/Downloads/extract-broadcom-hammerhead.sh
$ ~/Downloads/extract-lge-hammerhead.sh
$ ~/Downloads/extract-qcom-hammerhead.sh
After executing each file hit the Enter key once and then hit the Space bar until you reach the end of each document. At the end of each document type:
I ACCEPT
and hit the Enter key.
To accommodate the new binaries you must initiate a full rebuild, so set the
environment:$ ./ build/envsetup.sh
$ lunch aosp_hammerhead-userdebug
And make the synthetic target 'clobber' in order to clean:
$ make clobber
Now rebuild: (If you're running a Core2Duo)
$ make -j4
(Or, if you're running something bigger)
$ make -j16
回答2:
Uncompress the downloaded files, you will get bash files. Put all these files in the root directory of your AOSP project and execute them. You will have to accept the licenses and the binaries will be extracted in the right directory.
After this step. In the AOSP root directory, execute :
make clobber
It will clean the current build (out/**). It is needed for the make to notice the changes regarding the AOSP build official procedure.
Then you can compile again the sources.
make -j4
(or j8/j16 regarding your CPU threads number)
来源:https://stackoverflow.com/questions/33083512/aosp-6-0-build-for-hammerhead-proprietary-binaries