[UEFI][Bootloader] EDK II port for Mi Mix 2S - Xiaomi Mi Mix 2S Guides, News, & Discussion

An explain goes first:
This may surprise a lot of people, "Whaaaat? Isn't UEFI a kind of BIOS on PC?" Well, it can also be on your phone too, in fact.
This is an EDK II (UEFI) port for Mi Mix 2S. Currently it's incomplete, but already usable.
What is this port for?
This is an UEFI port, so there are many possibilities. As a second-stage bootloader, it can boot any ARM64 OSes that support UEFI.
At this point, both upstream Linux and Windows on arm are capable of booting. The UEFI firmware itself is very broken, so you should only use it as something which can help you boot OSes.
Status of this UEFI implementation:
Working:
Framebuffer
MMU
UFS
Not Working:
Everything else lol
Status of OS booting
Windows PE arm64 boots with the embedded broken ACPI tables, but nothing is working. You are welcomed to fix the ACPI tables if you can.
Ubuntu 20.04 unmodified iso (kernel 5.4) boots with the broken device tree that I writes.
See GitHub README.md for more details.
Some releases will be provided in the GitHub repo soon.
Source: https://github.com/edk2-porting/edk2-sdm845
Some pictures are provided in the GitHub repo.

You are welcomed to share your experience here if you have had a try.

Seems that I can upload photos now.

Nice project. Looks promising. I didn't test it yet and I'm no developer to support the project. just wanted to say to keep up with your work.

This is amazing!

wow thanks. thats so cool.
keep up the good work waiting for a working release.

I will be preparing for the College Entrance Examination in the next 12 months, so there should be someone to take over the project. You can join the project by telegram or QQ. Link is in the Github README. (You can also join if you are not really a developer)

I remember myself thinking 5-6 years ago ..why not phone companies don't introduce some sort of BIOS for phones? ...it would be awesome and you could even install any OS(..sort of)

Telegram: https://t.me/joinchat/MNjTmBqHIokjweeN0SpoyA
Discord: https://discord.gg/XXBWfag
?

Just installing is enough? Or do i need more files?

Sophon Wu said:
Seems that I can upload photos now.
Click to expand...
Click to collapse
I have compiled it for my Mi MIX 2S and it works, but how did you manage to boot Windows or Linux?

Cucciolo Di Informatico said:
I have compiled it for my Mi MIX 2S and it works, but how did you manage to boot Windows or Linux?
Click to expand...
Click to collapse
Join Telegram group. Guys there will help you?

hello i have a Motorola One Action and i want to port the edk2 to my Motorola One Action

Related

Essential prerequisites for X2 Android development [Crowdsourcing]

