What are the first steps to develop ROM's for a "forgotten" device? - Android Q&A, Help & Troubleshooting

I bought a Xperia C, a fairly popular model here in Brazil, but I just found out that it's bootloader was locked until some months ago, when Sony decided it was time to let people unlock it.s bootloader.
But now I see the phone has never receveid an update after Jelly Bean 4.2.x and no Custom ROM was ever developed for it (all ROM's that I found are just themed versions of the OEM 4.2 Jelly Bean).
So I decided that maybe I could build CM or AOSP for this device but after reading about the process I discovered that there's no device tree or vendor or kernel info available anywhere for this device.
I think this is all because Sony allowed the bootloader to be unlocked just now the phone is discontinued, so the possible developers this phone had moved away from it too quickly...
It's a shame, because it's indeed a good device, but it's stuck in a old firmware because of Sony's lack of support - same thing happened to the Xperia SP, another excellent device, which at least had an unlocked bootloader which allowed a lot of Custom ROM's to be developed.
So, I wish to know if there's any salvation for this device or if I should give up on it...
PS: I am a software developer, but I don't understand anything about android or Java. I'm willing to learn and develop ROM's for this device with someone's else help... I'll just need to find time to do that...

if your bootloader is unlocked the first step is compile a custom recovery, normally twrp that you can find tutorials in here. the kernel source code is always provided because of the linux open source license, I'm on the cellphone so I cant post links but search for the twrp compiling guide in here. i hope this helps

Related

[Q] how to port ics (serious learner)

Lemme get some things out of the way.. I am a noob. I have searched. I have read some of the results from the search. I am overwhelmed by the 20+ pages of results (lol). I am not 100% sure this is the correct forum for this (not sure where else would be ).. I believe this is one of those things where I need help based on my situation.. Ok, so here I go.
I wish to start porting ICS to my phone. That's my goal. I have general understanding of how linux works, but I do not know much about the android specifics of how they work, or what needs to be modified for this to work. I do not plan to use the kitchen tool as I wish to learn this the hard way. I believe this will help me become more understanding in what I am doing. However, at this point I don't and that's why I'm here. My phone model is irrelevant almost because its prepaid and usually the communities don't even recognize their existence.. at least that's how I feel about it. But I digress. My phone is the zte warp by boost mobile and I am here to learn hopefully the things that will get me started on porting ICS to this phone. I right now believe that the best thing for me to learn is how the android related files work because as it is, I only looked at guides on how linux works and I understand most of it. I'm not sure that's the best thing that will help me port ics, but I'm certain it is important.
Please help me figure out where I should start in learning how to port ICS to my phone basically.
Thanks XDA
anyone? I am quite serious about wanting to do and go into this but I have yet one thread that anyone's ever replied to.. (or post iirc) which puts a damper on me
Snake X said:
Lemme get some things out of the way.. I am a noob. I have searched. I have read some of the results from the search. I am overwhelmed by the 20+ pages of results (lol). I am not 100% sure this is the correct forum for this (not sure where else would be ).. I believe this is one of those things where I need help based on my situation.. Ok, so here I go.
I wish to start porting ICS to my phone. That's my goal. I have general understanding of how linux works, but I do not know much about the android specifics of how they work, or what needs to be modified for this to work. I do not plan to use the kitchen tool as I wish to learn this the hard way. I believe this will help me become more understanding in what I am doing. However, at this point I don't and that's why I'm here. My phone model is irrelevant almost because its prepaid and usually the communities don't even recognize their existence.. at least that's how I feel about it. But I digress. My phone is the zte warp by boost mobile and I am here to learn hopefully the things that will get me started on porting ICS to this phone. I right now believe that the best thing for me to learn is how the android related files work because as it is, I only looked at guides on how linux works and I understand most of it. I'm not sure that's the best thing that will help me port ics, but I'm certain it is important.
Please help me figure out where I should start in learning how to port ICS to my phone basically.
Thanks XDA
Click to expand...
Click to collapse
From my limited knowledge, I think it is a huge task undertaking, you can download Android source code from Google, the hard part will be the device driver development and porting for Linux kernel (and maybe portion of Android). If you are lucky, you can use the existing phone bootloader (or you have to port one). Understanding the inner of the phone (different chip set may need different device driver) will be another challenging task.
by the device driver development, you mean all the libs that go into the phone? Couldn't I just copy/paste the pre-existing libs that are already made for the phone? Also the phone im working with is a bit strange really.. noone has been able to compile the kernel from its source and get it to boot yet.. when it was compiled the zImage was different than that of the stock one.
And yeah, I have downloaded the aosp source.. I just need to know where to start at and the processes involved really
Snake X said:
by the device driver development, you mean all the libs that go into the phone? Couldn't I just copy/paste the pre-existing libs that are already made for the phone? Also the phone im working with is a bit strange really.. noone has been able to compile the kernel from its source and get it to boot yet.. when it was compiled the zImage was different than that of the stock one.
And yeah, I have downloaded the aosp source.. I just need to know where to start at and the processes involved really
Click to expand...
Click to collapse
To answer you question no the drivers and lib files are different for aosp based rooms then they are for the stock OEM from. The first step will be to get a working kernel. Without anything you do will be pointless
I'm somewhat interested in the same thing, and from what I've gathered, you'll need to do these things to begin ROM development:
1. Read every page on the AOSP site and grab a copy of the AOSP source. It probably wouldn't hurt to read the regular Android developer wiki as well.
2. Learn about Linux driver development:
http://lwn.net/Kernel/LDD3/ (this is apparently considered THE BOOK on Linux driver development)
http://www.freesoftwaremagazine.com/articles/drivers_linux
3. Learn pretty much every detail about your phone and its hardware, especially when it comes to how ROMs are installed on it. For example, my phone (the Droid X2) has a locked bootloader, so 2nd init has to be used to boot new ROMs, and this makes it so that we cannot update the kernel.
You can usually find this sort of information on your phone manufacturer's website. Sometimes they even post the source code to their phone's drivers, which is helpful.
4. Look at other ROMs (preferably for your phone) and see how they work. The source code is freely available for most popular ROMs.
For example: CyanogenMod keeps their source code in a public git repository: https://github.com/cyanogenmod
5. Get to work on porting!
I would highly recommend starting with something smaller, however, just as a start. One good jumping-off point is probably this guide: http://forum.xda-developers.com/showthread.php?t=1272270
If any part of this was wrong, or if I left something out, somebody feel free to correct me, I'm still a noob.
Thank you so much for your direction, however,, android kitchen.. im not sure about that because isnt that only ment for htc devices? My phone is made by zte
what device do you even have?
if it's stuck officialy on 2.1 or 2.2 there's no hope that if you even port it that it'll work
its the zte warp from boost mobile (prepaid). Btw if I compile an aosp ics launcher and put that on my phone whats the chances of that working?
edit: it uses 2.3.5
Well Sebastian responded on android forums, apparently zte is very bad at version control with their kernel sources. So when they complete one project, they use the same source for the next project, and what they release could be for anything. Apparently the blade source had the same issues, it took him a while to get them to correct the source
Sent from my N860 using Tapatalk
Yeah I noticed that there were ppl saying there were things similar but I'm not sure what will work or what won't.. guess its time to start a petition on zte to release the source code lol
edit: seems like zte's bein a bad company and violated the GNU GPL license for not providing a complete source code.. I compiled an email and sent it to someone who can proof read it and send it to the right person for this kinda thing.. danggit zte

Development of Ubuntu Touch for Xperia Z2

Hello.
I am very keen in getting the Ubuntu Touch ported to my Xperia Z2 phone. Obviously, I'll need all the help and guidance possible.
What I currently have? developer.ubuntu.com/en/start/ubuntu-for-devices/porting-new-device/
I'm using the official porting guide as checklist. Below are what I have accomplished so far with the guide
Setup my Development Environment
Have built for Nexus with success to see if my environment is up and running (the building threw no errors, so I assume it "works", since I have no means of testing because I don't have a nexus handset)
I have added repos regarding under how to enable a new device.
I have done the first part of the Device specific changes using the check-config script, the _defconfig file in the kernel (this is Sony Xperia Z2 kernel: CyanogenMod/android_kernel_sony_msm8974 , right?)
When I did the build ( just to test so far what I've done ) I got the error that, its using the pre-compiled kernel, or something like that.
Now my questions:
How do I tell it which kernel to use, and where?
Where is the pre-compiled kernel and which is the precompiled: the one from the vendor/ (which I got from extracted binary from sony official) OR the /kernel/sony/msm8974 ?
I've gone looking around to see if I could perhaps follow the pattern used in the porting to the Xperia Z, since they're in the same series. Yet, I hardly could follow what exactly the 'porter' did. I was interested in finding answers to the 'What?', and 'Where?' of the porting done, but couldn't get solid answers.
I ask this here with the hope that, a developer who's been through the porting process will be able to offer assistance. I've been in touch with Mamenyaka, and along the lines, he'll be assisting too. But since he isn't available all the time, I ask this here.
Concerning the above list of questions, please, any assistance will be appreciated.
Its understandable, yet unfortunate, that the official ubuntu porting guide has been made to be so broad and so generic its hard to streamline what it says with a specific device. With this thread, I hope to get very specific instructions precisely tailored to the Xperia Z2 and to accommodate being extensive, instructions for the Z line series.
thanks
EDIT: my error log so far pastebin.com/Wax18UFK
seanmavley said:
Hello.
I am very keen in getting the Ubuntu Touch ported to my Xperia Z2 phone. Obviously, I'll need all the help and guidance possible.
What I currently have? developer.ubuntu.com/en/start/ubuntu-for-devices/porting-new-device/
I'm using the official porting guide as checklist. Below are what I have accomplished so far with the guide
Setup my Development Environment
Have built for Nexus with success to see if my environment is up and running (the building threw no errors, so I assume it "works", since I have no means of testing because I don't have a nexus handset)
I have added repos regarding under how to enable a new device.
I have done the first part of the Device specific changes using the check-config script, the _defconfig file in the kernel (this is Sony Xperia Z2 kernel: CyanogenMod/android_kernel_sony_msm8974 , right?)
When I did the build ( just to test so far what I've done ) I got the error that, its using the pre-compiled kernel, or something like that.
Now my questions:
How do I tell it which kernel to use, and where?
Where is the pre-compiled kernel and which is the precompiled: the one from the vendor/ (which I got from extracted binary from sony official) OR the /kernel/sony/msm8974 ?
I've gone looking around to see if I could perhaps follow the pattern used in the porting to the Xperia Z, since they're in the same series. Yet, I hardly could follow what exactly the 'porter' did. I was interested in finding answers to the 'What?', and 'Where?' of the porting done, but couldn't get solid answers.
I ask this here with the hope that, a developer who's been through the porting process will be able to offer assistance. I've been in touch with Mamenyaka, and along the lines, he'll be assisting too. But since he isn't available all the time, I ask this here.
Concerning the above list of questions, please, any assistance will be appreciated.
Its understandable, yet unfortunate, that the official ubuntu porting guide has been made to be so broad and so generic its hard to streamline what it says with a specific device. With this thread, I hope to get very specific instructions precisely tailored to the Xperia Z2 and to accommodate being extensive, instructions for the Z line series.
thanks
EDIT: my error log so far pastebin.com/Wax18UFK
Click to expand...
Click to collapse
Hello,
if you are still working on this project:
Your Problem was not that you used the prebuilt kernel, your problem was that the script doesnt use mkabootimg correctly. For sony device you have to use another command.
Friend i would love to see ubuntu on my z2
share a link which may be helpful
https://wiki.ubuntu.com/Touch/Devices/minato

Becoming Android ROM developer

I am really confused! I went through a lot of threads and forums. Unfortunately i can't get some of the concepts....
Can someone give me a roadmap on how to get started with compiling android roms(not custom roms)
How do OEMs like Samsung, HTC compile their ROMs??? I mean where do they learn that the particular process should be done this way regarding Android firmware???
In Repo Sync, is it possible to pause and resume that huge download? If i want to reinstall linux, is it possible to backup that 30-40GB download???
I have Asus Fonepad 7 and has kernel sources here: http://www.asus.com/support/Download/28/7/0/7/K0zj5cW6VJEzTjQR/32/ My question is am i able to create stock Android ROMs like those in Nexus devices and fastboot images for flashing on to this device??? Also do x86 devices have a different way of compiling ROM???
I want to do things the original official way... Please help me, I am very eager to learn!!!
I would be more than happy if someone could help!!!

Why there is no custom rom?

First of all, before you can get mad at me because you think im requesting for a custom rom but im not. It's just i thought in the first place that Sony was more supportive of unlocking bootloader, rooting, things like that than Samsung because they(sammy) developed KNOX a long time ago to harden phone security and against to rooting.
Now i feel like it's sammy was the supportive one because comparing the custom rom development, i feel that in sony it is lesser.
So someone could explain what is the wall in custom rom development, is it the lack of sources of binary blobs or device drivers to get it working (yah because, mostly in our tab forum, the rom is sometimes not stable because of lack of binary blobs mking the rom not working camera, no sim card or even cannot detect radios). Or maybe that is the bootloader that sony programmed to doom every uncertified pieces of software installed on a device.
Just asking ✌

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 !

Categories

Resources