[ROM][F5121][WIP] Ubuntu Touch for Sony Xperia X

Search This thread

beidl

Senior Member
Apr 30, 2009
467
211
Vienna
fredl.me
Ok, so I did install the stock rom through EMMA fine. I did enable the usb debugging, installed twrp, wiped system & data, made sure they are EXT4. Rebooted to fastboot, installed SW binaries. Opened UBports Installer & proceeded with instructions. I got this error
Code:
Error: systemimage: Error: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"C:\\Users\\domin\\AppData\\Local\\Temp\\1Uo4H80AYPnCivmpnC8M9LLWxLb\\resources\\app.asar.unpacked\\platform-tools\\win\\adb -P 5037 shell mount -a"},"stdout":"","stderr":"mount: mounting /dev/block/bootdevice/by-name/userdata on /data failed: Invalid argument"}

Any solutions, did I miss something? I gonna retry without the twrp step, as I am pretty sure the partition format will be EXT4

You may want to try
Code:
fastboot erase userdata
from the command line.
 

beidl

Senior Member
Apr 30, 2009
467
211
Vienna
fredl.me
Is this ROM going to be updated? I've never decided to try it just for those annoying issues, will there be any chances to make this ROM usable?

There is a manual way to get video recording and flashlight during taking pictures to work, the thread is here: https://forums.ubports.com/topic/32...ort-in-ubuntu-touch-for-halium-7-1-based-port
You can start at the Install GStreamer-droid section.
You have to know what you're doing though, the issue is such that it's not integrated in the main system by default yet, which will come some day when it's ready.
 
Last edited:

eichenbast

Member
Oct 15, 2018
18
2
Big thank to you, "beidl", I appreciate very much, what you did for suzu. Bought a new device and ubuntu linux works amazing on my phone: - thank you!
 

heath1976

New member
Apr 18, 2020
1
0
does not work at all

I have been trying for 7 hours to get this blasted os onto my sony Xperia x and im about to give up
I have updated the rom to android 8, I have flashed the oem image but after the installer flashes the firmware the phone reboots and the installer complains that it has lost the connection,im at my wits end with it.
 

deprecated

Member
Mar 24, 2009
31
0
I have been trying for 7 hours to get this blasted os onto my sony Xperia x and im about to give up
I have updated the rom to android 8, I have flashed the oem image but after the installer flashes the firmware the phone reboots and the installer complains that it has lost the connection,im at my wits end with it.


procedure that works:

  1. restore to latest stock using the Emma tool
  2. power phone off, wait 5 seconds, hold vol up while inserting USB cable (to enter fastboot)
  3. fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.img
  4. fastboot flash recovery twrp-3.3.1-0
  5. remove usb cable
  6. power phone off (helps to hold down power + vol up until you feel it vibrate several times)
  7. boot into twrp by holding down vol down + power
  8. wipe /data and /system
  9. power off
  10. hold vol up while inserting USB cable (to enter fastboot)
  11. fastboot erase userdata
  12. power phone off (helps to hold down power + vol up until you feel it vibrate several times)
  13. boot into twrp by holding down vol down + power
  14. run ubports installer, wait for it to do its thing
  15. let Ubuntu Touch boot up (it may reboot several times, nothing to be alarmed about)

The Xperia X is very finnicky with this process, but this is the only way I got it to work. After many hours (and duplicating this process about six times now, to make sure it works), I've got Ubuntu Touch running on my old Xperia X - previously running official Sailfish. It'll be a test device, because my daily driver is now an XA2 Ultra running official Sailfish.

Enjoy, and if you have any trouble let me know.
 

Aaskereija

Senior Member
Jun 22, 2013
497
121
procedure that works:

  1. restore to latest stock using the Emma tool
  2. power phone off, wait 5 seconds, hold vol up while inserting USB cable (to enter fastboot)
  3. fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.img
  4. fastboot flash recovery twrp-3.3.1-0
  5. remove usb cable
  6. power phone off (helps to hold down power + vol up until you feel it vibrate several times)
  7. boot into twrp by holding down vol down + power
  8. wipe /data and /system
  9. power off
  10. hold vol up while inserting USB cable (to enter fastboot)
  11. fastboot erase userdata
  12. power phone off (helps to hold down power + vol up until you feel it vibrate several times)
  13. boot into twrp by holding down vol down + power
  14. run ubports installer, wait for it to do its thing
  15. let Ubuntu Touch boot up (it may reboot several times, nothing to be alarmed about)

The Xperia X is very finnicky with this process, but this is the only way I got it to work. After many hours (and duplicating this process about six times now, to make sure it works), I've got Ubuntu Touch running on my old Xperia X - previously running official Sailfish. It'll be a test device, because my daily driver is now an XA2 Ultra running official Sailfish.

Enjoy, and if you have any trouble let me know.

i did it in a more "dirty" way. my phone already was on a custom-rom with android 9, so i skipped everything related to "updating"

i did following:

  1. power phone off, wait 5 seconds, hold vol up while inserting USB cable (to enter fastboot)
  2. fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.img
  3. fastboot erase system
  4. fastboot erase cache
  5. fastboot erase userdata
  6. fastboot flash boot twrp-3.3.1-0
  7. boot into twrp
  8. wipe /data, /cache, /dalvik-cache, /system
  9. run ubports installer, ubports will maybe not recognize the phone by itself, select it manually
  10. let Ubuntu Touch boot up
(if it doesn't boot up, just do a restart with power+vol up)
 

Linux Klaus

Senior Member
Jul 21, 2017
56
23
Ok, so I did install the stock rom through EMMA fine. I did enable the usb debugging, installed twrp, wiped system & data, made sure they are EXT4. Rebooted to fastboot, installed SW binaries. Opened UBports Installer & proceeded with instructions. I got this error
Code:
Error: systemimage: Error: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"C:\\Users\\domin\\AppData\\Local\\Temp\\1Uo4H80AYPnCivmpnC8M9LLWxLb\\resources\\app.asar.unpacked\\platform-tools\\win\\adb -P 5037 shell mount -a"},"stdout":"","stderr":"mount: mounting /dev/block/bootdevice/by-name/userdata on /data failed: Invalid argument"}

Any solutions, did I miss something? I gonna retry without the twrp step, as I am pretty sure the partition format will be EXT4

I was running into the same problem. It seems more like a problem with the installer. Some people reported the same problem on github. I tried it several times and it worked in the end.
Did you used the installer on a windows machine. I tried it first on a windows machine and later on a Linux one and that it worked.

I hope you succeed. Fingers are crossed. After the struggle to get it installed its working flawless.
 

&(*)

Senior Member
May 8, 2020
169
7
There's another post on UBports of it being possible for other platforms. I realize the cpu and board architecture are different, I believe that other device's configs could be added to the installer there (UBPorts). Since both the X performance, XZ, & XZs share software binaries I am wondering why the instructions don't include those models too? I would like to get this working on other devices but the dev isn't responding, as I am tired of android software sources.
 

Aaskereija

Senior Member
Jun 22, 2013
497
121
There's another post on UBports of it being possible for other platforms.

yes, by compiling the whole thing by yourself with the needed adjustments

I believe that other device's configs could be added to the installer there (UBPorts).

i hardly believe so.

Since both the X performance, XZ, & XZs share software binaries I am wondering why the instructions don't include those models too?

you can't just copy & paste binaries from one phone to another and expect them to work, even if they share the same mainboard. As i said, if you want Ubuntu Touch for X Compact, you have to build it by yourself from scratch, you cant use the F5121 version. I don't understand how you think that this could work, you also can't use any Android Custom-Rom from another phone because all drivers are different and what not and we talk about a complete different OS Struktur here. I strongly recommend you to not f up your phone for nothing if you still plan to use it for a longer time. i'm not an expert at all, but it sounds very logic to me that this can't work
 
Last edited:

&(*)

Senior Member
May 8, 2020
169
7
I've already tried it and it didn't f'up, it just doesn't boot; the software binares are shared for a number of devices, however the microcode does vary. Simply adding the CPU/chipset microcode should suffice in a config file somewhere. BTW it does work on XZ & XZs.
 
  • Like
Reactions: NeonHD

beidl

Senior Member
Apr 30, 2009
467
211
Vienna
fredl.me
Should we use the dev or edge channel for updates within?

Depends, for a more properly working phone go with the devel channel. The difference between devel & edge is that edge is built on 64bit whereas devel is 32bit. 64bit has its own issues though, GPS & camera (with gst-droid) don't work as well as it does on 32bit.
 

DigitalDreamer

Senior Member
Jun 9, 2010
186
47
Depends, for a more properly working phone go with the devel channel. The difference between devel & edge is that edge is built on 64bit whereas devel is 32bit. 64bit has its own issues though, GPS & camera (with gst-droid) don't work as well as it does on 32bit.

Got it. While I haven't gone through the tutorial about the camera for the video recording (noticed it in the forum post on ubports), I do use GPS quite often, so I guess I'm staying on the dev channel.
Thanks a lot.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    devices-bq-aquaris-main.png


    A Mobile Version of the Ubuntu Operating System
    Ubuntu Touch is made and maintained by the UBports Community. A group of volunteers and passionate people across the world. With Ubuntu Touch we offer a truly unique mobile experience - an alternative to the current most popular operating systems on the market. We believe that everyone is free to use, study, share and improve all software created by the foundation without restrictions. Whenever possible, everything is distributed under free and open source licenses endorsed by the Free Software Foundation, the Open Source Initiative.

    For more information check out the UBports website.


    Known issues:
    • Recording video doesn't work
    • Changing volume in-call doesn't work

    Contribute:
    As not everything is working fully yet helping hands are welcome!
    Follow the project management issue over at the Halium GitHub page:
    https://github.com/Halium/projectmanagement/issues/98

    Instructions (tested on Ubuntu 18.04):

    First make sure to wipe /system & /data from within TWRP. The partitions must be ext4.

    4
    please make a porting for kugo (x compact) sir

    Someone else is working on that already, but this port is only for the Xperia X (F5121).


    In other news:
    Installation instructions have been updated, the Xperia X port is now available from the UBports community channel!
    2
    Reserved for future use
    2
    I've updated download links and the instructions to enable call functionality. Testers welcome! :)
    2
    As I get the question very often: To support the F5122 variant of the Xperia X (or other devices in general) for Ubuntu Touch I need donations to buy the device.
    Use the "Donate To Me" button on XDA or head over to https://fredl.me/donate/ for info on how to do so.

    In other news: The Xperia X F5121 has gained support for the official UBports installer. You can now flash the device using a fancy GUI.