[Q] How does Android handle device hardware? - Android Q&A, Help & Troubleshooting

Hi there,
I'm currently studying Software Development and Engineering in college. I'm planning on building something with android OS. I'm just wondering how Android handles hardware.
Does it detect the available hardware on a device it's installed on? or does it need to be set up for a specific configuration of hardware. Say I install android on a tablet with no phone capibilities or GPS for example, does Android handle the fact that these features aren't there and just get on with it's job? Or does it need to be tweaked for the device in question?

It needs to be built from source for the device, with all hardware drivers and binaries. Unlike Linux and Windows, you can't just install Android on a phone and have it work with most hardware. Computer OSes have years and years of driver support and backing from manufacturers. On smartphones, with the exception of a few manufacturers, a lot of them are very stingy and secretive with their proprietary drivers and other essential files, and they're not really supportive of third party development. This sucks, but it should change in future and smartphones could be just as open as PCs (I hope).

Android has a HAL (Hardware Abstraction Layer) for handling the hardware. Technically it's capable of detecting and enabling the device hardware in a modular way. But since the Android phone's hardware doesn't change typically throughout the life of the phone, the manufacturers tend to tweak it for each device so that you get the optimized version which can run only on that device. While PC like functionality is certainly possible with Android OS itself, it's not needed on a phone since there is not much scope for hardware addition / removal / upgrade.

Related

Running Maemo 5 on Android hardware

Could anyone answer my few questions to help me get a grip whether the idea is feasible?
* How different is Android kernel from standard Linux (ie. Maemo) kernel?
* Is most of the hardware abstraction handled by Linux kernel, or the Dalvik VM internals and library?
* Is the kernel accessible? Ie. can I supplant my own init script and run custom binary in place of Dalvik?
* Is the Android hardware hackable? Ie. can I get direct access to the root partition and put custom content in?
I'm asking because I would like to get a better piece of hardware than N900 (namely HTC EVO 4G) and port Maemo 5 (ie. Mer) on it. But if Android hardware is a closed black box, I won't bother.
I don't have experience with Android (I like Maemo so much better) and I wouldn't like to spent a lot of money on hardware I could not hack.
Some android hardware is more open to changes, such as google's devloper phone.
People have managed to run Debian GNU/Linux on the nexus one, but not all the hardware is functional as of now.
There are some binary only libraries and drivers for some vendors, meaning you might not be able to use all of the hardware.
I do believe it is possible to port the Maemo OS on the nexus one, and I would love to try it if you gain momentum on this.
Unfortunately I do not know Maemo OS enough to be of any assistance apart from telling you that Android use a standard ARM Linux kernel with some modules added to enable the special IPC that Dalvik uses.
As the owner of an N900, I would love to see this project gain momentum. I don't dislike the N900 hardware, it is actually quite decent but I would prefer a smaller, thinner and lighter phone with a capacitive screen.
Maybe MeeGo is the other option to consider since that OS will be designed much more in the open which would possibly make it easier to port to various devices. (Keep an eye on the meego website for the May release, which will be the first release with UX)
Also, my brother owns a Nexus One by my recommendation so porting Maemo to his phone would be great. (Unfortunately I'm not a developer so I would rely on this forum for a guide)
I am considering getting Nexus One. As I understand it supports messing with rootfs without restrictions. (Of course you loose warranty this way.)
Byte_76 said:
Keep an eye on the meego website for the May release, which will be the first release with UX.
Click to expand...
Click to collapse
Starting with MeeGo base is a viable option.
But the upcoming UX release will be a direct port of current Moblin UI. Maemo is a different beast.
And I am against Maemo 6 migration to Qt, so I would like to stick with current Maemo 5.
With Maemo 5 being a fully functional OS I think it makes sense to try to port it directly first, however if that doesn't work then MeeGo might be another option.
After some research I found that nor Qualcomm MSM7200A, nor Samsung S3C6410 chips have open 3D driver available.
Since Maemo 5 UI requires working OpenGL ES acceleration for its desktop and window management, I guess this project is in a dead-end until I find viable platform for experimentation.
Maybe Mer is another option:
http://forum.xda-developers.com/showthread.php?t=565480
http://forum.xda-developers.com/showthread.php?t=626287
http://mer-project.blogspot.com/2010/02/mer-project-just-bunch-of-redshirts.html
http://wiki.maemo.org/Mer
Without Maemo 5 visual effects it's soooooo stone age, that I don't really care for.

ubuntu for android

http://www.ubuntu.com/devices/android
after reading the description, i'm confused about whether it's ubuntu running on top of android, or it's dual booting
anyways, hopefully we get it working on touchpad
From the way it looks it works only if you plug it into a tv out via hdmi and it runs inside android. I imagine this will only be for a very few select phones.
No source, speculations all the way.
Straight From the description:
" Easy to integrate to your Android phone
Ubuntu for Android drops in cleanly alongside the rest of Android, so it is easy to integrate into current production roadmaps. The hardware requirements are straightforward and, with a broad range of ARM and x86 hardware supported, it can realistically be added to phones already in development.
Of course, your phone needs the docking capability and hardware support for HDMI and USB. But that’s standard for high-end models in the current generation of devices in development"
samsky said:
Straight From the description:
" Easy to integrate to your Android phone
Ubuntu for Android drops in cleanly alongside the rest of Android, so it is easy to integrate into current production roadmaps. The hardware requirements are straightforward and, with a broad range of ARM and x86 hardware supported, it can realistically be added to phones already in development.
Of course, your phone needs the docking capability and hardware support for HDMI and USB. But that’s standard for high-end models in the current generation of devices in development"
Click to expand...
Click to collapse
And there's the nail in the coffin for touchpad buntu....

Android device with FOSS drivers or vanilla support?

I'm looking for something very particular. I would like to get my hands on an Android phone or small tablet. Only, I need something which either has existing support for the vanilla Linux kernel (not a custom Android kernel) and typical userland OR has a full set of FOSS reference drivers which can be backported to vanilla Linux. I'm looking to set up a device which runs a Linux distribution (probably custom-derived from source or Gentoo) natively, not on top of Android.
The device's USB port must also be capable of USB hosting. For instance, the Nexus is technically capable of this with a properly configured kernel. Ideally the device should have a physical keyboard as well.
It does not need to be brand-new. I don't need powerful graphics, and the CPU can be as weak as the low-power ARMv6 phones (although I'd like to find one with similar specs to the HTC Evo at least).
Edit: I should mention I have no intention of running Xorg on the phone. So high-performnace GPU drivers are not a must. It needs only support outputing the console to the screen, using the keyboard, and using the wifi and USB port. Other things like bluetooth and the camera probably won't be used at all on this device, so drivers for them are not necessary.
I want to use this as a simplistic fileserver and VPN which I can connect to / tunnel into from other locations. I'm targeting an Android phone because it's incredibly low-power so I do not need to worry about the cost of keeping it on 24/7. And because they can usually be purchased used for quite cheap. Failing that I had my eye on a Raspberry Pi, but the point of the Android phone with a QWERTY keyboard is that I could also use the device in handheld form, since it would have the essentials like a screen and keyboard already built in (as opposed to needing a monitor&keyboard with the RaspPi).

Difference between Android and windows

Hi all. I have a random question. Why is android criticized for its fragmentation but not windows.
Doesnt windows pc come with so much more different hardware Configurations?
How do developers do it for windows then?
Sent from my HTC Desire using XDA
lol...
IMHO The main problem is that despite the numerous configurations of PCs the OS is always the same. Unique to all/everybody no matter the hardware.
The differences are solved using custom Drivers for the HW (usually from the manufacturer) but that does not change the OS.
But with Android, there is not a "unique/universal" version that works on every hardware. It is modded by every hardware manufacturer/implementer.
Starting from the "root version (official android release)" Drivers are usually integrated to the OS. Also many Mods by each developer. So, in the end you get a "customized" version of the original. And so the so called "fragmentation"
This is one of the main advantages/deficiencies of open source. You are not tied/limited by a closed source OS, but in the other end, you have lots of variation of the same software.
Just a few random thoughts ...
Have fun
Dip

Would this crazy idea work?

So the whole idea of having a phone that can be put in a dock and used as a computer is really cool, but me and my friend came up with an idea to expand on that. Would it be possible to have both android and Linux on the phone and then have an app/desktop icon to switch operating systems? I know this can be done on other devices. My mate has a chrome book and installed Ubuntu on it. Just a keyboard shortcut will switch operating systems. So would it be possible to do the same thing just on an android device. Hardware wide, there shouldn't be any problems. His chrome book has a cpu that's low spec enough to not have any sort of cooling system/unit whatsoever and only has 4 gigs of ram. Since the ROG phone has a top of the line smartphone processor, an actual cooling unit, and double the ram I don't see why there should be any issues related to the hardware. The thing I'm not so sure about is software issues. From my perspective it should be possible to do something like this, but I'm not at all familiar with software and programming so I wouldn't have any idea if it were possible or not.
Oske829 said:
So the whole idea of having a phone that can be put in a dock and used as a computer is really cool, but me and my friend came up with an idea to expand on that. Would it be possible to have both android and Linux on the phone and then have an app/desktop icon to switch operating systems? I know this can be done on other devices. My mate has a chrome book and installed Ubuntu on it. Just a keyboard shortcut will switch operating systems. So would it be possible to do the same thing just on an android device. Hardware wide, there shouldn't be any problems. His chrome book has a cpu that's low spec enough to not have any sort of cooling system/unit whatsoever and only has 4 gigs of ram. Since the ROG phone has a top of the line smartphone processor, an actual cooling unit, and double the ram I don't see why there should be any issues related to the hardware. The thing I'm not so sure about is software issues. From my perspective it should be possible to do something like this, but I'm not at all familiar with software and programming so I wouldn't have any idea if it were possible or not.
Click to expand...
Click to collapse
You can do it with linux deploy afaik.
Honestly, it would be much better to get a fully OpenSource build running on this hardware, no chroot env, no android kernel, no android libs, no proprietary closed drivers.
Since Asus is going with the ROG branding on this one, maybe they will make source code (drivers, libs etc) available for the the linux hackers in the ROG fan community to build images for it.
There is already a lot of linux use on ROG notebooks and a pretty decent following in the ROG fanbase as it stands but if we can't get a pure OpenSource build, at least a libhybris supported port using LXC and the android kernel as a start.

Categories

Resources