How to compile AOSP for Xiaomi 9a - Redmi 9A Questions & Answers

Hi, I have a Xiaomi redmi 9A and I'd like to compile and flash a custom android os, preferably AOSP or LineageOS.
What I know so far is that I need
1. Rom's source: I can simply get AOSP or LineageOS from their repository
2. Kernel files: xiaomi released the source code here.
3. vendor files: I can extract it from stock roms as explained here.
4. device files
The only bottle-neck for my phone is device files. where can I get them? can I extract them from stock rom? or from a rooted device? looks like mediatek (which redmi 9a uses) is not open-sourcing them. Is there a chance to get them?

alikazemlo said:
Hi, I have a Xiaomi redmi 9A and I'd like to compile and flash a custom android os, preferably AOSP or LineageOS.
What I know so far is that I need
1. Rom's source: I can simply get AOSP or LineageOS from their repository
2. Kernel files: xiaomi released the source code here.
3. vendor files: I can extract it from stock roms as explained here.
4. device files
The only bottle-neck for my phone is device files. where can I get them? can I extract them from stock rom? or from a rooted device? looks like mediatek (which redmi 9a uses) is not open-sourcing them. Is there a chance to get them?
Click to expand...
Click to collapse
Ask a developer about roms here.
https://forum.xda-developers.com/f/redmi-9a-roms-kernels-recoveries-other-develo.11007/

Related

A13 [clover] LeOS -T for Xiaomi Mi Pad 4

October 11, EDIT:
I have changed the headline to A13, because with he base of this rom you can flash LeOS-T (A13) on the pad. I'm sing it since a week without any issue.
Download of the GSI https://leos-cloud.de/s/JFrFgLgSSTEMtmL?path=/LeOS-T-beta
flashing instructions here: https://gitlab.com/leos1/leos-wiki/-/wikis/Flashing-Instructions/Mi-Pad-4
enjoy Android 13 on your Pad 4 )
_____________________________________________________________________________
This is an full ungoogled LeOS-S build for the Xiaomi Mi Pad 4 (clover), based on Lineage19.1.
LeOS includes a special MicroG version. With LeOS and this MicroG version you wont be able to run google apps, no device registration, no add of a google account, no google push messages.
LeOS is designed for users which have said goodbye to google.
LeOS includes only an f-droid client, file manager and phone app. So everyone can install his favorite (FOSS) apps.
EDIT: after you are running this rom, you can flash A12.1 and A13 GSI on clover.
A13 beta you will find here https://leos-cloud.de/s/JFrFgLgSSTEMtmL
Instructions
Boot to TWRP recovery (Vol UP + Power)
Format Data if a different OS was previously installed
Flash ROM (LeOS-*.zip)
Reboot
Enjoy!
Downloads
rom: https://leos-gsi.de/downloads/LeOS-S +NameOfMonth/LeOS-S*.zip
Sources
LineageOS
A free and open-source operating system for various devices, based on the Android mobile platform. This is a mirror of https://review.lineageos.org/ - LineageOS
github.com
https://github.com/kyasu/android_device_xiaomi_sdm660-common
https://github.com/kyasu/android_device_xiaomi_clover
https://github.com/kyasu/android_kernel_xiaomi_sdm660
https://github.com/kyasu/android_vendor_xiaomi_sdm660-common
https://github.com/kyasu/android_vendor_xiaomi_clover
Special thanks to
LineageOS team, kyasu,
ROM OS Version: Android 12.1
ROM Kernel: Linux 4.4
Based On: LineageOS 19.1
May, 13th: New version with updated security patches
Can Gapps be flashed with this rom?
abdulhamid1978 said:
Can Gapps be flashed with this rom?
Click to expand...
Click to collapse
Please read my post complete. LeOS is for googlefree users!!!!!``
harvey186 said:
Please read my post complete. LeOS is for googlefree users!!!!!``
Click to expand...
Click to collapse
I read that and understood. All I was asking was can Gapps be flashed on top. Looks like not.
abdulhamid1978 said:
I read that and understood. All I was asking was can Gapps be flashed on top. Looks like not.
Click to expand...
Click to collapse
If you are a googlfree user, you don't need gapps.
If you are needing gapps you are wrong with LeOS. Then you should use the standard LOS19.1 rom. There you can install all these spying apps like gapps
[ROM][12.1][clover] LineageOS 19 for Xiaomi Mi Pad 4 [UNOFFICIAL]
LineageOS is a free, community built, aftermarket firmware distribution of Android 12, which is designed to increase performance and reliability over stock Android for your device. LineageOS is based on the Android Open Source Project with extra...
forum.xda-developers.com
harvey186 said:
This is an full ungoogled LeOS-S build for the Xiaomi Mi Pad 4 (clover), based on Lineage19.1.
LeOS includes a special MicroG version.
Click to expand...
Click to collapse
Does this rom inherit the bugs of LOS 19.1 unofficial, or is this Source built?
Im interested in this rom, as a user of Calyxos with microG
Although I cant relock the bootloader, i guess this is somewhat better compare to vanilla LOS.
Thanks.
shizuni said:
Does this rom inherit the bugs of LOS 19.1 unofficial, or is this Source built?
Im interested in this rom, as a user of Calyxos with microG
Although I cant relock the bootloader, i guess this is somewhat better compare to vanilla LOS.
Thanks.
Click to expand...
Click to collapse
LeOS-19.1 is based on LOS29.1
LeOS-S isbased on latest AOSP sources
no additional bug removal.
Relock a bootloader is not recommend. In most cases you will loose all your data. Relock bootloader is, as far as,I know only eorking on some pixel devices and Fairphone
Hi,
thanks for your work, i want to give it a try. I am looking for an actual ROM for my MIPAD4 which gets security patches microg integration. So i found yours. Unfortunately i cant find any flashable zip on your new Server. Where can i find these files?
It would be nice to get this ROM.
THX a lot and best regards
42
zweiund40 said:
Hi,
thanks for your work, i want to give it a try. I am looking for an actual ROM for my MIPAD4 which gets security patches microg integration. So i found yours. Unfortunately i cant find any flashable zip on your new Server. Where can i find these files?
It would be nice to get this ROM.
THX a lot and best regards
42
Click to expand...
Click to collapse
After you have flashed the LeOS-Rom.zip you can updated with LeOS-19.1 GSI.
LeOS-Files
LeOS-Cloud - make Love not Waste
leos-cloud.de

