How to use your android device to its full potential
Posted: May 2, 2012 Filed under: Android | Tags: android, custom ROM, root 5 Comments »It has been a long time since I wrote that previous blog post on updating your Galaxy Ace device through Samsung Kies. It has been an awesome journey into the world of Android over the past few months!
I got a Galaxy Tab 10.1. It is sold as the Galaxy Tab 750, here in India. It is an amazing device, with a nice large screen. The cost of the device is kinda high, but not as high as the ASUS Transformer Prime in India (32k vs 50k). Since, I purchased it with my GSoC money, I didn’t mind spending so much on a fancy gadget that I didn’t think would be used to its full potential.
The Galaxy Tab 10.1 has very good hardware that can run a wide variety of apps and games and is extremely good for entertainment purposes like watching movies and Youtube videos too. But the OS is of poor quality. Honeycomb (Android 3.x) should have never been shipped. It is laggy, buggy and totally not worth it, on a device so costly.
That is when I started looking more into XDA forums. I wanted to know more about using my 2 android devices to their full potential as I became bored with the laggy OS that they carried.
After becoming familiar with the forum rules, tone and style of posts, and with some prodding around, I was able to understand the meaning of some common jargons used in the Android world. I have summarized some of the things that any android noob would want to know, below.
1. XDA is awesome.
There are so many android blogs and forums out there. But I don’t think any of them actually beat the volume and quality of content generated by xda forum members. There are countless active threads for each device and they contain almost all the information that you need.
2. Don’t dive in too quickly.
With so many jargons and with the huge possibility of getting flamed by xda members if you post totally noob questions that have already been asked before, it is better if you spend time going through the forums to find solutions for your question. Get yourself familiar with xda forums for a few days before posting something. It helps. Trust me.
3. Almost each Android device has its own section on XDA forums.
By using the Find your device… service at the top right corner on XDA forums, you can search the sub-forum for your device. Each device usually contain the following sections:
- General – where news and other discussions are posted
- Q & A – where users post questions and seek help
- Accessories – where details related to accessories are discussed
- Android Development – where custom ROMs are discussed
- Themes and Apps – where you can find good looking themes and great apps that are supported by your device
4. Rooting
Almost every android blog suggests you to root your device. But what exactly is rooting? There are so many wrong meanings given to that term. I will try to give the best correct definition that I can come up with.
Simply put, rooting is the process of gaining administration privileges on your android device.
There, that’s it. No more extra lines to that definition.
It is the equivalent of gaining root privileges on your linux system / administrator privileges on your Windows system.
5. Why aren’t all Android devices rooted?
Giving a rooted device to a customer who doesn’t know anything about his device, is the equivalent of giving a gun to a child.
Once your device is rooted, you might accidentally mess up system files and end up “bricking” your device. Although there are recovery solutions online for some bricked devices, most of the times, you might be pointed to the nearest service center that can repair your bricked device.
Therefore, most importantly, DO NOT TRY THE FOLLOWING STEPS IF YOU DO NOT KNOW WHAT YOU ARE DOING. THE AUTHOR OF THIS POST IS NOT RESPONSIBLE FOR ANY PROBLEM ON YOUR DEVICE.
There. Now, I am exempt from any guilt/damages.
6. Why should we root our device?
There are a few apps that need system privileges to run. You can install those apps to do a wide variety of tasks. Some apps that require root privileges are Titanium Backup, Touchscreen Tune and link2sd.
The most important reason to root your device is to install custom ROMs.
7. What are custom ROMs?
Simply put, custom ROMs are modified versions of the operating system that your device runs. They are still Android, but with so many new features added and so many useless features removed.
8. Who can make these custom ROMs?
Anyone! There are quite a few teams of developers who sit together and modify the existing ROMs on your device (stock ROM) and release it for you to download and install.
Some famous teams are CyanogenMOD, AOKP team and Team Cooper.
If you are good enough, you can take the source code for your device from the internet, modify it, build it, test it and even release it for others to download.
9. Should I pay those developers to install a custom ROM?
Nope. But sometimes, they might ask you to donate money to run their servers which build the code. Donating is usually optional.
10. How do I root my device?
There are quite a number of tutorials online for rooting. Please follow rooting instructions only for your device. Rooting instructions for one device might not work on the other. The method usually involves installing a zip file specific to your device onto your sd card.
11. How do I install a custom ROM?
There are generally 2 methods. One involves using the ODIN tool. The other involves installing ClockWorkMod (CWM) recovery (because the stock recovery tool isn’t good enough), storing a particular zip file for your device on to the sd card and installing it through the recovery mode. Please follow tutorials online for exact details.
12. What else can I do?
Once you have rooted your device, you can remove unnecessary system apps (bloatware).
If you make a nandroid backup (a complete snapshot of your system memory) using the CWM tool, you can always recover the previous state of your device, in case of problems with your new custom ROM.
Now that you have taken backup, you can try different ROMs and see what you like. Different ROMs offer different advantages. Some offer greater speed, some offer better battery life, some offer greater functionalities and access to system features and even overclock your device! (Be careful with overclocking. You might permanently ruin your device.)
Once you find the ROM that suits your device and your needs, you will realize that you had not been using your device to its full potential, all along!
By the way, I have rooted both my devices. My Samsung Galaxy Ace runs Omega ROM v3 and my Galaxy Tab 10.1 runs AOKP build 34.
If you have any doubts, suggestions or comments, do let me know through the comments section below. Happy rooting and installing custom ROMs!
Galaxy Ace – Gingerbread update
Posted: September 1, 2011 Filed under: Android 46 Comments »Great news for Galaxy Ace users in India. The official Gingerbread update became available yesterday (31st August 2011) through Samsung Kies.

