[WIP][DEV] Ubuntu Touch for Sony Xperia Z Ultra

Search This thread

KalleEatingBrain

Senior Member
Feb 1, 2013
55
80
Bremen
Hi folks,
I just started to port UbuntuTouch for the Sony Xperia Z Ultra and I think I should have a *.zip ready for testing in 2 weeks.
Until then, I will use this thread as a scrap book to document all the troubles I run into, all the things that needed my special attention and fixes that are not that obvious. I hope there will be some fellas brave enough to test everything and report back or even to join me with the development.
Best regards,
Kalle

First Update:
I found that the Ubuntu Touch version that ist based on CyanogenMod was not updated to a more recent version. This means that I have to either look into AOSP or backport everything to CM-10.1. I think backporting is kinda stupid because newer we are writing new software to improve things. Sadly I don't have much experiance with AOSP so I will have to find out how everything works and what the differences to CyanogenMod are.
The good news is, that I'm catching up with the mailing list, which means I'll have a place to call for help.
Also I'm in the progress to start a git repo, but I'm unsure what I will need to add, maybe some common stuff from sony does not need to be changed.
So long,
Kalle

Update!
There is a new porting guide! See here
I already freed some space for it and ordered a bit more ram so after my exam next week, I'll pick this up/Start all over.
Hope you are as excited as I am,
Kalle

XDA:DevDB Information
Ubuntu Touch for Sony Xperia Z Ultra, ROM for the Sony Xperia Z Ultra

Contributors
KalleEatingBrain, Kohelet
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.4.x
ROM Firmware Required: Unlocked Bootloader
Based On: AOSP

Version Information
Status: Testing

Created 2014-05-14
Last Updated 2015-02-24
 
Last edited:

reeco

Senior Member
Nov 20, 2009
296
128
Swansea, Wales
Great this would be awesome if you can make it happen. I'm here for testing if required.

Sent from my C6833 using XDA Premium 4 mobile app
 

qwasz123

Senior Member
Jul 30, 2010
219
30
In also here for testing... Ubuntu Touch has intruiged me, I would love to try it out.
 

KalleEatingBrain

Senior Member
Feb 1, 2013
55
80
Bremen
I keep meaning to reply to this thread... Thanks for putting the effort in to get this working. If you want any hints/tips etc from my experience in getting slim and carbon built for the ZU just ask, I'll be willing to test aswell

Cool, thanks :) can you give me a hint on how to deal with new targets in Aosp? I mean setting up the files in a way "lunch" is able to find the right target.

Sent from my C6833 using XDA Free mobile app
 

Kohelet

Member
Sep 15, 2013
35
21
Ashburn, VA
kohelet.tech
How are you doing on this? I've just started working on this as well and am curious to know how far along you've gotten/what issues you've run into.

Sent from my Nexus 7 using XDA Free mobile app
 

Kohelet

Member
Sep 15, 2013
35
21
Ashburn, VA
kohelet.tech
So I've gotten the build to start, but I'm running into issues with libhybris:

ubuntu/hybris/compat/media/media_codec_layer.cpp:51:40: fatal error: gui/IGraphicBufferProducer.h: No such file or directory
compilation terminated.
make: *** [out/target/product/togari/obj/SHARED_LIBRARIES/libmedia_compat_layer_intermediates/media_codec_layer.o] Error


I'll post here once I've found a solution.
 

KalleEatingBrain

Senior Member
Feb 1, 2013
55
80
Bremen
So I've gotten the build to start, but I'm running into issues with libhybris:

ubuntu/hybris/compat/media/media_codec_layer.cpp:51:40: fatal error: gui/IGraphicBufferProducer.h: No such file or directory
compilation terminated.
make: *** [out/target/product/togari/obj/SHARED_LIBRARIES/libmedia_compat_layer_intermediates/media_codec_layer.o] Error


I'll post here once I've found a solution.

Yeah, thats as far as I got, too. :-/ I tried removing all different libs or compiling different parts and leaving others out but I couldn't get any futher. Also I saw your post to the mailing list but it seems like you wont get a helpful reply either. As far a I could track this problem is the incompatibility of togari CM-11 and the ubuntu AOSP source tree. On xda-university there is a guide for porting from CM to AOSP which I will try but maybe you should take a look, too. Anyways: Great to see there is someone else except lazy me working on this.
Best regards,
Kalle
 
Last edited:

Kohelet

