Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

1 Jan 2015

Beginners Guide to rooting Moto G




The Motorola Moto G, the phone that took the Indidan market by storm and arguably the budget android phone of the year. The Moto G(1st Gen) currently runs Android 4.4.4 KitKat. Root access gives the user elevated permissions, with which you can do anything to any file or folder in the system. It's often dangerous, always powerful, and an integral part of Linux.

WARNING : ROOTING VOIDS WARRANTY!

So you need to think a bit before rooting cause if your phone still has a good year of warranty left I would recommend waiting a while.

Rooting the Moto G is quite easy. It took me hardly 10mins.

This guide is for beginners.


REQUIREMENTS:
  1. MOTO G (Charge above 80%,running original firmware kitkat). *Backup whatever is important
  2. USB cable to connect to computer.
  3. Superboot (Download here) . *sometimes this links do go down in such a case just google super boot and download it.
  4. Moto USB Drivers- (click here to download the firmware)


STEPS

1. Unlocking the bootloader-

Before you unlock the Bootloader of your Motorola Moto G you must know what actually Bootloader is. The Bootloader performs hardware initialization, verifies that the operating system is present, Boots the operating system, and provides a methods to update android.

To Unlock bootloader you need to back up all your files on your phone. Unlocking bootloader wipes and deletes everything on your phone. The unlocking process is quite easy and can be done easily in less than 5 mins, from the official Motorola Website here. Follow the steps carefully and you should be good.


2.The Actual Rooting-


First you need to extract the downloaded super boot file you downloaded earlier.
Bootloader mode 
Then go to settings>about phone>tap on the build number till developer options are unlocked.Then switch on usb debugging.

Then shut down your phone.

Then turn on your phone by pressing the volume down button+power button for 5secs then leave. You should be in bootloader mode.

The Following steps are based in what OS you are running on your computer.

For Windows- Double click 'superboot-windows.bat' 

For Mac - Open terminal window to the directory containing the files and type the following line by line

ch-mod +x superboot-mac.sh 
./superboot-mac.sh

For Linux - Open terminal window to the directory containing the files and type the following line by line 

ch-mod +x superboot-linux.sh
./superboot-linux.sh


After your done reboot your device (manually) and your done! Go to App drawer you will find Super Su installed.


YOU'VE ROOTED YOUR PHONE!!!!! 


If you face any problems contact me at this e-mail- sushant.rao@outlook.com

Credits-  The Android Cop
XDA-Moto-g site - http://forum.xda-developers.com/moto-g




7 Dec 2014

Android FAQ + Tips + Resource Guide (PART 2)

Continued from PART 1

This post can be read before, during and after getting started with Android Development. It is written as a ready reference. 


General Tips

  • Check only for Beta or Stable builds of Android Studio in the updates window. 
  • Do not start with Fragments until you have built a few small apps yourself. (Not by Copy-paste coding)
  • Forget sqlite databases in the beginning. The fact that you need to have 3 java classes for a single database can be a turnoff. Use alternatives like the Java collections framework till then. 
  • As I said before, do not quit whatever happens. It's only normal that you take time to get used to this.

Beginner Guides 

  • Vogella - Start with the basic tutorials and development starters. Reading only.
  • myBringBack - The videos may seem like a blast from the past, but that's just how quickly Android evolves.
  • slidenerd - Indian YouTuber. One of the best approaches to Android I have found. He stays up to date with all the latest Android developments and is currently bringing out a comprehensive series on Material Design.
  • Udacity - If you have enough time at hand (4-6 hours every week for 10 weeks). Taught by instructors at Google. But keep in mind that this one has a very steep learning curve and not the best suited for beginners.
  • Once you get a little comfortable, get into the habit of reading the documentation on developer.android.com . Soon this should become your bible. 

Random FAQ

Q)  Why doesn't my button do anything !!?
A)  You probably didn't program the button to do anything. This needs to be done in your activity.java file after defining in activity.xml. (Extremely silly but happens to first timers)

Q)  How do I avoid common Gradle build problems !!?
A)  Assuming your Gradle installations were done properly, Just restart Android Studio. If it doesn't go, update Android Studio. If there is no update available, You are stuck till you get the update. 

