I've recently purchased Samsung Galaxy Android phone after using Openmoko phone for 2 years.
One of the reasons for choosing Android was is that it's open sourced.
I don't want to depend on phone maker to provide updates for my phone. I'd like to do it myself.
Right now I'm in research stage if it's worth the time or not. So here are the questions:
I found some tutorials for building ROM images from source. They tell that Android build script will ask for make of the phone before building kernel. Does it mean that all the phone specific stuff is handled by the script or I will have to do some voodoo before I can flash it onto my phone?
Drivers. How are they handled? Are they included in the source as binaries and added automatically (question 1) or will I have to dissect old firmware to get them and put in my build? I realize that would mean some problems with module/kernel versions compatibility.
Is there is something I'm not aware of that would prevent me from building my custom firmware or make it very time-consuming?
I'm not afraid of installing SDK's and toolchains, after all I'm an Openmoko owner.
It's gonna be a little more complicated than that.
On any consumer Android phones I've seen, the user doesn't have root access to the OS. So step one, would be finding an exploit to get root.
Even after you get root, all consumer Android phones "lock" the bootloader to prevent unauthorized OS images from being booted.
The Android OpenSource project only contains device drivers for a small number of phones (Google dev phones, possibly the Nexus One?). For other phones, the drivers are proprietary binaries that the manufacturer loads on the phone. They generally aren't available separately.
Even with all of those obstacles, some enterprising smart guys have managed to create custom "ROM's" that blend the OpenSource release with drivers ripped OEM install on the phone, etc. CyanogenMod is one of the best known and is available for several different Android devices, but unfortunately the Samsung Galaxy does not currently appear to be one of the device supported by Cyanogen.
I found an old link here to a guide to getting root on the Galaxy and loading a custom ROM on it, but unfortunately the ROM they link to doesn't seem to be actively maintained anymore. It might be worth doing some more exhaustive google searches to see if you can find anyone doing active development on the Galaxy.
Related
i know it might be the same as this question. i am from the philippines as well but the phone mentioned in that link is a samsung which is an internationally well-known brand and i know that adb supports that brand. what i am planning and really want to buy is this locally known phone. it got a really nice specs but i am worrying that i might not be able to use it on app development. i found adb drivers on the net and installed it but i don't know how to use them with android studio. the reason why i want to use a phone for development is because my laptop slows down with i run android studio and the emulator at the same time. if some co-pinoy already know a phone that they already used for app development within the same price range of flare x, please let me know. please guys i really need help on this matter.
Any phone that allows you to enable USB-Debugging will be suitable for android development. Most developers try to stick to a phone that has a clean Android base like a Nexus or Moto X, as it rules out any interference with vendor specific changes to Android (like Samsungs TouchWiz).
See this page for further information on using a hardware device for development. Google does not recommend any specific device.
Also see this list for device vendors providing ADB drivers. If you want to play it safe, stick to these vendors.
This download page suggests that the Google provided driver is suitable for the Cherry Mobile Flare X too.
I want to modify the system apps running on my specific phone. I am stumped about some important steps on how to do that - see my questions further below.
N.B.: I am not interested in deploying these modifications to other phones. Instead I want to play with the original code and improve it. Hence "create your own system app" is no sufficient answer.
Background
I am just starting to get into Android development (have sufficient Java knowledge, though). There are plenty of great tutorials out there (e.g. here and here) but they all seem to cover user application development. I'm more interested in getting (a little) "closer to the metal". Unfortunately I am unable to find good sources teaching how to do that.
Example
As an example let's say I want to modify how the built-in brightness control works (e.g. changing the minimum) or want to add features to the call screen (e.g. "Send SMS instead" when the line is busy).
Specific Questions
I obviously need these things to get started...
Sources
The sources for (parts of?) the OS running on my phone. This is the part that confuses me the most. Can I just download the official sources or is it likely that my vendor made modifications?
In my specific scenario (I use a Fairphone), could those modifications be contained in any of these sources:
some core apps deployed by the vendor
the image binaries (some way down the page)
sources for the Linux kernel and some other libraries
Tools
I really hope to stay in Java-land. But either case I need a development (I hope to use Android Studio or Eclipse ADT) and a debugging environment (I hope the Android Virtual Devices suffice).
Is it a valid assumption that I can use those tools for system apps or are they usually implemented in C?
Process
Assuming I can download the official sources and get started with, e.g. Android Studio. As opposed to developing a user app, do I have to do anything special to emulate the modified system app on AVD?
I'm asking because I assume that AVD already runs an unmodified version of that very app.
I am just starting to get into Android development (have sufficient Java knowledge, though). ... I'm more interested in getting (a little) "closer to the metal".
You can of course follow your own bliss, but you may find it pretty frustrating to learn Android development by hacking on the OS itself. You'll find yourself doing a lot of OS debugging and working with harder-to-use tools than normal.
Example
As an example let's say I want to modify how the built-in brightness control works (e.g. changing the minimum)
I realize this is just an example, but this could be a tough one, because there are a lot of things that contribute to brightness control -- there's the app with the UI that sets it, but that talks to the framework and ultimately the driver for the hardware that actually deals with brightness curves for the display, in coordination with the ambient light sensor.
or want to add features to the call screen (e.g. "Send SMS instead" when the line is busy).
There's a dialer app, but implementing a feature like that will be...difficult, provided it's even feasible. I don't know offhand whether that sort of call state is available to the API.
Specific Questions
I obviously need these things to get started...
Sources
The sources for (parts of?) the OS running on my phone. This is the part that confuses me the most. Can I just download the official sources or is it likely that my vendor made modifications?
If you're replacing system apps, you'll need to run an OS signed with debug keys; you don't have access to the signing keys for the installed system apps on a retail build of the OS that would enable you to replace them. That will mean either getting a debug-keys installation or building it yourself from source, and flashing it to your phone. I would most strongly discourage you from using your daily phone for this sort of work -- you don't want it to be bricked when you need to receive an important call.
If you're not running a Nexus phone, then yes, your vendor has made modifications. The system apps are probably modified, and you almost certainly won't have access to the closed source of those apps. Also, there will be closed-source device drivers that are essential to the operation of the OS that you won't have access to. If you're trying to get AOSP Android up and running on such a device, as an individual hacker it's at best very, very difficult. If you're willing to use something like CyanogenMod, you could look to see if (and to what extent) they support your hardware.
If you are running a Nexus phone, then it's a goal of the AOSP project to try to have the OS bootable on select Nexus devices, though you won't necessarily enjoy the fullest functionality of the retail OS build, depending on the state of drivers -- even Nexus phones can have closed-source drivers and bits that make life more, um, exciting for building with AOSP.
In my specific scenario (I use a Fairphone), could those modifications be contained in any of these sources:
some core apps deployed by the vendor
Almost certainly
the image binaries (some way down the page)
Not sure what you mean by that
sources for the Linux kernel and some other libraries
It's unlikely there are significant modifications to the kernel itself, though vendors sometimes do...interesting...things with system configuration. I already mentioned device drivers. Vendors also have custom implementations/modifications of some framework APIs.
Tools
Vendor-specific tools are rare.
I really hope to stay in Java-land. But either case I need a development (I hope to use Android Studio or Eclipse ADT) and a debugging environment (I hope the Android Virtual Devices suffice).
Much of what you want to do can probably be implemented in Java, though it depends on how close you're getting to the hardware which can be difficult to know.
Is it a valid assumption that I can use those tools for system apps or are they usually implemented in C?
The "system apps" are implemented in Java, but again, you sort of have to know where the dividing line is.
Process
Assuming I can download the official sources and get started with, e.g. Android Studio. As opposed to developing a user app, do I have to do anything special to emulate the modified system app on AVD?
That's actually different, because you're dealing with an emulator system image instead of a phone image. The emulator system images are completely open source, and you can build them from AOSP.
I'm asking because I assume that AVD already runs an unmodified version of that very app.
That's correct.
To come back to my initial point, if you read between the lines of what I'm saying, I won't tell you it's impossible, but the difficulty ranges from freakin' tough on the easy end to spend-years-of-your-life on the hard end. If you really want to proceed, your best bet may be to buy the phone that's best supported by CyanogenMod and work that angle; there's a more active developer community there to help you. I know you're more excited about trying to customize the OS than you are in making a user-space app, but you'll experience less frustration with the latter than the former.
I wish to test my Android application against different versions of the Android OS on physical hardware. The need comes from testing interactions of my program with 3rd party hardware (barcode scanners).
In order to "switch" between Android OSs, I assume in order to "reimage" my phone, that I will have to root the phone then set the particular OS version with various images.
There seems to be much discussion on how to root the phones, however I'm curious if there is a easy/standard way to do this for developers (e.g. standard hardware which allows for this process to happen quickly/easily)? If not, how can I proceed?
Unfortunately, other than rooting your phone and flashing it w/ various OSs, you don't have a lot of options. My company keeps a tone of devices on hand running various different versions of android to address this exact challenge.
Otherwise, there are services out there that may be of help to you. Take a look at these:
http://www.deviceanywhere.com/
http://www.perfectomobile.com/
I'm sure there are others as well.
If it is just a testing of release candidate (not your BAU testing development), you may publish your app on Google Play as closed beta and then ask your friends (or some other community you trust) to play with the app.
My boss recently gave me an HTC Wildfire phone for doing an Android version of one of our mobile apps, which is all fine and good, except that the app requires API level 8 (ie Android 2.2), and the phone itself only has Android 2.1 installed. After much googling, I discovered that this phone does support Android 2.2, and carriers will be rolling out updates over the air for this model phone "in the near future".
Since I'm not entirely certain what our lazy carrier's definition of "near future" is, it would be nice if I could download images for particular releases and install them on my phone. Coming from the world of the iPhone, it seems that this should be something rather necessary in order to successfully develop an Android app.
Yet, it doesn't seem that Google offers any Android OS updates themselves. Have I no choice but to wait for the carrier to release an update?
Edit: Thanks for the suggestions regarding the emulator, but I'm asking about testing on hardware only. I already have a working 2.2 emulator image, but I need to test on hardware now, since the emulator does a very poor job of things like video playback and audio processing.
There's a few ways you can test your application on Android 2.2:
1) You can use the Emulator provided by Google in the SDK. It is possible to create a virtual machine of any version of Android with various hardware options. However, the emulator does have some limitations such as not supporting certain hardware options (such as bluetooth) and it's also dreadfully slow to boot.
2) If you have to use an actual phone with 2.2, you can root your phone and flash a custom ROM. I'm not particularly familiar with how to root the Wildfire, or what custom ROMs are available for that specific phone, but Cyanogen Mod has pretty good ROM support for HTC phones, as well as an active forum with tutorials.
No, it's not possible to download images before OTA. You could check CyanogemMod from time to time - they're working on Wildfire support. Also you could use an emulator.
If you are wanting to bounce around with newer versions, I recommend the Nexus One as a dev phone if you can get your hands on one. Or, if you can deal with the constraints, start with a built-in AVD emulator with API 8 until your phone gets the OTA update.
The Motorola Droid is also getting/has 2.2 on it. At least in the States, in seems that most of the phones on Verizon already have it (non-scientific, just from talking to people I know). So if that phone is available, it may be a decent choice.
Is it possible to install Android in a normal mobile phone?
I have Sony Ericsson Naite which has only key pad interface (No touch). I would like to install Android in my phone for experimenting with it. It will be great if its possible to dual boot Android with Symbian :-).
Do we need any other special hardware to install operating system in a mobile phone? Will Android work on a key-pad mobile?
Any pointer/suggestion is appreciated.
Thank you in advance.
The Naite is a fairly simple handset running on the Sony Ericsson JP8 platform.
End users are not supposed to be able to update the firmware on the phone.
Only Sony-Ericsson partners are supposed to get the PC software to update the firmware and only Sony-Ericsson is supposed to be able to create new firmwares.
(maybe you can hack the phone so you get it to boot on android or symbian but that's going to be unsupported behavior that nobody will guarantee)
If you want to experiment with creating your own android firmwares, I suggest buying an ADP2 handset from google.
If you want to experiment with creating your own Symbian firmwares, I suggest buying a Texas Instrument Zoom 2 device since it is the reference platform for Symbian.
The Zoom 2 seems to also support Android, by the way.
If you just want to experiment with application development on both platforms, I suggest using the two SDKs and emulators first.
There are some pretty cheap Symbian phones out there, particularly in the Series60 3rd edition range and, depending on where you live, you might even be able to find a Pay-As-You-Go Android phone like the Pulse.
I STRONGLY encourage you to go visit the XDA Forums and visit their Android sections for this kind of information.