Xiaomi 12x device tree?

Sorry for posting in the wrong section, Xiaomi 12x still does not have its own section despite the other variants of the mi 12 having one.
I'm a complete noob to android development. I've been trying to port twrp recovery to the Xiaomi 12x by following along with this guide:
[DEV]How to compile TWRP touch recovery
All of TWRP 3.x source is public. You can compile it on your own. This guide isn't going to be a step-by-step, word-for-word type of guide. If you're not familiar with basic Linux commands and/or building in AOSP then you probably won't be...
forum.xda-developers.com
I've managed to find the vendor and kernel, but am confused when it comes to the device tree. I have found this:
GitHub - MiCode/kernel_devicetree at psyche-r-oss
kenrel devicetree project for xiaomi kernel opensource - GitHub - MiCode/kernel_devicetree at psyche-r-oss
github.com
When I checked out the files, nothing resembled the structure of other device trees I have seen before. Could someone clarify me as to what I have found? Thanks.
[RECOVERY] [12] [OFFICIAL] TeamWin Recovery Project
Introduction: Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added...
forum.xda-developers.com
arch_user4 said:
Sorry for posting in the wrong section, Xiaomi 12x still does not have its own section despite the other variants of the mi 12 having one.
I'm a complete noob to android development. I've been trying to port twrp recovery to the Xiaomi 12x by following along with this guide:
[DEV]How to compile TWRP touch recovery
All of TWRP 3.x source is public. You can compile it on your own. This guide isn't going to be a step-by-step, word-for-word type of guide. If you're not familiar with basic Linux commands and/or building in AOSP then you probably won't be...
forum.xda-developers.com
I've managed to find the vendor and kernel, but am confused when it comes to the device tree. I have found this:
GitHub - MiCode/kernel_devicetree at psyche-r-oss
kenrel devicetree project for xiaomi kernel opensource - GitHub - MiCode/kernel_devicetree at psyche-r-oss
github.com
When I checked out the files, nothing resembled the structure of other device trees I have seen before. Could someone clarify me as to what I have found? Thanks.
Click to expand...
Click to collapse
This is the link for the source code on Android 11 - https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/psyche-r-oss

Redmi K50Pro (matisse or poco 4)

Is there an open source system or ROM available now for this phone with MediaTek 9000 chip? Where can I find and download it? Thanks!
Yes, All Android phones have ROM and can be downloaded from Google.
There is no open source code ROM, for All Android devices. Without android open source code and Googles own devices.

General Xiaomi 12 / Xiaomi 12 Pro OSS Kernel Sources

