[Q] Files Required from Stock ROM in order to build AOSP ROM - Viewsonic ViewPad 7 & Variants

There are many anecdotal notes here and there about ROM building, porting, etc. No where is there a list that outlines very simply (and device agnostic) what is required to 'pull' from a stock ROM in order to add it to the AOSP source code to build a fully working ROM image. I am looking for some help to define what this list might be.
I am creating this thread in the ViewPad 7 area because I am focused on this device at the moment, but this list does not have to be specific to this device, it just should be applicable to it.
Example:
Drivers
(Get everything in the /system/modules/lib folder and place it in AOSP/drivers/etc folder)
/system/modules/lib/* >> /AOSP/drivers/etc
Kernel:
Do a nandroid backup of boot.img and extract kernel from it via(...) then place that/those files into /AOSP/kernel
... These are all examples and do not represent real folders per-se.
Any help in assembling this list would be no double extremely beneficial to the entire android rom building community.
Thanks!

Related

[Q] New rom (or just launcher)?

The first thing I want to say is that my English is not really good. I hope you understand my questions.
I have an idea for a new Android rom, but I'm faced with a dilemma. I want to have as much as possible supported devices, so I also can just build a launcher apk which can be installed through Google Play. In this way all mobile devices with the minimal platform version can use it. The biggest problem is that I don't only want a replacement for the application launcher but also the notification drawer and everything else. Is it possible to replace them also? I don't think so, so I think I'll work on a custom rom.
The next problem is which base rom I would use if I really build a custom rom. It's most likely to use AOSP as base because it's clean. The question is which version of AOSP: Gingerbread, Ice Cream Sandwich, or the newest version Jelly Bean. You would probably say Jelly Bean because this is the newest version. The problem is the phone support. Gingerbread is supported on most phones. If I build ICS or JB the phones which are supported by Cyanogenmod are easy to support, because I can use their device files. The only problem is that my phone, the Samsung Galaxy Gio is not officially supported and the unofficial port is not really stable. I don't think it's a big problem to use this device files and just wait till the developer makes it more stable, but I don't know for sure.
The last thing I want to know is if it's really that simple to support multiple devices. If I read tutorials about porting existing roms to your device they all say you just have to add your device files to the source and compile it. But they never say something about the kernel. Most devices need another kernel because their hardware is different isn't it? Please explain me how this works.
I'm sorry about this hazy story, but please help me before I make wrong choices. Thanks on purpose.
Wietse
WietsedeVries said:
The biggest problem is that I don't only want a replacement for the application launcher but also the notification drawer and everything else. Is it possible to replace them also? I don't think so, so I think I'll work on a custom rom.
Click to expand...
Click to collapse
These changes you are talking about can be done. They are system changes so not supported by the android app installer.
Eg: Your notification drawer, status bar are part of SystemUI.apk. The source for this is can be found in the AOSP source code under android/frameworks/base/...
You can make your modifications, compile it into an apk and then make a flashable zip to replace the current one (or push it via a rooted adb console).
or you can compile the entire source code into a flashable zip (eg CM7,9 etc..) and use it a replacement ROM with your modifications.
This is the line between an application under the android runtime and the android runtime itself.
these files, under framework are part of the OS. so to provide a customized version of the operating itself is what people like to call ROMs.
Now ROMs (like any OS) are device dependant. Windows has the code to run in a lot of different hardware configs, but android aims to be small. It should have only the minimum required code to efficiently run itself on a device.
Thats the kernel. The kernel communicates with the hardware and so the rest of the hardware can happily talk to a working kernel and expect the hardware to function as advertised. Kernel is a simple program which goes into the RAM on system start and sits there directing the operation of the phone.
Kernel devs work on making sure the hardware and the android runtime work perfectly together. Now, in this imperfect world, not all sources are open, even though they should be. and therein the issue lies.
If you want to compile android from source and make sure it works on your phone, first you need to make sure you have the kernel with all the changes(patches) to it made by the vendor (chap who made the phone and bullied you into buying it) to get it working on your hardware.
If you dont have that, you have to do it yourself. Or wait for someone else to do it.
once you can compile android and get it working on your phone with all the itty bitty hardware working A-OK.. then you can browse through the source, make changes as per your individual requirements and compile it into a ROM.
see the changes to the OS are separate from the changes to the kernel. The kernel changes are for hardware-software interaction so they are phone SPECIFIC.
but changes to your custom android OS (ROM) can be "cherry-picked" from other ROM/gerrit/AOSP/CM/AOKP sources and put inside your own source tree to get included in your build.
so if you have all the device / kernel stuff from a working android distribution, you can take the source of another android distribution and swap the device stuff into it and see if it works.
hope this helps.
wingie6200 said:
These changes you are talking about can be done. They are system changes so not supported by the android app installer.
Eg: Your notification drawer, status bar are part of SystemUI.apk. The source for this is can be found in the AOSP source code under android/frameworks/base/...
You can make your modifications, compile it into an apk and then make a flashable zip to replace the current one (or push it via a rooted adb console).
or you can compile the entire source code into a flashable zip (eg CM7,9 etc..) and use it a replacement ROM with your modifications.
This is the line between an application under the android runtime and the android runtime itself.
these files, under framework are part of the OS. so to provide a customized version of the operating itself is what people like to call ROMs.
Now ROMs (like any OS) are device dependant. Windows has the code to run in a lot of different hardware configs, but android aims to be small. It should have only the minimum required code to efficiently run itself on a device.
Thats the kernel. The kernel communicates with the hardware and so the rest of the hardware can happily talk to a working kernel and expect the hardware to function as advertised. Kernel is a simple program which goes into the RAM on system start and sits there directing the operation of the phone.
Kernel devs work on making sure the hardware and the android runtime work perfectly together. Now, in this imperfect world, not all sources are open, even though they should be. and therein the issue lies.
If you want to compile android from source and make sure it works on your phone, first you need to make sure you have the kernel with all the changes(patches) to it made by the vendor (chap who made the phone and bullied you into buying it) to get it working on your hardware.
If you dont have that, you have to do it yourself. Or wait for someone else to do it.
once you can compile android and get it working on your phone with all the itty bitty hardware working A-OK.. then you can browse through the source, make changes as per your individual requirements and compile it into a ROM.
see the changes to the OS are separate from the changes to the kernel. The kernel changes are for hardware-software interaction so they are phone SPECIFIC.
but changes to your custom android OS (ROM) can be "cherry-picked" from other ROM/gerrit/AOSP/CM/AOKP sources and put inside your own source tree to get included in your build.
so if you have all the device / kernel stuff from a working android distribution, you can take the source of another android distribution and swap the device stuff into it and see if it works.
hope this helps.
Click to expand...
Click to collapse
Thank you very very much for your explanation! It's a pity it's impossible to hit multiple times "Thanks".
I think I'm going to make a modified SystemUI.apk but you didn't tell the application launcher is also in this file. Did you just forget this or is this stored in another file/folder? And the lock screen? And I want also to replace the boot animation if it's possible.
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
WietsedeVries said:
Thank you very very much for your explanation! It's a pity it's impossible to hit multiple times "Thanks".
I think I'm going to make a modified SystemUI.apk but you didn't tell the application launcher is also in this file. Did you just forget this or is this stored in another file/folder? And the lock screen? And I want also to replace the boot animation if it's possible.
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
Click to expand...
Click to collapse
Only way is through exchanging the png files since porting the whole .apk is impossible.
Sent from my Jelly Beaned Ace
Thanks for the answer. And do you also know the answers of the other questions?
Sent from my GT-S5660 using xda app-developers app
WietsedeVries said:
If I take the source files of the SystemUI.apk of AOSP ICS, does this work on every phone running ICS? Included CM, AOKP and other (smaller) custom roms? And my last question: Since SystemUI.apk a apk file is, is it possible to edit these files through Eclipse and build it in Eclipse? Or do I get errors?
//Edit:
Still another question: How much work is it to, as example, port a modified Gingerbread SystemUI.apk to ICS? (Or vice versa)
Click to expand...
Click to collapse
There are two roads you can go now - one is use apktool to *decompile* apk the apk file that you've taken from your phone, it doesnt convert the app to java source code but java bytecode in .smali files (like an assembly version of the source) but you will have access to the resource files (xml, images etc..) so you can replace them and create some new themes.
http://forum.xda-developers.com/showthread.php?t=1814441
http://forum.xda-developers.com/showthread.php?t=1760133
And no - a GB systemUI.apk will *NOT* work on ICS. It is very probable that any changes you make through any of these methods can brick you phone. So make sure you have CWM and a nandroid backup.
If you want to add/edit functionality within the source code of systemUI.apk, you need to learn how to compile Android from Source. i would suggest getting hold of the CyanogenMod source tree for your device and playing around with it.
Ginger bread is CM7 and ICS is CM9.
http://forum.xda-developers.com/showthread.php?t=1552090
once you have the full source tree, you'll find a folder called android/frameworks/base/core/...something../systemui/..
this will contain the javasource code for your application. Here you can edit stuff to your hearts content!
Note that this cannot be compiled standalone by eclipse. The Android build system must be used to compile this (cuz its a system app).
a nice resource i used when i was doing the same thing :laugh:
http://iserveandroid.blogspot.in/2011/01/how-to-implement-your-own-status-bar.html
cheers and have fun.

[Q] Building a custom ROM for Xperia-L from AOSP

Pardon my ignorance. Just for fun and learning, I am willing to build a custom ROM from scratch for Sony Xperia-L from Android AOSP. But, even after going through a number of tutorials, following are the issues which are yet unclear to me:
How to obtain Xperia-L specific drivers to intergrate it into my build. Please note that unlike a few tutorials has suggested, I don't want to start from CM ROMS. I want to do it from 'scratch'
I have downloaded Open source archive for build 15.3.A.1.12, 15.3.A.1.14 and 15.3.A.1.16. It contains two top level directories: kernel and platform. What are these two for? Given the size of AOSP so large, I presume this archive does NOT contain full source for Xperia-L stock ROM. Am I correct to reason that?
Without using kiddie-approach, e.g. different ROM kitchen, what is the recommended approach to for a beginner to master the art?

How to make source code of a new device?

Anyone here can u tell me how to create source code of a new device as my device is INFOCUS M680, kernel source.
I have used another device as same board to create source of my device but the kernel source is different. So anyone can tell me how to create kernel source and device tree.
My kernel version is 3.18.19+
Find the open sources for your device and download them. You need to match the build number from that release to the build number for the AOSP sources and download those as well. I have only done Samsung so far but the instructions are fairly clear for merging the sources. Next you need hardware drivers, in my case I have tons of free drive space so I just copied the entire /etc and /vendor from my device firmware.
A lot of time can be saved by downloading a matching sources from a custom rom. You can take configuration files and etc.
No open sources and no custom roms? You should start on something easier my friend. But if you want to continue forward with that I am guessing here. Unpack the boot.img and recovery.img files with the available unpackers. (save the info for the images and follow how to repack carefully) Match your build number to the AOSP sources and get the kernel. Modify, hack, gather and assemble what you need to make a new boot.img and recovery.img. Then with great courage comes lots of bricked devices..
Late reply so I didn't try to hard there. I will always help people send me a PM if your stuck
droidvoider said:
Find the open sources for your device and download them. You need to match the build number from that release to the build number for the AOSP sources and download those as well. I have only done Samsung so far but the instructions are fairly clear for merging the sources. Next you need hardware drivers, in my case I have tons of free drive space so I just copied the entire /etc and /vendor from my device firmware.
A lot of time can be saved by downloading a matching sources from a custom rom. You can take configuration files and etc.
No open sources and no custom roms? You should start on something easier my friend. But if you want to continue forward with that I am guessing here. Unpack the boot.img and recovery.img files with the available unpackers. (save the info for the images and follow how to repack carefully) Match your build number to the AOSP sources and get the kernel. Modify, hack, gather and assemble what you need to make a new boot.img and recovery.img. Then with great courage comes lots of bricked devices..
Late reply so I didn't try to hard there. I will always help people send me a PM if your stuck
Click to expand...
Click to collapse
Thanks for your reply.
I am planning to create a custom rom for my samsung tab A Sm-P555
Where do I start ? Is there AOSP for it ? How do I unpack everything ? Could you help me as I was very new to this ?
Many thanks in advance.
all you need is here
droidvoider said:
Find the open sources for your device and download them. You need to match the build number from that release to the build number for the AOSP sources and download those as well. I have only done Samsung so far but the instructions are fairly clear for merging the sources. Next you need hardware drivers, in my case I have tons of free drive space so I just copied the entire /etc and /vendor from my device firmware.
A lot of time can be saved by downloading a matching sources from a custom rom. You can take configuration files and etc.
No open sources and no custom roms? You should start on something easier my friend. But if you want to continue forward with that I am guessing here. Unpack the boot.img and recovery.img files with the available unpackers. (save the info for the images and follow how to repack carefully) Match your build number to the AOSP sources and get the kernel. Modify, hack, gather and assemble what you need to make a new boot.img and recovery.img. Then with great courage comes lots of bricked devices..
Late reply so I didn't try to hard there. I will always help people send me a PM if your stuck
Click to expand...
Click to collapse
Hola
Perdón pero estoy sufriendo errores con la app XDA labs
Thank you

[g531f Custom Rom] Here are the files needed for compiling custom rom!!!

I'm trying to build cm12.1 custom rom for g531f but so far not good since i don't have much experience compiling...
Here are the files need for building custom roms like CM,AOSP etc. :
Device Tree(TWRP): github.com/TeamWin/android_device_samsung_grandprimevelte // Minimal device tree possibly only for recovery
Device Tree(MINE): drive.google.com/drive/folders/0B8TQ0igdaGTjUE53S1dDMDkwVTA?usp=sharing
Vendor Tree/Blobs(MINE): drive.google.com/drive/folders/0B8TQ0igdaGTjUE53S1dDMDkwVTA?usp=sharing
Kernel Source: opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=G531F
Help for developers of g531f, most similar devices to g531f are X Cover 3(Same Specs) and Galaxy Tab 4 7.0(Most similar specs pxa1088 etc.)
I think the hardest part is now over,and that is to make all these files from scratch,now we need EXPERIENCED COMPILERS AND DEVELOPERS who know how to manipulate these files to work and to get successful build of CM or AOSP
PS. Keep in mind that i created these files in reference to our similar devices,so is most probable to need something removed or added and tweaked etc. this is just to jump start a development of roms for g531f
HIT THANKS IF YOU FOUND THIS POST HELPFUL OR USED MY SOURCE FILES

Build ROM from scratch

I would like to develop a custom ROM for my device. I read some guides and obtained some basic knowledge, but still don't know how to start. So I would like to ask some questions to test my knowledge and expand them.
My device: Wiko View
My Android version (actually installed): 7.1.2 almost pure Android (just some third-party apps)
Desired Android version: AOSP 9.0 (maybe?)
So as far as I know I need these things:
AOSP Source Code (9.0)
Kernel
Vendor (tree or blobs?)
Device tree
So for the AOSP: I can get it from the repo hosted by Google. How should it look once downloaded?
For the kernel: should I use that from my actual ROM, or the most recent one? And how to include it in my ROM before compiling?
For the Vendor: As far as I read, with project treble I shouldn't edit this. But since I'm not developing a treble ROM, I'm in troubles, right? In older ROMs (before Oreo and Treble), they're stored in /system/vendor. Is just that folder or are there more? Do I need to update something? Where do I need to put this folder?
For the device tree: I read some guides that explains how to extract it from ROM (only from 5.0 and up, since mine is 7.1 no problems, I hope). Is this right or are there other ways? Or do I need to write it myself?
I'm going to thanks anyone in advance. I know there are plenty of questions, but I hope this thread will be a place for begginer (like me) to know more about compiling from source a ROM. Have a great day!

Categories

Resources