Page 1 of 1

Porting Lineage OS to an unsupported device made by Sony

PostPosted: Apr 6th, '18, 04:56
by Umeaboy
Hi!

Some time ago I bought a brand new Sony Xperia XZ Premium Dual (Codename maple) & I wanted to port Sailfish OS to it as well.

To do that I had to do some research and I found that there there's a repo on github called AICP-Sony and that seems to have a working device tree, but for CyanogenMod 12.1 in a obsoleted project called AICP which stands for Android Ice Cold Project.

As I understand it it's a customized AOSP ROM.

If I'd clone that old tree I might not be able to build Lineage 14.1 or 15.1 for it as I wouldn't know what files to remove and which ones to keep.

This phone is a part of the yoshino platform, but I don't know if I'd push the yoshino directory to the Lineage gerrit in order to add support for it so I used the yoshino tree made by cryptomilk on github.

To make a Lineage 14.1 device tree I started forking the sonyxperiadev Oreo device repo for maple and the Lineage 15.1 repo for lilac because it has almost the same specs (lilac, poplar and maple all use the yoshino platform) made by cryptomilk and adjusted it more to my device and then made a local_manifest.xml file specific for maple to put in ~/android/lineage/.repo/local_manifests/

Here's the manifest file: https://github.com/CurveOS/local_manife ... /maple.xml

However as I after source build/envsetup.sh ran lunch lineage_maple-userdebug I got an error that the config makefile for my product is missing even thou it's in my device tree. Am I missing something?

Here's the device tree: https://github.com/CurveOS/android_device_sony_maple

To get the vendor files mentioned on a random device's build page says https://wiki.lineageos.org/devices/zero ... cific-code tells me I need to get the files from an installable Lineage zip (which I would assume is for my specific device name) I have no such Lineage zip file so then I get to use this page instead:

https://wiki.lineageos.org/extracting_b ... _zips.html

I used XperiFirm in Windows to download and extract the stock rom.

Then I extracted that sin file with UnSin which can be found here: https://forum.xda-developers.com/showpo ... ostcount=1 which makes it into a ext4 file to be mounted somewhere.

I then moved the system ext4 file and mounted it in Mageia.

Now I copied the vendor directory to ~/android/lineage/device/sony/maple/ and reran source build/envsetup.sh and then ran lunch lineage_maple-userdebug and still it fails with the same error.

I'd be happy if anyone would be willing to help me solve this so that I can do a test build of Lineage 14.1 or 15.1 to maple.

/Kristoffer

Re: Porting Lineage OS to an unsupported device made by Sony

PostPosted: Apr 6th, '18, 16:34
by jeff33
Sorry, maybe a stupid question, but what is the relation between Sailfish OS and Lineage OS? Are you using both at the same time?

Re: Porting Lineage OS to an unsupported device made by Sony

PostPosted: Apr 11th, '18, 14:52
by Umeaboy
jeff33 wrote:Sorry, maybe a stupid question, but what is the relation between Sailfish OS and Lineage OS? Are you using both at the same time?


Sailfish OS uses Android drivers via libhybris. We use the drivers from the Lineage image so we don't have to distribute them ourselves

Re: Porting Lineage OS to an unsupported device made by Sony

PostPosted: Apr 12th, '18, 00:11
by filip
Kristoffer, do you know these freenode IRC channels:
#jolamobile
#sailfishos
#jolafanclub
#mer-meeting
#sailfishos-porters

Might be worth a try.