• If you are experiencing issues logging in, we moved to a new and more secure software and older account passwords were not able to be migrated. We recommend trying to reset your password, then contacting us if there are issues.
  • Nearly done! Migration cleanup is mostly done. There are a small number of issues left that we continue to work on, but all the heavy lifting is done. We still would love to hear feedback over at this thread and also check out the new XDA app! Thanks and we hope you enjoy the new forums, and thanks for your support of XDA <3

[Oreo 8.0]AOSP build for dora

NielDK

Inactive Recognized Developer
Jul 13, 2008
539
141
0
Farum
I have build Android Oreo (8.0) successfully for Xperia X Performance (f8131) from AOSP source.

Instructions:

extract android-oreo-161117.zip ,
Connect phone in fastboot mode (vol-up & power)
flash boot, system, userdata (and, optionally - recovery)

fastboot -S 256M flash boot boot.img
fastboot -S 256M flash system system.img
fastboot -S 256M flash userdata userdata.img

See second post for flashing oem partition.

Works: everything
Bugs: Unknown

Build from SE AOSP, kernel sources link: Sony kernel sources
Link for building from AOSP: Building from AOSP

Links:
android-oreo,Software binaries

XDA:DevDB Information
TheExplorer, ROM for the Sony Xperia X Performance

Contributors
NielDK, NielDK
ROM OS Version: 8.x Oreo
ROM Kernel: Linux 4.x
ROM Firmware Required: TWRP
Based On: AOSP

Version Information
Status: No Longer Updated
Current Stable Version: 20171116
Stable Release Date: 2017-10-13

Created 2017-10-12
Last Updated 2018-10-08
 

Attachments

Last edited:

NielDK

Inactive Recognized Developer
Jul 13, 2008
539
141
0
Farum
Workaround for flashing oem partition

Until Sony updates their Firmware to allow flashing of oem partition, this is a workaround to flash this partition thru TWRP recovery and using dd.

Download and unzip SW_binaries_for_Xperia_AOSP_O_MR0_4.4_v05_tone.zip from https://developer.sonymobile.com/open-devices/list-of-devices-and-resources/

Create a sparse oem.img from the downloaded binaries.

Code:
$ simg2img SW_binaries_for_Xperia_AOSP_O_MR0_4.4_v05_tone.zip oem.raw
Then flash the oem partition (workaround, until Sony updates stock image with oem partition writable)

Boot to TWRP recovery by powering off the phone completely, hold VOL-DOWN and POWER and wait for TWRP boot.
Or, fastboot boot twrp.img

Code:
$ adb root
$ adb push oem.raw /sdcard/
$ adb shell
# dd if=/sdcard/oem.raw of=/dev/block/mmcblk0p42
 
Last edited:

NielDK

Inactive Recognized Developer
Jul 13, 2008
539
141
0
Farum
Changelogs

November 16th 2017
r_31 (android-oreo-161117)
November 5th security patches

November 9th 2017
r_17 (android-oreo-121109)
Removed Google search bar from Trebuchet Launcher
 
Last edited:

Hendikins

Member
Jul 24, 2008
7
5
0
Sydney
I don't have my f8132 with me right now, so I'll refine this in a few hours when I can check it rather than reciting from memory, but here's a solution to the OEM partition problem.