What is Gingerbread
Android is an operating system and Gingerbread is the latest version of it, for mobile phones. The Gingerbread series is 2.3.x with the latest being 2.3.4.

How do I update
You would have to update your firmware through Samsung Kies. Its a software that you can download from here: www.samsungapps.com/about/onPc.as. (After downloading, you might have to update the sotware itself, as the link might not provide the latest version directly.) No linux version of the software exists. So you might have to login into Windows.
Once you have an updated Kies, you should be able to see something like this.

Connect your device now. Wait for Kies to detect your phone. Kies should automatically say that you have new firmware updates to be installed on your phone. Follow the instructions and you’d have Gingerbread installed on your phone.
Restart your phone to ensure that all updates have been installed.
What’s new in Galaxy Ace Gingerbread
You’d be able to see a few changes in looks in your phone now. Before looking at them, go to Settings->About Phone and check the Android version. You should be able to see 2.3.4 and Build Number showing GINGERBREAD.DDKQ5.

What’s New
The immediate observation after upgrading is the change to the system notification bar. Icons are much more compact and they look a bit more sleeker.

You can also see that the GPS and Sound icons have changed. Earlier silent mode was highlighted. Now its the opposite. If you disable silent mode on your phone, the icon is highlighted. You can also view whether vibration is enabled or not.
When you are typing text, you can see that the circular hold icon is replaced by a rectangular one.

Other noticeable features are:
- Most importantly, Indic languages are now supported.
- The phone appear to be a bit faster
- Increased battery life
- Improved copy-paste functionality upon select-all
- A new system app called Downloads available now
- The line traced while typing text using swype also appears more transparent now
- WiFi bug seems to have been fixed
- No noticeable bugs yet
Do let me know if you are encountering any problems or have found other new features too.
Setting up Kate snippets
Posted: June 13, 2011 Filed under: editor, kate, Linux 2 Comments »Kate is one of the best editors around and I have always felt most comfortable with it. It is very intuitive and at the same pleasing to the eye. Most of the gnome population haven’t heard of it and I feel it trumps gedit any day. (
http://kate-editor.org/about-kate/
)
Recently, I discovered that that there is not much online material available for snippets in Kate and after a little bit poking around, I finally got what I wanted. I felt that putting up a blog post would be a good idea too.
Setting up Kate snippets:
1. Open Kate. Go to Settings Menu. Click Configure Kate.
2. Go to the Plugins tab. Enable Kate Snippets. You will notice that Kate Snippets tab appears automatically in the left pane.
3. Click the Kate Snippets tab on the left pane. You will observe a few sample snippets and also the option to add a New Snippet File. Click it.
4. As an example, I will be creating a snippet to help me with coding in C++ on SPOJ. So, I’ll give the snippet a name “C++ for SPOJ” and LGPL v2+ License. Of course, my name is Anirudh and I’ll give the same for Authors.
You will see a screen like this.
5. We wouldn’t inadvertently want our snippet to be applied for other type of files. So change the File type from * to C++. Click the button at the bottom-left to create a New Snippet. Set the Match/Name value in the right pane to spoj.
Insert the following in the Snippet Content:
#include <iostream>
using namespace std;
int main() {
${cursor}
return 0;
}
The ${cursor} informs Kate where your cursor should be, after inserting your snippet. You should end up with something like this.
6.Save the snippet, enable the snippet and go back to Kate. Save the file with .cpp extension. Now type spoj in your editor and press Ctrl+Space.. You will see a little drop down box showing suggestions. Just press Enter.

