Flash Stock Android Kernel (or Emulator ROM) - Galaxy S I9000 General

Hey,
I've just recently started Android development and I'm keen to learn as much as I can about the whole system, not just about SDK app development. As such I'm interested in attempting to build my own ROM completely from scratch. I've downloaded the Android Source (and Galaxy S source) and would like to try my luck.
First I've been mucking around creating custom ROMs with the emulator, moving apps from the Galaxy S ROM I dumped from my device onto the stock emulator ROM and testing things out.
Anyway I'm at the point where I'm wondering if it's possible to flash the stock emulator ROM onto a Galaxy S phone? I know the Galaxy S source includes a lot of device specific stuff however I'm not interested in getting the camera, bluetooth or anything hardware specific working just yet.
If I flash a ROM with a stock kernel, drivers etc. onto my phone will it work? Has anyone done this? Will it just brick my phone?
Any help would be appreciated.
Cheers,
Ben

Anyone?
Also, I know people have flashed AOSP ROMs on other phones, does anyone know if they required modifications or whether they are in fact stock ROMs?

nje, can't work. why?
1) different bootloaders
2) different partition layout
3) different (kernel)drivers
4) different vendor setup
etc.
it is possible to flash the emulator image onto a dev device (dream/sapphire) but even then a lot will not work properly!
if you want to learn about the android architecture you should start with building a kernel (there is already a thread about that here) and playing around with stuff like the (file)system and utilities...

Thanks jodue.
Yeah my long term intentions were definitely to build the Galaxy S kernel and any necessary libraries and drivers specifically necessary for the apps I decide to include in a custom ROM.
I was hoping that I'd be able to start out by tweaking a minimalistic/generic ROM (the AOSP default ROM) on my Galaxy S. However, as you've pointed out I'll have to start out with the kernel and all the device specific stuff first.
I've got quite a bit of information on building an Android/linux kernel both from the thread you mentioned and also the official AOSP page. However information on putting together a complete working ROM seems a bit sparse. Does anyone know where I can find some information on the topic?
I'm also curious to learn about the list of things jodue mentioned i.e. Android bootloaders, partition layouts and drivers (generic and Galaxy S specific). I assume detailed information about particular devices and drivers probably isn't available but if anyone even knows where I can learn detailed information about default AOSP ROMs I'd be extremely interested know.

Related

Building from Cyanogem source and flash to atrix

Hello everybody,
I'm an Android app developer for some time, but from some time ago until now I have been tweaking the framework, trying to enhance, customize and maybe correcting bugs, so I'm working on the emulator, but I would like to test it on my device (Atrix).
Since I'm a newbie on this matters and I found plenty of threads and sites/blogs, I got a little confused on what are the steps to be made, specially because I would like to build from source as to have my modifications flashed. I'm aware of the hardware implications for my specific device, so I decided to use a reported working rom source code for my device, but i'm a little lost. I thoutgh to be using Cyanogem but I don't know the specifics.
Since I already have the source code AOSP, I think It would be painful to make it work on my device (drivers, kernel, so on...).
I just want (for now) see my framework modifications on device. Anyone could point me to the right direction?
I thought of using this firmware here.
Thank you all.

[Q] Galaxy s4 I9505 with Google edition andriod

