Motorola XT1068/ Motorola G 2014 (2nd Gen) Rooting Manual

Hi, these days Motorola XT1068, popularly known as Moto G 2nd Gen is one of the leading phones in India which took over the smartphones market. Here, in this post I will be explaining the process for rooting Motorola XT 1068 and some tweak tools. This whole blog post will be in two parts. The first part consists of how to root Moto G 2nd Gen, the second blog post will contain about the installation of the GravityBox tweak tool, which lets you to tweak your Android.

The second generation Moto G, which we predicted would be called the Moto G2 is easier to find online by searching for its part code: XT1068. The main features of this Moto G2 is a 5 inch display that offers a 1280 x 720 p resolution. The screen is protected using a Corning Gorilla Glass. It is powered by a 1.2 GHz quad core Snapdragon processor along with a 1 GB RAM and an Adreno 305 GPU. The main feature of this is that it contains an external SD card slot which allows the user to expand the memory to further extent.

There are quite a lot of features which you cannot access as a normal user. For those who wants to give a try exploring all the different options, the only way is to root the mobile. 😉

Key specifications

  • 5 inch display (1280 x 720p)
  • 1.2 GHz quad core processor
  • Qualcomm Snapdragon 400 MSM 8228 Chipset
  • Adreno 305 GPU, 450 MHz Single Core
  • 1 GB of RAM
  • 8GB / 16 GB internal memory
  • Micro SD card slot  (up to 32 GB)
  • 8 MP rear camera with flash
  • 2 MP front camera
  • Android 4.4.4 KitKat upgradeable to Android L
  • 2070 mAh battery
  • Dual sim, dual mic and dual speakers.

Rooting Moto G 2nd Gen

Rooting your Android lets you to use the SuperUser permissions which helps you to remove all the unnecessary system applications which come along with the phone by default. Rooting your Android device lets you to side load Custom ROM’s such as CyanogenMod, MiUi etc.

Rooting any Android Device mainly consists of the following steps.

  • Unlocking the Boot-Loader
  • Flashing Custom Recovery
  • Installing Super Su (Super User) as a root

Prerequisites for rooting are as follows

These are the least minimum tools which you require for the rooting your device.

  • Installing the minimal adb and fastboot tools. You can download the installation file from here.
  • Custom Recovery for flashing the Custom ROM’s. There are two types of recoveries available for this phone. You can install anyone of these two.
  • Super SU (Super User), the root apk which needs to be installed from the custom recovery.

Note: The following procedure will void your warranty and you are responsible for any damage to your phone.

Unlocking the Boot-Loader

The first and the foremost thing to be done before you start the process for unlocking the boot loader is to take the backup of all the apps, contacts, messages, calendar and phone logs. This can be done by installing the Super Backup: SMS & Contacts app from the play store. Taking backup is one of the important steps before you start the unlocking process because after you unlock the device it will do a factory wipe out which leaves no trace of any data in your phone. So it is better to take the backup of the all the required data beforehand. J

For unlocking the boot loader you need to register in the Motorola site. Log in with either your Gmail or Motorola ID. After that you can proceed to the next stage of the unlocking your process.

  • Put your device in fastboot mode (power off then press the power button and the volume down buttons simultaneously for at least 3 seconds.)
  • Open the minimal adb and fastboot tool which you installed previously on your system. If not please download it and install which is given in the above section.
  • When you open the above file you will get a command prompt opened. Now connect your phone to the computer using a USB cable.
  • In the command prompt type the following command:
fastboot oem get_unlock_data
  • Now you will get a string which will be used to retrieve your unlock key. The string which you get in the command prompt looks somewhat similar to this if you are using a windows system:
