After dirty flashing CM 13 on top of CM 12.1, I faced some problems. First of all, things were kinda slow. So I went to Developer options in Settings and set all the Animation scaling to .5x. This considerable made things faster. Secondly and more importantly, my sim card was not getting detected and I was getting a ton loads of popups saying "Unfortunately the process com.android.phone has stopped".
Posts
- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
- Magic Cauldron: Harry Potter Themed Gender Reveal Party - #Aurdino
Earlier this year, we had a very fun filled Harry Potter themed gender reveal party. For the reveal, I built a Magic Cauldron which would reveal the gender. Check it out for yourself! For this I needed: A Cauldron. WS2812B LED array. Aurdino UNO. Bread board and jumper wires. Dry ice. Kasa Smart bulbs I will go over in the following sections The Mist.
- Kakashi: The Copycat Robot - #Aurdino #image processing
In this post, I want to share about "Kakashi: The Copycat Robot"—a fun side project I built a few years ago. The name is inspired by the famous character from Naruto, Kakashi Hatake, also known as the Copycat Ninja.The goal of this robot was to mimic Kakashi's ability to copy movements—though, of course, in a more limited way. Check it out for yourself!Here are the things I used to build this:
- Neural network inference pipeline for videos in Tensorflow - #Deeplearning #Tensorflow
Just as we saw a huge influx of images in the past decade or so, we are now seeing a lot of videos being produced on social media. The need to understand and moderate videos using machine learning has never been greater. In this post, I will show you how to build an efficient pipeline to processes videos in Tensorflow. For simplicity, let us consider a Resnet50 model pre-trained on
- Finding Where's Waldo using Mask R-CNN - #Deeplearning #ML
When I was a kid, I really loved solving Where's Waldo. There were few books (it used to be called Where's Wally) in our school library on which I spent hours finding Waldo. For people who do not know what it is, basically Waldo - a unique character is hidden among hundreds of other characters and you have to find him in all the chaos in the image. Now that I am too old to be solving it and
- Higher level ops for building neural network layers with deeplearn.js - #Deeplearning #javascript #ML
I have been meddling with google's deeplearn.js lately for fun. It is surprisingly good given how new the project is and it seems to have a sold roadmap. However it still lacks something like tf.layers and tf.contrib.layers which have many higher level functions that has made using tensorflow so easy. It looks like they will be added to Graphlayers in future but their priorities as of now is to
Wednesday, 23 December 2015
Unfortunately the process com.android.phone has stopped in CM 13
After dirty flashing CM 13 on top of CM 12.1, I faced some problems. First of all, things were kinda slow. So I went to Developer options in Settings and set all the Animation scaling to .5x. This considerable made things faster. Secondly and more importantly, my sim card was not getting detected and I was getting a ton loads of popups saying "Unfortunately the process com.android.phone has stopped".
Tuesday, 27 October 2015
USB debugging toggle widget
There are many alternatives to this. However they either require you to make the app a system app or they simply open the settings page. As this was not exactly what I wanted, I made one myself that allows me to enable/ disable USB debugging on click. You can get the app from here.
Fork me on Github
You DON'T have to make this a system app!.
Sunday, 25 October 2015
Using WRITE_SECURE_SETTINGS permission on non system apps
I checked if there are any widgets that could do this in a click and returned empty handed. So, I did what every developer would do - build it myself!
In order to change the adb settings, I had to use WRITE_SECURE_SETTINGS permission. But there was one major problem! This permission is not available for non system apps!!
The easiest solution to this was to move the apk to /system partition. Except that I didn't want to do this as I frequently keep flashing /system partition.
Another solution was to use pm and grant permission to the app like this:
adb pm grant <package name> android.permission.WRITE_SECURE_SETTINGS
This was great! However I didn't want users who were gonna use the app to go through all this pain. I had to figure out a way to do the same programmatically. So I did the next best thing! To run the command after opening a root shell in the code.
Here is how I did it.
This requires root. But that's ok.
Tuesday, 8 September 2015
The Infamous battery re-calibration bug in Lenovo Thinkpad
![]() |
Before - See the battery percentage drop from 30% to 6% |
Open /etc/default/tlp and set following variables.
START_CHARGE_THRESH_BAT0=100
STOP_CHARGE_THRESH_BAT0=100
![]() |
After - Fixed! |
Sunday, 6 September 2015
Download only part of a repository in github
svn export https://github.com/<username>/<project name>/trunk/<folder path>
For example:
svn export https://github.com/twbs/bootstrap/trunk/docs
Now, suppose you want to download it with a different name,
svn export https://github.com/twbs/bootstrap/trunk/docs bootstrap-docs
Monday, 3 August 2015
Material Theme for Google Blogger
Here are some of the themes generated with material-blogger
![]() |
Honor Theme |
![]() |
Aqua Theme |
![]() |
Pink Ribbon Theme |
Sample Widgets
![]() |
Button |
![]() |
Search Results |
![]() |
Popular Widget |
![]() |
Widget (Aqua Theme) |
![]() |
Archive |
To see how to use it, see this
Tuesday, 21 July 2015
Error 500: The template is updated in other place. Please reload the original page and retry it again
The template is updated in other place. Please reload the original page and retry it againThen when i tried to save the layout, I used to get this error
The server was unable to save the form at this time. Please try againAfter searching a lot on google, I found out that adding mobile only widgets causes this problem.
So, I followed the following steps to fix the issue.
Go to Template -> Edit HTML
Then search for mobile="only". You might find something like this:
<b:widget id='HTML4' locked='false' mobile='only' title='Mobile ad' type='HTML'>
Change this to:
<b:widget id='HTML4' locked='false' mobile='yes' title='Mobile ad' type='HTML'>
This will solve the problem. I think google should do something regarding this problem as it is not that straightforward to fix this.
Wednesday, 15 July 2015
ERR_TUNNEL_CONNECTION_FAILED on mobile network on android
"This webpage is not available
ERR_TUNNEL_CONNECTION_FAILED"
Monday, 6 July 2015
Celebrating the return of Dragon Ball: Kamehameha boot animation
To celebrate the return of DragonBall, I made a video of me performing the classic Kamehameha attack and made it my phone's boot animation. Here is the Vine of the video I made:
Grab the Adobe After Effects project of this video from here.
Here is how it looks while phone is booting:
Boot animation in android comes from the file called bootanimation.zip which is at /system/media. This file essentially consists of sets of sequences of images which have to be shown one after the other. Here we need to generate bootanimation.zip with just one sequence of images (extracted from the video) which runs in a loop. As there is no tool which can do this, I wrote a simple shell script.
Here we have to generate two things.
1. Folder with sequence of images.
2. Description of bootanimation.zip, which tells what to do with the images.
After running this script, bootanimation.zip is generated. Now move it to /system/media and set the permissions to 0644 (rw-r--r--)
Now reboot the phone and you are done!
KAAAAAAMEEEEEEEHAAAAAAMEEEEEHAAAAAAAAAAA!
Sunday, 21 June 2015
Play computer games through android wear using Magneto
How to use it?
Setup
Unfortunately, I haven't made a simple way to do this YET. And this is available only for Linux and Mac. If you wan't to give a try you will have to follow all these steps. I am assuming that you have ADT setup.For android wear:
- Enable developer options on your android wear and turn on USB debugging. See this to see how to enable bluetooth debugging for your watch.
- After you are successfully able to connect to your watch from your computer, install the apk.
adb install [location to the apk]
- You are done. Now go ahead and open it on your wear
For android phone:
- Enable developer options on your android device and turn on USB debugging or ADB over wifi.
- Install the apk like any other.
- You are done. Now go ahead and open it on your device.
sudo apt-get install xdotool
sudo yum install xdotool
sudo packman -S install xdotool
Start Magneto on computer
For android wear and linux
./nav -lwFor android wear and OS X
./nav -owFor android phone and linux
./nav -lpFor android phone and OS X
./nav -op
Calibration
Calibrate what is left, right, top and bottom.- Hold your device in front of the computer screen. This will be your initial position.
- Rotate your hand to left position and click on L. So, this will mark the region beyond it as Left. Then rotate your hand to the right and click on R. This will mark the region beyond it as Right. Similarly, do the same for Top (T) and Bottom(B)
- If you feel that you have to redo it, press RESET button and click on the letter. When the letter becomes L (capital L), redo Step 2.
Playing
See the video where I am playing Temple Run Online, Tetris and Pacman using my android wear!Contributing
There is a lot of scope for improvement. For instance, I haven't written the navigation script for windows. Pull requests are welcome.
You might have noticed the COMMAND button. It takes voice commands from the user and sends it to the computer. I will talk about that in another article.
Sunday, 14 June 2015
Crontab UI: easy and safe way to manage your crontab files
Here are the key features of Crontab UI:
2. Safe adding, deleting or pausing jobs. Easy to maintain hundreds of jobs.
3. Backup your crontabs.
4. Export crontab and deploy on other machines without much hassle.
5. Error log support
Setup
npm install crontab-ui
crontab-ui
Adding, deleting, pausing and resuming jobs.
Backup and restore crontab
Export and import crontab on multiple instances of Crontab UI.
See when the job is going to run next.
Separate error log support for every job
These are some of the things I am planning to add in the future
Contribute
Tuesday, 2 June 2015
Some of the cool vim tricks and tips
Here are some of the awesome tricks I have come across:
1. Suppose you have opened a file for which you don't have permission. While saving it will say "E212: Can't open file for writing". Now instead of saving this temporarily in another file and then saving in this file, you can do this:
:w !sudo tee %
2. You can edit binary files like in hexedit
:%!xxd
3. Easy diff between two files. Say there are two files 'a' and 'b'. To find the diff of 'a' with respect to 'b'
:vert diffs b
4. See command history
q:
5. Execute command while still in vim.
:! <command>
Here I am compiling and running cpp file without closing it.
6. Autocomplete whatever you are typing in insert mode based on the words you have typed before:
Ctrl+n
7. Directory Listing without NERDTree
:vsp %:h
8. Indenting code
=<next position>For example,
To indent the current line, press ==
To indent the code till next closing flower brace, press =}
Here is an example of indenting the entire code block. Place the cursor on { and then press =%
Before
Indented
9. Make searching as you type instead of after completing typing the entire thing
:set incsearch
10. Download and open source code for a given url
vim http://google.com
I usually use this to quickly view responses of my web pages.
vim http://localhost/path
I will add more in the future.
Sources:
http://vim.wikia.com/wiki/Best_Vim_Tips
What are the dark corners of Vim your mom never told you about?
Monday, 16 March 2015
A geek way to wish Happy Birthday!
Now mixing all this with my very little knowledge in signal processing, I wrote a python code which does this:

Fork me on github
How it works?
Equalizer effect
Fluttering candle flames
Happy birthday text
Python Code
Enjoy!
Sunday, 22 February 2015
Magneto = Gyroscope + Accelerometer + Geomagnetometer
Magneto runs on both android phone and wear. Here is a quick view of its working:
If you are interested to view the source. Github: Magneto
The intention of this article is not to showcase Magneto, but to explain the physics behind how I was able to map the sensors on android device to mouse movement. While making it, I had used a lot of builtin functions and some help from FusedGyroscopeSensor. Later, I did a lot of research (mainly on linear algebra and rotation physics) to get a clear understanding of the logic. In this article I will clearly explain the learnings.
Sensors
I have used 3 sensors available on android device- Accelerometer - measures the acceleration applied to the device, including the force of gravity.
- Geo magnetic sensor - lets you monitor changes in the earth's magnetic field.
- Gyroscope - measures the rate or rotation in rad/s around a device's x, y, and z axis.
Getting the initial rotation matrix
![]() |
Device's coordinate system |