Voila! Your snippet works perfectly!

Understanding WordPress for Android – Part 3
Posted: June 10, 2011 Filed under: Android, GSoC, wordpress 1 Comment »I managed to squeeze in time for another blog post about the app. So here it is.
As I mentioned in my previous blogpost (
http://anirudhspider.wordpress.com/2011/06/08/understanding-wordpress-for-android-part-2/
), I will be explaining the code for the app’s splash screen here.
What is a Splash screen?
Quoting Wikipedia, “A splash screen is an image that appears while a game or program is loading. It may also be used to describe an introduction page on a website.” (
http://en.wikipedia.org/wiki/Splash_screen
)
The existing app has a really cool splash screen which I do not wish to lay my hands upon and spoil.
splashScreen.java
Let’s start with splashScreen.java. If you have downloaded the source code, you’ll find it in your src/org/wordpress/android/folder, or under src->org.wordpress.android in your Eclipse Package Explorer (left pane, by default). If you haven’t downloaded the source code, you can view it here:
http://android.trac.wordpress.org/browser/trunk/src/org/wordpress/android/splashScreen.java
I have also posted it below for your convenience.
package org.wordpress.android;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.os.Handler;
import android.view.WindowManager;
import android.widget.TextView;
public class splashScreen extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
getWindow().setFormat(PixelFormat.RGBA_8888);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);
setContentView(R.layout.splashscreen);
//Display the current version number
PackageManager pm = getPackageManager();
try {
PackageInfo pi = pm.getPackageInfo("org.wordpress.android", 0);
TextView versionNumber = (TextView) findViewById(R.id.versionNumber);
versionNumber.setText("Version " + pi.versionName);
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
new Handler().postDelayed(new Runnable(){
public void run() {
/* Create an Intent that will start the Main WordPress Activity. */
Intent mainIntent = new Intent(splashScreen.this,wpAndroid.class);
splashScreen.this.startActivity(mainIntent);
splashScreen.this.finish();
}
}, 2900); //2900 for release
}
}
Note that the line numbers refer to the above source code.
Lines 3-12: They are the necessary import statements. In case you miss any import statements and Eclipse shows an error, press Ctrl+Shift+O (in Linux and Windows). Eclipse will automatically find and add the necessary import statements.
Line 14: public class splashScreen extends Activity {
This is where the code actually starts. splashScreen being an Activity obviously extends the Activity class. (In case you do not know what an Activity is, an Activity is what the user is actually able to view. For more details:
http://developer.android.com/reference/android/app/Activity.html
)
Lines 17-19:
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
The onCreate function is an integral part of the Activity life cycle and as the name implies, it is called once the Activity is created. We are overriding the onCreate method. Whenever the onCreate method is overridden, we must call super.onCreate() to save the state of the previous activity. ‘icicle’ is the name of the Bundle objects that are passed to the onCreate method. This is the default name provided in the earlier versions of the SDK. The new SDK defaults the name to ‘savedInstanceState’.
Lines 20&21:
getWindow().setFormat(PixelFormat.RGBA_8888);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);
Line 20 sets the format. Can you see that the background gradient is uniform and non-patchy? It is because of the FLAG_DITHER flag.
Line 23: setContentView(R.layout.splashscreen);
Sets the xml layout provided in splashscreen.xml. Lets have a quick look at it.
splashscreen.xml
If you have downloaded: found at res/layout/splashscreen.xml
If you haven’t:
http://android.trac.wordpress.org/browser/trunk/res/layout/splashscreen.xml
Code:
<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center|center" android:background="@drawable/home_gradient" android:orientation="vertical"> <ImageView android:layout_marginTop="-60dip" android:paddingLeft="20dip" android:paddingRight="20dip" android:scaleType="centerInside" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/wordpress_logo" android:src="@drawable/wordpress_home"></ImageView> <TextView android:text="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dip" android:typeface="serif" android:shadowDx="0" android:shadowDy="2" android:shadowRadius="1" android:shadowColor="#FFFFFF" android:textColor="#444444" android:textSize="20dip" android:id="@+id/versionNumber" android:gravity="bottom"> </TextView> </LinearLayout>
As you can see, it contains a vertical LinearLayout with 2 elements: an ImageView and a TextView. The ImageView renders the logo while the TextView provides the version number of the app.
Back to splashscreen.java
Lines 25-34:
//Display the current version number
PackageManager pm = getPackageManager();
try {
PackageInfo pi = pm.getPackageInfo("org.wordpress.android", 0);
TextView versionNumber = (TextView) findViewById(R.id.versionNumber);
versionNumber.setText("Version " + pi.versionName);
} catch (NameNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Obtain the version number from the package (from the manifest xml?) and sets it to the TextView.
Lines 36-42:
new Handler().postDelayed(new Runnable(){
public void run() {
/* Create an Intent that will start the Main WordPress Activity. */
Intent mainIntent = new Intent(splashScreen.this,wpAndroid.class);
splashScreen.this.startActivity(mainIntent);
splashScreen.this.finish();
}
An Intent is an abstract description used to jump from one Activity to another. The Intent mainIntent is used to transfer control from the current splashScreen.java file to wpAndroid.java. (The number 2900 in Line 43 is the number of milliseconds for which the splash screen is to be displayed.)
What does that mean? Yeah, you got that right. Coming up next, wpAndroid.java!
Understanding WordPress for Android – Part 2
Posted: June 8, 2011 Filed under: Android, GSoC, wordpress 2 Comments »You have set up the development environment, downloaded the source code and created a new project. Now, we can start going through the source code. I hope you are familiar with developing Android Apps. If not, it is ok. You can refer to
http://developer.android.com/
in case you are not able to understand something that has been explained here. I will also be providing links to the official documentation wherever necessary.
AndroidManifest.xml
As with every application, the WordPress app has an AndroidManifest.xml file. It is the first piece of information that describes the different activities, services, broadcast receivers, content providers, user permissions and all other important details. (To know more, have a look at
http://developer.android.com/guide/topics/manifest/manifest-intro.html
)
To view the manifest file, open it in Eclipse. If you don’t want to develop but just want to view it, you can view it here:
http://android.trac.wordpress.org/browser/trunk/AndroidManifest.xml
Line 2. The attributes of the <manifest> tag specify the version name, package details, etc.
Line 3. As you can see in the <uses-sdk> tag, you can develop this app for devices that run on Android, right from Cupcake (android:minSdkVersion="3") and is also best viewed in a device running Froyo (android:targetSdkVersion="8").
Line 4 and 5: They describe the details of how the app looks before it is launched, in your android device. It specifies the logo image, label and the style. You can find the logo in your project at res/drawable/app_icon.png and the theme it uses from Line 61 of res/values/styles.xml (
http://android.trac.wordpress.org/browser/trunk/res/values/styles.xml
)
I will be discussing each Activity and its corresponding xml later. (Same with the service and receiver tags)
It is obvious what the remaining xml code describes. Understanding what the <supports-screens>,<uses-permission> and <uses-feature> tags describe, shouldn’t be a problem.
Before moving on, we need to find out which activity is called first. If you have a quick look at
http://developer.android.com/guide/topics/intents/intents-filters.html#ccases
, the activity with the android.intent.action.MAIN action and the android.intent.category.LAUNCHER is started at first. A quick scan through the AndroidManifest.xml file reveals that the activity with the android:name="splashScreen" is the one that is launched, when the application starts.
So, next stop: splashScreen.java !!
Still don’t believe me?
Posted: June 7, 2011 Filed under: Android, GSoC, wordpress 1 Comment »
If blogging from inside the app like how I am doing right now, doesn’t make you believe how great this is, then u must try writing one on your own.
Although this is an open source project run by the community, I believe that most of the work so far, has been done by Dan Roundhill, who is the mentor for my GSoC project as well.
http://danroundhill.com
I can also add media from inside the app, like this photo of my laptop.
This took me about 5 minutes to blog about. Its that easy!
Understanding WordPress for Android – Part 1
Posted: June 7, 2011 Filed under: Android, GSoC, wordpress Leave a comment »The app itself
The latest release is version 1.4.1 and it was released on April 18 2011. It is available for free in the market. I own a Samsung Galaxy Ace running Froyo and it works flawlessly on my mobile. You can use the app to maintain multiple blogs including both, self-hosted blogs and those hosted at WordPress.com.
The Description of the app in the marketplace reads thus:
“Write new posts, edit content, and manage comments on your WordPress blog.
WordPress for Android is an Open Source app that empowers you to write new posts, edit content, view stats, and manage comments with built-in notifications.
WordPress for Android supports both WordPress.com and self-hosted WordPress (2.9.2 or higher) blogs.”
Get the app from the market
There is nothing more important than having a first-hand experience of any product that you are working on. So, download the app directly through your mobile’s Android market or from
https://market.android.com/details?id=org.wordpress.android
and install it in your Android mobile.
Run it and check whether it works fine in your mobile. Browse through the app. It shouldn’t take you more than half an hour to figure out all features in that app.
Get the source code from the dev site
If you want to start developing, get your Eclipse IDE set up for Android app development. If it is your first time, refer to
http://developer.android.com/sdk/index.html
to setup your development environment. Hope you have installed subversion and know how to use it too. If you don’t, you can read up on this:
http://svnbook.red-bean.com/
Head towards
http://android.trac.wordpress.org/
. You will find that their source is located at
http://android.svn.wordpress.org/
. <strong>Note.</strong>Do not use the svn site for browsing the source code. It is not created with that purpose in mind. If you want to browse the source code, you can do so at
http://android.trac.wordpress.org/browser
.
The trunk folder provides the latest build and you can work on it. To get the code into your system, do this from your terminal:
svn checkout http://android.svn.wordpress.org/trunk/
Rename the folder to the project name of your choice. Now open Eclipse. Press Ctrl+N and create a New Android Project. In the next step, select the option “Create project from existing source:” and point it to the location where you have checked out your wordpress android app code. Provide necessary details such as Project name, Build Target, Application name, Package Name and other details. You are ready to develop on the Android app of WordPress now.
Understanding WordPress for Android – Part 0
Posted: June 7, 2011 Filed under: Android, GSoC, wordpress Leave a comment »One of the apps which I never expected to see in the Android marketplace was the WordPress app.
https://market.android.com/details?id=org.wordpress.android
Seriously, was it possible to bring in the power of blogging into one’s Android mobile? Microblogging was easy. There are thousands of Twitter apps for Android to do that. But how could a mobile be sufficient to blog on WordPress??
Trust me, it is really an awesome app!
It was the time when organizations where applying for Google Summer of Code. Within a few weeks, I got to know that the Android app had been selected as a project as well! I was so eager to work on it to realize it’s full potential myself. I also wanted to work on a GSoC project. I applied and worked hard to get it, and finally I did.
You can find more details about the app here:
http://android.wordpress.org/
If you also wanna be a developer, this is the place to be: irc://freenode/wordpress-mobile
I have been working on changing the UI of the app for a few weeks now. I just realized that the best way to progress quickly would be to be blog about this blogging app. So here I am.
I will be initially giving a brief introduction to the app and then moving on to the explain the code later.
Macbuntu in Ubuntu 11.04
Posted: June 7, 2011 Filed under: Linux, Ubuntu 9 Comments »Those of you who used Macbuntu earlier on your Ubuntu 10.10 and have shifted to Ubuntu 11.04 would have noticed that the Macbuntu theme isn’t available. It seems that the project has been stalled and they don’t seem to have a version for 11.04 yet. Searching for it on Google takes you to a site where you are asked to download a remastered Ubuntu distro of size >700 Mb! If you have already downloaded Ubuntu 11.04, you wouldn’t feel like downloading another complete distro just for the sake of the Macbuntu theme.
So, what is the solution? Use the code for 10.10!! With a few minor changes, you can use the Macbuntu theme for your 11.04 Ubuntu Classic desktop as well. I do not know how it integrates with Unity yet, as I don’t use Unity. (I have also heard that it doesn’t integrate very well with Unity.)
So, what are the changes to be made?
First download the source code for the Macbuntu theme from the SourceForge project site, if you already haven’t.
http://sourceforge.net/projects/macbuntu/
After downloading, extract the file to some location that you can remember. Rename the folder from Macbuntu-10.10 to Macbuntu-11.04 to avoid confusion later.
Now open the file install.sh in the text editor of your choice. I use vim, so the code is as follows.
vim install.sh
After opening the file, you would see the following code in lines 19 and 20:
UBUVER="10.10"
UBUNTU="Ubuntu $UBUVER"
Change it to read
UBUVER="11.04"
UBUNTU="Ubuntu $UBUVER"
Do the same to your uninstall.sh file.
Now run the install.sh file.
./install.sh
Now follow the installation instructions and reboot your system.
After rebooting, you might want to adjust your Indicator Applet icons, make sure Docky is installed and adjust your Compiz settings too.
If you want to uninstall, you can always run
./uninstall.sh
to remove Macbuntu from your system.
Note.If you have any clarifications or if something just doesn’t work, you can always post them in the Comments section below.
UI mock-up for a Non Dashboard page
Posted: April 8, 2011 Filed under: Uncategorized 1 Comment »This is my UI mock-up for a Non Dashboard page. Quick Access dashboard will ensure that users can access other stuff really quickly now.
Not that I have replaced the button for Dashboard with a large button to return to the previous page. Please note that I might come up with something more useful later, in this space.
This is my mock-up with my Quick Access Dashboard pulled up. It displays the dashboard.













