Custom ROM Guide? - Android Q&A, Help & Troubleshooting

Hi all,
I was just wondering if anyone can point me in the direction of an up to date guide on how to create a custom ROM? I have searched, but can only seem to find ones from several (2013,14) years ago - are these still usable? Or is there anything better that I should be looking at?
Many thanks
Ben

@bendonahue
The process of creating a Custom ROM is always the same.

@jwoegerbauer
Thanks - So forum.xda-developers.com/showthread.php?t=2195858 would still be valid then, even though its from 2013?
Thanks
Ben

@bendonahue
This Google doc - also valid for Custom ROMs - is from 2020:
https://source.android.com/setup/build/requirements

There is a YouTube video that helps get the process if a device tree started and I can help to extract OEM blobs out of /vendor to get that started. As long as you have the kernel sources then your good

0

you can try this guide : link

Related

[Q] Building android for my device?

Hello everyone!
I'm new to this forums, although i'm not new to android. I've been researching android for a long period now but only lately, wandering in the source code, etc.. But only lately, i've started messing around with the concept of flashing my device with costume ROMs and finally, with my own built system image.
I've been looking for some time on different tutorials and stuff, but yet, I don't seem to get a full grab over the idea of building the system for a costume device. So i want to ask you guys..
I have the source code that i downloaded from google. What measures do i have to take in order to make it compatible with my device and be able to flash the compiled system image to my device?
Sorry if i posted in the wrong forum, this is my first time here..
Thank you!

any devs who can create aosp 8

Saw it on Sony development Web yesterday...it will be awesome if any developers can make a fully functional rom
Well, haven't you seen the 7.1.1? The dev is still working on it, and the next build will be on O. We're working on it now. We have a channel for the news - https://t.me/joinchat/AAAAAELTVKqh1eeAesWWXw.
p.s. Thread must be deleted now, IMHO.
Thumbs-up to kamil ochman and other devs for your great work
To do list
https://gist.github.com/bartcubbins/69d44e166b529de192f2621b498f8030
What? Me?
Hi,
I downloaded the AOSP sources from Sony the other night to build a barebones from for my Z3. However, the Leo wasn't in the device tree, but what I did see were options for the E2303 & E2333. This was for 8.0.0 OPR3, mind you, so is an Oreo.
I was successful in building the images required for flashing, however the kernel fails to boot due to missing DTB. I am currently attempting to fix this so that the boot.img will boot and hopefully have a working Oreo for our M4. The inline kernel fails, so if anyone with skills in this particular area would be greatly appreciated. I'm not a developer, merely a tinker with determination. I am currently trying different patches seen on github for tulip, however no matter what I do I can not get the missing DTB into boot.img.
Dutch Burdock said:
I was successful in building the images required for flashing, however the kernel fails to boot due to missing DTB. I am currently attempting to fix this so that the boot.img will boot and hopefully have a working Oreo for our M4. The inline kernel fails, so if anyone with skills in this particular area would be greatly appreciated.
Click to expand...
Click to collapse
Write me in PM as quick as possible, we have a team of devs, and your help will be appreciated)

Need help to start Android Engineering

I am completely new to Android Engineering and want to learn it. Till now, I have tried building aosp oreo from repo. It is built successfully but I don't know about the use of all the folders that are downloaded by the repo. What is the use or importance of each folder in repo? Where can I learn more about this?
I have also modified my stock firmware (only removed some bloatware apps) and rebuilt the firmware. I haven't installed it yet. I used android kitchen which helped me with signing the zip but I am afraid the signature might be for testing and not the official vendor signature. I have phone with unlcoked bootloader but it's still on stock recovery. According to my knowledge, unlocking bootloader helps us to flash unofficial files but people at XDA say that we should also have custom recovery to flash custom ROMs. Should I flash the modified ROM built by me in device with stock ROM and unlocked bootloader?
My device doesn't have official TWRP support. How can I port recovery or build it from scratch for my phone?
Also, I have only modified stock ROM and need to learn porting ROMs like porting MIUI for my device. How can we port ROMs?
Sorry for asking all these at once but I tried getting answer one after another which confused me a lot. I am a noob in this field.
I read XDA thread of TWRP developer which included a guide on how to build TWRP for any device. But as the author said, that post wasn't for noobs. Maybe I need to learn a lot before I reach that level of understanding. But I don't know what to learn and from where. Please help..
And one last thing - What is a device tree? Or vendor tree? I saw these words many times when I was trying to understand the above things. But I still don't know what these are and Google doesn't help. Thank you everyone..
Hi
there is this section here https://forum.xda-developers.com/android/software
you`ll find some sticky threads of the top with plenty of info , have a look !
you may also use search and type XDA University , it will reveal also some useful links
Good luck !

Question Where to start building a working twrp and/or roms for moto g power 2021 (borneo)?

Hello all, where would I start in making a working twrp for this phone?
Does anyone know if Motorola has released the device tree/source code for this phone so we can make the roms? LineageOS would be ideal.
Well, I have the same phone. Couldn't find ROMs for it.
thebestofall007 said:
Hello all, where would I start in making a working twrp for this phone?
Click to expand...
Click to collapse
look in this forum here, there are a couple floating around for it, I've made one, that I was able to fully flash to mine and has touch (Android 10. there's another that is 11 on here too by another poster), but as there are multiple display options out there it seems for how they were made, that is the sticking point, as not all will behave properly when booted into a recovery like mode it seems. I have tried installing it over bootloader and it will have touch then, but when flashed to recovery the touch never activates properly. So it all likely comes to that, as we'll need combine them in, properly applying proper checks for each display type and having it use the proper driver files, since can't load them all at once or it breaks things.
Working shrp for Borneo
thebestofall007 said:
Hello all, where would I start in making a working twrp for this phone?
Does anyone know if Motorola has released the device tree/source code for this phone so we can make the roms? LineageOS would be ideal.
Click to expand...
Click to collapse
First place to start: twrpdtgen
Read the "readme"
Also check out:
[DEV]How to compile TWRP touch recovery​
Device tree made from A10. Should still be relevant for A11.
Kernel for A10. Unfortunately I don't think Moto released the one for A11 yet. You can ask on their GitHub and devs might consider your request.
TWRP for A11. Touch is working.
Edit : here's a link for the device tree (in text) from A11
maybe this will work
thebestofall007 said:
Hello all, where would I start in making a working twrp for this phone?
Does anyone know if Motorola has released the device tree/source code for this phone so we can make the roms? LineageOS would be ideal.
Click to expand...
Click to collapse
maybe this will help probably https://github.com/MotorolaMobilityLLC/kernel-msm
UPDATE: I have a telegram account where we are discussing how to make a custom lineage OS. I'm at the gathering stage and in the process of porting a device tree. For starters I want to start with lineage OS 18 because its the same android version the stock OS is, to be on the safe side, and that I've never done ROMS before.
Moto G Power 2021
I now have a device tree with the help of AOSPdtgen from the stock ROM from mirrors.lolinet: https://github.com/thebestofall007/android_device_motorola_borneo
I have started the build and got the first error:
https://imgur.com/a/XZoqy8B
I've looked this error up and they say it's because of the ram, but the error recurs at the same point. I have 16gb of swap, too.
thebestofall007 said:
I have started the build and got the first error:
https://imgur.com/a/XZoqy8B
I've looked this error up and they say it's because of the ram, but the error recurs at the same point. I have 16gb of swap, too.
Click to expand...
Click to collapse
you need alot of ram to build a rom for android 36GB of RAM or more will be beater to it wont crash
KILLFIREY1389 said:
you need alot of ram to build a rom for android 36GB of RAM or more will be beater to it wont crash
Click to expand...
Click to collapse
The error turned out to be entries in the proprietary-files.text file that needed to be deleted.
@thebestofall007 If you'll suceed. please take in consideration to build \e\ (aka deGoogled Lineage) too.
Here's a couple of interesting links that may help:
https://doc.e.foundation/support-topics/build-e
https://community.e.foundation/t/howto-building-e-roms-a-beginners-guide/26371
Last but not least, we've also suggested them (check here) to setup a "build (V)Machine" by modding this colab notebook to made it device agnostic:
https://github.com/viam1-dev/colab_lineage_build
Hope can "inspire" you.
Thanks in advance.
Does anyone have a complete list of sources so far? I have some experience in the past building ROMs for Android 5 and I wouldn't mind trying. I have a lot of computer resources to dedicate to building as well.
Device tree: https://github.com/thebestofall007/android_device_motorola_borneo-old
Does anyone know if there is a kernel source? I looked on the Moto github and couldn't find one. Is everyone using prebuilt for the time being? Also, do we need a vendor tree?
Thanks

Question [Custom AOSP] Installing Pixel 6

Hello all,
Im newbie in the site and also in Android AOSP.
I would like to know if is possible:
I have a AOSP X86 Emulator and I made some changes in HAL . So I desire to test in a Pixel 6 . i believe that I need to install the custom ROM.
Some Steps that I identified.
1- Convert my X86_64 AOSP Android 12 Custom ROM => ARM.
2- De-activate BootLoader .
3- Flash my Pixel 6.
Would you help me if these steps are correct?
I have no idea where to start. Any suggestion to tacke the task is well apreciated.
Thanks a lot
Convert? I'm not sure that is the right word here, though I know it can be done if you have the source code. In essence you would be compiling with ARM as the target processor instead of x64. From there your steps are essentially correct, though I would take steps to ensure you can recover from a problem prior to unlocking the bootloader and flashing the ROM.
Thanks a lot for your reply!. Sorry to bother again.
In my case I did some changes in HAL AOSP Master X86_64 and I've tested in Cuttlefish Emulator (aosp_cf_x86_64_phone-userdebug).
If I didn't misunderstand, what you suggest firstly is to compile, Im a little confused in which I have to use:
lunch:
1-armv8-eng
2-aosp_arm64-eng
3-aosp_cf_arm64_phone-userdebug
4-aosp_oriole-userdebug ->( I guess this one).
and then continue with the steps detailed above.
Many Thanks for your help!
@Palinamarne And I wouldn't be able to tell you which one to use. My days of tinkering that deeply beneath the hood of Android are long since behind me.
@Strephon Alkhalikoi No problem! I'll play around a bit and put the details here. Thank you very much for your help.
Were you able to run this custom aosp build in an emulator?

Categories

Resources