Suramya's Blog

Visit suramya.com Who am I?

May 6, 2015

How to Root a second generation Moto x running Lollipop

Filed under: Knowledgebase,Techie Stuff,Tutorials — Suramya @ 11:22 PM

I got my new phone today and as usual the first thing I did was root it before I started copying data over so that I don’t loose data when I unlock the boot loader. The process required a bit of work mainly because I was following instructions for KitKat while my phone was running Lollipop. That caused the phone to go into this funky state where the Play Store API’s went MIA and the entire thing stopped working to the point that I had to do a hard reset to get back to a stable state.

BTW, before you continue please note that this will delete all data on the phone so you need to ensure that you have a proper backup before proceeding. Without further ado, here are the steps I followed to get things to work using my Linux (Debian) desktop:

Unlock the Bootloder

The first thing you have to do is unlock the Boot loader on the phone:

  • Install the Android SDK by issuing the following command:
    apt-get install android-tools-adb android-tools-fastboot
  • Run the following command:
    fastboot oem get_unlock_data
  • Take the string returned, which would look something like this:
    (bootloader) 0A40040192024205#4C4D3556313230
    (bootloader) 30373731363031303332323239#BD00
    (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
    (bootloader) 1A3E5#1F53280002000000000000000
    (bootloader) 0000000

    and concatenate the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. Your string needs to look like this:
    0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000

  • Visit the Motorola Website.
  • Paste the string you got in the previous step on the site, and then click on the ‘Can my Device be Unlocked?’ button and if your device is unlockable, a “REQUEST UNLOCK KEY” button will now appear at the bottom of the page.
  • Click on the “REQUEST UNLOCK KEY” Button.
  • You will now receive a mail with the unlock key at your registered email address
  • Start your device in fastboot mode by pushing and holding the power and volume down at the same time. Then release the power button followed by the volume down button. The device will now power up in fastboot mode.
  • Run the following command to unlock the bootloader:
    fastboot oem unlock 
  • If the code was correct then you will see a message confirming that your device was unlocked and the phone will reboot.

Enable Developer Options/USB Debugging

In order to proceed further we need to enable USB Debugging and in order to do that we need to enable Developer Options following these steps:

  • Pull down the notification drawer and tap on ‘Settings’
  • Scroll down to ‘About Phone’
  • Now scroll down to ‘Build Number’
  • Tap on ‘Build Number’ 7 times.
  • It’ll now say that you are a developer. Now press back, You should now see Developer Options above About Phone.

  • Click on ‘Developer Options’
  • Check the box next to ‘USB debugging’ and save

Root the Phone

First we need to download the correct image file for the model of your phone. I had to look up my model on Wikipedia because for some reason my phone decided not to share that information with me. Use the appropriate link for your model in the list below. I have a XT1092 but the XT1097 image worked fine for me.

After downloading the file, extract it. Run the following command:

adb reboot bootloader

This will restart the phone in the fastboot mode. Then boot using the image you downloaded in the previous step using this command:

fastboot boot /path/to/image/file/CF-Auto-Root-victara-victararetbr-xt1097.img

Once you run the command the Device will boot up, install su and quickly reboot (this is automatic, no user intervention is required). After the phone starts up, you need to install Chainfire’s SuperSU from the Play Store.

After that you are done and your phone is rooted. You can verify the same by installing a ‘Root Verifier’ application from the store.
Well this is all for now, will write more later.

– Suramya

April 26, 2015

How to create Electric Ink for projects

Filed under: Interesting Sites,Knowledgebase,Techie Stuff — Suramya @ 9:48 AM

At times using wires in a project might not be the most practical option because of space/weight limitations. If that is the case then you should take a look at Electric Ink for creating cheap circuits. In fact you can make your own Electric Ink using a process which is quite simple. The good folks at the Popular Science site have provided us with an instruction guide that I am reproducing here so that I don’t loose the instructions in case PopSci decides to reorg their site:

Materials:

  • Powdered graphite
  • White vinegar
  • Syringe
  • Elmer’s clear glue (I think any clear glue should work)

Instructions

  • To make the ink, put powdered graphite in a cup, cover with vinegar, and stir. Let it sit for a few minutes.
  • Once the graphite settles on the bottom of the cup, remove the clear liquid on top with a syringe.
  • Stir in about a teaspoon of glue to keep the graphite suspended. A thick line of paint has a resistance of a few kilohms per inch.
  • Draw the circuit, wait for it to dry and then you can test it out.

I was wondering if this would work on T-Shirts, under a laminate or other such protective coating to prevent the circuit from getting washed out. Maybe I should try this out over the weekend on one of my old T-Shirts. Wonder what kinds of design’s I would be able to make before hitting issues if this works.

– Suramya

April 17, 2015

How to find information when Google can’t find it

Filed under: Computer Tips,Interesting Sites,Knowledgebase,Techie Stuff — Suramya @ 10:36 PM

For most people if you can’t find something on Google then it’s not there on the internet. However that is not true and there are other ways to find the information you are looking for even if Google can’t find it. Now some of you might be wondering, how can something be online without Google knowing about it because don’t they index everything? Unfortunately, that is not true. According to studies there are a lot of sites out there that are not indexed by any search engine. This part of the internet is called the Deep Web. Deep web is not to be confused with Dark Net which contains sites that can’t be reached via the regular internet. Deep Web sites are accessible via the regular internet and it is a lot bigger than the visible internet. In-fact some estimates suggest that the deep web is 400 to 550 times larger than the surface web.

So how do you find something that is in the Deep web or just not indexed by Google? Well, you can always try one of the following options depending on what you are looking for.

Wolfram Alpha

For example, if you are making factual queries about data (e.g. facts, figures, etc) then you should take a look at Wolfram Alpha. Their Wikipedia page explains how the engine works:

Users submit queries and computation requests via a text field. Wolfram Alpha then computes answers and relevant visualizations from a knowledge base of curated, structured data that come from other sites. The curated data makes Alpha different from semantic search engines, which index a large number of answers and then try to match the question to one.

Using the Mathematica toolkit, Wolfram Alpha can respond to natural language questions and generate a human-readable answer.

Topsy

Topsy maintains a comprehensive index of tweets and since Twitter is the best place for real-time sharing of thoughts/news then it is a good place to search for current events/trending topics. I just tried it out and it looks to be pretty effective and efficient.

Image Search

If you are trying to identify an image, or find more information about a particular Image then you can always try Google image search. However if that doesn’t return any relevant results then you should try out specialized Image search engines like Tin Eye or yandex.ru. I use a Firefox Extension called Who Stole my Pictures that lets you search across multiple engines in one shot from your context menu. Side note: This also search on Bing but 99.99% of the time Bing doesn’t return any results no matter what you search for.

On the other hand if you are just searching for images you should try PicSearch.com which is a image search service allowing a user to search across over 3 billion pictures (as per the site).

WebForums and Discussion boards

Another great way to find answers is to search on enthusiast forums and discussion boards. These forums have a whole community of folks who are passionate about that particular topic and would love you to point you in the right direction or walk you through figuring out the solution. Just ensure that you are asking Questions The Smart Way.

BoardReader.com allows you to search across multiple discussion boards and forums available on the net. StackExchange.com has multiple sub sections on hundreds of topics, Reditt.com has subreddits that focus on thousands of topics and most of them have actual relevant information as not all of the site is dedicated to cat video’s.

IRC

IRC stands for Internet Relay Chat and is designed to facilitate group communication in discussion forums, called channels hosted on IRC servers. There are channels dedicated to pretty much any topic you can think of on some IRC server somewhere and you can get answers to questions or help with a problem in real time.

The difficult part is finding the appropriate channel to ask your question.

I have used IRC Search in the past to find channels with a good success rate. Another option is ixirc.com/.

In addition to the options listed above, you should also check out the following resources for additional information and search options/methods that you can try out when searching for data:

That pretty much covers what I wanted to talk about in this post so this is all for now. Will post more later.

– Suramya

April 15, 2015

Please defend Internet Freedom in India

Filed under: Computer Related,Interesting Sites,My Thoughts,Techie Stuff — Suramya @ 1:34 AM

Not content with watching the US and certain other countries screw around with net neutrality the Telecom Regulatory Authority of India (TRAI) has decided to pitch in and make a mess of things (again) in India. These are the same brilliant folks who decided in 2007 that an entire IRC network (undernet.com) should be blocked in India because there are a few channels on it that promoted piracy. It took a few years for the stupid ban to get lifted. Even now a bunch of URL’s are blocked but for the most part things are ok.

Unfortunately that is not going to be the case for long if the telecom lobbyist’s have their way. They want to break up the internet access to Paid and free access with the Telecom’s deciding what content should be available to a user. If a site doesn’t pay then they would either get blocked or get put on a ‘slow-lane’ where traffic to the site is artificially slowed down to give more bandwidth to paying sites. In short they want to take away net neutrality. So what exactly does net neutrality mean? In short it means:

  • All sites on the internet must be equally accessible (that means that no site’s traffic is given priority)
  • The same access speed at the telco/ISP level for each (So assuming all else is the same then all sites will be accessible at the same speed)
  • The same data cost for access to each site (per KB/MB). (No reducing of data cost to sites that pay Telecom’s money)

TRAI has released a consultation paper with 20 questions and wants you to send them an e-mail by 24th of April, 2015. Please visit Save the Internet to submit your responses to TRAI. It is as simple as going to the site, reviewing the email with the answers and then sending it out. Your 5 mins just might save the net in India.

More information on this issue is available at the following sites:

Once you have emailed your responses please help in spreading the word to others via Social Media/Email/Smoke Signals.

– Suramya

March 29, 2015

Rosetta Stone for Unix/Linux

Filed under: Knowledgebase,Linux/Unix Related,Techie Stuff — Suramya @ 9:53 PM

If you have been in the industry for a while then you have been in a situation where you need to do something on the server but have no idea what the appropriate command is because you always worked on a different variant/version of the Operating System. Think having to work on Solaris or Linux when all you have worked on is the Mac OS. To make things easier for the poor admins that have to keep switching OS’s, Bruce Hamilton has created a site he calls the ‘Rosetta Stone: A Sysadmin’s Universal Translator‘. This site has a list of tasks and the corresponding command that you would have to run for each of the OS’s. The Stone supports the following OS’s:

  • AIX
  • A/UX
  • DG/UX
  • FreeBSD
  • HP-UX
  • IRIX
  • Linux
  • Mac OS X
  • NCR Unix
  • NetBSD
  • OpenBSD
  • Reliant
  • SCO OpenServer
  • Solaris
  • SunOS 4
  • Tru64
  • Ultrix
  • UNICOS

and covers tasks in the following categories:

  • hardware
  • firmware
  • devices
  • disks
  • kernel
  • boot
  • files
  • networking
  • security
  • software
  • patching, tracing, logging

Check it out, bookmark it. It will save you some grief down the line the next time you are in this situation.

– Suramya

January 8, 2015

Microsoft Office now available for Android tablets

Filed under: Computer Software,Techie Stuff — Suramya @ 11:35 PM

MS is spending a lot of time and effort trying to overcome the cloud of their previous actions where they did their level best to eradicate their competitors by any means necessary, even if they were morally in a grey area. The latest volley in this effort is their move to make MS Office available on the Android tablets for free. They have MS Word, MS Excel and MS Powerpoint available and the reviews so have have been very good even though the apps are technically still in Preview mode.

Today, we are excited to announce that we are further expanding the preview. We want more feedback from more users to ensure that Office apps work well on a range of different Android tablets before launching the official apps. To participate in the preview, you can use an ARM-based Android tablet running KitKat or Lollipop, with a screen size between 7″ and 10.1″. Starting today, anyone can go to Google Play and download the Word, Excel and PowerPoint preview apps. No waitlist. No requesting access. Just go and download the apps!

Office apps are one of the apps that need to be there on every OS. I have tried a lot of the alternatives like OpenOffice and other clones but I keep coming back to MS Office because of the stability and compatibility that it gives me with other Office users. On my Linux machine I use Crossover to have a native install of Office and it works great. When I get some time and restore Android to my Tablet (I am trying to install Kali Linux on it) I will try Office out on it even though I don’t see myself editing a lot of documents on the tablet.

Well this is all for now. Will write more later.

– Suramya

Source: androidcentral.com and Microsoft Blog Announcement

December 26, 2014

Writing A Virtual Machine In Excel

Filed under: Computer Software,My Thoughts,Techie Stuff — Suramya @ 6:03 PM

Microsoft Excel should soon be classified as an Operating System. In the past we have seen a 3D shoot them up Doom Clone, a Flight Simulator and other games included in it as Easter eggs. Then we saw people using it to watch movies at work, and now here’s the latest entry that forces Excel way outside its comfort zone…

A programmer named Ádám was participating in a contest where he had to solve a problem in Excel but the official rules prohibited the use of Excel macros so he went and created an assembly interpreter for Excel and used it to solve the problem instead. Talk about overkill. The idea is quite interesting. However the thought process required to imagine this as a possibility and then actually going ahead and implementing this is mind boggling.

This is a virtual Harvard architecture machine without writable RAM; the stack is only lots and lots of IFs. The instructions – mostly load, MOV, JNZ, INC, and CMP solves this problem, examining two inputs to see if they multiples of each other. If you’re wondering, an example cell from [Ádám]’s Excel sheet looks like this:

=F6
   INDEX($C$2:$C99999,$G2,1),
   IF(AND(INDEX($B$2:$B99999,$G2,1)="JZ",$I2=0),
      INDEX($C$2:$C99999,$G2,1),
         IF(AND(INDEX($B$2:$B99999,$G2,1)="JNZ",$I2<>0),
         INDEX($C$2:$C99999,$G2,1),
         G2+1
         )
      )
   )
)