Hello guys, i just have a (few) question(s)
So, last week i installed Google Edition Andriod Kitkat 4.4.4 on my galaxy S4 I9505.
This rom is till now, still amazing, fast and better than touchwiz in any way. But i can't seem to find on the internet how and which version of xposed framework i need to install, since it is per model (i think?) which model do i choose?
since i have a Galay S4 but my rom is not from a galaxy S4, i get confused which one i have to install.
Some links to downloads would be great!
Thanks in advance
Dylan
dylanbos1996 said:
Hello guys, i just have a (few) question(s)
So, last week i installed Google Edition Andriod Kitkat 4.4.4 on my galaxy S4 I9505.
This rom is till now, still amazing, fast and better than touchwiz in any way. But i can't seem to find on the internet how and which version of xposed framework i need to install, since it is per model (i think?) which model do i choose?
since i have a Galay S4 but my rom is not from a galaxy S4, i get confused which one i have to install.
Some links to downloads would be great!
Thanks in advance
Dylan
Click to expand...
Click to collapse
Hi mate
Basically it works in any android 4.0 + base rom device see from one of his threads
For which devices/ROMs does it work?
I develop the Xposed framework based on the AOSP sources. I'm personally using CM10.2 on an I9100 (Samsung Galaxy S2, bought in Germany). Basically, it should work on any phone which with a ROM based on Android 4.0 or later and an ARM or x86 processor (this is the processor architecture, almost all smart phones and tablets have either of those). Exceptions might be ROMs which are different from the original Android code in some very internal, central code parts (which don't need to be touched for most theming and enhancement modifications). But this is related to the ROM, not the phone itself.
The modules target higher-level code, so they are more likely to be incompatible with your ROM. Basically, the question is whether the methods and resources which the module modifies are similar on your ROM and on the developer's ROM. Let's say a module needs to modify the result of a certain method call. For this, it needs to specify the exact name and parameters that identify that method. If the in your ROM, an additional parameter has been added, the module can't find the method anymore and won't work. If the method can still be found, it will probably work (unless the rest of the app/ROM has changed too much).
There is not definite answer whether it will work. Just try it (of course, making a nandroid backup before is never a bad idea). If it doesn't work, just disable the module. You might want to inform the module developer (not me!) about this fact and provide details (e.g. a logcat and/or the content of /data/data/de.robv.android.xposed.installer/log/debug.log).
Try with latest 2.6.1
http://forum.xda-developers.com/xposed/xposed-faq-issues-t2735540
http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053
Thank You!
MAX 404 said:
Hi mate
Basically it works in any android 4.0 + base rom device see from one of his threads
For which devices/ROMs does it work?
I develop the Xposed framework based on the AOSP sources. I'm personally using CM10.2 on an I9100 (Samsung Galaxy S2, bought in Germany). Basically, it should work on any phone which with a ROM based on Android 4.0 or later and an ARM or x86 processor (this is the processor architecture, almost all smart phones and tablets have either of those). Exceptions might be ROMs which are different from the original Android code in some very internal, central code parts (which don't need to be touched for most theming and enhancement modifications). But this is related to the ROM, not the phone itself.
The modules target higher-level code, so they are more likely to be incompatible with your ROM. Basically, the question is whether the methods and resources which the module modifies are similar on your ROM and on the developer's ROM. Let's say a module needs to modify the result of a certain method call. For this, it needs to specify the exact name and parameters that identify that method. If the in your ROM, an additional parameter has been added, the module can't find the method anymore and won't work. If the method can still be found, it will probably work (unless the rest of the app/ROM has changed too much).
There is not definite answer whether it will work. Just try it (of course, making a nandroid backup before is never a bad idea). If it doesn't work, just disable the module. You might want to inform the module developer (not me!) about this fact and provide details (e.g. a logcat and/or the content of /data/data/de.robv.android.xposed.installer/log/debug.log).
Try with latest 2.6.1
http://forum.xda-developers.com/xposed/xposed-faq-issues-t2735540
http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053
Click to expand...
Click to collapse
Thank you so much for your help. I think it is pretty clear for me now.
Dylan
dylanbos1996 said:
Thank you so much for your help. I think it is pretty clear for me now.
Dylan
Click to expand...
Click to collapse
Any time mate.

Porting modern TouchWiz: Notes from me