Note that this is potentially dangerous if you don't know what you're doing (although in the worst case you should be able to reflash stock firmware - just don't blame me if you brick your device).

* Make sure you've got TWRP on the device
* When the device stops during the boot sequence, connect via USB cable
* Run "adb root" (you'll need this to be able to read fstab files)
* Open an adb shell
* Determine the block device of the OEM partition (IIRC using "mount" will give you the LVM device not the actual block device, so you'll have to check by using "cat fstab.dora" or "cat fstab.tone")
* Grab the binaries for Oreo, unzip, and unsparse the image file
* Copy the unsparsed image file to an SD card, or push it to somewhere persistent on the device
* Reboot to TWRP, and open TWRP's terminal
* Run "dd if=[path to image] of=[block device of OEM partiton]"
* Reboot to system, and the device should boot Oreo.

Incidentally, when I built AOSP 8.0 myself I flashed the Nano Open GApps + Magisk 14.2 beta and it all worked.
 
Last edited:

NielDK

Inactive Recognized Developer
Jul 13, 2008
539
141
0
Farum
I don't have my f8132 with me right now, so I'll refine this in a few hours when I can check it rather than reciting from memory, but here's a solution to the OEM partition problem.

Note that this is potentially dangerous if you don't know what you're doing (although in the worst case you should be able to reflash stock firmware - just don't blame me if you brick your device).

* Make sure you've got TWRP on the device
* When the device stops during the boot sequence, connect via USB cable
* Run "adb root" (you'll need this to be able to read fstab files)
* Open an adb shell
* Determine the block device of the OEM partition (IIRC using "mount" will give you the LVM device not the actual block device, so you'll have to check by using "cat fstab.dora" or "cat fstab.tone")
* Grab the binaries for Oreo, unzip, and unsparse the image file
* Copy the unsparsed image file to an SD card, or push it to somewhere persistent on the device
* Reboot to TWRP, and open TWRP's terminal
* Run "dd if=[path to image] of=[block device of OEM partiton]"
* Reboot to system, and the device should boot Oreo.

Incidentally, when I built AOSP 8.0 myself I flashed the Nano Open GApps + Magisk 14.2 beta and it all worked.
Thanks!
First post updated with instructions on how to do this
 
Last edited:
  • Like
Reactions: Hendikins

jisoo

Senior Member
Jul 12, 2013
570
495
0
d-h.st
This is pure AOSP from sources, with october security patches.
Sorry, I meant to ask if the device trees and kernel are just the ones from the xperia github repo by Sony, or you had to patch them.

The reason I'm curious is that I am planning on doing personal build and would like to know if those repos are good enough to use for Oreo already, or need patching to get a properly working phone.
 

NielDK

Inactive Recognized Developer
Jul 13, 2008
539
141
0
Farum
Sorry, I meant to ask if the device trees and kernel are just the ones from the xperia github repo by Sony, or you had to patch them.

The reason I'm curious is that I am planning on doing personal build and would like to know if those repos are good enough to use for Oreo already, or need patching to get a properly working phone.
They are good to use :)
 
  • Like
Reactions: jisoo

hanson2046

Member
Nov 3, 2016
10
0
0
Yes, or it wont boot.
ok,thank you.
But why not use the sony guide like this: fastboot flash oem SW_binaries_for_Xperia_AOSP_O_MR0_4.4_<release version>_<platform>.img

---------- Post added at 01:29 AM ---------- Previous post was at 01:24 AM ----------

Until Sony updates their Firmware to allow flashing of oem partition, this is a workaround to flash this partition thru TWRP recovery and using dd.

Download and unzip SW_binaries_for_Xperia_AOSP_O_MR0_4.4_v02_tone.zip from https://developer.sonymobile.com/open-devices/list-of-devices-and-resources/

Create a sparse oem.img from the downloaded binaries.

Code:
$ simg2img SW_binaries_for_Xperia_AOSP_O_MR0_4.4_v02_tone.img oem.raw
Then flash the oem partition (workaround, until Sony updates stock image with oem partition writable)

Boot to TWRP recovery by powering off the phone completely, hold VOL-DOWN and POWER and wait for TWRP boot.
Or, fastboot boot twrp.img

Code:
$ adb root
$ adb push oem.raw /sdcard/
$ adb shell
# dd if=/sdcard/oem.raw of=/dev/block/mmcblk0p42

$ adb root
$ adb push oem.raw /sdcard/
$ adb shell
Is this three code running in fastboot?

dd if=/sdcard/oem.raw of=/dev/block/mmcblk0p42
this code running in twrp?
 
Last edited:

NielDK

Inactive Recognized Developer
Jul 13, 2008
539
141
0
Farum
ok,thank you.
But why not use the sony guide like this: fastboot flash oem SW_binaries_for_Xperia_AOSP_O_MR0_4.4_<release version>_<platform>.img

---------- Post added at 01:29 AM ---------- Previous post was at 01:24 AM ----------




$ adb root
$ adb push oem.raw /sdcard/
$ adb shell
Is this three code running in fastboot?

dd if=/sdcard/oem.raw of=/dev/block/mmcblk0p42
this code running in twrp?
Sony doesn’t atm allow fastboot to flash oem.
So, as a “hack” , we use dd to write to that partition, which we from TWRP can do.