You can check out Adam’s solution at Hackaday.io if you are interested. I think I am going to go find my excel for Dummies book now and get just a little bit more proficient in it.

Thanks to hackaday.com for the original article.

-Suramya

December 14, 2014

Cleaning your Linux computer of cruft and duplicate data

When you use a computer and keep copying data forward everytime you upgrade or work with multiple systems it is easy to end up with multiple copies of the same file. I am very OCD about organizing my data and still I ended up with multiple copies of the same file in various locations. This could have happened because I was recovering data from a drive and needed a temp location to save the copy or forgot that I had saved the same file under another directory (because I changed my mind about how to classify the file). So this weekend I decided to clean up my system.

This was precipitated because after my last system reorg I didn’t have a working backup strategy and needed to get my backups working again. Basically I had moved 3 drives to another server and installed a new drive on my primary system to serve as the Backup drive. Unfortunately this required me to format all these drives because they were originally part of a RAID array and I was breaking it. Once I got the drives setup I didn’t get the chance to copy the backup data to the new drive and re-enable the cron job that took the daily backup snapshots. (Mostly because I was busy with other stuff). Today when I started copying data to the new Backup drive I remembered reading about software that allowed you to search for duplicate data so thought I should try it out before copying data around. It is a good thing I did because I found a lot of duplicates and ended up freeing more than 2 GB of space. (Most of it was due to duplicate copies of ISO images and photos).

I used the following software to clean my system:

Both of them delete files but are designed for different use cases. So let’s look at them in a bit more detail.

FSlint

FSlint is designed to remove lint from your system and that lint can be duplicate files, broken links, empty directories and other cruft that accumulates when a system is in constant use. Installing it is quite easy, on Debian you just need to run the following command as root

apt-get install fslint

Once the software is installed, you can either use the GUI interface or run it from the command line. I used the GUI version because it was easier to visualize the data when seen in a graphical form (Yes I did say that. I am not anti-GUI, I just like CLI more for most tasks). Using the software was as easy as selecting the path to search and then clicking on Find. After the scan completes you get a list of all duplicates along with the path and you can choose to ignore, delete all copies or delete all except one. You need to be a bit careful when you delete because some files might need to be in more than one location. One example for this situation is DLL files installed under Wine, I found multiple copies of the same DLL under different directories and I would have really messed up my install if I had blindly deleted all duplicates.

Flossmanuals.net has a nice FSlint manual that explains all the other options you can use. Check it out if you want to use some of the advanced features. Just ensure that you have a good backup before you start deleting files and don’t blame me when you mess up your system without a working backup.

BleachBit

BleachBit is designed for the privacy conscious user and allows you to get rid of Cache, cookies, Internet history, temporary files, logs etc in a quick and easy way. You also have the option to ensure that the data deleted is really gone by overwriting the file with random data. Obviously this takes time but if you need to ensure data deletion then it is very useful. Bleachbit works on both Windows and Linux and is quite easy to install and use (at least on Linux, I didn’t try it on Windows). The command to install it on Debian is:

apt-get install bleachbit

The usage also is very simple, you just run the software and tick the boxes relevant to the clutter that you want gone and BleachBit will delete it. It does give you a preview of the files it found so that you can decide if you actually want to delete the stuff it identifies before you delete it.

Well this is all for now. Will write more later.

Thanks to How to Sort and Remove Duplicate Photos in Linux for pointing me towards FSlint and Ten Linux freeware apps to feed your penguin for pointing me towards BleachBit.

– Suramya

December 12, 2014

My new toy: the Moto 360 smart watch

So I have a new toy that I am super excited about and It is a birthday gift from me to myself. :) I have been wanting to get a smartwatch since last year when the Samsung gear came out but when I saw the gear I didn’t like the way it looked so ended up not buying it. Now that I have bought the Moto 360, I am glad I didn’t buy the gear because it beats the Gear hands down, no questions asked. I have been using it for 3 days now and I love it.


The Moto 360 with the default Face

The initial setup of the watch was easy, I just had to download an app on my phone and follow the prompts, took me about 2 mins (excluding the time to download the app) to complete the pairing and setup. Once the app was installed the watch downloaded the latest firmware and upgraded automatically after I charged the battery which was surprisingly very fast. Once the upgrade completed it was connected to my S5 and has been working like a charm.

The default apps on the 360 are the Fitness apps, ability to receive any notifications on the watch and control the music app and the Google camera app from the watch. It has built in voice recognition which works fantastically great and is integrated with Google Now. Tonight we tried it out in a restaurant where we had gone out for a team outing and it had no trouble with the voice recognition even with the background noise. In addition to the default apps so far I have also installed a flashlight app, a dictation app and another camera app that lets me use the watch as a viewfinder for the camera on my phone. I keep finding cool new apps for the watch every day so will probably be installing a lot more stuff on it in the near future.