Member
Sep 15, 2013
35
21
Ashburn, VA
kohelet.tech
Yeah, thats as far as I got, too. :-/ I tried removing all different libs or compiling different parts and leaving others out but I couldn't get any futher. Also I saw your post to the mailing list but it seems like you wont get a helpful reply either. As far a I could track this problem is the incompatibility of togari CM-11 and the ubuntu AOSP source tree. On xda-university there is a guide for porting from CM to AOSP which I will try but maybe you should take a look, too. Anyways: Great to see there is someone else except lazy me working on this.
Best regards,
Kalle


I actually got past the libhybris issue. The problem was that the porting guide is out of date. It's based on using cm-10.1 whereas the current source for Ubuntu is based on cm-11.0. So if you use 4.4.2 instead instead of 4.2.2 then it works. But there are so many other issues and the documentation for fixing them is so poor. I've kept a running list of problems I've come across and the solutions for them (it's below).

Also they dropped the whole UCM thing so you should be able to get sound working once you actually get a working build, but I couldn't get it to build. The error that is currently in my way has to do with "No rule to make target signapk.jar needed by com.qualcomm.location" or something or other. And I found nothing on how to solve that online.

At this point I've decided to take a short break from the whole thing because it's so frustrating. :p

Once I get motivated to work on it again, I'll probably start from scratch.



Issues List (I apologize for not being specific about the errors, I didn't write them down verbatim):

If you get an error about libelf you need to add CyanogenMod/android_external_elfutils to your local_manifests/roomservice.xml and also add external/elfutils under subdirs in build/core/main.mk

Don't forget to also add device/sony and vendor/sony to build/core/main.mk as well.

The build will complain about not having a rule to make android-boot.img. To fix you have to go to device/sony/fusion3-common/custombookimg.mk and change boot.img to android-boot.img. You need to make the same change in device/sony/rhine-common/custombootimg.mk

I got an error about android.hardware.bluetooth_le.xml. If you just restart the build it doesn't complain, but I didn't find a proper solution to that.

If you get the libhybris error you have the wrong version of the Ubuntu source. Make sure you're using 4.4.2 when you phablet-dev-botstrap. It should be phablet-dev-bootstrap --sources aosp --repo-branch phablet-4.4.2_r1 [target_directory]

You might get an error about a product_config.mk and how it's missing a makefile for togari. You have to make sure that in device/sony/togari Android.mk, cm.mk, full_togari.mk, and vendorsetup.sh PRODUCT_NAME is the same. I solved this by changing PRODUCT_NAME to cm_togari in all of them and then renamed full_togari.mk to cm_togari.mk

You might get an error like MODULE.TARGET.SHARED_LIBRARIES.libOmxCore already defined in hardware/qcom/media. You should have CyanogenMod/android_hardware_qcom_media-caf-new in your repo manifest with a path of android/qcom/media-caf-new so you can safely rm -rf the hardware/qcom/media directory to get past this error.

If you get an error about dtbToolCM, add /device/qcom/common/dtbtool to your subdirs in build/core/main.mk

You may get an error about mkbootimg, that's because Sony uses a different version of mkbootimg. The only option I found was to download it from the internet (Thanks DooMLorD!). Once you get that version edit device/sony/rhine-common/custombootimg.mk and replace $(MKBOOTIMG) with the path to your downloaded mkbootimg binary.

You might get an error about no rule to make target something/something/signapk.jar needed by something/something/com.qualcomm.location. I didn't find a solution to this error.
 
Last edited:

blueether

Senior Member
Jan 21, 2011
3,391
1,639
Te Awamutu, New Zealand
Thanks for that list, it's sure to help some one. I think I have had most of those errors in trying to get aosp to build.

Can I copy those errors to my [DEV]Random thoughts thread?
 

Kohelet

Member
Sep 15, 2013
35
21
Ashburn, VA
kohelet.tech
Thanks for that list, it's sure to help some one. I think I have had most of those errors in trying to get aosp to build.

Can I copy those errors to my [DEV]Random thoughts thread?

Sure, feel free. I built CM for all my devices and regretted not keeping such a list when I did that. So now every time I work on a build I keep lists like that. Eventually, when I have a working build, I'll post a guide for how to build following the same steps I took.
 
  • Like
Reactions: adfurgerson

blueether

Senior Member
Jan 21, 2011
3,391
1,639
Te Awamutu, New Zealand
Sure, feel free. I built CM for all my devices and regretted not keeping such a list when I did that. So now every time I work on a build I keep lists like that. Eventually, when I have a working build, I'll post a guide for how to build following the same steps I took.

Yeh carbon and slim were easy to build, and simple fixes. AOSP on the other hand I wish I had kept a build log
 

KalleEatingBrain

Senior Member
Feb 1, 2013
55
80
Bremen
Ah nice, when I last checked CM-11.0 was not working with the 4.4.2r2 branch. I think I know how to fix the problem with the *.apk. Basically you have to remove all java dependencies from all the makefiles. I will look it up, so I can tell you what to grep for. Do you have a git repo we can work on, or should I add you to mine (which is just a fork of the CM-repos)? I will take a look at the sound in the next days. Thanks for you list!
Keep it up,
Kalle

Sent from my C6833 using XDA Free mobile app
 

Kohelet

Member
Sep 15, 2013
35
21
Ashburn, VA
kohelet.tech
Ah nice, when I last checked CM-11.0 was not working with the 4.4.2r2 branch.

That could potentially be a major source of my problems. i wasn't aware of that.

I think I know how to fix the problem with the *.apk. Basically you have to remove all java dependencies from all the makefiles. I will look it up, so I can tell you what to grep for. Do you have a git repo we can work on, or should I add you to mine (which is just a fork of the CM-repos)? I will take a look at the sound in the next days. Thanks for you list!
Keep it up,
Kalle

Sent from my C6833 using XDA Free mobile app

All I have at the moment is a fork of the CM repos. Feel free to add me to your repo. My username on Github is Kohelet as well. I can start to look into removing java dependencies as well.

As for the sound, the mailing list made it appear as if it was a simple matter of running

Code:
$ sudo apt-add-repository ppa:ci-train-ppa-service/landing-018
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install pulseaudio-module-droid


I could be wrong though.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Hi folks,
    I just started to port UbuntuTouch for the Sony Xperia Z Ultra and I think I should have a *.zip ready for testing in 2 weeks.
    Until then, I will use this thread as a scrap book to document all the troubles I run into, all the things that needed my special attention and fixes that are not that obvious. I hope there will be some fellas brave enough to test everything and report back or even to join me with the development.
    Best regards,
    Kalle

    First Update:
    I found that the Ubuntu Touch version that ist based on CyanogenMod was not updated to a more recent version. This means that I have to either look into AOSP or backport everything to CM-10.1. I think backporting is kinda stupid because newer we are writing new software to improve things. Sadly I don't have much experiance with AOSP so I will have to find out how everything works and what the differences to CyanogenMod are.
    The good news is, that I'm catching up with the mailing list, which means I'll have a place to call for help.
    Also I'm in the progress to start a git repo, but I'm unsure what I will need to add, maybe some common stuff from sony does not need to be changed.
    So long,
    Kalle

    Update!
    There is a new porting guide! See here
    I already freed some space for it and ordered a bit more ram so after my exam next week, I'll pick this up/Start all over.
    Hope you are as excited as I am,
    Kalle

    XDA:DevDB Information
    Ubuntu Touch for Sony Xperia Z Ultra, ROM for the Sony Xperia Z Ultra

    Contributors
    KalleEatingBrain, Kohelet
    ROM OS Version: 4.4.x KitKat
    ROM Kernel: Linux 3.4.x
    ROM Firmware Required: Unlocked Bootloader
    Based On: AOSP

    Version Information
    Status: Testing

    Created 2014-05-14
    Last Updated 2015-02-24
    5
    So I've gotten the build to start, but I'm running into issues with libhybris:

    ubuntu/hybris/compat/media/media_codec_layer.cpp:51:40: fatal error: gui/IGraphicBufferProducer.h: No such file or directory
    compilation terminated.
    make: *** [out/target/product/togari/obj/SHARED_LIBRARIES/libmedia_compat_layer_intermediates/media_codec_layer.o] Error


    I'll post here once I've found a solution.
    5
    Yeah, thats as far as I got, too. :-/ I tried removing all different libs or compiling different parts and leaving others out but I couldn't get any futher. Also I saw your post to the mailing list but it seems like you wont get a helpful reply either. As far a I could track this problem is the incompatibility of togari CM-11 and the ubuntu AOSP source tree. On xda-university there is a guide for porting from CM to AOSP which I will try but maybe you should take a look, too. Anyways: Great to see there is someone else except lazy me working on this.
    Best regards,
    Kalle


    I actually got past the libhybris issue. The problem was that the porting guide is out of date. It's based on using cm-10.1 whereas the current source for Ubuntu is based on cm-11.0. So if you use 4.4.2 instead instead of 4.2.2 then it works. But there are so many other issues and the documentation for fixing them is so poor. I've kept a running list of problems I've come across and the solutions for them (it's below).

    Also they dropped the whole UCM thing so you should be able to get sound working once you actually get a working build, but I couldn't get it to build. The error that is currently in my way has to do with "No rule to make target signapk.jar needed by com.qualcomm.location" or something or other. And I found nothing on how to solve that online.

    At this point I've decided to take a short break from the whole thing because it's so frustrating. :p

    Once I get motivated to work on it again, I'll probably start from scratch.



    Issues List (I apologize for not being specific about the errors, I didn't write them down verbatim):

    If you get an error about libelf you need to add CyanogenMod/android_external_elfutils to your local_manifests/roomservice.xml and also add external/elfutils under subdirs in build/core/main.mk

    Don't forget to also add device/sony and vendor/sony to build/core/main.mk as well.

    The build will complain about not having a rule to make android-boot.img. To fix you have to go to device/sony/fusion3-common/custombookimg.mk and change boot.img to android-boot.img. You need to make the same change in device/sony/rhine-common/custombootimg.mk

    I got an error about android.hardware.bluetooth_le.xml. If you just restart the build it doesn't complain, but I didn't find a proper solution to that.

    If you get the libhybris error you have the wrong version of the Ubuntu source. Make sure you're using 4.4.2 when you phablet-dev-botstrap. It should be phablet-dev-bootstrap --sources aosp --repo-branch phablet-4.4.2_r1 [target_directory]

    You might get an error about a product_config.mk and how it's missing a makefile for togari. You have to make sure that in device/sony/togari Android.mk, cm.mk, full_togari.mk, and vendorsetup.sh PRODUCT_NAME is the same. I solved this by changing PRODUCT_NAME to cm_togari in all of them and then renamed full_togari.mk to cm_togari.mk

    You might get an error like MODULE.TARGET.SHARED_LIBRARIES.libOmxCore already defined in hardware/qcom/media. You should have CyanogenMod/android_hardware_qcom_media-caf-new in your repo manifest with a path of android/qcom/media-caf-new so you can safely rm -rf the hardware/qcom/media directory to get past this error.

    If you get an error about dtbToolCM, add /device/qcom/common/dtbtool to your subdirs in build/core/main.mk

    You may get an error about mkbootimg, that's because Sony uses a different version of mkbootimg. The only option I found was to download it from the internet (Thanks DooMLorD!). Once you get that version edit device/sony/rhine-common/custombootimg.mk and replace $(MKBOOTIMG) with the path to your downloaded mkbootimg binary.

    You might get an error about no rule to make target something/something/signapk.jar needed by something/something/com.qualcomm.location. I didn't find a solution to this error.
    3
    Unfortunately, it seems that the Ubuntu Touch team is primarily focused on completing work for the BQ and Meizu phones that will be sporting Ubuntu Touch. That said, significant changes have been made to the OS that make the current porting guide completely unusable for porting. Which means people who want to port are left to do a lot of heavy lifting on their own with no support from the team working on the core of the OS because, as KalleEatingBrain mentioned, porting is just not a priority of theirs at the moment.

    I've been monitoring their IRC and mailing list for relevant updates when I have time, but for the moment I've found it wouldn't be a good use of time to bang my head against Ubuntu Touch. Especially when the documentation of it is seriously outdated with no sign of being updated any time soon.

    Thanks for having my back ;)
    It's not that I stopped working on this, but I just don't make any progess and the support for porting is really bad. In the beginning I thought Ubuntu Touch might be a big thing because of the good community, but right now Cannonical is not very community friendly to anyone who doesn't have a Nexus device. Just take a look at the supported devices: Everything stopped after maybe 5 initial builds within the first 2-3 month after launch. I talked to the guy who maintains the UT build for the Xperia Tablet Z, which is like the only device that get's any updates, and he is willingly to help, but he says that it's really hard, even for someone who might have a extended knowledge of android development and linux.

    Is anyone interested in joining me for porting FireFoxOS? They have a nice and clean porting guide and use Android 4.4 sources as default, so we could use CM sources. I want to have a exotic OS on my phone, that's why I started this xD