Today I wanted to talk about porting current versions of TouchWiz from one device to another. This will be focused primarily on the Sprint network capability since that is my current carrier. But these same basic steps will apply for all porting of TouchWiz.
I know several people have ported roms but I first want to point out one important fact. There is ABSOLUTELY no "guide" that can help you port TouchWiz roms successfully. Period. Any "guide" thread that you may find is completely useless and is isn't even close to touching on the key components of today's porting methods. So don't waste your time reading guides because they are very outdated and irrelevant today.
First things first... When deciding to port a Samsung Rom you need to understand that there are going to be different chipsets for the different device models used in other parts of the world. With this in mind you need to choose software that was originally designed for the same similar cpu whether it be Exynos or Qualcomm. This makes a huge difference when it comes to cpu configs that will best support your device's cpu. If you try to port an Exynos rom to work on a Qualcomm device then expect to have to do a lot more work in framework, etc.
GSM vs CDMA is another very important part of the porting process. When possible, ALWAYS choose software that supports your specific carrier and service type/technology!!! If you are on a GSM network then choose a GSM rom and same for CDMA. However CDMA technology here in the US is a bit different from other countries in regards to how it is setup in the software. Each CDMA carrier will have it's own unique code inside system files. Simply replacing csc and other files will do NOTHING to fix this, leaving you with either no data services or improper generic data services. The only way to do this right is to either start with software for your specific carrier or manually modify these values in multiple files throughout framework and system using the correct values from software specific for your carrier. No exceptions.
The other thing. You ideally want to port the same Android version that is currently available for your specific device because the original kernel and libraries, etc need to support the version of Android in which you want to port. When porting you will be using most of your original software's bin files, kernel, etc... so these files need to be compatible with the version of Android you want to port. Very important!
I will not go into great details with smali modifications, etc because that is a whole different animal. This thread is a general breakdown of what is involved in the whole process. Porting a ROM such as the Note 7 software is no simple task, especially with so many unknown obstacles that must be discovered then remedied. You will need the right tools for the job before you even take on such a task. I'm talking about ApkTool, smali/baksmali, mad genius mentality, etc. Without the proper tools forget about it.
The main things that must be done for the rom to even boot, reside internally inside a few framework jar files. There will also be incompatible system files which must be removed and/or replaced with compatible versions that support your specific device/model. You also may need to make the rom support 32bit such is the case with the Note 4, since it is only 32 bit compatible. There can be no traces of 64bit libraries either inside the system apps or the library folder or else you will have issues. 32 bit devices cannot process 64 bit libraries, whether external or imbedded inside system apps. The one exception to this rule is when an app is multi-arch compatible which means the app can be installed on either 32 or 64 bit devices. In this case the 64 bit libs can remain although they will not be used since the 32 bit libs will be detected by the os. Thankfully 64 bit TouchWiz contains 99.9% of the necessary 32 bit libraries! So use them instead if your device is only compatible with 32 bit architecture.
There are several key Android/Samsung services that are not going to be compatible with other Samsung devices therefore one must identify these incompatible services and other methods in smali and either remove them or recode them in order for the rom to function in a way that is compatible with the device for which you will be running the software on. Sometimes you can simply replace services from your original device's software as long as it is compatible and from the same Android version, but not always.
There is NEVER going to be a set of instructions that will apply to all ROMS. Period. This stuff is always ever-changing with each update that Samsung releases. This is why there can be no accurate "guide" to porting TouchWiz. Whoever says otherwise is not knowledgeable on this stuff at all.
Once the framework files are prepared and rebuilt properly then you will need to have knowledge of the stock system apps and what role they play in the software. Most system apps are cross compatible but some are device and/or carrier specific and must either be removed or replaced in order for the rom to boot and run without a complete meltdown with continuous FC's. Then you have CSC (customer service codes). This plays a major role in how the software will be setup on initial rom setup. Each specific device model will have it's own unique CSC, however most of Samsung's current CSC is identical between the current available top tier devices such as the N4, N5, S7 and N7. BUT each device will have it's own unique "values" within multiple files in CSC. Some Samsung devices are compatible with features that other Samsung devices do not support. Therefore you must have knowledge of this and make the necessary edits in order for the software features to be setup correctly without major malfunctions. One wrong value can actually cause the rom to not boot. You will need experience with this as well.
Next you may need to slightly modify the kernel's ramdisk to support a couple of additional framework files which is the case with the N7 software and probably the N5 as well. It's just a matter of adding a few file names to a text file, save, then recompile the zimage and place the modified kernel inside your rom zip. These types of things must be discovered by trial & error by people who are knowledgeable and have experience porting roms. But it goes to show that these little things can determine a successful or failed port. You never know what can cause the rom to not boot. There's so many pieces to the puzzle when porting.
Moving on to the build.prop and updater-script. There MUST be a lot of edits done to the build.prop and the same principal applies here. You MUST edit the build.prop in order for it to support the software AND your specific device model, cpu, security features, etc, etc. This is an art folks. Again... there is no "guide" for doing this properly. You must possess the mental aptitude to tackle this stuff. It's not for normal people The updater-script is a VERY VERY important part of the rom porting process because it contains the permissions and symbolic links for all of the critical system files and folders. You must manually edit the updater-script so that it sets the proper permissions and symbolic links for the files that are used in the current software you are going to run. You cannot simply use a stock device updater-script straight out of the kitchen for your specific device. It will not work due to other versions of TouchWiz will likely have additional or different files and folders in the rom. This will take a LOT of time to go over everything and make sure you covered everything and properly setup the updater-script.
Next there is the process of replacing critical and device specific libraries and bin files as well as kernel modules. Generally for Samsung devices, system/bin folder must contain all of the original files from the original stock software for your specific device. You might need to add additional files from the software you are porting. The same applies to the system/lib/modules. These modules MUST come from your device's original software. The libraries are very tricky because not all libraries can be from either your original stock software nor from the software you are porting. Simply put, this is going to be the single most time consuming process with a ton of trial and error. You must figure out which lib files must be used from your original software and which libs must come from the new ported software. Good luck figuring this out! :laugh:
This pretty much covers the initial areas of the system software that must be manually modified in order for the rom to actually boot.
As you can see, there's a lot of trial and error with porting roms. Believe me. Other people who ported the early N7 and S7 port ROMs have done a LOT of work and surely they have a lot of trial and error. These early port dev's deserve a lot of credit for these early discoveries without a doubt. Without their original trials and errors & hard work, there would be no other port roms. They shared their knowledge and it was a group effort in the beginning. You guys know who you are! :highfive: Much Thanks to all of you who figured out framework issues etc in the early stages of current TouchWiz. I learned a lot in this process in which I have never shared with the public simply because there's no point in giving information that others can't use due to lack of experience. Hopefully some people will read this and better understand what goes into porting these ROMs. At a later dat, I may write up a more detailed "guide" on current TouchWiz IF I feel there is a need and there is enough people willing to step up and help out the community in the future. This is the way XDA works. You have to pass the torch to win the race. No one person can conquer the world. Teamwork is the key to success in everything you do. Remember this. Thanks for reading.
Wow, very nice write up. Thanks!
I would be interested in a more detailed guide if and when you get to it. I'm always looking to expand my know - how.
Many thanks! :highfive:
Thanks for the post....
but you did not go in to ROM porting much at all... I'd love to read a in depth view of the " copy and paste " dev .
tx_dbs_tx said:
This will be focused primarily on the Sprint network capability since that is my current carrier. But these same basic steps will apply for all porting of TouchWiz.
GSM vs CDMA is another very important part of the porting process. When possible, ALWAYS choose software that supports your specific carrier and service type/technology!!! If you are on a GSM network then choose a GSM rom and same for CDMA. However CDMA technology here in the US is a bit different from other countries in regards to how it is setup in the software. Each CDMA carrier will have it's own unique code inside system files. Simply replacing csc and other files will do NOTHING to fix this, leaving you with either no data services or improper generic data services. The only way to do this right is to either start with software for your specific carrier or manually modify these values in multiple files throughout framework and system using the correct values from software specific for your carrier. No exceptions.
The other thing. You ideally want to port the same Android version that is currently available for your specific device because the original kernel and libraries, etc need to support the version of Android in which you want to port. When porting you will be using most of your original software's bin files, kernel, etc... so these files need to be compatible with the version of Android you want to port. Very important!
Click to expand...
Click to collapse
This was great. It was exactly what I was looking for. Ive being working on porting a gsm rom to my device N900P. But the only thing Ive found is copy and paste. Trying to find something on cdma is even harder. Ive just download your Ultimate Hybrid N7 to see if can get a clue on where to start. Deodexing telephony-common should be enough? Where else should start looking? If you could point me a direction would be great. Thanks
triskaw said:
This was great. It was exactly what I was looking for. Ive being working on porting a gsm rom to my device N900P. But the only thing Ive found is copy and paste. Trying to find something on cdma is even harder. Ive just download your Ultimate Hybrid N7 to see if can get a clue on where to start. Deodexing telephony-common should be enough? Where else should start looking? If you could point me a direction would be great. Thanks
Click to expand...
Click to collapse
Sorry for the late reply. To be honest, porting a gsm rom to work on a U.S. cdma carrier is going to require massive work. Forget about it. Start your rom project with cdma compatible software and save yourself the trouble. You'll win the lottery before you get a gsm rom ported over to cdma. Copy and paste isn't going to scratch the surface. Why not port a factory Sprint ROM for your Sprint note 3? Such as the Sprint N7, N5, S7 edge? It is already setup to work on the sprint network. It would save you a lot of time and effort.

Asus ZenPad 8.0 (Z380M/P00A ver) Firmware Hacking

(Since I'm a newbie, I can't post in development forums, so I guess this goes here for now. If this is the wrong place, I apologise.)
I have an Asus Zenpad 8.0 (Z380M/P00A), which doesn't seem to have any support from the custom rom community. This is not surprising as it's a fairly uncommon device, and until recently, Asus has been less than helpful. However, the latest firmware update (supposedly; I haven't pulled the trigger yet) allows the Asus bootloader unlock utility to work on this tablet.
I've wanted to replace Asus's firmware since I bought the thing. I know that it's an uncommon device, so I'll have to do all the work myself. I'm an experienced Linux hacker, so I know how to configure and build kernels, how Linux OS images are constructed, how to read/write C, etc. However, I'm a bit of an Android newbie.
I figured the first step would be to port TeamWin recovery, so I'd have a way out if I brick the thing. But (from what I've been able to find) porting TeamWin requires a working CM or (preferably) Omni port. So it's kinda a chicken and egg problem. Do people just port roms using stock recovery and hope for the best? Or is there a (more involved, I'm sure) way of porting TeamWin that doesn't require an existing port? Or is there some other recovery (I don't know about) that's more standalone?
And then there's the issue of porting the OS itself. For thier part, Asus provides kernel souces, firmware images, and the aforementioned boot loader unlock utility. I imagine to get started, one has to compile a kernel and combine it with binary blobs extracted from the firmware image, but I'm not entirely sure.
I've looked around for porting information, but the guides I found all seem to assume you've got a working device tree from one mod that you want to graft onto another. I couldn't find much about really starting from (nearly) nothing. I'd like to say I'm surprised Google doesn't have something written up, but given how unhelpful I've found a lot of thier Android docs in the past, I'm not.
I'm mostly interested in porting AOSP to start, but I'd be willing to start somewhere else if some other ROM is easier to work with. Anyway, thanks in advance for any suggestions or advice you might have to offer.
Any progress on this? I was able to flash twrp and root my Asus Zenpad 8.0 (Z380M/P00A), but had no luck finding a compatible rom. Did you get to compile one? Thanks!
How would you unlock the bootloader for this device?

Build and compile rom and kernel

This is a question for all the devs here.
Ive been a long time member, mostly lurking. I use to compile windows mobile roms for my own use.
Im interested in trying to build my own custom stock(ish) rom and kernel.
I know it wont be easy and will most likely fail multiple times or even brick my phone completely.
I have the sm-g935w8 version and currently on 8.0 stock root.
My goal would be a custom rom possibly tw with stuff i manully remove and configure i would also make a kernel ..possibly..ive compiled one a long time ago for a linux build. But as for kernel id just like to play around see what is available
Im not looking for the step by step but some information on where to begin and what software ill need.
Also has samsung released latest source code?
Thanks

Categories

Resources