Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    How to build and flash AOSP Android 11.0 to Sony Xperia XA2

    General Sony related developer discussions
    3
    7
    4356
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      neo75 last edited by

      Hello,
      I have followed all the steps described here:

      https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-android-11-0-0/

      and here:

      https://developer.sony.com/file/download/software-binaries-for-aosp-android-11-0-kernel-4-14-nile/

      Everything was succesfull up to the last flashing, where I obtained following error message:

      sudo fastboot flash system /media/android/out/target/product/kirin/system.img
      
      target reported max download size of 536870912 bytes
      erasing 'system_a'...
      OKAY [  0.383s]
      sending sparse 'system_a' 1/3 (516924 KB)...
      OKAY [ 12.921s]
      writing 'system_a' 1/3...
      OKAY [  0.000s]
      sending sparse 'system_a' 2/3 (516176 KB)...
      FAILED (remote: Error: Last flash failed : Volume Full)
      finished. total time: 13.305s
      
      

      Is there any solution for the "volume full" error?

      I did it all under latest Linux Mint 20. The phone is without any SD card.
      After this last error the phone was completely stuck and after booting showed only "device corrupted" message. So finely I switched to Windows and used Sony Emma programme and flashed back original Android 9 installation from Sony site.

      Thank you in advance for any help.
      Regards

      1 Reply Last reply Reply Quote
      • D
        devjerpelea DeveloperWorld last edited by devjerpelea

        Hello
        I built and flashed the image without any problem on my device

        Can you please confirm that

        • the device was lashed with EMMA to the latest SW available ?
        • The AOSP software was built according to the guide without adding extra packages or source?

        Please share the output for the next command:

        ls -la /media/android/out/target/product/kirin/*.img

        put device in fastboot mode (blue LED) and run the next command to check the base SW version
        fastboot getvar --all

        Best Regards
        Alin

        1 Reply Last reply Reply Quote
        • N
          neo75 last edited by

          Hello, thank you for answer.
          -I have flashed it with Emma the baseband 50.2.A.0.400 (Android 9), which works.
          -regarding the AOSP I have made no modifications at all.
          Just followed the first part of steps here:
          https://jolla.zendesk.com/hc/en-us/articles/115004283713-Reverting-Xperia-device-to-Android-OS-and-reinstalling-Sailfish-OS

          Regarding your command I will share it later. Now I am sitting at different computer.

          The history of this my XA2 device is following: I have used Sailfish OS for more than a year, than I decided to reflash it back to android. I was not satisfied with SFOS.

          Thanks a lot for support!
          Neo

          1 Reply Last reply Reply Quote
          • N
            neo75 last edited by neo75

            Hello,
            so now I'm back and want to share following outputs.
            I recompiled everything again (the phone is H4113).

            ls -la android/out/target/product/pioneer/*.img
            
            -rw-rw-r-- 1 zdenek zdenek   24192296 lis  5 03:36 pioneer/boot.img
            -rw-rw-r-- 1 zdenek zdenek       3630 lis  5 03:36 pioneer/ramdisk.img
            -rw-rw-r-- 1 zdenek zdenek   11502249 lis  5 03:36 pioneer/ramdisk-recovery.img
            -rw-rw-r-- 1 zdenek zdenek 1346535872 lis  5 04:32 pioneer/system.img
            -rw-rw-r-- 1 zdenek zdenek     184732 lis  5 03:10 pioneer/userdata.img
            -rw-rw-r-- 1 zdenek zdenek   65159352 lis  5 04:31 pioneer/vendor.img
            

            Sony is saying on their page, that "Several images may be missing depending on device layout.​"

            In my output is missing "vbmeta.img​", "dtbo.img​", "vbmeta_system.img".
            And some images are not mentioned on Sony page, like "ramdisk.img" and "ramdisk-recovery.img".

            So should I flash all of the images, which appeared in my directory?

            And here I want to share following output:

            sudo fastboot getvar all
            
            (bootloader) hw-revision:10000
            (bootloader) unlocked:yes
            (bootloader) off-mode-charge:0
            (bootloader) charger-screen-enabled:0
            (bootloader) battery-soc-ok:yes
            (bootloader) battery-voltage:3999
            (bootloader) version-baseband:1311-2918_50.2.A.0.400
            (bootloader) version-bootloader:1310-0301_X_Boot_SDM630_LA3.0_P_38
            (bootloader) erase-block-size: 0x200
            (bootloader) logical-block-size: 0x200
            (bootloader) variant:SDM EMMC
            (bootloader) partition-type:system_b:ext4
            (bootloader) partition-size:system_b: 0xB5000000
            (bootloader) partition-type:system_a:ext4
            (bootloader) partition-size:system_a: 0xB5000000
            (bootloader) partition-type:rddata:raw
            (bootloader) partition-size:rddata: 0x1400000
            (bootloader) partition-type:userdata:ext4
            (bootloader) partition-size:userdata: 0x500000000
            (bootloader) partition-type:Qnovo:raw
            (bootloader) partition-size:Qnovo: 0x1400000
            (bootloader) partition-type:diag:raw
            (bootloader) partition-size:diag: 0x2000000
            (bootloader) partition-type:appslog:raw
            (bootloader) partition-size:appslog: 0x1000000
            (bootloader) partition-type:fsmetadata:raw
            (bootloader) partition-size:fsmetadata: 0x101000
            (bootloader) partition-type:vendor_b:raw
            (bootloader) partition-size:vendor_b: 0x35200000
            (bootloader) partition-type:vendor_a:raw
            (bootloader) partition-size:vendor_a: 0x35200000
            (bootloader) partition-type:oem_b:raw
            (bootloader) partition-size:oem_b: 0x1C200000
            (bootloader) partition-type:oem_a:raw
            (bootloader) partition-size:oem_a: 0x1C200000
            (bootloader) partition-type:keystore:raw
            (bootloader) partition-size:keystore: 0x80000
            (bootloader) partition-type:rdimage_b:raw
            (bootloader) partition-size:rdimage_b: 0x4000000
            (bootloader) partition-type:rdimage_a:raw
            (bootloader) partition-size:rdimage_a: 0x4000000
            (bootloader) partition-type:misc:raw
            (bootloader) partition-size:misc: 0x100000
            (bootloader) partition-type:sti:raw
            (bootloader) partition-size:sti: 0x200000
            (bootloader) partition-type:frp:raw
            (bootloader) partition-size:frp: 0x80000
            (bootloader) partition-type:ssd:raw
            (bootloader) partition-size:ssd: 0x2000
            (bootloader) partition-type:sec:raw
            (bootloader) partition-size:sec: 0x4000
            (bootloader) partition-type:ddr:raw
            (bootloader) partition-size:ddr: 0x100000
            (bootloader) partition-type:logfs:raw
            (bootloader) partition-size:logfs: 0x800000
            (bootloader) partition-type:toolsfv:raw
            (bootloader) partition-size:toolsfv: 0x100000
            (bootloader) partition-type:limits:raw
            (bootloader) partition-size:limits: 0x1000
            (bootloader) partition-type:splash:raw
            (bootloader) partition-size:splash: 0x20A4000
            (bootloader) partition-type:dpo:raw
            (bootloader) partition-size:dpo: 0x1000
            (bootloader) partition-type:msadp:raw
            (bootloader) partition-size:msadp: 0x40000
            (bootloader) partition-type:apdp:raw
            (bootloader) partition-size:apdp: 0x40000
            (bootloader) partition-type:devinfo:raw
            (bootloader) partition-size:devinfo: 0x1000
            (bootloader) partition-type:dip:raw
            (bootloader) partition-size:dip: 0x100000
            (bootloader) partition-type:mdtp_b:raw
            (bootloader) partition-size:mdtp_b: 0x2000000
            (bootloader) partition-type:mdtp_a:raw
            (bootloader) partition-size:mdtp_a: 0x2000000
            (bootloader) partition-type:mdtpsecapp_b:raw
            (bootloader) partition-size:mdtpsecapp_b: 0x400000
            (bootloader) partition-type:mdtpsecapp_a:raw
            (bootloader) partition-size:mdtpsecapp_a: 0x400000
            (bootloader) partition-type:dsp_b:raw
            (bootloader) partition-size:dsp_b: 0x1000000
            (bootloader) partition-type:dsp_a:raw
            (bootloader) partition-size:dsp_a: 0x1000000
            (bootloader) partition-type:modem_b:raw
            (bootloader) partition-size:modem_b: 0x6E00000
            (bootloader) partition-type:modem_a:raw
            (bootloader) partition-size:modem_a: 0x6E00000
            (bootloader) partition-type:bluetooth_b:raw
            (bootloader) partition-size:bluetooth_b: 0x100000
            (bootloader) partition-type:bluetooth_a:raw
            (bootloader) partition-size:bluetooth_a: 0x100000
            (bootloader) partition-type:boot_b:raw
            (bootloader) partition-size:boot_b: 0x4000000
            (bootloader) partition-type:boot_a:raw
            (bootloader) partition-size:boot_a: 0x4000000
            (bootloader) partition-type:tzxfl_b:raw
            (bootloader) partition-size:tzxfl_b: 0x40000
            (bootloader) partition-type:tzxfl_a:raw
            (bootloader) partition-size:tzxfl_a: 0x40000
            (bootloader) partition-type:tzxflattest_b:raw
            (bootloader) partition-size:tzxflattest_b: 0x40000
            (bootloader) partition-type:tzxflattest_a:raw
            (bootloader) partition-size:tzxflattest_a: 0x40000
            (bootloader) partition-type:xfl_b:raw
            (bootloader) partition-size:xfl_b: 0x4000000
            (bootloader) partition-type:xfl_a:raw
            (bootloader) partition-size:xfl_a: 0x4000000
            (bootloader) partition-type:storsec:raw
            (bootloader) partition-size:storsec: 0x20000
            (bootloader) partition-type:devcfg_b:raw
            (bootloader) partition-size:devcfg_b: 0x100000
            (bootloader) partition-type:devcfg_a:raw
            (bootloader) partition-size:devcfg_a: 0x100000
            (bootloader) partition-type:cmnlib64_b:raw
            (bootloader) partition-size:cmnlib64_b: 0x100000
            (bootloader) partition-type:cmnlib64_a:raw
            (bootloader) partition-size:cmnlib64_a: 0x100000
            (bootloader) partition-type:cmnlib_b:raw
            (bootloader) partition-size:cmnlib_b: 0x100000
            (bootloader) partition-type:cmnlib_a:raw
            (bootloader) partition-size:cmnlib_a: 0x100000
            (bootloader) partition-type:cdt:raw
            (bootloader) partition-size:cdt: 0x40000
            (bootloader) partition-type:keymaster_b:raw
            (bootloader) partition-size:keymaster_b: 0x100000
            (bootloader) partition-type:keymaster_a:raw
            (bootloader) partition-size:keymaster_a: 0x100000
            (bootloader) partition-type:abl_b:raw
            (bootloader) partition-size:abl_b: 0x100000
            (bootloader) partition-type:abl_a:raw
            (bootloader) partition-size:abl_a: 0x100000
            (bootloader) partition-type:pmic_b:raw
            (bootloader) partition-size:pmic_b: 0x80000
            (bootloader) partition-type:pmic_a:raw
            (bootloader) partition-size:pmic_a: 0x80000
            (bootloader) partition-type:hyp_b:raw
            (bootloader) partition-size:hyp_b: 0x80000
            (bootloader) partition-type:hyp_a:raw
            (bootloader) partition-size:hyp_a: 0x80000
            (bootloader) partition-type:rpm_b:raw
            (bootloader) partition-size:rpm_b: 0x80000
            (bootloader) partition-type:rpm_a:raw
            (bootloader) partition-size:rpm_a: 0x80000
            (bootloader) partition-type:tz_b:raw
            (bootloader) partition-size:tz_b: 0x400000
            (bootloader) partition-type:tz_a:raw
            (bootloader) partition-size:tz_a: 0x400000
            (bootloader) partition-type:xbl_b:raw
            (bootloader) partition-size:xbl_b: 0x380000
            (bootloader) partition-type:xbl_a:raw
            (bootloader) partition-size:xbl_a: 0x380000
            (bootloader) partition-type:xflkeystorebak:raw
            (bootloader) partition-size:xflkeystorebak: 0x10000
            (bootloader) partition-type:xflkeystore:raw
            (bootloader) partition-size:xflkeystore: 0x10000
            (bootloader) partition-type:LTALabel:raw
            (bootloader) partition-size:LTALabel: 0x1000000
            (bootloader) partition-type:fsg:raw
            (bootloader) partition-size:fsg: 0x200000
            (bootloader) partition-type:modemst2:raw
            (bootloader) partition-size:modemst2: 0x200000
            (bootloader) partition-type:modemst1:raw
            (bootloader) partition-size:modemst1: 0x200000
            (bootloader) partition-type:fsc:raw
            (bootloader) partition-size:fsc: 0x400
            (bootloader) partition-type:persist:raw
            (bootloader) partition-size:persist: 0x2000000
            (bootloader) partition-type:TA:raw
            (bootloader) partition-size:TA: 0x200000
            (bootloader) has-slot:modem:yes
            (bootloader) has-slot:system:yes
            (bootloader) current-slot:a
            (bootloader) has-slot:boot:yes
            (bootloader) slot-retry-count:b:0
            (bootloader) slot-unbootable:b:no
            (bootloader) slot-successful:b:no
            (bootloader) slot-retry-count:a:6
            (bootloader) slot-unbootable:a:no
            (bootloader) slot-successful:a:yes
            (bootloader) slot-count:2
            (bootloader) secure:no
            (bootloader) serialno:CQ3000B09S
            (bootloader) serial:d31add
            (bootloader) product:H4113
            (bootloader) max-download-size:536870912
            (bootloader) kernel:uefi
            all: 
            finished. total time: 0.008s
            

            Thank you very much for any help!
            Kind Regards
            Neo

            1 Reply Last reply Reply Quote
            • N
              neo75 last edited by neo75

              Hello,
              so finely I was successful. After I recompiled everything again I found, that phone H4113 XA2 is codenamed "Pioneer" and not "Kirin". I did wrong setup of the first compilation. Now the AOSP 11 is up and running.
              Thanks for support!
              Best Regards
              Neo

              1 Reply Last reply Reply Quote
              • T
                tester2021 last edited by tester2021

                This post is deleted!
                1 Reply Last reply Reply Quote
                • T
                  tester2021 last edited by

                  aaaaaaaaaaa

                  1 Reply Last reply Reply Quote
                  • First post
                    Last post
                  Developer World
                  Copyright © 2021 Sony Group Corporation. All rights reserved.
                  • Contact us
                  • Legal