• 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

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

KalleEatingBrain

Senior Member
Feb 1, 2013
55
80
0
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:

KalleEatingBrain

Senior Member
Feb 1, 2013
55
80
0
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
0
Los Angeles
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
0
Los Angeles
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
0
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
0
Los Angeles
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:

Kohelet

Member
Sep 15, 2013
35
21
0
Los Angeles
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

Elite Member
Jan 21, 2011
3,391
1,639
0
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
0
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
0
Los Angeles
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: