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

beidl

Senior Member
Apr 30, 2009
467
209
0
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
209
0
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
17
2
0
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
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
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
484
119
73
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
0
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
161
4
18
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
484
119
73
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
161
4
18
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
209
0
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
176
43
48
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.