30 Jan 2015

Getting Started with XDA


XDA Developers is a mobile software development community of over 5 million members worldwide, started in January 2003. Although discussion primarily revolves around Android, members also talk about many other operating systems and mobile development topics.


Why would I use XDA?

Have you thought of rooting your Android device, or changing something that is not really available using an app? If yes, I'm sure you've come across XDA. As I already mentioned, XDA is a site where people discuss about Android and find guides to customize their devices to the highest levels.

XDA is a also the major hub for Open-Source Android Development and there is always something to learn.

The following sections give you the basics to understand XDA lingo

What is rooting? 

Well there’s no real definition to rooting. But I would say it as “Gaining superuser access to an android device”. Its similar to running programs as administrators in Windows, or running a command with sudo in Linux. (sudo is "SuperUser do")

Some important terms: 

Root:  It is the permission obtained to run special apps to enhance the working of your Android device. This can include SetCPU or Helium. This can be done by either flashing the SuperSU application through the recovery or flashing a custom rom which has root privileges.

Flash:  When you install something on your device using methods other than running a simple installer. These methods are generally "flashing" from a custom recovery or bootloader.

For eg. When you install the Gmail app from the Play store it is not called flashing.

But if you install Gmail on your phone using the recovery, it can be called flashing. Why would you install Gmail using the recovery? Read on to know what GApps are.

ROM:  A rom is the firmware (software) that runs on an Android device. There are two types of ROMs.

Stock ROM:  This is the original firmware which comes with the device when you buy it and/or gets updates from the manufacturer.

Custom ROM:  This is the ROM you flash when you want to completely change the software your phone is running. Popular examples include CyanogenMod, AOKP, Paranoid Android.

GApps:  When you first install a custom ROM, you need some apps to actually use the device. These apps are generally the Google apps. These apps are standardized according to your Android version in a package called GApps that is flashed right after flashing the ROM.

Bootloader:  Lowest level of software which runs all code for the OS to boot up.

Recovery:  It is a piece of software which allows you to take backup of ROMs, flash ROMs and many do many system level tasks. This is also a main part of rooting a device. In most cases it is recommended that you first install a custom recovery like TWRP or CWM.

Brick:  Bricking an android device is the act of ruining the internal firmware or the kernel. Again there is soft brick and hard brick. A soft brick, is usually just when you're phone is stuck in a bootloop, and as the name implies, is caused by a software error, usually the lack of a system to boot from or some other minor software bug that glitching boot. Hard brick as the word suggests means that the phone can now be used only as a paper weight.

Kernel:  A kernel can be thought of something which communicates between the firmware and the hardware of your device. There are many custom kernels too which can be used to overclock the CPU or enhance battery life and things like that.

ADB:  It is a command-line tool from Google to communicate with your device when it is connected to the computer. It stands for Android Debug Bridge.

OEM:  This is an acronym for Original Equipment Manufacturer. Every Android device manufacturer is an OEM.

A more technical post can be found here [Link]


GENERAL METHODS FOR ROOTING
(Based on OEM)

(WARNING!: This is not the recommended guide for your specific device. Official rooting guides can be found on xda-developers. )

There are some applications which help you root your device. However it is not recommended as they can brick your device unless they are verified by users.

SAMSUNG:
Since Samsung releases a heck load of devices every year, so it keeps changing from device to device. Old Samsung phones like the Galaxy Ace, Galaxy Pop, etc., required just flashing a Superuser zip file on a ClockWorkMod Recovery. Samsung phones(2012-2013) need Odin (which is a tool from Samsung to tweak Samsung phones) to flash a zip file to root your devices.
Newer Samsung devices have difficult procedures to root due to implementation of Samusung Knox on Exynos chipsets.

HTC:
Just a few years back HTC phones were the toughest phones to root.
These days HTC phones are as easy as they can come. But you need to register on their website to your device.
There are also plenty of HTC rootkits available. 

SONY:
Since Sony is becoming open day by day the methods of rooting their phones is also becoming easier. Older phones like the Xperia S/T/U require the rootkits from Sony. Newer phones get rooted using TowelRoot itself (Xperia Z/Z1). 

LG:
This is surprising but there this app called StumpRoot which root can all LG devices. 

Nexus:
Since these devices are from Google, they require some special steps to root the device. ADB should be installed on the PC, bootloader should be unlocked using this and custom recovery should be flashed. Using the custom recovery flash the SuperSU zip and you’re done.
But one important thing of note is that there is almost no way of hard-bricking a nexus.


Xiaomi: 
There are also some devices which come pre-rooted which enables the user to have root permissions out of the box.

The Moto G has already been covered in a previous blog post.


Consequences of rooting: 

  • Warranty is void (On most phones).
  • Chances of getting bricked become high.
  • If you don't know what you are doing, you may get unexpected behavior.

How do I use XDA without harming my device?

While following guides

  • Read the whole guide once and check if have all the prerequisites to complete the process
  • If you don't know how to do something, ask around or find out
  • Follow each and every step carefully and do not skip anything or mess up the order.