(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000

On a Mac the string which will be returned in the terminal will be similar to this:

  • Now copy the string from the command prompt to a notepad and then remove the (bootloader) or INFO and the white spaces also. After you remove those the string must look similar to this:
  • Now copy the string which you get by removing the white spaces, and paste it in the Motorola site where you logged in. Now paste it in the given box over there and then click on the button below that box.

Note: If your device can be unlocked then click on the REQUEST UNLOCK KEY in the bottom of the page.

  • After you click on the REQUEST UNLOCK KEY button, check your mail. You will get a mail from the Motorola with the key in it.
  • Now open the minimal adb and fastboot terminal which started before and execute the following command:
fastboot oem unlock UNLOCK_KEY
  • Now your device will go for a reboot. That’s it your mobile’s boot loader is unlocked.

Flashing Custom Recovery

The default recovery present in the phone is of no use. So we will have to replace the default recovery with some recovery such as Clockwork Mod or TWRP. For flashing the recovery you need to go the bootloader and from there you need to install the custom recovery.

To go to the bootloader menu directly run the following command in the minimal adb and fastboot command prompt:

adb reboot bootloader

Now the phone will restart and it will be in the fastboot mode. Now in the command prompt run the following command to install the custom recovery.

fastboot flash recovery TWRP2801-titan-motog-2014.img (for Team Win Recovery mod)


fastboot flash recovery CWM_Touch_Titan_v2.img (for Clockwork Recovery mod)

That’s it, now the phone is flashed with the custom recovery which you want.

Installing SuperSU as admin / root

For this copy the SuperSU file to the internal memory and then reboot the phone to the fastboot mode. In the fastboot mode, navigate to the recovery and then you will be taken to the Custom recovery which you installed previously.

In the custom recovery go the INSTALL ZIP option and then select the which you placed in the internal SD card. Now click on the install button after selecting the zip file. Let it complete the installation process of the file. Once after it completes reboot the phone.

That’s it, yay, you have rooted your phone. 🙂

Hope that this post helped you. If you have any problem, please do comment below. 🙂

Hacktool for Android Games

Hey guys, here’s a small guide for a hack tool for android games where you can do as many purchases as you want for free. It works for most of the games, as far as I’ve tried. Here in this post you will be provided with the download link for the app and the way to use the app. 😉

There are a lot of hack tools around which requires a survey page to complete for downloading the hack tool for most of the games. I know that is a bit irritating for you to fill your details for some unnecessary random site.


So here you go, here is a small hack tool called CreeHack. Using this, you can buy as many resources as you wish during the game when ever you want.

All you need to just need to install that app and then run it in the background. Here I will be giving the whole process for installing the CreeHack app and how to use it.

Installing CreeHack

  • Download this app from here.
  • Install in the android device as you do the normal installation for any app.

Using CreeHack

  • Open the app, and then click on the button in the app, as shown in the figure below.


  • After you switch it on, press the home button, so that it minimizes and runs in the background. 
  • Now open the game which you want to play.
  • Go to the purchases section in the game and then click on the purchase
  • Now, after you press on the purchase button, you will see something like this:


  • Now click on the buy button, in that popup window.
  • This is what you will get in the screen after you press the buy button in that popup.


Bingo!!!, there you go, the resources which you want.

Have fun guys 🙂

Join fedora – site

Hey, how are you?? It’s been a long time since my last blog post!!!! Ok, here is a small blog post regarding the design of the fedora apps site.

Me and my friend are working on this project together where a newbie can use this site to know what all areas he can contribute to. At the moment, we are in the initial stages of the site, though we haven’t started working on the site (as in coding 😛 ). Here are the mockup’s for the site.

Fedora Landing Page:

Note: You need to imagine all the pictures with colors and animations (as in effects), otherwise it will be too ugly 😛

Alright, you might be wondering what the hell is the landing page right? Fedora’s landing page is something where you can see all the different areas in which you can contribute towards fedora organization.

Coming to the design part, the main center will be the fedora logo. The bubbles around the fedora logo shows all the main areas to which the user can contribute such as QA, Packaging, Upstream, Accounts, Content, Development, Infrastructure and Coordination.

These will be the main places where a user can select one of them. Once he selects one of them, he will get something like this:

(this mockup we still have to design. So please if you guys have any suggestions please do give us. All suggestions are welcome. 🙂 )

Mobile View of the fedora-join site

In the last meeting with my mentor, we have decided to make this site compatible with the mobile versions also. So here’s the mockup for the mobile view of the site:

fedora apps_mobile_version

This mockup is designed by Sarup (a core member of the fedora-design team).

The mobile view of the site is completely different from the desktop version. Here in the main page of the mobile site you can see the various areas in which you can contribute. Once you select a particular area, you will come to see the details and description of that particular area.

And if you are a member of any fedora project you can have a look at the various things like the current status of the project, your account details (fedora project account) etc.

This is the current plan of our desing for the new fedora site. Any suggestions are welcome. 😉

The post is still not complete. Wait for the remaining updates. 😛

An Inspirational talk by Arvind

This one experience I had to share it openly because, each and every point what Arvind bhaiya (brother) told applies to me a lot. Thanks to Arvind bhaiya for spending a lot of his time with us.

For those, who don’t know Arvind, he is my senior who is an active Foss Member in my college. He is currently pursuing his masters here in Amrita University and he got a chance to continue his masters in Amsterdam. He will be leaving from India in a few weeks.

Most of the points what he mentioned applies to me in most of my daily life. Even some of the experiences which he mentioned are very similar to my kind, and thanks to him, that I got a solution after all for all my failures till now.

The thing what I learnt from his session is that no matter how many times you fail, never give up, and do try to rectify the mistakes what you did previously. In my case, I got the realization a bit lately after messing up one full year doing nothing, not only I didn’t make any progress and in addition to that I messed up my academics so badly.

Yeah, what Aravind bhaiya said is correct, when ever you have some problems you have to share it with some one like family members or friends. So that you can get a solution within no time. Instead of that if you don’t share it with anyone, you will end up messing things like me.

I never do prefer anyone to repeat the mistake again like this. Never think there is no one to help you around with your problems, there is always someone to help you, but never think no one is there to help you out during hard times. Always there is someone to help out and never think that you never have any friends. That is one of the worst things which you can ever think, and if you think so you are the most stupid guy in the world. Unless you open up to some one, you can never be happy at what ever you do. Without knowing this thing, I did misunderstand my mentor and always thought I was right. I am really sorry for the way, I behaved with you till now.

And when it comes to computer games, again what he said is exactly correct. I am a freaking hardcore gamer, the example what he gave is nothing when compared to what I did and the solution what he gave to us, also completely applies to me. And friends, yeah it did work for me. I did format my system and now I did reduce the usage of my computer completely. I don’t say that using computer is not wrong, but using it for purposes which will not be of any use for us.

Let me give me an example of what I did, a live example: I did played games even before the night of my final exam also. You know, how much I was addicted to gaming, one night I sat and completed a game sitting for 15 hours continuously not even for getting for food and after that I faced the consequences of it which are worse than anything. Trust me gaming is one poison if you can’t keep it in a control.

Finally what I learnt from the session was, never ever give up, even when you are in tough times. You always have a way to come out of the situation, if not do search for the solution and do go express your situation to some one, so that you can get a solution.

Aravind bhaiya, thanks a lot for the session, it really helped me understanding my mistakes. I think I should have met any of the seniors long back and should have explained my problem. Really thanks for a worthy session.

Oh yeah, forgot to say, let’s all congratulate Aravind bhaiya, because he will be leaving for his Masters to Amsterdam. Hope you will have a really good time over there during your masters.

Insertion Sort Algorithm

Insertion Sort

A simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quick sort, heap sort or merge sort algorithms. However, insertion sort algorithm provides several advantages:

  • Simple Implementation
  • Efficient for smaller data sets.
  • Efficient for data sets that are already substantially sorted: the time complexity is O(n+d), where d is the number of inversions.
  • More efficient in practice than most other simple quadratic algorithms such as selection sort and bubble sort algorithms.
  • Stable – doesn’t change the relative order of elements with equal keys


A sequence of n numbers ( a1, a2, a3, ………, a)


A sorted array of elements ( a1′, a2′, a3′, ……., an’ ) of the input sequence such that a1′ <= a2′ <= a3′ <= ………. <= an’


Algorithm for Insertion sort (n elements) is given below:

for j ← 2 to length[A]
    do key ← A[j]
        Insert A[j] into the sorted sequence A[1 - (j - 1)]
        i ← j - 1
        while i > 0 and A[i] > key
            do A[i+1] ← A[i]
            i ← i – 1
        A[i + 1] ← key


Let us take the example of a list of numbers { 5, 2, 4, 6, 1, 3 }. Now if we take a look at the above algorithm, the index j indicates the current card  being inserted into the array. At the beginning of each iteration of the ” outer for loop ” which is indexed by j, the sub-array consisting of the elements A[1 ….. (j -1)] constitute the currently sorted hand, and elements A[j+1 …. n] correspond to the pile of cards still on the table. In fact, elements A[1 …. (j – 1)] are the elements originally in the positions 1 ( indexed 0 ) through (j – 1), but now in sorted order.

Analysis of Insertion Sort

Insertion Sort Algorithm      Cost Time
for j ← 2 to length[A] c1 n
do key ← A[j] c2 n-1
Insert A[j] into the sorted sequence A[ 1…. (j – 1) ]  – n-1
i ← i – 1 c4 n-1
while i > 0 and A[i] > key c5 Σ Σj to n = pow(2, tj)
do A[i+1] ← A[i] c6 Σ Σj to n = pow(2, tj-1)
i ← i – 1 c7 Σ Σj to n = pow(2, tj-1)
A[i + 1] ← key c8 n-1

We start by presenting the Insertion Sort procedure with the time cost of each statement and the whole number of times each statement is executed. For each j = 2, 3, 4, 5, ………, n, where n is length[A] i.e. length of the array. We let “tj” be the number of times the while loop test in line 5 is executed for that value of “j”. When for or while loop exists in the usual way the test is executed one time more than the loop body. We assume that comments are not executable statements and so they take no time. The running time of the algorithm is the sum of running times for each statement executed; a statement that takes “ci” to the total running time. To compute T(n) , the running time of Insertion sort , we sum the products of the cost and times columns, obtaining:

T(n) = c1(n) + c2(n-1) + c4(n-1) + c5(n-1) + c8(n-1)

T(n) = (c1 + c2 + c4 + c5 + c8) n – (c2 + c4 + c5 + c8)

This running time can be expressed as an+b for constants a and b that depend on the statement costs ci , it is thus linear function of n. If the array is in reverse sorted order that is decreasing order the worst case results. We must compare each element A[j] with each element in the entire sorted sub-array A[1 …. (j-1)] and so tj = j for j = 2, 3, ……, n.

Σ(j=2 to n) j = [n(n+1) / 2 ] -1

Σ(j=2 to n) (j-1) = [n(n-1)/2]

We find that in the worst case , the running time of insertion sort:

T(n) = c1 n + c2(n-1) +c4( n-1) +c5 ( (n(n+1)/2)-1) + c6 ( n(n-1) / 2) + c7 (n(n-1)/2) +c8 (n-1)

T(n) = ([c5 /2] + [c6 /2] + [c7 /2]) n x n + (c1 +c2 +c4 +[c5/2]-[c6/2]-[c7/2]+c8) – (c2 + c4 + c5 +c8)

The worst case running time can be expressed as an2 + bn + c for constants a , b and c that again depend on the statement costs ci; it is thus a quadratic function of n.

Complexity of Insertion Sort

The complexity of any algorithm can be expressed in three ways:

  • Best case complexity
  • Average case complexity
  • Worst case complexity
Best case Complexity

The best case complexity can be calculated where the array is already sorted or the required element is in the first position. Calculating the best case complexity gives us the lower bound of the time. In this case, the insertion sort algorithm has a linear running time (i.e., O(n)). During each iteration, the first remaining element of the input is only compared with the right-most element of the sorted subsection of the array.

Best case complexity = O(n)

Worst case Complexity

The worst case complexity can be calculated by assuming that the element is in the last position or the element is not even present in the array. In this cases every iteration of the inner loop will scan and shift the entire sorted sub-section of the array before inserting the next element. This gives insertion sort a quadratic running time (i.e., O(n2))

Worst case Complexity = O(n²)

Average case Complexity

The average case complexity can be calculated by taking the average of the best case and the worst case complexities of any algorithm.