sonyxperiadev / bug_tracker

Empty repository that is used as a bugtracker for Open Devices project
52 stars 13 forks source link

Failed to build AOSP Android 10.0 for Sony Xperia X #662

Closed Neo75T closed 3 years ago

Neo75T commented 3 years ago

Device: Xperia X Kernel version: 4.14 Android version: 10.0 Software binaries version: SW_binaries_for_Xperia_Android_10.0.7.1_r1_v7a_loire

Description Failed to build AOSP Android 10.0 for Sony Xperia X

Symptoms There is no combo for phone Xpera X (F5121).

How to reproduce I have followed all steps described here: https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-android-10-0-0 and here: https://developer.sony.com/file/download/software-binaries-for-aosp-android-10-0-kernel-4-14-loire/ after this command: source build/envsetup.sh && lunch what combo I need to pick? There is no combo for phone Xpera X (F5121).

chris42 commented 3 years ago

There is no 4.14 Kernel for loire. See https://developer.sony.com/develop/open-devices/get-started/supported-devices-and-functionality. You will need to build the android-10_legacy tag with kernel and binaries for 4.9.

The 4.14 binaries are not usable. @jerpelea would it make sense to remove them from download, to avoid further confusion?

Neo75T commented 3 years ago

Thanks. It was also published here: https://developer.sony.com/develop/open-devices/latest-updates

see section: 2020-05-25: Updated AOSP Android 10.0 binaries (Kernel 4.14) for: Xperia X and Xperia X Compact (Loire)

bartcubbins commented 3 years ago

Please do not remove 4.14 binaries from the site

jerpelea commented 3 years ago

@chris42 those binaries are usable with a fixed kernel. They will be left there if anyone needs them

jerpelea commented 3 years ago

@Neo75T did you manage to build the legacy branch ?

Neo75T commented 3 years ago

@jerpelea thank you for support. But please can you instruct me, how to build the "legacy" branch?

I was in a hurry and needed a functional device, so I temporarily flashed this custom ROM: https://forum.xda-developers.com/t/rom-10-0-aosp-suzu-sonyxperiadev-q-builds.3969967/ which quite works. But definitely want to try it different way. Thanks.

chris42 commented 3 years ago

It is pretty straight forward. In step 4 of the Sony guide you initialize the android tree with the android 10 branch and in the second part the sony local manifest with "android-10_legacy". As binaries you use the android 10, kernel 4.9 ones.

EDIT: you can also check my build script https://github.com/chris42/android_build/blob/master/xperia/build-10-4.9.sh

Neo75T commented 3 years ago

@chris42 thanks for instructions. I was successful in compiling of "android-10_legacy" and flashing it to Xperia X. The phone is up and running AOSP 10.0. For binaries I have used "SW_binaries_for_Xperia_Android_9.0_2.3.2_v9_loire", which has kernel 4.9.213. Thanks for support.

If you just please can explain, how this AOSP works with updates. The settings on the phone show "Android security patch level: August 5, 2020".

chris42 commented 3 years ago

Glad, that you were able to build it.

Regarding security: You can always see the current available security patch level here. August 5th was the last regular Android 10 update, after that google switched phones to Android 11. You would need a build with Android 11 to get regular security updates. I've never tried to compile Android 11 with the 4.9 kernel, I guess some development would be needed. EDIT: You pick the security level by the tag you check out for the android repo (sony manifest stays on android-10_legacy)

The kernel 4.9.213 is not current anymore. When building you should be at least on .230. I was trying to keep it up to date beyond that, but some changes in the Sony repository were not playing nice with the mainline kernel updates. Hence a developer would have been needed as well.

Last but not least I do not know if the binaries get updates, if anything needs to be fixed in there (jerpalea would need to answer that). However without the Android base and kernel updates that is the least of your problems.

Without development/developer support you will be stuck on the 5th August / .230 security level.

jerpelea commented 3 years ago

@chris42 the Android 10 if reaching end of the line for legacy devices and unfortunately there will not be any new updates we will continue with updates for Android 10 with 4.14 kernel and a new update will come soon

Neo75T commented 3 years ago

@chris42 thank you for explanation! Unfortunately I was not able to install opengapps on it. I was stuck on android logo. After uninstall of opengapps, it was up and running again. So anyway, I returned to custom ROM mentioned above.

chris42 commented 3 years ago

When it gets stuck on the android logo, it already should produce logs, which you can access via adb logcat. There you might find hints on what the problem is.

ix5 commented 3 years ago

@Neo75T could you please close this issue? The "build error" you experienced does not exist.

upsuper commented 2 years ago

I had the same issue that there was no combo for Xperia XZ for Android 10.0, and when I switched to the legacy branch, the image doesn't boot up. Eventually I tried the Android 9.0 binaries, and it works.

It might be good to include this information in the build instructions to let people know what to do (switch to legacy branch, and use 9.0 binaries), as this is quite confusing otherwise.