Saturday, May 28, 2011

So you want to know about Bootloaders?


Firstly, let's get some cryptic terms out of the way.
Symmetric encryption: this is the typical, familiar, scramble-your-data algorithm. You use one secret key, together with your data [called plaintext], and input them to the function. It spits out random-looking output [ciphertext]. You put your ciphertext back into it with the same key, and you get your original data back again. With this, either exactly the same function does encryption and decryption, or one function does encryption and a similar, but different one does decryption. The most popular algorithm is called AES.
Asymmetric/public key encryption: this is slightly different from the above. This time, you have two keys. One is called the public one, and it is figured out from the private one. The private key cannot be figured out from the public key. They only work in a pair as well: If you do encryption with one, you can only decrypt with the other. This is why it is special. If you encrypt with the private key, you cannot decrypt with the private key, only with the public (and visa-versa). The most popular is RSA.
Cryptographic hash: This is a one-way function. You can input as much data as you want into it, and it will come out with a fixed number of fairly random digits. These digits come out in a fairly random, and mostly normalised way. A good property of a hash function is that changing 1 bit in your input, should have a 50% chance of changing every bit in the hash's output. This means hashes are fairly unique to any particular data, and can detect even the slightest changes in it by comparing two hash ouputs together. The most popular is SHA, the most well known is MD5.
Digital signature: This uses the last two above terms. You have a message, and you want to sign it. When theyverify the signature, a receiving party can tell two things: A) That the message came from you, and B) That the message has come exactly as you intended it. How? First, you make a private/public key pair, and publish your public key everywhere a while beforehand. People remember the public key and know that you made it. When you want to send a message, first you hash that message. The hash will let anyone know if someone has tampered with the message during sending. Then you encrypt the hash with your private key (you have now signed your message). You send off the encrypted hash with your message. To verify your message, the receiving party remembers the public key you sent out earlier. They use this to decrypt the hash, and then check this hash with one generated from hashing the message themselves. If they get a match, then they now know the two facts stated previously.

So why lock a bootloader?
A bootloader lets you change all the software on your phone. By locking it, you are prevented from doing so. Why do companies do this? Well, they try to never say directly, but you can guess the reasons:
  • They don't want customers accidentally uploading faulty software to their phone, bricking it, and coming crying back
  • They want to give as little surface as possible to hackers looking to meddle with the phone, for whatever security reasons
  • At the request of various third parties, such as carriers
  • They don't want custom software being put on that gives the device extra functionality or lifetime
Disclaimer: I never said these reasons were going to make sense in your, the customer's, mind.
What does a bootloader do with digital signatures?
It uses them to check any update that passes through it. The phone keeps a read-only copy of the manufacturer's public key internally. The manufacturer then signs an update they want to give the phone. When the phone receives the update, it verifies the signature to check that the update came from the manufacturer, and only then lets it change the phone.
This means that the the manufacturer gets the best of both worlds: It stops customers from uploading unsigned changes to the phone, while allowing through only changes that the manufacturer has approved and signed. From a QA perspective, this is great! It also means that you, the customer, know that you are only getting official updates. No-one can hack an update onto your phone, or tamper with the manufacturer's before it gets to you. This meanssigning is not necessarily a bad thing! If you just want to make sure you get official updates, signing is for you.
So... what do 'we' want?
We, being the community of Android users who love to modify their phone, basically want bootloaders to follow the model that Google employs in its phones.
You can choose, by typing a command in an adb shell, whether you want your phones bootloader to be locked or unlocked. In its locked state, it will check signatures and make sure everything is official. Great for your average customer, who just wants peace of mind. In its unlocked state, it allows any custom modification, like CyanogenMod, to pass through.
When we refer to a locked bootloader, we mean one that is in its locked state, and usually also that the manufacturer didn't give us any option to unlock it. So when people say they've loaded an engineering version of a bootloader, it usually means they've found a way to load a bootloader made in the development of the phone, which didn't check for signatures (unlocked by default).
So we don't want unlocked bootloaders, or non-signing ones; that might be bad for the average customer. [TL;DR:] We want unlockable bootloaders. Note, the unlocking process shouldn't be something a normal person would be able to get to, or automatable. It should be a choice that a technical user can make.
Edit: What I think the ideal bootloader's functionality should be:
  • It should not be replaceable, or only replaceable by a signed manufacturer update. The rest of the phone should be.
  • It should have a locked state, where any updates to the phone are checked first (through signatures) to see that they're by the manufacturer
  • It should have an unlocked state, which allows any update to the software of the phone
  • These states should be switchable by a technical method
  • The bootloader should be able to tell what software is on the phone. It outputs a string, say, which includes a nonce and a signed answer to this question. The manufacturer can ask the customer to give them this answer from their phone. If the answer matches up with the signature of an official version of their software, then they can give support and/or warranty to the customer, because they know the software is in a certain state. If it does not match, they know custom software is on and they don't have to provide warranty and support.

Tuesday, April 27, 2010

Android 2.2 aka Froyo Coming Soon....

Android handsets have been coming out from the various mobile manufacturers stable at a brisk pace. The development of Android OS has also been pretty good.The OS has been gaining market share by leaps and bounds. Currently, the latest version of the Android OS is 2.1.


Reports suggest that Android 2.2 will soon be announced. The Android v2.2 is named “Froyo”. The new version of the Google OS will come with some major changes under the hood.

The reported features include:
*JIT compiler
*Free additional RAM
*OpenGL ES 2.0 enhancements
*Flash 10.1 support
*Fixed problem with “crazy screen” / Resolution of cross multitouch
*Activation of Color Trackball (Done On Several CM Rom's )
*Enable FM radio
The most important change in Android 2.2 is the JIT compiler. The JIT compiler translates the application written in JAVA to native code. This leads to significantly better performance, richer graphics and better battery life.  There is also Flash 10.1 support in the latest version of the OS. The new version of Android OS is also expected to enable Wi-Fi n support in devices which have the required hardware. The Linux kernel of Android will also get an update from 2.6.29 to 2.6.32. This will lead to additional free RAM on the various Android devices.
It is expected that that the latest version of the Android OS will be announced on May 19th, during the Google’s I/O event.

Wednesday, January 6, 2010

Comaprision Chart

The Dust for Nexus One has now settled. Yesterday Google announced their New Super phone category phone "Nexus One". Thought there was nothing new in the Android press meeting apart from New Google Earth App and Voice commands in Mailboxes. As every one already saw the Unboxing video of Nexus One Weeks ago but google just officially launched it.
Its not yet there to beat Apple Iphone (this is what people say), but i personally feel that the craze for Iphone is slowly going down.
If it is not yet beating Apple Iphone, no worries its always getting closer to it.


Thanking Billshrink.com for this amazing comparison between some amazing Phones.
Apart from Market place I dont find Android lacking anywhere, and event like this small of yesterday will definitely encourage more Developers.
 Hope Android is the world we live in. Cheers...

Sunday, January 3, 2010

Google Tablet: Google and HTC’s Next Project vs iSlate?

It appears Apple  is not the only company who is mauling their tablet for the people, there’s a rumor that Google and HTC – the tandem that will bring forth the Nexus Strike this Jan, is about to unleash their own tablet as well. The name is not yet disclosed, but whatever it’ll be called (G-tablet, Schmidt’s Pad etc – oups can’t help to give that premonition) alot of speculations are starting to develop with this purported tablet.
google tablet
iSlate carryout two freshly baked patents that was said to surprise the users; Google Tablet on the other hand will have all the sauce of Chrome OS, Qualcomm processors and a dash of a new software from Adobe. (Mmm, what could that be? Am i sensing a new Air Product?)
According to Smarthouse “HTC, who have been working closely with Google for the past 18 months have several working models of a touch tablet including one model, is based on the new Google Chrome Operating System say sources.”
google tablet 2While everything is still on a stream of uncertainty, there’s a lot of criticism with this rumored release. One is, will BIG G became the Big Jerk for its neighboring companies? – Remember Mototola Droid With just a short span of three months, the nexus one phone will reach its debut and it's ZOMG features is far better than that droid phone with the keyboard. Without a doubt this release  will kill the competition with the moto-droid not to mention the ‘pissed-off’ buyers who happens to be stucked on a 2 year contract with Veriz only to find out that there’s a better phone – Nexus One.
So much for the happy ending, indeed.

Apple iSlate

A new decade is fast-approaching – Six days from now and the world that we know will have its yet another phase in the course of history, hopefully towards the ‘brighter side’, ideally speaking that’s all what we want, don’t we? Thus, tech enthusiasts are already getting too delirious with what the industry has stored for them (same for the non techsavvy citizens too) Off the record, you can shout the company that you think will start the year with a new gizmo – Did I hear you say the big A as in Apple ? Well if that’s the case then your tech oriented intuitions are correct for Steve Jobs favorite ‘fruit’ will release a gadget on January 26, 2010.
apple tablet picture
This is not another Jesus Phone (as TC calls it), i mean iphone. Not a new iPod twin type (disappointingly) also this not about contacting an extra terrestrial being from. … bahh, this about a Tablet! Yep, A T-A-B-L-E-T guys. Could somebody call the clowns now, please? I can feel our readers are starting to get bored.
apple tablet pic1
The size of this ‘very soon’ tablet will be 7-inch (100% sure) Although there will be a 10incher follow-up rumored to be release on spring.
The concept of this tablet sounds mediocre: Try to think about the iPhone make it 7-inch and voila we got the new apple tablet.

A tablet with a multi-touch feature: It may sound new to the tablet industry, but for the users? Of course this is expected. It wouldn’t be the image and likeness of the iPhone without a multitouch feat, wouldn’t it? The funny thing though is how appleinsider manage to salvage this comment:apple tablet
One current senior employee at Apple would only say that Jobs is “extremely happy with the new tablet.” Someone else who recently left Apple reportedly said that users will be “surprised how you interact with the new tablet.”
In my opinion, I think users will be extremely happy if they saw the new tablet with ‘minority report like interface’ infused with it.
minority report
And that’s why there’s a buzz that Apple had recently filed for two patents namely, Keystroke Tactility Arrangement on a Smooth Touch Surface: Ability of the system to detect the type of interaction you are playing with it. and Multipoint Touch Surface Controller: A more advance system for detecting multi points on a touch screen.
Did I say it will be unveiled on the 26th of January, 2010?

Now TC is cooking some theories again about the nameless Tablet, they have a strong belief that this one will be named as iSlate. Snap! okay first and foremost, if you’ll say that it sounds turd then worry not, there’s a lot of people who are with the same boat as you are. But for what it’s worth, the term 'slate' has been used in the Tablet industry. Which simply refers to as a tablet pc sans the keyboard and utilizes stylus/fingertips for the interaction.

Apple has acquired the domain name islate.com back in 2007.
islate thumb iSlate is the new Apple Tablet? See the leaked Specs

Mr Robin of TC manages to play some tech-detective game of who’s the owner, tracing some link of the islate domain to the impending release of the new tablet today. Is it a coincidence? Well, iSay we just wait for 3 weeks to find out, it isn’t that long, is it?