How to Build AOSP Android O

96boards

#1

I want to flash Android O to my hikey960, but the official tutorial is using master branch, which is Android P. I tried using branch android-o-mr1-iot-preview-8 and some others, but all failed to booting. Is there any binary file need to include? Is any tutorial to flash Android O? Thanks!


Stable Android Oreo + Latest 4.9 Kernel?
#2

I’m afraid there are no tutorials for this… mostly because we know it doesn’t work (even when they are built the AOSP 8 branches will not have working graphics acceleration).


#3

Hey, I tried building android O too (see my previous thread), but no luck in terms of getting the Hikey960 to boot up. Consensus from the thread on the forum was also that it was not possible.


#4

I’m a newb, apologies in advance for any inaccuracies.

I see so many threads that end the same way. Someone says that the HiKey 960 is only supported by the master branch without explaining why other branches cannot be built.

For instance, I want to embed the HiKey 960 into a device running Android 8.0 Oreo. 3D graphics performance is important, so we plan to use the Vulkan 1.0 API. The ARM Mali GPU user-space binary drivers support android-8.0.0_r36:
https://developer.arm.com/products/software/mali-drivers/user-space

Why is it impossible to build the android-8.0.0_r36 branch instead of the master branch?


#5

@paul: Probably the reason why nobody elaborates on this is because the reason seems (at least to them) to be obvious… it is because the stable branches of Android do not include the code necessary for the board to function, or at least to function fully.

While there are some files in stable branches pertaining to the Hikey 960, they are not complete and will not work.

To put it another way, the reason why it won’t work with a stable branch of Android 8.0 is the same reason why it won’t work with a stable branch of Android 1.0.

My guess (and it is only a guess) is that you can anticipate support in a stable “P”.

Having said that, there is no technical reason why you could NOT make it work with a stable Android 8.0, but it won’t be a simple matter of running “lunch hikey960-userdebug; make -j17”, but rather you will have to get your hands really dirty.


#6

Okay, got it. Thanks!


#7

I’ve been thinking about this.

There might be stable support in P, in fact this has been made more likely by the recent migration of the GPU drivers from tarbal to repo (which means no worries about version skew for the binary blobs). However there are still no guarantees. It will depend entirely on whether there are regressions for hikey960 during the P merge frenzy and how soon P is branched after the merge frenzy.

Anyone who wants known working builds for hikey960 might be better of looking at:


#8

I still don’t fully understand the problem why we cannot build let’s say android-8.0.0_r36. By specifying this tag, the manifest defaults all repository tags to android-8.0.0_r36. There are 5 repositories related to the hikey boards in the manifest, namely arm-trusted-firmware, edk2, OpenPlatformPkg, hikey, and hikey-kernel. These are the same repos which exist in the manifest of the current master and all the repos have a tag named android-8.0.0_r36. So in my head, repo should check out these exact tags, so why can’t we build Android 8.0.0_r36 then?
And I’m sorry, if I’m missing the point, but I just don’t understand the problem. :wink:


#9

Because the part in the code that says this, is not there;

if (hikey960){
do_stuff_needed_by_hikey960();
}


#10

Okay thanks! But at which location(s) does this kind of code live? And why is it not part of the tagged releases?


#11

All over the place.
Because it wasnt written yet.


#12

The status of the reference boards is not usually considered when the branches are made. Instead the decision to branch tends to be based on the status of some production phones instead. If the reference boards were not working at the point the branch is made then the fixes that correct this are typically only made available via the master branch.