-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[device-port] [suzu] Sony Xperia X #98
Comments
If you try a build by yourself and encounter problems, please specify your build environment (GNU/Linux distribution, changing default compiler, etc.) to help track down issues. |
All right. I gave it a try. Thanks for providing the instructions. I got until the part building the systemimage, failing on something with checkpolicy on selinux. More details:
Could the error I get be related to Halium/android_build#4 (comment)? |
@mdehollander To get past the checkpolicy error you need to use the following sepolicy repo: https://github.com/beidl/android_system_sepolicy/tree/halium-7.1
|
A repo sync is suggested now to gain proper AppArmor/click & snap support. Still missing:
Using systemd as the init manager and avoiding running into trouble Specifically, the upstream lxc-android-config service shouldn't require cgmanager anymore. |
I guess this is related to the not yet working audio. I get this error when making the systemimage:
Setting
Is there a part I did not configure correctly? |
@mdehollander Looks like you don't have the vendor repo added (or the vendor repo doesn't contain |
Interesting, I'll try a test with that flag, hasn't happened for me yet.
You could comment out the manual copying of librmnetctl.so files to the system image (within device/sony/loire/platform.mk) and uncomment them later in case the PRODUCT_PACKAGES additions aren't enough. |
Thanks @Beidl. Commenting out the copying worked for me. At least it is compiling and now at 50%. |
Great! Have you tried flashing the image onto your Xperia X? There's a chance it might require an additional apt repo which has already been removed. |
I tried flashing the image to my device, but had to figure out how to do that. And I think I did not do it correctly since I got this error when running
I looked a bit at http://docs.halium.org/en/latest/supplementary/devices/nicki.html to find out how to get into fastboot and recovery mode. However, in recovery mode (green led), the device was not found with adb. Therefore I booted into TWRP recovery and then connected the device to the laptop to start |
@mdehollander it could be possible you're missing the udev device rules to establish adb and fastboot connections. You could try installing them using your distributions package manager or find a udev rules file on GitHub. |
Feel free to test a prebuilt image in case you cannot get the build up and running yourself: https://drive.google.com/open?id=1OJjTosp7jFaYhEYYkB9Mxf3lA0HPIXY6 https://forums.ubports.com/topic/1669/ubuntu-touch-on-sony-xperia-x |
The prebuilts don't seem to boot for me unless I'm missing a step (flash something else first?). I did flash the nougat OEM blob first. I also can't seem to get the build working but I'll need to try again to get the specific error as it was from a month ago... It would be great to see more Sony Open devices since Sony has been keeping the program up and releasing updated binaries and kernels. |
@retro486 how far along can the bootup process get? Are you able to get an active USB networking connection? You could check using |
After booting TWRP and mounting the rootfs.img and changing the ssh init script to run at runlevel 1 (in addition to 2-5) I was able to ssh in. I'm seeing a lot of crashing services in dmesg but I haven't tried the extra sound in the guide above yet... This is using the latest UBports rootfs. Edit: but it's booting which is awesome! Edit 2: Woo! After your post-installation fixes listed above I've got Ubuntu Touch on my Xperia X. Holy smokes that's awesome! Edit 3: I still had to perform a strange fix in that after using halium-install-standalone.sh I booted into TWRP, mounted rootfs.img and changed /etc/init/ssh.conf:
to:
I confirmed I was booting into runlevel 2 so I don't know why I had to add runlevel 1... |
Final comment then I'll move this to the UT forums but I'm using the stock UT rootfs tarball from their custom Halium wiki. I couldn't get the halium reference rootfs to open SSH. |
Tbf there's still an issue with attaching to an already running LXC container, seems to be a kernel-side issue. Among other things this seems to be the root cause of Plasma Mobile refusing to successfully boot into a graphical session. |
Can't wait to try this. I am looking to buy a new phone and I think this is the best candidate. Thank you for the hard work! |
how about anbox? can this port run anbox? |
The kernel has yet to be modified to run Anbox but in theory, as soon as that's worked out, it should run just fine. |
sony Xperia x and x compact is had similar hardware, so will this port can run on Xperia x compact? |
The Xperia X and Xperia X Compact are different devices, you might want to follow this project management issue instead: #103 |
ok, I think it's just can run on Xperia x compact like G7 has done to make compatibility layer to run sailfish x on Xperia x compact |
I have enabled the kernel to support the Anbox-required additional Binder instance. As soon as the Xperia X hits the list of supported Anbox devices we can mark Anbox support as fully available. |
wow, sounds good, whats next? |
Missing pieces are audio while calling, camera and video playback. |
does this will work too for xperia x dual? F5122? |
In theory yes, practically I don't have the device available. But since I modified the source in a way that's not specific to F5121 it should work just fine. The only area I could see issues with is ofono needing an override to support the second SIM tray. |
Calling now works (with caveats). For the time being you need a test version of telepathy-ofono on your device to enable calling:
|
it's getting interesting by the time |
A new build will be released soon with functional hardware video decoding & partial camera support (currently only pictures & no flash). |
Hey there. Huge props for getting this working. As far as I can tell, I followed the installation instructions here: https://forum.xda-developers.com/xperia-x/development/rom-ubuntu-touch-sony-xperia-x-t3958100, but boot is failing. Looks like my partitions aren't set up correctly? Relevant portion of on-device dmesg follows:
|
Hello @neutralinsomniac! EDIT: Also, are you using f2fs? The system expects the partition to be formatted with ext4. |
Looks like this was the ticket. I was coming from a fresh restore of Android 8. Went into TWRP, formatted /data and /system, re-did all the installation steps, and now it looks like ubuntu touch is booting properly! Thank you! Not sure if it would be helpful to add those steps to the install guide? |
Makes sense, I'll include it in the XDA forum post. Thanks for testing! |
Thanks for this! I just wanted to add that in order to get OTAs to install (if desired) people need to do this additional step:
This will replace TWRP (presumably if they flashed it and didn't just fastboot boot it) with the Ubuntu Touch recovery allowing installs of downloaded OTAs. |
Hi all, |
I believe Sailfish is using sensorfw as sensor middleware, whereas with UT on suzu we're still using the old Canonical way of doing things through platform-api. We're using sensorfw for Halium 9 based ports already, but it's conflicting with platform-api. Therefore Halium 9 based ports use a slightly modified variant of the rootfs. I'm not sure how much work it would be to make the standard rootfs use sensorfw, especially since it would mean dropping some core devices which don't have open source device trees available. So currently, if you want to use a magnetometer, you're probably better off making use of a Halium 9 based adaptation of UT. |
Hmm. The magnetometer sensor is listed as "AK09915", and when I looked at sensorfw code it seemed to me those natively implemented are ak897X. So, I was guessing that Sailfish was getting the Xperia X magnetometer data using sensorfw's hybrismagnetometeradaptor. Indeed libhybris sensors are not far to fully work in your port since many devices are identified. Using strace on test_sensor, it seems that polling the sensors simply does not return any data (except for sensor 0, the accelerometer). One difference between Sailfish and your port, is that Sailfish is using an older version of android as base for that phone; I was suspecting this could explain the difference and hoping it could be simple to fix. Now, I did not take a look at platform-api and maybe you mean platform-api is not accessing the android drivers through libhybris, and it's that api code that needs to be fixed for getting magnetometer data? I probably won't be able to investigate Halium 9 adaptation on that phone, because it's my only phone and I need it in a usable state. Yet, out of curosity, you believe that adaptation is feasible? |
For the magnetometer to work on UT you'd either have to implement the feature in what we have already, or make it possible to run sensorfw on the Xperia X + all core devices that UBports supports. I'm not sure though if supporting all core devices using sensorfw would even be possible as we don't have access to some of the device trees (they were proprietary when Canonical worked with those vendors). |
@slowcyclist Seems magnetometer sensor support was in development but never merged in the Canonical days. We're reviving it: ubports/platform-api#8 |
Any updates? |
Yes, most sensors now work on the xperia x in UT (still xenial for me, at this point): gps, magnetometer, acceleration, gyro, pressure, light ... Temperature gives no indication, but maybe there is just no thermometer in the device. |
Tree: halium-7.1
usb: Manufacturer: GNU/Linux Device
appears indmesg
on host.The EGL_PLATFORM=hwcomposer environment variable is required for test_hwcomposer to succeed.
Kernel Support
This Halium abstraction uses a 4.4 kernel provided by Sony and CodeAurora,
thus has the benefit of taking advantage of upstream kernel patches
and follows Ubuntu's Xenial kernel series for AppArmor updates.
This opens the door for potentially decade-long support of kernel patches.
The Halium suzu device platform is determined to support Snap packages
and is well positioned to do so long term.
Areas of improvements
Usability:
Fix Android init service start issues related to:
Possible improvements through use of FLOSS-compliant components
Upstreaming:
Build instructions
Build tests (even if you don't have the device) are welcome!
The resulting image is arm64 and armhf multilib compatible.
Tested on Ubuntu 18.04 inside an LXD container:
Flashing images
Prerequisites:
The OEM binaries need to be flashed onto the oem partition:
Flashing boot and system images:
Edit 2018-09-13: switch to xenial-edge UBPorts rootfsEdit 2019-05-16: switch to xenial (devel) UBPorts rootfs
Post-installation steps
The most current xenial rootfs (devel) build from ci.ubports.com is used in the following steps (2019-05-16).
This shouldn't be needed anymore, keeping for reference.
The text was updated successfully, but these errors were encountered: