Android N is Saying Goodbye to Oracle’s Proprietary Java APIs

Google has announced to move away from Orcale’s proprietary Java Application Programming Interfaces (APIs). In the next version of their operating system, Android N, the new standard will be OpenJDK, an open source alternative.

It all started last month with a “mysterious Android codebase commit”  which shows 8,902 files were changed, clearly notes OpenJDK code was added to Android:

Initial import of OpenJdk files.
Create new libcore/ojluni directory with src/main/java and src/main/native subdirectiories.
Build ojluni into core-oj jar.
Use openjdk classes from java.awt.font package.
Copy all files from jdk/src/share/classes and jdk/src/solaris/classes directories in openjdk into libcore/ojluni/src/main/java.
Copy following native files from openjdk to libcore/ojluni/src/main/native: [long list of files]

I largely suspect it has a lot to do with Oracle vs Google case in which Oracle, which only bought Java a few months ago from Sun Microsystems, claimed Android has copied Java’s source code in their operating system. To anyone who didn’t follow the case, the main code in question was just a few lines written by a guy at Google who previously used to work at Sun on Java. That’s right. He wrote the code in both cases (among thousands of lines of code he wrote on both projects) and it happened to be the same on a few lines by the same guy (Joshua Bloch). Out of millions of lines, this was it:

private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) { 
    if (fromIndex > toIndex) 
        throw new IllegalArgumentException("fromIndex(" + 
             fromIndex + ") > toIndex(" + toIndex+")"); 
    if (fromIndex < 0) 
        throw new ArrayIndexOutOfBoundsException(fromIndex); 
    if (toIndex > arrayLen) 
        throw new ArrayIndexOutOfBoundsException(toIndex); 

Continue reading


How to Protect Your Android Device from Stagefright Vulnerability


A day ago, a vulnerability was disclosed for Android phones performing a remote code execution over MMS. The vulnerability, named Stagefright after Android’s built-in stagefright media library, occurs when your Android device, upon receiving an MMS, starts processing it in the background, so you have seamless experience when you actually open it up. This processing is done automatically and without any user action performed. Apart from the incoming MMS notification, you may never know if your device was accessed by a malicious user or not.

Joshua Drake, the security researcher who reported the bug believes

All [Android] devices should be assumed to be vulnerable,

he added,

Only Android phones below version 2.2 are not affected.

Zimperium zLabs, the mobile security firm Drake is a VP of, notified Google of the vulnerability and according to Drake,

Google acted promptly and applied the patches to internal code branches within 48 hours.

Upon reaching a Google spokesperson, she’d responded with an email that,

The security of Android users is extremely important to us, so we’ve already responded quickly to this issue by sending the fix for all Android devices to our partners.

Although it is to be noted that security is baked deep into Android and that the OS uses a sandbox environment which runs apps, processes, and services, in their own separate areas of sort. Coupled with SELinux enforce enabled by default, apps outside the sandbox can’t have access to data of other apps, processes, and services. According to Google vulnerability report, only 0.15% malware exist in Android. For more details on how security works in Android, read a detailed post by Android Authority and first-hand information about security on Android about the platform’s Lead Security Engineer, Adrian Ludwig.

Even though Google applied the patches to the Android Open Source Project, we all know how terrible OEMs are about distributing updates to their users. I’m not going to assume this vulnerability is going to change anything with OS updates on OEM devices hence a solution unless you decide to toss out your current phone and go Nexus.

How to protect from the vulnerability?

I’m going to demo how to do that on Google Hangout, the default SMS application on many Android devices and Messenger, another famous SMS application by Google.

Continue reading

Android One in Pakistan – Hands on with QMobile A1

Android One is a line of consumer electronic devices running Android operating system. Unlike other Android-based smartphones, Google manages the design, development, marketing, and support of these devices whereas the original equipment manufacturers (OEM) are responsible for manufacturing them.

Cherry on top is the near-stock Android experience the smartphones running Android One get. With minimum (or no) bloatware and OEM modification to the OS, you get to use Android the way it is meant to be used.

With Android One we set the bar to be a great software experience and a great device. We really want to bring in a whole new set of people who have never tried a smartphone before.

Sundar Pichai, Senior Vice President of Products, Google.

Android One was introduced in Google I/O 2014 with smartphones starting to ship from September 2014. Now there are dozens of manufacturers in India, Bangladesh, Nepal, Indonesia, the Philippines, Sri Lanka and other South Asian countries. A couple of days ago, Google, with collaboration of QMobile, launched the first Android One phone in Pakistan, QMobile A1.

I’ve been a fan of stock Android myself and thus I own a Nexus phone, tablet(s), and a player. When I heard about Android One heading to Pakistan, I decided to jump the wagon and buy a QMobile phone to try out the software in lower specs device. Now, I’ve only used the phone for around 8 hours and these are my initial thoughts.

Continue reading

Windows 10 Will Run Android and iOS Apps

Windows 10 will run ios and android apps

Have you been a proud owner of Nokia Lumia? Do you love its apparent build quality, design aesthetics, and killer camera? You very well be but all of these bells and whistles don’t seem to matter when your friends with an Android device or iPhone can flaunt an awesome game or a useful application that just isn’t available on Windows Store yet. If you think that way, you’re not alone. App selection is a major problem faced by manufacturers wanting to enter the mobile world. Though, Android has arguably taken over the world of mobile OS with over 80% of market share, iOS still holds its ground in the global market. Both of these ecosystems have a combined market share of over 93%. That doesn’t leave much for other players in this game, including Microsoft.

Infographic: Smartphone Duopoly Pushes Competition to the Fringes | Statista

Source: Statistica

For Windows Mobile, it goes something like this:
Windows Phone app selection problem

This is why Microsoft was largely unable to get more developers on board for its platform. Sure, you’d find almost all top-tier apps on Windows Mobile, but below that level, it’s a different story altogether. Many apps either don’t have a presence on Windows Mobile or they don’t update it as much as their Android and iOS counterparts.

Continue reading

Google slams opposition, claims Android only has 0.15% malware


Over the years, the most widely used mobile platforms has been called many names. ‘Malware-infested’ is one of them. Well, not any more. Today, Google releases an official report sourcing data collected by them that proves that Android is one of the most secured operating systems in the world, with as low as 0.15% malware rate on Google Play. Adrian Ludwig, the lead engineer for Android security, says

It’s part of a larger ecosystem cleaning effort at Google, which also includes keeping an eye out for potentially harmful Chrome extensions.

Continue reading

Android Lollipop – Unlock Your Device at a Trusted Location


Google smart lock’s location unlock option. Picture via TheVerge.

Having a smartphone is more than a style symbol now. We manage our digital lives, social, and professional lives on our smart devices now. That would mean carrying it around with us. With the increasing amount of sensitive and personal data we tend to carry in our phones, having it locked with some sort of PIN, password, or pattern is a reasonable security option. But we don’t require to use them always, now do we?

Do you keep a count of unlocking your phone or a tablet in one day? I bet it exceeds 2 figures. So, with all the cool and awesome features of Android Lollipop, there is an option to unlock your device based on a criteria of you being at a trusted place. That trusted place can be your home or your office cubicle (though many coworkers can be intruding so I wouldn’t advice to add your work place to the list). Once you added trusted places, your device will be automatically unlocked when you’re any of those places. Cool, right?

Let’s see how you can activate this option, shall we?

  • Update Google Play Services via Play Store. Android’s recently released this update so it may take a couple of hours or maybe even a day for the update to be available on your device running Lollipop. But, if you’re like me, you would want to get your hands on this feature right away. Well, then, go ahead and download the APK of the latest Play Store Services, install it, and reboot your device.
  • Set up a PIN, Password, or Pattern screen lock method. In order to use smart lock, you have to use one of these options to lock your device. You can easily access this option via Settings > Security.
  • If you were able to successfully install/update Play Services in Step 1, you’d see the Trusted Places option under Smart Lock. Select it.
















  • If you’ve added your home and office location via Google Now, it would show these two places in the Trusted Places option so you can go ahead and choose any or all of these locations.
















  • Apart from these two locations, you can also add a custom location as a trusted location by simply choosing the option Add trusted place. It would take you to the map that would allow you to choose a custom trusted place. (Needless to say this isn’t my actual current location).
  • smart-lock-trusted-places-custom-location
















Do enjoy this little but useful feature.

Basit Saeed

Passionately a software developer, Basit Saeed considers himself a person who believes in software and social media being the change agents of 21st century. He is a techy, a gadgets freak, and loves playing with code whenever he can. He tweets at @basit_saeed.

Lollipop for Your Phone


In case you were wondering, your smartphone won’t be asking you to buy it a Lollipop. Not any time soon, anyway.

Back to the actual topic, Google has announced to roll out one of the biggest version upgrade since Android 4.0 today. Lo and behold, Android L(ollipop) 5.0, following the tradition of name its operating systems alphabetically after sweet delicacies. This latest version of Android have been in spotlights ever since Google announced it in I/O 2014 a few months back.

So what’s new?

A bunch of stuff, really. From complete revamp of internal workings to a sexier, sleeker user interface to material design, it is said to be the

largest, most ambitious release on Android

Some of the most notable features of Android Lollipop are:

  • Consistent design and look-and-feel in all of the devices.
  • 5,000 new API’s for developers.
  • OS sync (yes, OS sync) across multiple devices running on Android Lollipop. So you launch an app on your phone, do some stuff on it, pick up your tablet, and continue where you left off on the phone. Your photos, songs, searches, recent tasks, and even applications get sync across devices.
  • Categorization of notifications – say you’re on a dinner date and wouldn’t want to have it disturbed so you allow only certain kind of notifications to be displayed to you, like a text message from a family member or a voice note from your home land-line number.
  • Android now runs on Android own runtime environment making it more efficient and less power hungry than its previous versions. Google claims that its optimizations into core Android will give your device an extra juice of 90 minutes every day. For you tech-savvy people out there, here’s a comparison between Android Lollipop’s ART and previously used Dalvik Virtual Machine.
  • Material Design – unified experience across device platforms and screen sizes allowing a user to intuitively use an Android application whether they’re tapping away on their smartphone, tablet, your smart watch, or an in-car Android computer.  For more detailed features of Material Design, read this article.
  • Ability to create multiple user profiles and switch between them. Switching a profile would keep your photos and other data private, including the apps you’ve installed on the device.
  • 3D but flat, yet 3D.


    Look, ma, it’s both flat and 3D

There are plenty of features in Android Lollipop that are yet to be disclosed about the operating system. So, if you’re saying to yourself, “Well, awesome! So when do I get my hands on a phone running Android L?” And the answer is: if you’re a developer and have Nexus 5 or Nexus 7, you can get to play with it. For the rest of the folks, Google is going to release Android L on 1st of November. So hang tight!

Basit Saeed

Passionately a software developer, Basit Saeed considers himself a person who believes in software and social media being the change agents of 21st century. He is a techy, a gadgets freak, and loves playing with code whenever he can. He tweets at @basit_saeed.