[ROM] Android 11 + mainline Linux Kernel for Sony Xperia M4 Aqua

Search This thread

Cubbins

Senior Member
Nov 26, 2015
72
153
63
26
Disclaimer:
I'm not responsible if you destroy your device. Use at your own risk.

Description:
First of all, I want to say thank my friend Pablo for the provided device. It wouldn't have happened without him.
This is a pure Android 11 that runs on the mainline Linux Kernel.
This project is part of my Linux kernel experiments and will be updated from time to time.

Current state:
It is a very early stage, very unstable and has extremely limited functionality. Keep this in mind.
What works:
  • WiFi
  • Bluetooth
  • Display
  • Sound (only main speaker at this moment)
Known bugs:
  • Device stability
  • Screen flickering when changing brightness
  • TODO

Flashing instructions:
  1. Download and extract zip archive
  2. Flash the boot, system vendor and userdata images by entering the following commands in a terminal:
    Code:
    fastboot flash boot boot.img
    fastboot flash system system.img
    fastboot flash cache vendor.img
    fastboot flash userdata userdata.img
  3. Unplug and boot device

Screenshots:
Screenshot_20201004-133400.jpg

Screenshot_20201004-133441.png


Download link: https://drive.google.com/file/d/1sL4m93ZErYgPleLQfVH8N1_KHkekYgj8

Kernel sources: https://github.com/bartcubbins/kernel_kanuti_mainline
Android device tree sources: https://github.com/bartcubbins/device_sony_tulip-mainline

OS Version: Android 11
Kernel version: 5.9.0-rc7
 

Attachments

  • Screenshot_20201004-133400.jpg
    Screenshot_20201004-133400.jpg
    37.3 KB · Views: 596
  • Screenshot_20201004-133441.png
    Screenshot_20201004-133441.png
    70.6 KB · Views: 605
Last edited:

pawloland

Senior Member
Jan 23, 2019
178
67
28
I would never expect anyone to pick up old and forgotten m4 aqua and give it any custom ROM. I am positively surprised here. What is even more insane is that m4 aqua will be my first device running android 11 ?! Life is so unpredictable.
 
  • Like
Reactions: Mapuku

NullCode

Senior Member
Nov 29, 2017
165
46
38
Dhaka
Description:
This is a pure Android 11 that runs on the mainline Linux Kernel.
This project is part of my Linux kernel experiments and will be updated from time to time.

Hello! Man I was so dumb, I thought if I could upstream a kernel to a newer version, it would work. Damn. Well I've only started learning about development (my only feat has been compiling PBRP for a 2016 phone as of now). Anyways even though I do not have this device, MASSIVE RESPECT for doing such a thing which has the potential to change the ROM status of like many many old smartphones. You know, I would donate but only if I was not 13 and if I had a card.
 

Cubbins

Senior Member
Nov 26, 2015
72
153
63
26
Hmmm, looks like my phone boots into fastboot mode(shows blue LED), but in cmd its not detecting it. ADB works but fastboot doesn't work on my device. Any help is appreciated. (Im a noob in fastboot stuff).
If you use Windows most likely fastboot driver is missing. Check device manager
 
  • Like
Reactions: xrenoix

tommytomson

Member
Oct 2, 2015
30
4
38
@Cubbins
After connecting the phone to Fastboot, I have a blue LED for 5 seconds and the phone disconnects and I have a red LED and it connects again to disconnect in a moment ...
USB Drivers installed...
Where is the problem?
Ok, I found the mistakes... but I have problem with ADB because i don't know how to use image and where start the command prompt. SDK installed in directory:
C:\Users\PC\AppData\Local\Android\Sdk\platform-tools
 
Last edited:
@Cubbins
After connecting the phone to Fastboot, I have a blue LED for 5 seconds and the phone disconnects and I have a red LED and it connects again to disconnect in a moment ...
USB Drivers installed...
Where is the problem?
Ok, I found the mistakes... but I have problem with ADB because i don't know how to use image and where start the command prompt. SDK installed in directory:
C:\Users\PC\AppData\Local\Android\Sdk\platform-tools
After installing the drivers via platform tools, I also started to have these issues except mine goes into fastboot for about 10 seconds then it the LED goes from blue to red then it goes into a green LED(which is flash mode).
 

pawloland

Senior Member
Jan 23, 2019
178
67
28
Hi @Cubbins, I am going to try that ROM during this weekend. I have few questions beforehand:

If I am not wrong, this is pure AOSP, so no gapps are present. Is it possible to install them? I don't see any of them for A11 on the Open Gapps site, so I guess they can't be installed currently but I want to be sure.

Is this ROM compatible with TWRP for this device? I guess it isn't so will it be? Do you have plans to also build TWRP along side building ROM (so for example gapps, magisk and other TWRP zips can be flashed)?

If you are going to make TWRP compatible with android 11, are you going to make flashable zips, rather than relying on manually flashing img files?