There is 3 packages needed for any device for an original Android development:
Android source tree, preferably the original as with OEM devices but CyanogenMod or independent ports are enough too. Aka device
Kernel sources for the device. Aka kernel
Vendor proprietary drivers, which make the GPU and various sensors work. If not explicitly available for download they need to be extracted from a running device. Aka vendor
If these three packages are all available, making new roms will be easy for developers. Please co-operate to gather all of them here to be a resource for android developers.
If we could achieve this goal, I would port the Ubuntu OS for Nokia X2 and share it here with you
====
Progress:
Android source tree
No known instant or effort.
Can anyone contact to Microsoft mobile and get the Android source tree for Nokia X2 and upload it to Github?
Kernel sources
here is kernel source code for Nokia RM-1013 2.0.0.11: https://github.com/danialbehzadi/Nokia-RM-1013-2.0.0.11
Due to Microsoft mobile statement, there is no difference in kernel between 2.0.0.11 and 2.1.0.13.
DONE! :good:
Proprietary drivers
Thanks to T4ufik_Hidayat, Here is vendor packages: https://github.com/cm-nokia-x2/proprietary_vendor_nokia_ara
DONE! :good:
Nice effort
You are our only hope
As we have no real devs for this device and the device wasn't released globally, u r our only hope. I request u to build the kernel with device tree that we need so much to port any real android rom like AOSP , please. Frozentears was working on that, You can contact him as well.
Again, I request you, please make us a custom kernel so that we noobs can start porting KitKat/Lollipop for our beloved X2DS, u r our only hope because we see no other developer here for this device.
danialbehzadi said:
There is 3 packages needed for any device for an original Android development:
Android source tree, preferably the original as with OEM devices but CyanogenMod or independent ports are enough too
Kernel sources for the device
Vendor proprietary drivers, which make the GPU and various sensors work. If not explicitly available for download they need to be extracted from a running device.
If these three packages are all available, making new roms will be easy for developers. Please co-operate to gather all of them here to be a resource for android developers.
If we could achieve this goal, I would port the Ubuntu OS for Nokia X2 and share it here with you
====
Progress:
Android source tree
No known instant or effort.
Can anyone contact to Microsoft mobile and get the Android source tree for Nokia X2 and upload it to Github?
Kernel sources
here is kernel source code for Nokia RM-1013 2.0.0.11: https://github.com/danialbehzadi/Nokia-RM-1013-2.0.0.11
Due to Microsoft mobile statement, there is no difference in kernel between 2.0.0.11 and 2.1.0.13.
DONE! :good:
Proprietary drivers
No known instant or effort.
Does anyone know how to extract it? Can anyone contact to Microsoft mobile and get them and upload it to Github?
Click to expand...
Click to collapse
Here is for proprietary https://github.com/cm-nokia-x2/proprietary_vendor_nokia_ara
for Android source tree, try to use CyanogenMod.
maybe you can help people to make the complete rebuild of CyanogenMod with full fixed from bugs
danialbehzadi said:
There is 3 packages needed for any device for an original Android development:
Android source tree, preferably the original as with OEM devices but CyanogenMod or independent ports are enough too. Aka device
Kernel sources for the device. Aka kernel
Vendor proprietary drivers, which make the GPU and various sensors work. If not explicitly available for download they need to be extracted from a running device. Aka vendor
If these three packages are all available, making new roms will be easy for developers. Please co-operate to gather all of them here to be a resource for android developers.
If we could achieve this goal, I would port the Ubuntu OS for Nokia X2 and share it here with you
====
Progress:
Android source tree
No known instant or effort.
Can anyone contact to Microsoft mobile and get the Android source tree for Nokia X2 and upload it to Github?
Kernel sources
here is kernel source code for Nokia RM-1013 2.0.0.11: https://github.com/danialbehzadi/Nokia-RM-1013-2.0.0.11
Due to Microsoft mobile statement, there is no difference in kernel between 2.0.0.11 and 2.1.0.13.
DONE! :good:
Proprietary drivers
Thanks to T4ufik_Hidayat, Here is vendor packages: https://github.com/cm-nokia-x2/proprietary_vendor_nokia_ara
DONE! :good:
Click to expand...
Click to collapse
https://github.com/cm-nokia-x2/
android_kernel_nokia_msm8610-kernel source
proprietary_vendor_nokia_ara-vendor
android_device_nokia_ara- device(boardconfig.mk, other configs)
And here is the manifest
https://github.com/cm-nokia-x2/android_local_manifest

Abandoned Alpha - Device config for FP2

Hello everybody,
I tried to build a device config for my Fairphone 2 but ended up giving it up as I didn't have enough time (and skills). I didn't even have the time to test it. I pushed the sources to my github account for anyone to continue developing:
https://github.com/kaibutsu
Sources:
oppo n3 config:
https://github.com/CyanogenMod/android_device_oppo_n3
https://github.com/CyanogenMod/android_device_oppo_msm8974-common
https://github.com/CyanogenMod/android_device_oppo_common
https://github.com/CyanogenMod/android_device_qcom_common
Fairphone 2 OSS source:
http://code.fairphone.com/
Maybe I'll pick this up at some point. Just wanted to share before it's going to be forgotten.
Thanks for sharing this! :good: How far did you get with using this device config?
There also is a cm device repo on github: keesj/cm12-device-fairphone-fp2 which claims to produce a bootable recovery. How does this compare to your configs?
best news i heard in quite a while!
Some people are trying to build a working port of Cyanogenmod to the Fairphone 2
Feel free to bring your help
https://forum.fairphone.com/t/pencil2-porting-cyanogenmod/20254?u=alexisju

Will there be a Custom Rom?

Does anyone know about this topic?
https://forum.xda-developers.com/mi-note-10/how-to/custom-development-t4018813
In short:there are same some efforts trying to get custom Roms but nothing groundbreaking yet.
I am working on the device tree right now to compile from source. Not ready yet and don't have the device in hand right now (should arrive soon) s.o. else is trying with treble images.
nchantmnt said:
https://forum.xda-developers.com/mi-note-10/how-to/custom-development-t4018813
In short:there are same some efforts trying to get custom Roms but nothing groundbreaking yet.
I am working on the device tree right now to compile from source. Not ready yet and don't have the device in hand right now (should arrive soon) s.o. else is trying with treble images.
Click to expand...
Click to collapse
I thought device tree is something that was used to be leaked from Xiaomi
As far as I can see there is no device tree published by xiaomi for tucana (our device)
Only thing we have rn is kernel source.
But we can create device tree by ourself. There are some basic guides online. Rest is compare with existing device trees for similar devices and copy&paste.
for now I have downloaded k20 device tree, removed everything k20-specific (e. G. Popup Camera) and adapt further files for our device(s)
When my handset arrives (should be today) I can start unlock procedure (should take some time to get the code AFAIK), then I can unlock bootloader, flash custom recovery and see if I can get my device to boot properly after flashing... Then comes troubleshooting.
Right now I am expecting maybe a halfway booting device or broken/missing functionality at best. But we will see
I hope soon
The more people help together the faster we can get some Roms ?
nchantmnt said:
The more people help together the faster we can get some Roms ?
Click to expand...
Click to collapse
If you have a group for this, would you pm?
No group yet, but you still get an pm
Anyone willing to collaborate is welcome to pm me as well
I have seen this Android 9 source code. Is it helpful?
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/tucana-p-oss
I thought this model would have more support and after 4 months there is no Rom. I hope that now that the price is going down more people buy it and we have more community. Thank you for what you know and develop.
ignalop1983 said:
I have seen this Android 9 source code. Is it helpful?
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/tree/tucana-p-oss
I thought this model would have more support and after 4 months there is no Rom. I hope that now that the price is going down more people buy it and we have more community. Thank you for what you know and develop.
Click to expand...
Click to collapse
Just an incomplete kernel sources, I think is useless.
https://www.xda-developers.com/poss...-fcc-certified-snapdragon-730g-penta-cameras/
There will be a lite edition soon. The only difference on hardware is number of pixels.
If its ROM is same or almost the same to current models, we should get some progress around development.
Anything new?
UtkuAblak said:
Does anyone know about this topic?
Click to expand...
Click to collapse
Please look at the existing topics first, before opening another topic!
nchantmnt said:
As far as I can see there is no device tree published by xiaomi for tucana (our device)
Only thing we have rn is kernel source.
But we can create device tree by ourself. There are some basic guides online. Rest is compare with existing device trees for similar devices and copy&paste.
for now I have downloaded k20 device tree, removed everything k20-specific (e. G. Popup Camera) and adapt further files for our device(s)
When my handset arrives (should be today) I can start unlock procedure (should take some time to get the code AFAIK), then I can unlock bootloader, flash custom recovery and see if I can get my device to boot properly after flashing... Then comes troubleshooting.
Right now I am expecting maybe a halfway booting device or broken/missing functionality at best. But we will see
Click to expand...
Click to collapse
Well, just tell me if you need help.
Same here, I am very tempted by the Note 10 but I am waiting for an aosp rom as many people complained about the stock miui rom
Any news or update on this? Would love to buy a Mi Note 10 as their prices have gone down but with the lack of development I'm kind of leaning towards the 9t even tho I'm worried about that front camera as some have had issues. I suspect not many are developing for this device because of the high price. Hopefully whoever said something up there about the Note 10 lite gets custom ROMs going with more devs
I'm still trying here but very short on time. We have some good progress on device tree thanks to someone else (thanks Hlcpereira).
nchantmnt said:
I'm still trying here but very short on time. We have some good progress on device tree thanks to someone else (thanks Hlcpereira).
Click to expand...
Click to collapse
yes he is working on this device.
nchantmnt said:
I'm still trying here but very short on time. We have some good progress on device tree thanks to someone else (thanks Hlcpereira).
Click to expand...
Click to collapse
Awesome news! Thanks :good:
I think the development goes now straight because we have MIUI Stable based on Android 10 now.
Good luck!

[ROM] [UNOFFICIAL] LineageOS 14 for Meizu M5C [MT6737m]

LineageOS (Lineage Android Distribution) members or anyone else on this website is not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in the products you find here before flashing it! YOU are choosing to make these modifications, and if you point the finger at us for messing up your device, we will laugh at you. Your warranty will be void if you tamper with any part of your device / software.
How to Install:
1- Make a backup of your important files
2 - Unlock bootloader with this guide
3 - Flash the TWRP, link here
4 - Move Rom & Gapps (optional) into device storage
5 - Full Wipes
6- Flash Rom & Gapps (gapps are OPTIONAL)
for GAPPS:
Choose Gapps Package ARM64 > 7.1 > Micro and below: visit OpenGAPPS
If during the gapps flash it gives you an error then in the TWRP terminal or on the adb shell you have to execute this command: "mkdir /tmp/bin"
Download:
Releases · XRedCubeX/android_device_meizu_m5c
Contribute to XRedCubeX/android_device_meizu_m5c development by creating an account on GitHub.
github.com
Working:
Boots
Storages
Bluetooth
Wifi
GPS - GNSS
Audio
NOT Working:
Camera
Hotspot
Offline Charging
Special Thanks
LineageOS
Moyster for device trees
Device Tree:https://github.com/XRedCubeX/android_device_meizu_m5c
Vendor Tree: https://github.com/XRedCubeX/android_vendor_meizu_m5c
Assim que possível, irei testar!
Hi Red. I was taking a look at the ROM repository on GitHub, and saw that the default branch is now named cm-13.1. So, are you now working on an Android 6.0 ROM for the M5c?
thiagosousa777 said:
Hi Red. I was taking a look at the ROM repository on GitHub, and saw that the default branch is now named cm-13.1. So, are you now working on an Android 6.0 ROM for the M5c?
Click to expand...
Click to collapse
I have a slight indecision, now I can not carry on the Custom ROM because I do not have the right PC but when I am able to compile it, I will evaluate which one can work better
XRed_CubeX said:
I have a slight indecision, now I can not carry on the Custom ROM because I do not have the right PC but when I am able to compile it, I will evaluate which one can work better
Click to expand...
Click to collapse
I see. I would say that in the long run Lineage 14 would be more worthwhile, since Android 6.0 is becoming outdated, with no support for some apps. But really, I just wanted a ROM to replace Flyme, and its bugs. Also, many of the apps I use don't work, or don't work right on Flyme...
These days I was taking a look at /e/ OS. I've been thinking about venturing into porting this ROM to the M5c. For me it would be a challenge, since I've never done this before. But unfortunately at the moment I also don't have a PC that meets the requirements to compile the ROM
thiagosousa777 said:
I see. I would say that in the long run Lineage 14 would be more worthwhile, since Android 6.0 is becoming outdated, with no support for some apps. But really, I just wanted a ROM to replace Flyme, and its bugs. Also, many of the apps I use don't work, or don't work right on Flyme...
These days I was taking a look at /e/ OS. I've been thinking about venturing into porting this ROM to the M5c. For me it would be a challenge, since I've never done this before. But unfortunately at the moment I also don't have a PC that meets the requirements to compile the ROM
Click to expand...
Click to collapse
I find it useless, just use lineage without gapps and it will be better than /e/, then anyway I don't know where to find the manifest
XRed_CubeX said:
I find it useless, just use lineage without gapps and it will be better than /e/, then anyway I don't know where to find the manifest
Click to expand...
Click to collapse
You are right. However, /e/ has some nice features like e account synchronization, an app store, microG, and some of their apps... Of course we could get that with LineageOS, but it is interesting how /e/ already brings that well integrated and ready.
By the way, I am also looking at other non-Android systems, like Ubuntu Touch...
thiagosousa777 said:
You are right. However, /e/ has some nice features like e account synchronization, an app store, microG, and some of their apps... Of course we could get that with LineageOS, but it is interesting how /e/ already brings that well integrated and ready.
By the way, I am also looking at other non-Android systems, like Ubuntu Touch...
Click to expand...
Click to collapse
Ah beautiful those non-android systems yes, unfortunately we have to forget them because of the prebuilt kernel and unavailable sources
XRed_CubeX said:
Ah beautiful those non-android systems yes, unfortunately we have to forget them because of the prebuilt kernel and unavailable sources
Click to expand...
Click to collapse
Well, from what I've been reading the process is similar to porting LineageOS. You just need the kernel sources and the device specific binary blobs. I'm guessing you know how to get them, don't you?
And the interesting thing is that there is a layer, called Halium, that interacts directly with the hardware. And that is actually what you should port to the desired device. Then you can install any Linux system on top of this layer, like Ubuntu Touch, Plasma Mobile, etc, and these are distributed pre-compiled.
thiagosousa777 said:
Well, from what I've been reading the process is similar to porting LineageOS. You just need the kernel sources and the device specific binary blobs. I'm guessing you know how to get them.
And the interesting thing is that there is a layer, called Halium, that interacts directly with the hardware. And that is actually what you should port to the desired device. Then you can install any Linux system on top of this layer, like Ubuntu Touch, Plasma Mobile, etc, and these are distributed pre-compiled.
Click to expand...
Click to collapse
Mhh ... good, you are informed, however the vendor blobs are bull**** to take, the problem is the kernel sources but Meizu has not released them. However, some time ago I booted a Custom kernel based on ALPS (A custom AOSP from Mediatek to be clear) but the touchscreen doesn't work and I'm looking for a solution around but that I can't find
P.S: Fixing that kernel has great potential, forget android 7, you could also boot android 9 with sources, but as long as they are still working
XRed_CubeX said:
Mhh ... good, you are informed, however the vendor blobs are bull**** to take, the problem is the kernel sources but Meizu has not released them. However, some time ago I booted a Custom kernel based on ALPS (A custom AOSP from Mediatek to be clear) but the touchscreen doesn't work and I'm looking for a solution around but that I can't find
P.S: Fixing that kernel has great potential, forget android 7, you could also boot android 9 with sources, but as long as they are still working
Click to expand...
Click to collapse
I confess I didn't quite understand one thing: so how did you port LineageOS to this device? You didn't need the kernel sources?
thiagosousa777 said:
I confess I didn't quite understand one thing: so how did you port LineageOS to this device? You didn't need the kernel sources?
Click to expand...
Click to collapse
At the time I was doing this lineage, I was with the prebuilt kernel, week ago I had done this kernel port to a twrp and the touch was not working so I left the device alone
XRed_CubeX said:
At the time I was doing this lineage, I was with the prebuilt kernel, week ago I had done this kernel port to a twrp and the touch was not working so I left the device alone
Click to expand...
Click to collapse
Thanks for the clarification! It is a shame that Meizu does this (I wonder if they are not violating the terms of the Linux GPL license by distributing the kernel without publishing the modifications made to the source code).
Anyway, if a solution to this kernel problem related to the touch screen comes up, please let me know. In the meantime I'll keep reading Halium's documentation until a solution comes along, or until I get a compatible phone.
Great work!
Hello. I've been testing this ROM on my M5c and love it. The ROM is very good, fluid, lightweight... the only problem is that the camera doesn't work, as well as the cellular network data. Congratulations for the excellent work.
The ROM will no longer receive bugfixes?
pls compile
publish a release

General [info] Xiaomi 13 (fuxi) Open Source Kernel and Lineage Device Tree

Hi all,
For those of you, like me, who are interested in learning more about developing for custom ROMs, the following links will be helpful for finding .
First is the inclusive list of open source kernel releases by Xiaomi: https://github.com/MiCode/Xiaomi_Kernel_OpenSource
At the bottom of said list is the Xiaomi 13 (fuxi).
Second is the device tree (based on Lineage OS and said to be WIP) by YuKongA: https://github.com/YuKongA/device_xiaomi_fuxi
What is the primary difference between official xiaomi 13's device tree https://github.com/MiCode/kernel_devicetree/tree/fuxi-t-oss and https://github.com/YuKongA/device_xiaomi_fuxi ?
YuKongA's contribution is for Lineage OS, or instead of MIUI it's AOSP. I think.
To give additional information, the Lineage-derived device tree likely originates from: https://github.com/imasaru/android_device_tree_template
Also, the kernel includes a lot of stuff for the hardware and is accompanied by a kernel device tree, which is a kind of 'table of contents' (unless I'm mistaken about the analogy).
"The 'Open Firmware Device Tree', or simply Devicetree (DT), is a data structure and language for describing hardware."
Linux and the Devicetree — The Linux Kernel documentation
I imagine a lot of compatibility issues are lining up the system image and the kernel+device tree.
...
(At this point, I'm really just spouting off some things as I'm learning, so feel free to correct or ignore me as I'm going along!)
Aquariuslt said:
What is the primary difference between official xiaomi 13's device tree https://github.com/MiCode/kernel_devicetree and https://github.com/YuKongA/device_xiaomi_fuxi ?
Click to expand...
Click to collapse
1/Xiaomi Kernel OpenSource
2/Xiaomi fuxi prebuilt
Veiranx said:
To give additional information, the Lineage-derived device tree likely originates from: https://github.com/imasaru/android_device_tree_template
Click to expand...
Click to collapse
You can find older ones.

Categories

Resources