Q)  Why is my activity not starting !!? [Most important]
A)   You probably did not add the activity to the Android manifest. This step is very important.

As you saw most of the questions turned out to be silly. But these are exactly the kind of problems people face. All of these have been answered on StackOverflow . So I will not continue this further.

A more comprehensive guide for troubleshooting IDE related Problems can also be found here.

Intermediate Level Resources



p.s. I just realized that I emulated something called as "Externalizing resources" that is used in development. I'm sure you'll hear it when you start Android Development.

Please '+1' if you liked it, comment if you want to point out a mistake.

Getting Started With Android Development (PART 1)


This was intended to be a very long post. Deal with it.

Still Waiting for Lollipop? 


Crazy about Android, Rooting your phone and pushing your Android to its limits? No? That's fine. That was just how I got started off with Android Development. Believe it or not, I started programming only because of my passion towards Android and XDA. Allow me to take a small detour before getting to Android Development.

I started exploring and researching about android devices just as I was finishing my 8th std. For about one solid year it was just getting to know about android and the devices on the market. You could literally ask me anything about android devices and I would know. I still remember that epic MWC 2012 where the HTC One X and the Xperia S were unveiled along with their smaller brothers. .... You get my point.

Around that time I got my own Android device. It opened up infinite opportunities for me to try new stuff and I did exactly that. One month after getting it, I rooted it and for almost the next 6 months , I was flashing a Custom ROM once every 2 days. Very soon I was a senior member on XDA .... Again, you get my point.

Along the way, I was fascinated at how these developer-legends were taking time off their busy schedules and writing code to support a device they truly loved. I decided that I too wanted to build a Custom Rom and post it on XDA. Tried and failed (obviously). Advised to start with writing Android apps, thus I began my journey. My objective has changed since then.

OK That's enough. Let's get down to business


There is one fundamental thing you need to ask yourself - Do I want to start Android development because I want to learn it or because I want to build an app as soon as possible. These may seem to be the same but believe me. They're not. The difference also lies in whether you are willing to compromise on the quality of your apps.

If you want to build an app as soon as possible, You should probably stop reading this and read Aniruddha's post on the Future of Web Development (Coming soon) (Since it never came - Google Phonegap or "Android Apps using Javascript").

Traditional Android development is what you should start with if you don't want to compromise on quality and/or are learning for the long term experience. Read on.


JAVA

Your first hurdle is to learn a new language : Java. It's not the easiest language to learn, but then it's not the toughest one to learn too. If you do know Java, good for you. But you may ask , how much Java is enough. Valid question.

You don't need to go too deep into Java. Let me just list the most important concepts. You can learn the rest as you need them.

  • Basic Syntax (obviously!)
  • Writing your own methods (aka functions)
  • Object Oriented Concepts of Java (It does vary a little by language)
  • Creating Your own Classes , Interfaces , Abstract Classes , Objects 
  • Extending / Implementing these
  • Generics and Collections Classes   
Hands down the best Java video tutorials I have found.

NOTE : If you are completely new to programming, Pay special attention to the syntax part and give enough time for each of these topics.


The ANDROID IDE

Now You have a choice. No actually you don't. This is 2016 and you have no reason to not use Android Studio. You can follow any other guide on the internet to set up Android studio and its dependencies. 

Take your time and understand how the process of writing an android app works. If you don't understand something, just skip it. If you don't understand anything at all (It can happen in the start), ask around in the community or contact me personally. Some beginner questions may be 
  • Why are there so many different folders and files ?
  • Why doesn't my button do anything ?
  • How do I avoid common Gradle build problems ?
  • Why is my activity not starting ?
Don't pull your hair out. There's always help around. I'll answer these and a few more in the FAQ post.

PLEASE NOTE : Patience is key here. Android Development is not easy to learn without any decent programming experience. It will take time. Now Go have fun with Android.



BTW You can still find me on XDA . Though not active anymore, Waiting for an opportunity to be back. Please '+1' if you liked it, comment if you want to point out a mistake.

Continued in PART 2