After reading about the fast kernel source release for the Xiaomi 12 and Xiaomi 12 Pro one could think that xiaomi did a good job at complying with the GPL v2 license and providing useful sources for developers of custom kernels. But appearances are deceiving: The provided kernel sources are incomplete and partially broken.
The most important issues are that xiaomi pushed incomplete devicetree sources which are neither provided by qualcomm anymore unfortunately and the touchscreen drivers are really out of date which leads to broken double tap to wake and under display fingerprint sensor. Additionally building the kernel isn't as trivial as it sounds anymore since many kernel modules are built outside of the kernel tree now.
During the past days i have spent some time on getting a source built kernel including modules and devicetree running on Xiaomi 12.
I have sucessfully booted the kernel and uploaded this work to github.com/xiaomi-sm8450-kernel.
Using this manifest one is able to compile the OSS kernel for Xiaomi 12 and Xiaomi 12 Pro.
I hope that this can help other developers working on the Xiaomi 12 and Xiaomi 12 Pro!
For instructions to build the kernel and more details about missing sources please refer to the manifest on github.
Note that double tap to wake and fingerprint sensor don't work as is on the stock ROM.
Also note that the OSS display-devictree for Xiaomi 12 Pro is missing the configurations for some referesh rates which were supported on MIUI. This could be dumped and included from the stock dtbo.img with some effort.
If you encounter issues with this OSS kernel feel free to ask me and i will give my best to help.
To finish this thread i want to draw further attention to the fact that this is not a one-time issue with the OSS kernels for Xiaomi devices and the situation seems to get even worse. The newer Redmi K50 gaming got kernel sources which don't include any external respositories, as in no techpack drivers and no devicetree sources at all. The new Xiaomi 12S series still has not seen any open source kernel release.
I hope this project helps to set a better starting point than the xiaomi oss release to other developers for the Xiaomi 12 and Xiaomi 12 Pro.
Thanks for thus clarification Arian. Sad story....To be continued... Quo Vadis Xiaomi?
ti think the xiaomi 12 has suffered a performance squeeze... this is not because of the heat.... i have tried thermal unlocking and overclocking the CPU GPU and updating the driver 617 the result shows the real performance is vastly different many
Can you tell me which version of clang can be used to build the kernel from the sources for lineageos 20? And which commands to use? I would like to build a kernel for Kali Nethunter, but when using any of the defconfig I get compilation errors
Can you explain how to flash built kernel..? I built the kernel and I get the kenrel image but I don't know how to flash it to the device...
Would you know if this is also the case for Mi11 Ultra tree?
The OSS for the 12S and 12S Pro has just been released recently if anyone is interested in looking at it:
GitHub - MiCode/Xiaomi_Kernel_OpenSource at mayfly-s-oss
Xiaomi Mobile Phone Kernel OpenSource. Contribute to MiCode/Xiaomi_Kernel_OpenSource development by creating an account on GitHub.
github.com
I would be interested to hear if the kernel source for the 12S family is also incomplete, like the regular Xiaomi 12 series
pj_ said:
Can you explain how to flash built kernel..? I built the kernel and I get the kenrel image but I don't know how to flash it to the device...
Click to expand...
Click to collapse
You need to pack the boot, vendor_boot, vendor_dlkm and dtbo images, the easiest way is to do that within the LineageOS tree.
KeepingKeyes said:
The OSS for the 12S and 12S Pro has just been released recently if anyone is interested in looking at it:
GitHub - MiCode/Xiaomi_Kernel_OpenSource at mayfly-s-oss
Xiaomi Mobile Phone Kernel OpenSource. Contribute to MiCode/Xiaomi_Kernel_OpenSource development by creating an account on GitHub.
github.com
I would be interested to hear if the kernel source for the 12S family is also incomplete, like the regular Xiaomi 12 series
Click to expand...
Click to collapse
Yes, unfortunately this devices source situation is even worse. On all the recent releases xiaomi did not release the audio, display and camera drivers. The released touchscreen driver does not compile either, though i fixed that by guessing and the driver works now: https://github.com/xiaomi-sm8450-ke...3b9d0f69ecd2ba01674a0dc29cfdc86782bb7c9d6c3da

twrp for Huawei y5, Huawei p10 and Xiaomi Redmi 9c

Hi!
I need the twrp updates for the following devices:
Huawei Y5 DRA-L21
CPU MT6739
System Android 8.1.0
Huawei P10
CPU Kirin 960
System Android 9
Xiaomi Redmi 9C
CPU Octa-core
System Android 10QP1A
I've searched the devices listed in https://twrp.me/Devices/ but didn't find any of the 3 models described above.
Should I try some twrp updates for similar devices from the official Team Win site (https://twrp.me/)?
(I've read on this site that this is not recommended)
Or are there some reliable twrp specific updates for any of the 3 devices listed above which I can download from this site or any other?
Any advice will be much appreciated!
Here is the compile guide
[DEV]How to compile TWRP touch recovery
All of TWRP 3.x source is public. You can compile it on your own. This guide isn't going to be a step-by-step, word-for-word type of guide. If you're not familiar with basic Linux commands and/or building in AOSP then you probably won't be...
forum.xda-developers.com
Fytdyh said:
Here is the compile guide
[DEV]How to compile TWRP touch recovery
All of TWRP 3.x source is public. You can compile it on your own. This guide isn't going to be a step-by-step, word-for-word type of guide. If you're not familiar with basic Linux commands and/or building in AOSP then you probably won't be...
forum.xda-developers.com
Click to expand...
Click to collapse
Thanks Fytdyh!

Categories

Resources