Is kernel development for our beloved v10 as simple as building any other kernel? I just want a quick answer so i can try to learn to build a kernel just to do so in my free time and can anyone give suggestions and or links to what would be needed in order to get started.
Things I know that are required:
-linux (most likely will use FWUL, so if i brick i should be able to restore)
-toolchain for kernel compilation
-phone
-usb cable
Things to figure out:
-sources
-how to make a flashable zip when done(if i ever get to complete such a task)
-help from anyone with knowledge to share is welcome
p.s. does this thread belong here or general?
Related
Hi. I would like to learn how to develope and port kernels..
Before anybody starts posting guides, I know how to download a kernel source add a few tweaks and compile. But I do not know how to port kernels. Or make cyanogen or AOSP kernels..
So my question is, are there any guides I can read, That will help me get started.
I also understand that I won't get a specific guide I just want a general guide to help me get started.
gmillz said:
Hi. I would like to learn how to develope and port kernels..
Before anybody starts posting guides, I know how to download a kernel source add a few tweaks and compile. But I do not know how to port kernels. Or make cyanogen or AOSP kernels..
So my question is, are there any guides I can read, That will help me get started.
I also understand that I won't get a specific guide I just want a general guide to help me get started.
Click to expand...
Click to collapse
There is no general guide, or any specific how to for merging code to build a aosp kernel. You get the kernel source for HTC for example, then compare that kernel with either an aosp kernel with a comparable type, or look at the aosp devices and merge things are remove them until you have a kernel that can boot in aosp. Then you start tweaking and tweaking until the kernel is stable.
lithid-cm said:
There is no general guide, or any specific how to for merging code to build a aosp kernel. You get the kernel source for HTC for example, then compare that kernel with either an aosp kernel with a comparable type, or look at the aosp devices and merge things are remove them until you have a kernel that can boot in aosp. Then you start tweaking and tweaking until the kernel is stable.
Click to expand...
Click to collapse
Thank you. That gives me a better understanding.
Sent from my captivated jelly beans. waiting on my skyrocket to get back from its space journey.
First a short question. What is the device configuration.(For example:https://github.com/TeamICS/android_device_htc_heroc) Which information does it contain? I don't think it's the whole Rom, but they update it, change stuff and so on?
Now my actual question:
I want to port a Kernel+System on an unsupported device.
Where do I have to start. Is there a difference between building it from source or port one from a similar device? Is one solution slower, more complicated or anything? There are many tutorials for porting, just bundle a system with a working kernel, but what to do if I want to have the Kernel also?
How do I extract the Device Proprietary Files without an github of the device?
Links, short explanation of the steps or anything else would be helpful.
I am sorry if this post seems to be ill informed, but I am searching and searching and can't find really helpful information..
chaoskoch said:
First a short question. What is the device configuration.(For example:https://github.com/TeamICS/android_device_htc_heroc) Which information does it contain? I don't think it's the whole Rom, but they update it, change stuff and so on?
Now my actual question:
I want to port a Kernel+System on an unsupported device.
Where do I have to start. Is there a difference between building it from source or port one from a similar device? Is one solution slower, more complicated or anything? There are many tutorials for porting, just bundle a system with a working kernel, but what to do if I want to have the Kernel also?
How do I extract the Device Proprietary Files without an github of the device?
Links, short explanation of the steps or anything else would be helpful.
I am sorry if this post seems to be ill informed, but I am searching and searching and can't find really helpful information..
Click to expand...
Click to collapse
First off what device do you have?
This link might be helpful
How to Port Android to Another Device
Now in regard to your questions i'll do my best to answer them best I can. The device configuration think of it as a fingerprint every fingerprint is unique (Although some a very similar), basically when building from source is tells the build what device you want the version of android your compiling to run on. They update and change the device configuration to reflect changes in the different versions of Android (Going from Gingerbread to ICS for example). Porting Kernels is not easy if you don't know C, things about embedded systems, basic Linux knowledge, among other skills but take a look at Guidance regarding Kernel porting, and what do you mean by port system? Here is a basic place to start for kernels AOSP Building Kernels and Building Your First Kernel. Yes their is a difference between porting a kernel and building from source, porting implies taking a kernel from device A and porting it to device B, while building from source means your building directly for device A. Porting in your case is probably going to be harder then building from source. If you want to have the kernel also again you have to modify it to run on the device you are porting it too. To extract proprietary files you have to hook your device up to your computer, turn on usb debugging, and using ADB run these commands:
Code:
cd ~/android/system/device/motorola/sholes/ # Replace Motorola and Sholes with your vendor such as HTC, Samsung, etc. and your device codename
Then run:
Code:
./extract-files.sh
Look at this guide for more info Compiling ICS from Source. Hope this helps you in some way :good:.
Hi,
I know there are a lot of guides out there but you still might want to read it
What are the different things I need to know ?
Well you will hear three terms very often. Baseband, Kernel and the ROM. Lets see what they are.
Baseband :
A firmware to drive the radio (2G/3G) chipset in your phone. Most of the time you don't need to bother thinking about it. But you might need to upgrade this firmware in order to get optimum performance. Just think of it as something you won't need to apply unless explicitly specified. For you xperia neo v, you can find out the baseband version by going into phone info and looking up baseband version number. I have not flashed any baseband. I recommend if you have not rooted/flashed your phone, install the official sony update you'll get the latest baseband without any troubles, this is what I did. Although if you need to flash it, there are very many tutorials available on this forum. You can check out the flashtool androxyde . github . com / Flashtool (sorry for the spaces in the links. I can't post outside links because of some forum rules which don't make any sense whatsoever)
Kernel:
This is the Linux (android) kernel image that drives all the hardware. Always install (flash) the recommended kernel for any ROM. Installing kernel and ROM is an absolute must.
ROM:
This is the actual thing you see running on your phone. It consists of the modified android source, user interface tweaks, the apps and some under the hood modifications done by the ROM developer for ex. cyanogenmod.
Now lets setup you linux (ubuntu) install fo installing a custom ROM on your phone.
Follow this wiki : wiki. cyanogenmod. com / wiki / Howto:_Install_the_Android_SDK
Don't forget to setup Udev by making a file /etc/udev/rules.d/51-android.rules with contents as
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
now restart your udev daemon by running "sudo restart udev".
Now yo have the necessary kernel and ROM flashing tools at your disposal. I am going to tell you how to achieve a fast and very battery efficient cyanogenmod install.
1) Download CM9 ROM and gapps(for google apps) from here
ROM: download. cyanogenmod. com /get / jenkins/4630/cm-9.0.0-RC2-haida.zip
Gapps: cmw. 22aaf3. com/gapps /gapps-ics-20120317-signed.zip
Copy these two zips to your phone's sd card.
2) Download night elf's kernel for cyanogenmod 9 from here mediafire. com /?nm7g0zid8aazfl1
3) Follow this guide wiki. cyanogenmod. com/wiki/Sony_Ericsson_Xperia_Neo:_Full_Update_Guide
But instead of flashing the kernel inside the zip, flash the night elf's kernel (just provide the path to night elf's kernel instead of the ROM's boot.img).
4) As told in the link given in above step flash both the zips. Before flashing you may also clear the Dalvik cache by going into advanced options in the recovery menu.
5) Reboot your phone. Don't turn off the GPS !!! There is a bug in CM9 RC2 which results in substantial hit on battery life. Just let it be. Anyways the GPS antenna is turned off unless any application is using it.
I am having approx more than two days of battery life with light/moderate usage (No data connection, occasional wifi).
CM9 may not be the best looking ROM. But I can assure you nothing beats it in the performance and the default setup (its very sane !!! No need to change anything at all). Also I only trust cyanogen community with all my very personal information (its my phone, it has everything !! ). If you need eye candy more and are comfortable with taking privacy risks, you may try MIUI and the dozens more ROM in the thread. I am not trying to offend anyone, its just my opinion, feel free to call me paranoid.
Always keep in mind that there are no stupid questions only stupid answers Ask away !!
I wish you a free and serene future.
I am however more interested in using the source code provided by Sony with AOSP and compiling the system image by myself.
I know how to compile AOSP, but the files provided by Sony doesn't seem to contain the `device` directory.
Also is it possible to use the AOSP and compile a ROM that is exactly the same as the stock ROM?
I haven't done any reading or experimentation on the subject but as far as I know, Sony only provides the stock kernal sources, some hardware support libraries (not all for ex HDMI, xLOUD still not provided). You can compile the kernel from Sony sources. Android image and apps are not provided by sony. All the ROM makers who are releasing ROMs based on stock are modifying the stock ROM image to do it.
For compiling your own ROM, you will have to do it form AOSP or cyanogenmod (FXP) sources.
My experience:
I've done some building of linux images and flashing old PDA devices. I've flashed mine and friends android devices so I know the basics and my understanding of android is pretty good. What I'd like to do is to build (and maintain if all works well) a Baked Rom (BB8 and above). I understand there are some tricks to get it to build. Any hint or help would be appreciated. If you have any questions i'm happy to answer (so long as they are related to the subject!)
Thanks
jamesthedisciple said:
My experience:
I've done some building of linux images and flashing old PDA devices. I've flashed mine and friends android devices so I know the basics and my understanding of android is pretty good. What I'd like to do is to build (and maintain if all works well) a Baked Rom (BB8 and above). I understand there are some tricks to get it to build. Any hint or help would be appreciated. If you have any questions i'm happy to answer (so long as they are related to the subject!)
Thanks
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1988701&highlight=compile+cm10
This should get you started with the device tree etc mate.
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 !