Установка linux на sony xperia

Ubuntu Wiki

Bring-up of Sony Xperia line of devices based on AOSP 5.1.1 tree. Tested on Z1, Z2 tablet, Z3 Tablet Compact, Z5, Z5 Compact but not limited to.

Useful key combinations

  • Vol UP pressed + insert USB cable -> fastboot mode
  • Vol DOWN pressed + insert USB cable -> flash mode (used by Sony tools)
  • Vol UP + POWER, both pressed during 30 seconds -> hard reboot
  • Vol DOWN + POWER, no USB cable, stop pressing POWER after vibration -> recovery mode when it has been enabled and has a proper image (see below)
  • Small red button next to SIM, press it for a few seconds (you need a clip) until you get 3 vibrations -> power off

Current images

Built images ready to flash on a device are here. Ensure you download the boot.img and ubuntu.img files and then follow the flashing instructions below.

Flashing Ubuntu

2. Make sure that you have Android 5.1.1 in your Z1. Otherwise, flash it using the Sony official tools or unofficial tools that run in Ubuntu.

3. After that you can use fastboot to flash the images, by running these commands on the terminal:

sudo fastboot -S 256M flash boot boot.img sudo fastboot -S 256M flash system ubuntu.img

Compiling from scratch

Alternatively, in addition to the ready-made images, if you want to contribute to development or modify those images, you can build them yourself following these instructions. These assume you’ve got knowledge of building software and you are familiar with the Ubuntu and Android source code. Current source tree is compatible with Sony’s binary blobs version 19a

 1  Download Sony binaries (current tested version is AOSP L v19a)  2  repo init -u https://code-review.phablet.ubuntu.com/aosp/platform/manifest -b personal/w-ondra/xperia-5.1.1_r36 -g all,-darwin,-qcom_msm8x26,-qcom_msm8x27,-qcom_msm8x74,-x86,-omap3,-omap4,-omap4-aah,-manta,-grouper  3  repo sync  4  . build/envsetup.sh  5  lunch -> Select desired target e.g Z5 aosp_e6653-userdebug  6  make -j8  7  this is optional step, if you want to use specific channel to build ubuntu root from, for example . ubuntu/prebuilts/prepare-ubuntu-packages-for-build -d generic -c rc-proposed/ubuntu-pd  8  make ubunturootfsimage -j8 -> build will downloads ubuntu rootfs and custom packages for default channel rc-proposed/ubuntu channel 
  • Use custom channel to build Ubuntu rootfs from:
    • after step 6 run: . ubuntu/prebuilts/prepare-ubuntu-packages-for-build -d generic -c rc-proposed/ubuntu-pd
    • Run following after step 6
     1  git clone https://code-review.phablet.ubuntu.com/ubuntu/libhybris-prebuilt ubuntu/libhybris-prebuilt -b personal/w-ondra/phabket-5.x-kitakami  2  mmm ubuntu/libhybris-prebuilt/  3  make snod 

    Port status

    The port is in its early steps and feature set differs between devices, there are many things that do not work. Some of the stuff that does work is:

    Generic known issues

    • Power handling.
      • Device does not power off completely. When usb cable is plugged and unplugged, power button fails to switch off screen.
      • suspend does not works properly

      Development tips

       1  $ make bootimage  2  - repackage boot image without rebuilding dependencies  3  $ make bootimage-nodeps 
       1  $ make recoverytimage  2  - repackage boot image without rebuilding dependencies  3  $ make recoveryimage-nodeps 
      • Build Ubuntu image ( this will download latest rootfs and custom adds local Android image and packs all in image)
      • re-build Ubuntu image without checking dependencies, use this to create image with local changes
       1  $ make ubunturootfsimage-nodeps 
       1  $ make device package  2  - without checking dependencies  3  $ make devicepackage-nodeps 
       1  - build changes in Android code  2  $ make  3  - copy updated Android image so it is picked when we are repacking Ubuntu image  4  $ cp out/target/product//system.img out/target/product//ubuntu/rootfs/var/lib/lxc/android/system.img  5  - repack Ubuntu rootfs without checking dependencies  6  $ make ubunturootfsimage-nodeps 

      When doing changes on Android side, sometimes there is need for quick iterations, for this case best is to use adb sync feature. You will have to make sure to use eng build, as you will need to run adb daemon as root. You will also have to make sure to have enough spare space in Android system image.

       1  Preconditions:  2  - Preparation: prepare Android system image with 30MB padding space  3  $ BOARD_SYSTEMIMAGE_PARTITION_PADDING=3145728 make -j8  4  or without dependencies  5  $ BOARD_SYSTEMIMAGE_PARTITION_PADDING=3145728 make snod -j8  6  - Create Ubuntu image with new Android system image  7  $ cp out/target/product//system.img out/target/product//ubuntu/rootfs/var/lib/lxc/android/system.img  8  $ make ubunturootfsimage-nodeps -j8  9    10  - Flash device with new Ubuntu image.  11  - once device is booted, using adb add following two files:  12  $ touch /userdata/.writable_image  13  $ touch /userdata/.writable_device_image  14  - reboot  15  - once device is booted, check that '/' and '/android/system' are mounted as 'rw'  16    17  Iterating through changes:  18  - restart adb as root  19  $ adb root  20  - make and compile changes in Android, you do not need to run make in root, to recreate Android system image  21  - e.g.  22  $ mmm frameworks/av/media/libmedia  23    24  - sync all changes with device. Be careful if you change is executable can you restart it, if it's shared lib, can you make system reload it, if it's config file can you make system reload it? Ultimately reboot is always safest option if you do not know  25  $ adb sync 

      Touch/Devices/minato (последним исправлял пользователь localhost 2016-07-29 08:45:25)

      Источник

      Sony Xperia X (F5121 & F5122)

      You are viewing data for an obsolete Ubuntu Touch release that is kept for historical reasons, please use the latest stable release instead.

      Features & Usability

      Pro Tip

      Use GitHub to subscribe to the linked Issues. So, whenever bugs get solved (or a fix needs testing) you will know about that.

      Automated Usability ( beta )

      Runs very smoothly without any flaws. The experience on this device will be comparable to other mobile OSes on the market.

      • Actors:
      • Manual brightness
      • Notification LED
      • Torchlight
      • Vibration
      • Camera:
      • Flashlight
      • Photo
      • Video
      • Switching between cameras
      • Cellular:
      • Carrier info, signal strength
      • Data connection
      • Incoming, outgoing calls
      • MMS in, out
      • PIN unlock
      • SMS in, out
      • Change audio routings
      • Voice in calls
      • Endurance:
      • 24+ hours battery lifetime
      • 7+ days stability
      • GPU:
      • Boot into UI
      • Hardware video playback
      • Misc:
      • Anbox patches (deprecated)
      • AppArmor patches
      • Battery percentage
      • Offline charging
      • Online charging
      • Recovery image
      • Reset to factory defaults
      • RTC time
      • Shutdown / Reboot
      • Wireless External monitor
      • Network:
      • Bluetooth
      • Flight mode
      • Hotspot
      • NFC
      • WiFi
      • Sensors:
      • Automatic brightness
      • Fingerprint reader
      • GPS
      • Proximity
      • Rotation
      • Touchscreen
      • Sound:
      • Earphones
      • Loudspeaker
      • Microphone
      • Volume control
      • USB:
      • MTP access
      • ADB access

      Confirmed, depending on the maintenance

      If there is a link here, follow it to learn more’ ‘

      Working to some extent but with issues

      Issue is not specific to this device

      Global issues

      The issues listed below are present in most or all of the devices depending on the technology they are built on.

      • Incoming, outgoing calls Calling over VoLTE is not supported, please check that this is not a requirement in your country. Halium and Legacy ports
      • GPS Devices may take longer than usual to get the first GPS fix because of missing Assisted GPS support. All devices

      Unsupported features

      The device hardware does not support these features, if you need them, please consider a different device.

      • Waydroid
      • SD card detection and access
      • Wireless charging
      • Wired External monitor

      Support with casual testing

      Some things are just so important that they need to be tested every day, every week, every month. Just hang around in QA group and try out the stuff that gets flagged. Without your help the developers may sit there for days more, trying to figure out the puzzle.

      Join and introduce yourself “Hi, my name is X, and I own Z. How can I help?” that will do fine 😉

      Unless you want to step up to become our Test Manager, but that is a whole different story.

      Release channels

      This device gets updates through these channels, learn more about OTA updates

      Ubuntu Release Channel Version Release Date Description
      Xenial stable OTA-25 4/14/2023 Stability over newer features (recommended)
      Xenial rc 2023-W16 4/14/2023 Testing before the next stable release
      Xenial devel 2023-05-11 4/14/2023 Daily built development releases
      Xenial edge 2023-05-11 11/21/2022 Here be dragons

      Sony Xperia X (F5121 & F5122)

      Specifications

      CPU Hexa-core 64-bit
      Chipset Qualcomm MSM8956 Snapdragon 650
      GPU Qualcomm Adreno 510
      Storage 32/64GB
      Memory 3GB
      Android Version Android 6.0.1
      Battery 2620 mAh
      Display 1080×1920 pixels, 5.5 in
      Rear Camera 23MP
      Front Camera 13MP

      Preparatory steps

      You can install Ubuntu Touch on the versions F5121 and F5122 of the Sony Xperia X. Before, you have to take a number of preparatory steps:

      1. Ensure you have upgraded the stock firmware at least to Android 8, else you can’t flash the OEM binaries for AOSP. It is best to ensure that you have all the latest firmware installed.
      2. Enable developer options for your device,
      3. In the developer options, enable ADB debugging and OEM unlocking,
      4. Install ADB on your computer
      5. BEFORE unlocking the boot loader, back up your TA partition, in case you later wish to return to factory state. You can’t do this step at a later stage!
      6. Get an unlocking code from Sony,
      7. Reboot to fastboot and unlock the bootloader using the code obtained from Sony
      8. Download the OEM binaries for AOSP from sony, unpack them,
      9. Flash them in fastboot ( fastboot flash oem [filename] )

      Built on Halium 7.1

      Devices that originally ran Android 7 can run on Halium 7.1.

      Kernel version on the device is 4.4.146.

      Port Resources

      Contributors

      How to install Ubuntu Touch OS

      You can install Ubuntu Touch on this device using the UBports Installer on your computer.

      Make sure your device is unlocked and the required Android version is installed, follow the device-specific instructions below:

      1. Please double-check that your device is a Sony Xperia X (F5121 or F5122).
      2. In case you later wish to return to factory state, you will have to back up your TA partition before unlocking the bootloader. You can’t do this step at a later stage!
      3. You have to unlock the bootloader to install third-party operating systems on your device.
      4. If the device is running Android, you might have to upgrade to Android 8.0.

      You will also need to download manually some files specific for your port depending on the type of your install:

      Linux

      Windows & Mac

      Failed to install?

      The world hasn’t come to its end yet. Try our troubleshooting channel on Telegram or read the troubleshooting documentation if the problem persists. Finally, you can discuss the problem with our support team. Good luck!

      Resources for community & developers

      Test the lastest release ⭐

      Build an App ⭐

      User Manual 📄

      Troubleshoting 🛠

      Report an Issue for
      Sony Xperia X (F5121 & F5122)

      Did the maintainer say that feature ‘works’ but you know from doing it that it really doesn’t?

      Start by searching the device issue , if you found it, hopefully the porter is on it. ‘Subscribe’ to the issue in case it get solved.

      Uh-oh… Well it is time to let the porter and everyone else know about the fail and send the tech magic back to the workshop for a makeover.

      1. Read ‘Bug Reporting’ section in UBports docs on ‘How to report a bug’.

      2. Then (this time), head to the device repository and submit it, so the porter knows about it.

      Источник

      Читайте также:  Linux list file by name
Оцените статью
Adblock
detector