Should I register on XDA?

We were all once new to XDA-Developers, and it can be daunting to get started on a site as large as XDA. If you use XDA to simply read and download files (attachments), there is no real use of registering on the website. But if you want to post questions and add your own stuff then you should register.

I would also like to mention that there is a mobile app, where you can browse forums.

You should really watch this video if you want to be a member on XDA



If you run into problems, feel free to tag the author, Sanjay Krishnan, Gautam Padiyar or Sushant Rao and ask a question on the G+ Community. We’ve all been in those situations.

Don't forget to +1, share, comment and point out mistakes (if any) in the comments section below.

15 Jan 2015

Bio Mimicry

Please read the prequel to this here

When you are an admirer of Nature, it is hard to look at Nature without considering the acts of Man. Many of our scientific inventions and achievements appear to be narrow-sighted and flawed. What Nature produces is completely bio degradable – safe for the planet, safe for all the living creatures. But when Man started using technology to ‘enhance’ living on this planet, he has done more damage than good. Harmful toxins are released; dangerous radiations that threaten the survival of several species are the results of man’s rapid progress. Watch this




Is there any solution? Yes, people are now looking towards Nature and Her ways of solving man-made problems. This relatively new approach to science and technology is termed Bio Mimicry. Look around and just observe Nature’s fascinating ways.

Microbes, the tiniest of living creatures are ingenious engineers; watch how ants make ant hills and you will be surprised at the architectural skills



Impressed? Watch the TED video to understand how bio mimicry is being accepted today.




ReflecITion

Technology today has redefined our lives. What was unimaginable before has become a reality – wait a minute! Was it really unimaginable? The recent news article that carried the stories of inventions by ancient Indians seems to defy this statement. The fact that Indians initiated several technological advancements, show that as a civilization, we were far ahead in our approach to technology.

This might give rise to the all-important question – Are these claims true? What evidence do we have to substantiate this claim? Answering this is not easy. We have relied on oral rendition/transfer of knowledge in the past. Documenting our country’s rich history and scientific progress was undertaken by foreign travelers like Hiuen-Tsiang and Fa-Hien.This again has a philosophical connotation – our ancestors believed that knowledge is free and never felt the need to own what they have achieved – life itself is transient, so is owning (patenting) of success.

Today we work and think different – our needs revolve around technology- owning the latest phone, documenting our achievements in a digital format, having a flat screen Television, connecting to people through social media– the list grows for adults and the young alike. We have come a long way, haven’t we? It’s time now to think, to pause.Where are we heading? Should we not document/patent our achievements now? Where is that elusive progress in creative thinking, as a Society /as a Civilization? Should technological advancements be unfettered and exist without global boundaries? Can technology be the leveler, the panacea to bridge the gap between the developed and developing countries?

8 Jan 2015

Texas Instruments Sci-Tech Quiz 2015

Hello everyone!

So the Texas Instruments Science and Technology Quiz is back in its 11th edition this year. The quiz will be conducted in 5 cities followed by a national finals which is held here in Bangalore. Students from classes 8 to 10 can participate. Our school has done really well in this quiz, and hopefully we continue to do so. 2 years ago, Barghav Cavale and I won this quiz. (In my 3rd attempt) A lot of you must be interested in attending this quiz, so I thought I could help all of you in preparing better.

The quiz primarily focuses on knowledge science concepts and the technology isn't really about the latest gadgets and its NOT an IT quiz like the ones which have been held in school for IT Fair or the TCS quiz. The science questions require some thinking and need to be explained.

Other than general knowledge and thinking, the best way to prepare would be to read howstuffworks.com's Science and Tech Sections (http://science.howstuffworks.com/). We were able to answer 3 or 4 questions from reading stuff here. (Ex: How noise cancelling headphones work, Regenerative breaking etc.) Knowing stuff about scientists, and the periodic table and the elements is necessary.

Last year, we conducted a quiz in school to select students for the TI quiz but the quiz was never held that year. So to get you started, have a look at those questions here and see how you do.
http://1drv.ms/1wWULxI (Its kind of difficult)