As I said earlier Voice recognition works for most of the things I would want to do on the watch, like use to to initiate a call or dictate a reply to an SMS, start an app etc. For the rest the touch screen works fine. Took me a bit of time to figure out how to run the new apps I installed because that isn’t really intuitive initially (or maybe I was just sleep deprived) but once I figured that out I was good to go. I think it would have made sense for them to put this in the help section.

The watch is not bulky at all and is lighter than my other watch. Lots of folks have complained about its size online but I didn’t find that to be an issue. However the battery life could have been better. In my daily use I am down to about 35% charge by the time I am ready to sleep after starting with a full charge in the morning. The charger looks nice and the charging is fast, however since the watch has a custom charger it means that I have to make sure that I carry it with me when I am traveling because none of my other chargers work with it. Sure, I can buy another charger for the office but it’s a pain.

The other issue that I noticed with it is that the heart rate sensor is crap. Every single time I have tried to check my heart rate (using both fit and the Moto software) it has failed with a sensor time out message, although Vinit did manage to get it to work once so I know the sensor works.

For the most part I have been using the watch to read my SMS/Whatsapp/Email messages without having to pull out my phone and monitoring my step count. Apparently I walk around a lot more than I thought which is good. :) Also the ability to decline calls with a message from the watch is very handy when your phone is at your desk and you are at another desk working on something or in a meeting.

I am planning on installing the Analog keyboard for Android that I blogged about earlier but that will be over the weekend when I have some breathing room to experiment. I will share my findings and experiences going forward so if you are interested do keep an eye on the blog for new posts.

Well, this is all for now. It’s time for me to crash for the night. Will post more later.

– Suramya

November 23, 2014

Presenting hack.summit a virtual dev conference Dec 1st – 4th

Filed under: Interesting Sites,Techie Stuff — Suramya @ 11:55 PM

Developer conferences are a great way to meet developers and learn about the latest and greatest technologies and programming skills etc. However most of them happen in places where they are not accessible to a majority of the people in the world, primarily because of cost and time taken to travel there which is quite unfortunate. I know there have been multiple conferences that I wanted to attend but couldn’t because they were in the US or Europe while I was in India.

To fix that problem the nice folks at hack.hands() have created a free, live, online event from Dec 1 – Dec 4th where top speakers from their fields will be available to answer questions and have their brains picked. You can register for the event for free by visiting their website.

The hack.summit() conference is a live, global event put on by the fine folks behind real-time programming assistance service hack.hands(). From December 1 to December 4, a wide range of speakers will present and answer democratically popularized questions over Crowdcast via Google+ Hangouts. Speakers in attendance include wiki inventor and Design Patterns pioneer [Ward Cunningham], Codeacademy founder [Ryan Bubinski], Google Glass creator [Tom Chi], Python Software Foundation’s [Alex Gaynor], and even the inimitable [Jon Skeet].

The goals for this conference are simple and admirable: to educate developers of all stripes about best practices, to encourage mentorship in the programming community, and to spread the joy of coding by supporting coding non-profits.

Thanks to hackaday.com for the story.

– Suramya

Older Posts »

Powered by WordPress