[Q] ROM Creation - General Questions and Answers

Dear all
I know this is probably in the wrong forum - but I need ten posts before I can post in the dev forums (which seems silly!).
I'm a developer with a Galaxy S2. I wish to create a highly specialised ROM for the S2 (for a particular need - which may involve custom kernels as well as image) - I have some questions that I'd be grateful for answers to:
1) What should I not do to avoid bricking the S2? Is it just the bootloader that shouldn't be modified (e.g. uploading a duff kernel will be fine?)
2) Can I build the sources from Google and burn a Google image straight onto the phone? I presume it will need Samsung drivers though - where can I get these?
3) Where can I find information on the PIT format and other stuff related to the 'image' -e.g. format/layout of the image to burn from ODIN?
Many thanks
Gareth

Related

Sapphire ROM HowTo - request for info

I'm Linux & BSD literate, and used to administering servers, compiling programs and kernels from source. I've also managed to root and flash my Magic, following advice found here. What I'd like to do is gather up some info on how to build ROMs for the Sapphire platform.
I'm already poking around the Android Wiki FAQ and the Dream dev forum on this site. There's quite a bit of info there but some of it is out of date and I've not found much that's Sapphire-specific. I also plan to take apart the .zip files released by Haykuro and others and compare/diff configs to get a feel for things.
My intent is to put together enough info to allow anyone to pull apart a released ROM and replace the dialler, add some language support or some extra apps, maybe make some other simple changes.
What I need is any pointers on:
1. Sapphire-specific info.
2. Any danger of bricking my Magic by messing around with home-made ROMs.
3. Anything else that might be useful.
Hopefully I'll be able to put together a rudimentary HowTo for the wiki, which others can add some fine-tuning and extra info to.
Thanks for any input.
I think this is a very good idea!
It would simplify things if everybody would understand how exactly custom ROMs are created.
1 - Be aware that there are different Magic HW versions...
2 - I don't think you can brick your magic as long as you make backups via nandroid.
3 - A few things I think should be in the wiki :
- how to completely setup a linux environment and which applications you need to be able to build custom ROMs.
- Explain how the android OS is working, explain what boot, hboot, recovery, system is, how the partitions work, etc..
- What are test-keys, what is the difference with and release-keys.
- How to sign.
- How to dump the recovery.img, boot.img without having root access.
- What to change into the recovery.img and boot.img to get root.
- How create an update.zip
- How to make backups with nandroid and how to restore them..
Agreed think this would be a fantastic idea, unfortunately it seems like the people in the know are not willing to share any of their knowledge =o(
Do keep us up to date as to what you find by dissecting the ROMs, had a look the other day briefly but didn't have time to play yet,
Also waiting for info/confirmation that as long as you just flash bad roms its not possible to brick your phone only if you play with SPL's and such
fxn said:
Agreed think this would be a fantastic idea, unfortunately it seems like the people in the know are not willing to share any of their knowledge =o(
Click to expand...
Click to collapse
Oh, I'm sure the knowledge is scattered around the place - sharing is one thing, bothering to document is quite another!
The only thing I don't expect to find openly shared is traceable leaked material, and frankly I can live without that.

[Q] ROM's, Kernals, Recovery's and ROOTING?

Hi Fellow old and New Devs,
The title suggests it all. I have four questions that I think ALL newbies want to understand. I would try and explain them, but as I am just coming out of the newbie stage, I'm sure people would prefer an answer from a experianced Dev.
When answering a question please put the Question Number. Feel free to answer only one or two of the questions, I'm sure other people will cover your missing fields of knowledge.
Here they are:
1. What is rooting? Can I root my device (HTC Buzz Wildfire) and keep the stock interface? Will I loose my data?
2. What do all these Dev's mean by Recovery? What are they, why are they needed?
3. What is a ROM? Do I need to be rooted for a custom ROM? How can you trust them? Will I loose my data when installing a custom ROM?
4. What is a Kernal? How are they Different to ROM's? Should I change from the stock Kernal?
I know this is a tall order and you could write a book on the topic, but please could you write a short (a couple of sentaces will do) paragraph on each question you choose to do.
When we get enough understandable answers I will edit this post publish the Final answers for other newbies in the future.
Also feel free to enter the poll! As this is a Dev site I presume one of the options will have the most votes but we will see....
Cheers for any contribution in advanced.
th3ant
th3ant said:
Hi Fellow old and New Devs,
The title suggests it all. I have four questions that I think ALL newbies want to understand. I would try and explain them, but as I am just coming out of the newbie stage, I'm sure people would prefer an answer from a experianced Dev.
When answering a question please put the Question Number. Feel free to answer only one or two of the questions, I'm sure other people will cover your missing fields of knowledge.
Here they are:
1. What is rooting? Can I root my device (HTC Buzz Wildfire) and keep the stock interface? Will I loose my data?
2. What do all these Dev's mean by Recovery? What are they, why are they needed?
3. What is a ROM? Do I need to be rooted for a custom ROM? How can you trust them? Will I loose my data when installing a custom ROM?
4. What is a Kernal? How are they Different to ROM's? Should I change from the stock Kernal?
I know this is a tall order and you could write a book on the topic, but please could you write a short (a couple of sentaces will do) paragraph on each question you choose to do.
When we get enough understandable answers I will edit this post publish the Final answers for other newbies in the future.
Also feel free to enter the poll! As this is a Dev site I presume one of the options will have the most votes but we will see....
Cheers for any contribution in advanced.
th3ant
Click to expand...
Click to collapse
Okay, from the best of my understanding, here we go:
1: Rooting. To understand this, we must consider a computer, running linux, windows, or mac. In windows, the "Administrator" account is similar to the root account in linux and mac. Basically if you have root privileges in a system, you can modify every part of the filesystem, as well as perform any tasks the system is equipped to handle. Basically achieving root on an android device means that you can unlock the ability to flash roms, mod, and otherwise hack your device any which way you like. Nearly every model of android device has been rooted, so in most cases, yes you can root XXXXX phone. Also, since you're just gaining privileges, you can root without losing any data, apps, or settings.
2: Recovery. This is a long standing concept in SoC/Embedded device hacking. Basically it is a minimal operating system that performs some very basic, but very important tasks. The reason for it is so that you can write to the necessary areas on the NAND, which would be "busy" while android is booted. This offers a way to access the necessary partitions and write data to them while the data is not being accessed. It's also useful for backing up your NAND. Hence the name "nandroid."
3: ROM. By definition, it means "Read Only Memory." This is a chip on the board. ROM has evolved over the years. It started out as a chip that was sensitive to UV light. The earliest ROMs were "flashed" to a device by stenciling out the pathways and exposing the chip to UV radiation. Nowadays, we have fancy EEPROMs instead, which stands for Electronically Erasable Programmable Read Only Memory. This means that you can "flash" the chip by means of software, namely via Recovery mode in our case. Different ROMs have different features. They are all variations on source code made available by AOSP, or the android open source project. Some projects have their own code tracking, such as CyanogenMod. In most devices, you must be rooted to be able to install a ROM, however it is not explicitly necessary. A bit vague, I suppose. Specifically the tablet I own, the WITS a81e, you can flash a ROM to it just by putting the correct files on the TF card. This is not very common with phones, however. Flashing any rom that is not just a newer version of your current ROM will require a full format. For instance, if you have cyanogenmod and switch to a Sense or Blur ROM, you must format, but if you update from CM6 to CM6.1 you will not need to wipe. How can you trust ROM's? Well the best way to know is to either roll your own, or go with CyanogenMod, as their source is freely and easily available for scrutiny and improvement, along with a nice changelog tracker.
4. Kernels. A kernel is basically the most low level part of an operating system. It interfaces directly with the processor and provides all instruction for operation. Linux is technically not an operating system, it's a Kernel. The different distributions have the Linux kernel, and use their own different User Interfaces. Different kernels in android devices can allow you to overclock. There are many choices in kernels, and the features they offer. Some features are BFS/CFS which is the priority scheduling of processes. Some kernels allow you to charge your battery differently and conserve life. These are often called battery kernels. Also, some kernels unlock extra multitouch points in certain devices. There are different versions of the linux kernel, with many improvements with each iteration. Currently, the latest kernel available that I know of for android devices is 2.6.37. The froyo default kernel was a 2.6.32. I wish I knew a bit more about kernels, however this is about all I know. Perhaps someone could help us out and expand on this a bit?
Brilliant answer not too complicated... let's see what others say....
Sent from my HTC Wildfire using XDA App
What he said...
Pyroboy1080 well said...
That pretty much covers it.
thx for the infos..
Agreed. Thanks for using the poll!
nothing to add on that, as we used to say "merci beaucoup"
Can't ROM
Gotta be something stupid......
Can't install 2.2 or 2.3. Tried two different ODIN flashers. When I do the reset I do not get the triangel with downloading in the center. I'm rooted, Have ROM Manager, Superuser, Root Explorer, Super Manager, I'm unlocked.
I have Android SDK, Congnitive 4.1, NPS, Samsung Kies,SGH I897 USB Drivers, What else? I think I have it covered. In any case I never get the download . Even if I do a "ROM Manager Install fron SD Card, the result is a screen, blue at top and yellow at bottom with the last line saying "Installing Multi- CSC. I can let it run all night, no change in ROM. Does the Captivate sold by ATT have some kind of block or filter keeping me from updating?
Current firmware is 2.1 update 1, baseband I897UCJH7, Kernel 2.6.29 [email protected] #2, Build ECLAIR.UCJH7
Thanks
To better answer your question, I first need to know what type of device you're using...
fxstsb said:
Gotta be something stupid......
Can't install 2.2 or 2.3. Tried two different ODIN flashers. When I do the reset I do not get the triangel with downloading in the center. I'm rooted, Have ROM Manager, Superuser, Root Explorer, Super Manager, I'm unlocked.
I have Android SDK, Congnitive 4.1, NPS, Samsung Kies,SGH I897 USB Drivers, What else? I think I have it covered. In any case I never get the download . Even if I do a "ROM Manager Install fron SD Card, the result is a screen, blue at top and yellow at bottom with the last line saying "Installing Multi- CSC. I can let it run all night, no change in ROM. Does the Captivate sold by ATT have some kind of block or filter keeping me from updating?
Current firmware is 2.1 update 1, baseband I897UCJH7, Kernel 2.6.29 [email protected] #2, Build ECLAIR.UCJH7
Thanks
Click to expand...
Click to collapse
didn't know where to ask this?
hello, everyone..
i have some questions, i'm hoping some of you can anwser.
I used unrevoked to root my htc desire. after that, I used alpharev to gain s-off.
everything went fine, i got the joker, the white screen that lets me pick different options..
now Í tried all those options, nothing works.
I've been searching all night for a solution, and it seems my recovery boot and rom are missing? and what I came across is installing ANDROID SDK tools, and then run fastboot to recover an image. So I installed SDK tools, but fastboot doesn't run, it says some .dll driver is missing. in the platform-tools map is that .dll driver, should i move it?
Can someone get me a step by step tutorial on how to make my desire work again? Im kind of a noob, all I needed was to make a screenshot..
Thanks in advance, it would be appreciated so much..
Pyroboy, I'm using a Samsung Captivate. In another thread someone lead me to "All in One Toolbox". The other stuff is just stuff. That allowed me to install my ROM.

[Q] Custom ROM, complete howto?

This question is probably already asked, but I can't find a clear answer for it.
2nd thing is that I can`t see the forest for the trees anymore cause I'm quite an android noob.
I wan't to try to build a custom rom, but how do I get started?
As far as I know there are 2 ways:
1) Take an existing rom (either stock or custom) and mod it.
2) Start from scratch.
The 2nd method is of course the most interesting (but probably also the hardest) method.
So say we take that method.
First of all I think android basically consists of 2 parts, being the kernel + all the rest.
You can take a kernel from a working rom, which may be moddified, but can you also build the original kernel from the source? For getting that to work on my device I'll probably need the drivers, but how? Extract it from the latest official rom? And how to add them?
Samsung (yes I have a samsung s5660 aka gio) also uses the rfs filesystem, would it be possible to use ext4 and does the kernel need to be adapted to that?
And how do you make the rom flashable for odin?
A lot of questions, I know, but isn't there a step to step guid for doing this kind of things?
Thanks
yes, its possible to create an odin flashable rom with ext4 as default filesystem. and yes, obviously the kernel need to support ext4.
read this thread, particularly the first post.
http://forum.xda-developers.com/showthread.php?t=1202049

Requesting Further Knowledge : Ubuntu Touch for p3110

Greetings;
I've been searching how to install and where to get Ubuntu Touch files for my p3110.
I couldn't find anything that could provide me with concrete information.
- Is there a Compatible way to Install Ubuntu Touch on this Tablet?
- If so can anyone provide me links for file(s) or recommend me a place for more research? (As i'm having a hard time to get them)
- Can still use Google Play and Andorid Apps?
- Can i Still Flash / Have CWM?
- Can i Flash a Custom Kernel and Still Control My CPU Speed easily?
Any good straight forward info would be apreciated.
In return you can expect (as usual) some more tutorials for this device.
Best Regards;
Richard
Me too too also
81! said:
Me too too also
Click to expand...
Click to collapse
I searched for the files some time ago. Everything i found didnt work and people i asked said that they were never able to make it work and that they had deleted the files. I dont think you have any chance of getting ubuntu touch (however, if you do, please post links )

Compiled Kernel-Source - now what?

Hello dear people,
I've managed to compile a Kernel for the A515F - using the source code provided by samsung (https://opensource.samsung.com/uploadSearch?searchValue=A515F) - Version A515FXXU3BTF4.
The usage of make (...) yielded an Image (no extension) and a Image.gz file under the path "arch/arm64/boot/" within the sourcecode.
The size of the Image is 30,3mb - the Image.tz size is 10,3 mb - looks good so far doesnt it?
SInce my last kernel-development work is from 5 years ago and a lot of things changed during that time - what are the next steps in order to install this kernel on the device?
I can remember somethings, like using adb / fastboot to flash the related partitions, etc. - im going to get my head around this, but maybe someone could give me some hints ?
Ive also have some other questions:
- Flashing a custom kernel on this device trips the knox status - ive read that this disable secure folders and samsung pay - so no software that im interested in - are there any othere drawbacks of installing cfw ?
- I've read alot of A/B partitions - Ive used an android app which logs some hardware-specific information about the device and as it looks - the A51 uses A/B partitions - what does that mean and how does it differ to smartphones 5 years ago?
- From other kernel-development-work (on x64 / x86 hosts) I know that the modules of a kernel should be a part of the resulting Image / Image.gz file - is this also the case in this scenario? Are drivers / and related modules part of the kernel?
- Is it possible to test this kernel on an android emulator? I dont want to flash something somehow on a device wihtout being sure that it doesnt result in a bricked device.
Thanks in advance!
theWicket said:
Hello dear people,
I've managed to compile a Kernel for the A515F - using the source code provided by samsung (https://opensource.samsung.com/uploadSearch?searchValue=A515F) - Version A515FXXU3BTF4.
The usage of make (...) yielded an Image (no extension) and a Image.gz file under the path "arch/arm64/boot/" within the sourcecode.
The size of the Image is 30,3mb - the Image.tz size is 10,3 mb - looks good so far doesnt it?
SInce my last kernel-development work is from 5 years ago and a lot of things changed during that time - what are the next steps in order to install this kernel on the device?
I can remember somethings, like using adb / fastboot to flash the related partitions, etc. - im going to get my head around this, but maybe someone could give me some hints ?
Ive also have some other questions:
- Flashing a custom kernel on this device trips the knox status - ive read that this disable secure folders and samsung pay - so no software that im interested in - are there any othere drawbacks of installing cfw ?
- I've read alot of A/B partitions - Ive used an android app which logs some hardware-specific information about the device and as it looks - the A51 uses A/B partitions - what does that mean and how does it differ to smartphones 5 years ago?
- From other kernel-development-work (on x64 / x86 hosts) I know that the modules of a kernel should be a part of the resulting Image / Image.gz file - is this also the case in this scenario? Are drivers / and related modules part of the kernel?
- Is it possible to test this kernel on an android emulator? I dont want to flash something somehow on a device wihtout being sure that it doesnt result in a bricked device.
Thanks in advance!
Click to expand...
Click to collapse
First of all, dang that's a lot of questions at once.??
Also you might've already figured out the answers to all of em but still here are all the Answers in case you didn't or for someone else seeing this post.
Q1) For installing the kernel on the device, one option is to flash the boot image using twrp while the other is to compress to boot.img.tar and flash in the AP section of odin.
Q2) The only drawback is tripping knox which makes some samsung apps like samaung pay, samsung pass, secure folder etc to not work on your device EVER. I repeat they won't work on your device ever because tripping knox is an irreversible thing.
Q3) Yes samsung A51 uses A/B partition structures which just means that it has 2 copies of some partitions like system and vendor, for example. For more details google should be able to explain it to you better than me. Aka A-only vs A/B partitions.
Q4&5) I'm sorry but I don't know about that ? but in case you are looking for tests you can ask in A51 telegram group.

Categories

Resources