Will you (if at all) only work on AOSP build for m4 aqua or are you interested in making for example Lineage OS 18, once it is stable enought (sources are already public, but not many lineage's OS features work at the moment). I personally would prefer LOS over AOSP in long time perspective, but I am not in charge here, you are @Cubbins :laugh:, so I am fully dependent on your will (but it would be cool if you could consider making LOS, and even cooler :fingers-crossed: if you switched from AOSP to making just LOS + TWRP :D.

I would be glad if you answered mine uncertainties.

Whatever your plans are for the m4 aqua, you already have made more to it, than anyone in the past years. I wish you easy and fast time fixing the bugs ;).
 
Can anyone give me a guide of some sort to install these drivers the correct way in windows ?
Im going to start installing these drivers from scratch but I need some sort of guide to follow.
Any help is appreciated.
Thanks!
Update- I have installed it by myself. But im getting the same issue, when I type adb reboot fastboot
it reboots into fastboot mode(blue led) but then when i type fastboot devices, it doesnt show up even thou it is in fastboot mode.
 
Last edited:

Cubbins

Senior Member
Nov 26, 2015
72
153
63
26
Hi @Cubbins, I am going to try that ROM during this weekend. I have few questions beforehand:

If I am not wrong, this is pure AOSP, so no gapps are present. Is it possible to install them? I don't see any of them for A11 on the Open Gapps site, so I guess they can't be installed currently but I want to be sure.

Is this ROM compatible with TWRP for this device? I guess it isn't so will it be? Do you have plans to also build TWRP along side building ROM (so for example gapps, magisk and other TWRP zips can be flashed)?

If you are going to make TWRP compatible with android 11, are you going to make flashable zips, rather than relying on manually flashing img files?

Will you (if at all) only work on AOSP build for m4 aqua or are you interested in making for example Lineage OS 18, once it is stable enought (sources are already public, but not many lineage's OS features work at the moment). I personally would prefer LOS over AOSP in long time perspective, but I am not in charge here, you are @Cubbins :laugh:, so I am fully dependent on your will (but it would be cool if you could consider making LOS, and even cooler :fingers-crossed: if you switched from AOSP to making just LOS + TWRP :D.

I would be glad if you answered mine uncertainties.

Whatever your plans are for the m4 aqua, you already have made more to it, than anyone in the past years. I wish you easy and fast time fixing the bugs ;).

Installing GAPPS is possible using some tricks, but I am not doing it, sorry. I think you can find the answer on this forum.
It's compatible with any TWRP version, just don't forget that we use cache partition as a vendor.
At the moment I'm concentrated on working on the kernel and I see no reason to build any other custom ROM. Maybe when the kernel is in good enough shape we will return to this question.
 
  • Like
Reactions: xrenoix
Finally! I managed to install it on my phone.
I actually had to install linux on a virtual machine cause windows 10 doesn't like my device even though I had fastboot drivers.
Then after a few hours of figuring out the commands, I got it to install on my device via virtual machine.
P.S I actually tried this ROM and its pretty unstable for the moment.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Disclaimer:
    I'm not responsible if you destroy your device. Use at your own risk.

    Description:
    First of all, I want to say thank my friend Pablo for the provided device. It wouldn't have happened without him.
    This is a pure Android 11 that runs on the mainline Linux Kernel.
    This project is part of my Linux kernel experiments and will be updated from time to time.

    Current state:
    It is a very early stage, very unstable and has extremely limited functionality. Keep this in mind.
    What works:
    • WiFi
    • Bluetooth
    • Display
    • Sound (only main speaker at this moment)
    Known bugs:
    • Device stability
    • Screen flickering when changing brightness
    • TODO

    Flashing instructions:
    1. Download and extract zip archive
    2. Flash the boot, system vendor and userdata images by entering the following commands in a terminal:
      Code:
      fastboot flash boot boot.img
      fastboot flash system system.img
      fastboot flash cache vendor.img
      fastboot flash userdata userdata.img
    3. Unplug and boot device

    Screenshots:
    Screenshot_20201004-133400.jpg

    Screenshot_20201004-133441.png


    Download link: https://drive.google.com/file/d/1sL4m93ZErYgPleLQfVH8N1_KHkekYgj8

    Kernel sources: https://github.com/bartcubbins/kernel_kanuti_mainline
    Android device tree sources: https://github.com/bartcubbins/device_sony_tulip-mainline

    OS Version: Android 11
    Kernel version: 5.9.0-rc7
    1
    I would never expect anyone to pick up old and forgotten m4 aqua and give it any custom ROM. I am positively surprised here. What is even more insane is that m4 aqua will be my first device running android 11 ?! Life is so unpredictable.
    1
    I would never expect anyone to pick up old and forgotten m4 aqua and give it any custom ROM. I am positively surprised here. What is even more insane is that m4 aqua will be my first device running android 11 ?!

    I'm glad to hear that, but please note this is very unstable at the current stage.

    Life is so unpredictable.
    it is;)
    1
    Finally! Days of waiting for someone to make a ROM for this device has come to an end. Hope it becomes stable very soon.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone