[Q] How Android Works - OS and Versions - Android Software/Hacking General [Developers Only]

I know this is an incredibly newbish question, but I'd flipped through various forums and articles and googled it and still don't quite seem to understand it.
My question is why is android dependent upon manufacturer's release?
Take for example, a desktop computer.
OS
This is the core of the device and the UI between the user and the hardware.
Applications talk to the OS to instruct the hardware to do stuff.
Microsoft and Apple makes the OS.
ex. Windows 7, Mac OS, Linux.
Hardware
Asus, Nvidia, Realtek, marvell make the hardware.
ex. video, LAN, sound etc.
Hardware Bundler
Dell, Alienware, Gateway, Acer
They take commercial hardware and some OEM hardware and assemble it in a way that many consumers will buy their bundle.
For 99.9% of us, not counting Synapse, this is the only way the hardware is packaged together.
Device Standards
Collectively, the manufactures work together to determine certain industry standards ex. ATX, PCI-E, SATA 3, USB 3.0 etc...
Drivers
The manufacturers also make drivers so the OS can make use of their hardware.
Compatibility Is Determined by Driver Support
If the driver exists to talk to a given OS, then the hardware will work.
Not all hardware manufacturers will code for every OS out there.
ex. USB works on all OS because it's more established, but not every sound card will work on a Linux system.
Bringing it home...
So if Microsoft releases Windows 8, and as long as Nvidia releases a driver that works with that OS, then the video card will work.
Can you help me understand how the android phone architecture is so different that it's no longer
OS <-> Driver <-> Hardware?
Sorry for not getting it.

Culverin said:
Can you help me understand how the android phone architecture is so different that it's no longer
OS <-> Driver <-> Hardware?
Click to expand...
Click to collapse
It isn't different, it's exactly as you written. But manufacturers usually don't release sources of drivers, neither binaries for newer versions of OS. Also many manufacturers add protection against installing your own software into "their" device.
Android is open, but many manufacturers of Android devices - aren't.

Many devices just like????

You say manufacturers, are you referring to components such as the modem (???), video encoding/decoding chip (tegra), sound chip (wolfson)? NFC chip?
Aren't these drivers publicly available?
How else would small companies be able to develop low volume items such as these?
http://www.bigboxstore.com/computers/android-tablet-pcs
http://cheapandroidtablet.org/
When a company, samsung for example, makes a phone.
They start tying all the components together and making them talk to each other.
How "custom" are the "motherboard bios"?
Is that what you are saying by the manufacturers add protection?
Like at the "bios" level?
As for things like this...
http://www.engadget.com/2011/01/27/sony-announces-playstation-suite/
Does that mean Sony is banking on Google making it more standardized?

Culverin said:
You say manufacturers, are you referring to components such as the modem (???), video encoding/decoding chip (tegra), sound chip (wolfson)? NFC chip?
Click to expand...
Click to collapse
I mean both components manufacturers and phone manufacturers.
Usually there are problems with Wifi, GPS, GPU support, camera, etc. Many alpha-stage ports have problems with these things.
Culverin said:
Aren't these drivers publicly available?
Click to expand...
Click to collapse
Do you mean sources? Manufacturers rarely release sources of drivers, even on a PC. This is the reason, why there are problems with some devices on linux systems.
Culverin said:
How else would small companies be able to develop low volume items such as these?
Click to expand...
Click to collapse
I'm not sure, but they have to buy a license to use these components in their devices anyway, so I guess they get sources of drivers too, but they can't release them.
Culverin said:
How "custom" are the "motherboard bios"?
Is that what you are saying by the manufacturers add protection?
Like at the "bios" level?
Click to expand...
Click to collapse
"BIOS" or just "boot phase software" is usually 100% custom - there are no standard solutions I know of.
Let's imagine you have bought a new PC with some preinstalled OS. You don't have administrator rights on it, you can't boot from other device than HDD and if you want to update your system, you have to use special software, which has administrator rights, but it checks whether updates were created by device manufacturer. This is more or less how most of phones work.
Culverin said:
Does that mean Sony is banking on Google making it more standardized?
Click to expand...
Click to collapse
I'm not sure what do you mean?

Culverin said:
I know this is an incredibly newbish question, but I'd flipped through various forums and articles and googled it and still don't quite seem to understand it.
My question is why is android dependent upon manufacturer's release?
Click to expand...
Click to collapse
Because individual makers add their own hardware.
Can you help me understand how the android phone architecture is so different that it's no longer
OS <-> Driver <-> Hardware?
Sorry for not getting it.
Click to expand...
Click to collapse
It still is. Android OS is JUST THE BIOS, in your example. The VXDs/drivers are made by different manufacturers (hardware level drivers) and loaded at system time.
You can load a plain Android OS, but it won't be able to talk to the phone's hardware except in a very general sense. You can touch screen, launch apps, but no phone, and only generic camera without special resolution support and such. It won't be able to do data or phone at all. That requires special VXDs (or their linux equivalent, I'm a Windows guy). Not all phones have the same buttons, or the same screen rez, or the same keyboard, and so on.
That's why there are various experimental Gingerbread ROMs out there already, but they don't work that well, because nobody had debugged the "drivers" for the hardware yet.
And if nobody release the source of the drivers (even for the earlier versions) nobody can use that to figure out if they are compatible with the next OS rev. Binary hacking is way too difficult.

Related

[Q] (Q) Updates

I am not a developer so I don't understand why it is so hard to receive updates on some android devices.
Today, particularly I am concerned with the ICS update . Why is it that even though TF meets all the hardware requirements it still can't receive ICS?
To a n average user like me this is like saying "we both have similar computers but Windows 7 won't work on yours and it's nothing do do with hardware".......
it is not the same at all. For windows computers all of the components are supported by their respective manufactures and all of those manufactures write the drivers for the operating system. By doing this you can install windows (or linux) on most platforms because of the cumulative support. In android there are many more steps. Most drivers have to be written by a single manufacturer which may get hardware from other manufactures but they do not provide software support for that hardware. writing those drivers takes some time and implementing them into each release of android as it changes the parameters it accepts ect. then each device has to be tested rather than just testing one part to make sure everything is in order then it goes through google who do even more checks to make sure that it is near perfect before it is released to the general public

[Q] a smartphone with open source drivers

Which smartphone has the source for the drivers availbale at the moment?
To know what to choose in case i want to port tizen to it...
frullewulle said:
Which smartphone has the source for the drivers availbale at the moment?
To know what to choose in case i want to port tizen to it...
Click to expand...
Click to collapse
I just wanted to post a new thread with the same question.
Also, which are the phones with the best reverse-engineered drivers? And is there much difference between this and open drivers?
If you have open drivers you should pretty easily be able to port every system to it that supports the same specs as screen resolution, etc, right?
Unrelashade said:
I just wanted to post a new thread with the same question.
Also, which are the phones with the best reverse-engineered drivers? And is there much difference between this and open drivers?
If you have open drivers you should pretty easily be able to port every system to it that supports the same specs as screen resolution, etc, right?
Click to expand...
Click to collapse
Although it would be reasonable for you to think so, you would also be incorrect. The reason why this isn't the case is because hardware manufacturers each have their own different firmware that they use, which causes a lot of the bifurcation of the Android ecosystem. Just because you have two phones that are identical in every hardware fashion doesn't mean that their firmware is the same, so there is no guarantee that one set of drivers would work on different devices.
syung said:
Although it would be reasonable for you to think so, you would also be incorrect. The reason why this isn't the case is because hardware manufacturers each have their own different firmware that they use, which causes a lot of the bifurcation of the Android ecosystem. Just because you have two phones that are identical in every hardware fashion doesn't mean that their firmware is the same, so there is no guarantee that one set of drivers would work on different devices.
Click to expand...
Click to collapse
Ooohh, so underneath android and its Linux kernel lies a firmware that handles communication between the kernel/ Android and the drivers/ hardware? So I'd need open drivers and open firmware to be able to port anything with ease to this device (at least theoretically)?
Unrelashade said:
Ooohh, so underneath android and its Linux kernel lies a firmware that handles communication between the kernel/ Android and the drivers/ hardware? So I'd need open drivers and open firmware to be able to port anything with ease to this device (at least theoretically)?
Click to expand...
Click to collapse
Yes, but practically this is impossible as firmware comes straight from the manufacturer, so even if you could develop some sort of open firmware (basically you would be making an open BIOS), you would have no way to install it onto the actual device, since they are hard coded into the chip. You would need specialized tools in order modify on that level.
syung said:
Yes, but practically this is impossible as firmware comes straight from the manufacturer, so even if you could develop some sort of open firmware (basically you would be making an open BIOS), you would have no way to install it onto the actual device, since they are hard coded into the chip. You would need specialized tools in order modify on that level.
Click to expand...
Click to collapse
Awesome, I'm finally learning what I want to know!
So if there was a manufacturer who gave this firmware/ BIOS code away (because it's an old model or they have been convinced by the community or it's a dedicated device for developers or whatever) then it would be finally easy to port every system to it (that supports the hardware)?
And how come it is possible to port e.g. Linux to Android devices without having the sourcecode of the firmware/ BIOS? Because they reverse engineered it? And if you have a device with closed drivers you have to reverse engineer the drivers *and* the firmware/ BIOS? How come no manufacturer tried to build a developer device with open firmware/ BIOS since it would give them a lot of support from developers?
Theoretically yes, but then you would still face the issue of how you are going to interface with the hardware, as the chips were not designed to be interfaced with via usb devices. They tend to be programmed at production then never altered again.
Android is linux-based, so it would stand to reason that you could port a stripped-down version of linux onto the device. Using other tools, you can create a VM on the Android device to have a fully functioning version of linux, but this is all software-level, not physical level. And the reason why they don't make open BIOS is for the same reason textbook manufacturers keep making new versions of textbook that are almost exactly the same.

[Q] Why is Android so hardware specific

May be a dumd question, but I'm asking anyway. Why is Android so hardware specific?. or better yet, why can't you install any android system on any phone?
example: you can install windows or linux on any system, you don't have to have a certain set of chips. Is it a propitiatory type thing with these phone makers. is the whole android system so small, that the coding can't be added to make it installable on any phone.
I'm not a coder, or prgrammer, I do understand it enough to read what it is doing, but cannot write anything. Can someone shed some light on this
Thanks in advance
You've got this completely bass ackwards. Android is decidedly not hardware specific. Phones, tablets, computers, car stereos, home heating/AC, watches, TVs, etc. Android is open source, which means anybody can develop it to work on just about any platform they wish. I mean, you can get refrigerators and microwaves that run Android for Pete's sake.
If you're complaining that you can't get Android on an iPhone or a Nokia Lumia, then you're barking up the wrong tree.
To add some more "devices" to the list above on which android can be installed - cars! I'm working in that industry now
And the answer above is right - if your device is totally closed for others, then you will not be able to install anything on it, maybe, without really breaking into it. Android can be put mostly on any hardware - if the hardware manufacturer wants it. The short description is - Android is implemented on top of HALs (Hardware Abstraction Layer) which are then implemented by manufacturers specific to their devices and then Android works "out of the box".

Why aren't there any universal ROM?

Why everysingle device have his own ROM and there isn't a universal ROM for all devices? I know, every single devices have lots of different features but why just a single HAL which load the appropriate drivers for each device's componente (speaker, io, chipset, etc)? (Like Windows, OSX, Linux Distros does) What is wrong with this? why not? Did anyone ever tried to build something like this?
Scr3w1912 said:
Why everysingle device have his own ROM and there isn't a universal ROM for all devices? I know, every single devices have lots of different features but why just a single HAL which load the appropriate drivers for each device's componente (speaker, io, chipset, etc)? (Like Windows, OSX, Linux Distros does) What is wrong with this? why not? Did anyone ever tried to build something like this?
Click to expand...
Click to collapse
This will take to much space to hold every driver of every device and the partition sizes are limited
Scr3w1912 said:
Why everysingle device have his own ROM and there isn't a universal ROM for all devices? I know, every single devices have lots of different features but why just a single HAL which load the appropriate drivers for each device's componente (speaker, io, chipset, etc)? (Like Windows, OSX, Linux Distros does) What is wrong with this? why not? Did anyone ever tried to build something like this?
Click to expand...
Click to collapse
Some software needed to be in a specific processor/cpu or hardware,every model of device is working differently even though their brand are same and the name of the phone is same,like there are exynos and snapdragon for samsung galaxy s flagship phone and they are working differently.maybe in the future there is but it will need experienced engineer or whatever it takes to build an os that work for every phone,and of course it is costly to maintain the development like the remix os.but it just nearly impossible(maybe not).
You know that when you install Windows, you still need drivers for almost everything, motherboard, gpu, some ssds need drivers to work properly. Maybe in the future because device space is increasing and we might have like chromebooks, 2 partitions for drivers and system files, then after installation, it determines drivers and loads them, then deletes the rest of the double partitions and cleans up. This will take up space though, a lot. And it will take a heck lot of space and will most likely only be available for new devices because what's the point of having devices from 2016 and their files in a ROM for devices from 2020 etc. Space is the only limitation.
Not Possible.
Every manufacturer built it's system using public patents (like IEEE 802.11) and multiple private patents, that they acquire or researched. This way all the companies have different architecture means different drivers set and hardware settings. In order to achieve something that you are describing, they have to agree to 1 manufacturing standard (and believe or not no company will agree to this thing). As another person wrote above about installing many drivers and stuff. This will make the ROM extremely heavy and it will take allot of time each time, it will start as it have to check the system and load all the drivers compatible. This is the thing Richard Stallman is saying for many years but close system developed by each and every company have produced 'restrictions on each and every side of the technological field'
strongst said:
This will take to much space to hold every driver of every device and the partition sizes are limited
Click to expand...
Click to collapse
Well, nice point, honestly how much space are we talking about? We may just have some generic drivers (like windows) and some thirdy part proprietary drivers to download separately
Thunderoar said:
Some software needed to be in a specific processor/cpu or hardware,every model of device is working differently even though their brand are same and the name of the phone is same,like there are exynos and snapdragon for samsung galaxy s flagship phone and they are working differently..
Click to expand...
Click to collapse
Linux (And Windows as well) is/was designed to run on a very large number of platforms, like RISC, ARM, X86, AMD64, IA64 etc. Both Exynos and Snapdragon processors are based on the ARM/ARM64 Platform so this kind of abstraction OSes do already from long time
Thunderoar said:
maybe in the future there is but it will need experienced engineer or whatever it takes to build an os that work for every phone,and of course it is costly to maintain the development like the remix os.but it just nearly impossible(maybe not)
Click to expand...
Click to collapse
We are a open source community, look at Linux kernel, everything is possible.
RAZERZDAHACKER said:
You know that when you install Windows, you still need drivers for almost everything, motherboard, gpu, some ssds need drivers to work properly. Maybe in the future because device space is increasing and we might have like chromebooks, 2 partitions for drivers and system files, then after installation, it determines drivers and loads them, then deletes the rest of the double partitions and cleans up. This will take up space though, a lot. And it will take a heck lot of space and will most likely only be available for new devices because what's the point of having devices from 2016 and their files in a ROM for devices from 2020 etc. Space is the only limitation.
Click to expand...
Click to collapse
"Space is the only limitation" Yeah but space is increasing, everyphone have at least 16 GB, only video drivers are very heavy, we may drive some generic video drivers (like xorg-amd, xorg-nvidia etc) All other drivers are relative lightweight, bluetooth, wifi, modems etc.
GenieKnudson said:
Every manufacturer built it's system using public patents (like IEEE 802.11) and multiple private patents, that they acquire or researched. This way all the companies have different architecture means different drivers set and hardware settings. In order to achieve something that you are describing, they have to agree to 1 manufacturing standard (and believe or not no company will agree to this thing). As another person wrote above about installing many drivers and stuff. This will make the ROM extremely heavy and it will take allot of time each time, it will start as it have to check the system and load all the drivers compatible. This is the thing Richard Stallman is saying for many years but close system developed by each and every company have produced 'restrictions on each and every side of the technological field'
Click to expand...
Click to collapse
I think we already talked about some aspect of this answer, private patents? CyanogenMod, AOSP, are opensource those roms run on kinda everyphone out there, we may just write a real "os" based on those roms. What do u thinK?

Why don't phones exist with standard hardware, that you can install any OS on?

I have wondered this for a very long time
Why isn't there any phone hardware which exists (that I'm aware of) where you can simply install any OS you like without jumping through hoops?
I'm referring to something similar to a PC. When you build a PC, it is all standard hardware and you can load any os you want on it, endless flavors of linux, current or old versions of windows, etc. It is simple. Both windows and linux can generally detect all your hardware and install drivers, it is simple.
With phones however it seems you are always limited. You have to find ways to root them, usually requiring exploiting some vulnerability. Hope the bootloader is unlocked. Assuming you aren't a talented developer (like most typical people), you then must search for roms for the phone, usually made by various people on forums sites or similar. It is a big mess. Or if you don't customize it, your stuck with some bloated os that the manufacturer will fail to update.
I don't understand why phones are such a mess like this, and why you can't just buy an OS-less phone, and simply install vanilla android, or any other standardized open source os on it, similar to how things work on a PC?
There aren't any unified standard in the embedded devices in general and in phones in particular. The reason that you can install compatible OS on the PC is because IBM PC is a standard, which specifies how the PC should boot, where to search for the bootloader, what kind of partition table should be on the HDD, how the devices should be connected, how to probe for the hardware, how software should use hardware, and lots of other things.
In embedded word, there aren't such standard. Until recently, every System-on-Chip used its own boot specifications and bootloaders incompatible with each other. Only in the last 2 years something started to change in a better way.

Categories

Resources