All the best to everyone who will be going this time! (Ask Chethana Ma'am for more details)

Abhishek

6 Jan 2015

Quantum computers - a replacement?

A touch of history

Quantum Mechanics as a subject rose from one single question that was bothering Scientists of the time, and is still debatable now.

"Is light a particle or wave"? 

The eminent physicist Isaac Newton believed that light was a rain of particles, called corpuscles. At the beginning of the nineteenth century, Thomas Young demonstrated with his famous double-slit interference experiment that light propagates as waves. With Maxwell’s formulation of electromagnetism at the end of the nineteenth century, it was generally accepted that light is propagated as electromagnetic waves, and the debate seemed to be over. However, in 1905, Einstein was able to explain the photoelectric effect, by using the idea of light quanta, or particles which we now call photons.






Similar confusion reigned over the nature of electrons, which behaved like particles, but then it was discovered in electron diffraction experiments, performed in 1927, that they exhibit wave behavior. So do electrons behave like particles or waves? And what about photons?
This great challenge was resolved with the discovery of the equations of quantum mechanics. But the theory is not intuitive, and its description of matter is very different from our common experience.

The Real Deal


             The Bloch sphere is a representation of a qubit


Quantum computing is essentially exploiting the laws of quantum mechanics to process information. A traditional computer uses “bits,” which encode either a zero or a one.Quantum computers aren't limited to two states; they encode information as quantum bits, or qubits, which can exist in superposition. Which makes them better machines for computation.

To really understand superposition we need to look at one work of Alan Turing, "The Turing Machine".
The Turing machine, developed by Alan Turing in the 1930s, is a theoretical device that consists of tape of infinite length that is divided into little squares. Each square can either hold a symbol (1 or 0) or be left blank. A read-write device reads these symbols and blanks, which gives the machine its instructions to perform a certain program.
Explained Here:




Now think of a quantum Turing machine where the long tape is in a quantum state as does the read-write device.This means that the symbols on the tape can be either 0 or 1 or a superposition of 0 and 1, in other words the symbols are both 0 and 1 (and all points in between) at the same time. While a normal Turing machine can only perform one calculation at a time, a quantum Turing machine can perform many calculations at once.
Quantum computers also utilize another aspect of quantum mechanics known as entanglement.

Entanglement is an extremely strong correlation that exists between quantum particles, that two or more quantum particles can be inextricably linked in perfect unison, even if separated by great distances. The particles remain perfectly correlated even if separated by great distances. The particles are so intrinsically connected, they can be said to “dance” in instantaneous, perfect unison, even when placed at opposite ends of the universe. This seemingly impossible connection inspired Einstein to describe entanglement as “spooky action at a distance.”

Quantum Tunneling is something that most of us have heard and is the most misunderstood property of a quantum system. Let us take for example the phenomenon of tunneling. If we can’t tell exactly where something is then it follows that we can’t tell exactly where it’s been or where it will be(Classical/Newtonian Mechanics). The best we can hope for is where it most probably will be. So there’s a small chance that a ball thrown repeatedly at a barrier(for instance a wall) could just tunnel through the barrier, appearing almost magically on the other side. We don’t see this often because a ball is pretty big and its 'uncertainty' pretty small. But if we deal with matter on the subatomic scale it becomes much more likely. It’s made use of commonly in modern electronics and in a real way allows for life on earth. To see why, let us trace the creation of a photon in the sun. The light from the sun that we see, two light atomic nuclei (hydrogen) collide, forming a new element(helium), and in the process light is released. But these nuclei are both positively charged and so repel each other. Only if they have enough energy can they overcome this potential barrier and fuse. But if you do the math, the nuclei in the sun don’t have enough energy. The sun’s just not hot enough, yet, the sun shines, and it does so because of tunneling. Just like our physical barrier, there’s a chance that our particle could be on the other side, and so the sun shines.




The properties better explained :


They speak about multi-verse which is an another theory to explain why these subatomic particles behave the way they do, which was first explained Hugh Everett in the 1950's that the complicated and ill-defined parts of quantum mechanics, they're all happening when you measure/observe something, what he said was, when a quantum object/system interacts with another quantum system, the world 'splits', you get 2 worlds from 1 world, and these systems will never interact again. [This is a concise form of it, but the real expressions are far more complicated.(Read more on Wikipedia)]

The Result


Well, with the title being "Quantum Computers - a replacement?", because the whole point of this article being to give you an introduction on the subject and then answering that question.

Nope, quantum computers will not serve as a replacement to classical computers. The computational power of a quantum computer is immense and can be applied to solve problems that seem impossible with a classical machine.

So we can use all these properties of a quantum system and apply it in information processing which can help us in a number of ways. As we saw in the above video, they spoke about Optimization problems and Optimization problems are some of the most complex problems to solve.

Imagine you are building a house, and have a list of things you want to have in your house, but you can’t afford everything on your list because you are constrained by a budget. What you really want to work out is the combination of items which gives you the best value for your money. This is an example of a optimization problem, where you are trying to find the best combination of things given some constraints. Typically, these are very hard problems to solve because of the huge number of possible combinations.

These types of optimization problems exist in many different domains - systems design, mission planning, airline scheduling, financial analysis, web search, cancer radiotherapy and many more. They are some of the most complex problems in the world, with potentially enormous benefits to businesses, people and science if optimal solutions can be readily computed.
One more application being, Simulation of physical environments. Many things in the world are uncertain, and governed by the rules of probability. We have, in our heads, a model of how things will turn out in the future, and the better our model is, the better we are at predicting the future. We can also build computer models to try and capture the statistics of reality. This is really a concise idea on quantum mechanics and quantum computing.

The subject is vast and requires substantial amount of patience to understand it. Although if you think you understood it...you haven't - as quoted by the great Richard Feynman. Well, go explore this ocean of opportunities.

Additional link:  [Link] -> It's a great reference on this topic.

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