Posted in Android Experiments, Uncategorized

Building CyanogenMod 12.1 from Ground Up

This is part of a continued series of my experiments with Android. I am pretty sure my device will just pick up its bags one day and walk away from me in Disney movie style of leaving a cruel master. I better make the most of it till then.

Seeing as I had rooted and explored the world of custom ROM for a while, I decided (well having time to kill decided it for me) that it I should try building the CyanogenMod code from scratch. Download the source and all. I will have to ask for forgiveness right here for messing up any technical terms and process as I am not quite sure of all that happened myself. Having a great mentor always helps and I was fortunate enough to have one who guided me to follow :

A very comprehensive and step by step guide. What all the process entails can easily be read but what I wanted to share were the hair pulling difficulties I ran into.

Half the guide was already covered so I began by downloading the source code which on the first attempt brought down my healthy net connection of ~30mbps to some 18kbps. I had to give up and call it a day. The journey was kick started at 5 in the morning in the hopes of Delhi winters keeping everyone in the hostel asleep leaving the LAN all to myself. I was blessed indeed, it was done in matter of half an hour (all 10 – 12gb of it). I even used and intimidating looking commands for running download on threads (not that scary but I deserve brownie points) .Then came the waiting part – my device needed a lot of food. First a ‘breakfast’ then a ‘brunch’. Aptly named as I had both while waiting for it to finish. But before that how could Java not poke its ever demanding nose in the middle? Apparently I had jdk version 1.8x while it worked only for 1.7x, the agonizing search of removing the latest update, countless ‘jdk already in its latest version useless messages and path variables mess up, it approved my jdk version (Android Studio wasn’t too happy about this downgrade though and it let me know.)   After hours of waiting and watching my terminal light up like in Mr. Robot, I saw the grateful message of a successful build!

Finally the build was flashed onto my device (after getting hysterically lost in the myriad of folders that gets created) and seeing no apparent change, was doubtful about the validity of the whole process. But as pointed out by a helpful soul, seeing my name on the kernel version was worth celebrating and that’s what I did right after 🙂 .

kernel name

Do I wish to carry on and be able to actually make changes to source code? Yes.

Am I sure I will be able to? No.

No step of this journey is without complications and I am not sure how much patience I have. I have come this far, I wish to go forward, only time will tell if I actually do. Fingers crossed.

Things learned today:

  • Think before you decide to mess up your only device.
  • Java has grown too complicated for its own good.
  • Linux/Terminal is GOD.
  • Happiness is seeing your name in the Kernel Version.




Posted in Explorations

Learning “How To Teach”

I am a bit young(or at least I assumed so) to find myself at this stage but I do find myself at a place where I am in a state to teach others something. Be it anything. It is a surreal feeling in itself. Keeping aside the feeling of pride and vanity, there is a sense of wonder in being able to impart knowledge to others and see the expression of gratitude light up their face. This is a small foray into how I reached here and what I plan to do now that I am here.

It began with explorations of my own, naive and unskilled, a bit late to the race actually, I ventured in the world of tech and let it unleash whatever wonders it could on me. I tried competitive coding, web development, game development, AI, android development and the hunt is still on for the next challenge. In this journey, I left my shyness behind and sought help from whatsoever source presented itself. Seniors, blogs, friends, forums I searched them all and was fortunate enough to find people willing to mentor and assist in mundane tasks, spending time and effort. That was it when I decided that some traditions are honorable to carry forward.

Following in the footsteps, I welcomed juniors and friends seeking my help and guidance in matters I had some knowledge of and it is a task I took up diligently. What amazes me is the ease with which I can recognize even over a Whatsapp chat (coherent conversations over which are difficult anyway) exactly what the problem someone is facing and is not able to convey. I guess my own days of trial and error have taught me too much about making mistakes. There are some plans in motion to expand my reach and take up more elaborate sessions. There is a sense of fear and responsibility with this task that you cannot deny but the overwhelming joy of sharing the best of what you had learnt, giving a simpler solution or at times even making someone understand the problem better is a reward that urges you to fight through your fears. It is a satisfaction and gives a high like rare other things can.

I am not an accomplished teacher, far from one actually, taking my first steps. I don’t wish to make a career out of this but will always attempt to build a stronger community which can survive and grow by supplying knowledge from within. That is my dream and that is why even if my efforts are meager and audience small, I believe they matter.

Posted in Android Experiments

Flashy Flashy ROMs

It all started with that one crash. New Year, 2016 and WhatsApp apparently couldn’t take the load. It gave in. Frustrations ran high, the impossible had happened. No WhatsApp? How were we supposed to convey our heartfelt greetings to people we probably hadn’t had a human interaction with in a  year? Oh well, my frustration was more rooted in being a developer. Locked out of an application! Oh, the horror! Long story short, a blend of too much ego and an aimless day led to me wiping my phone’s data.

What’s done is done right? Can’t cry over spilled milk and I had always fancied trying on the custom ROM variants of android. (I know many question my even being a developer if I hadn’t done this already. I have one word for you – Laziness) . Luckily I own a nexus 5, Google’s own play toy.  I cant even take credit for all the work I did henceforth.

What ensued was a hurried backup(not much was left to be honest), a quick unlocking of bootloader and then flashing a custom recovery (all child’s play in nexus really). But now came the hard part. Which ROM to choose? Should I leave it to simple stock? Or the evergreen Cyanogenmod 12? And then there’s a tirade of choices by very attractive names. Eeny-meeny-miny-moh.

I tried Stock Rom for a bit, but it didn’t seem worth the effort. And as everyone was using CM, I had to do something different. Typical right? Of all the options available I picked Paranoid Android to be my test mule. Disappointment wouldn’t be the right word to convey it, dissatisfaction it was when I saw it load up. I gave it some 30-45 minutes but I knew this wasn’t it. Hover, peek and pie…eye catching but not long lasting.

Time to be daring, CM 13, here I came. Against all the advice of it being unstable, I installed and ran it and it was just right. Slick animations, minimalistic features, so many options, everything was in place. I paired it up with the Dark Material Theme: and it was like strawberries dipped in chocolate. Just the boot animation! After some tweaks here and there, I was set. But alas, every beautiful story has to have some tragic element or it isn’t complete.

The headphone jack wasn’t working! The music just stopped as soon as they were plugged in. So this is what unstable feels like. After a frantic search and some amount of self cursing, going to CM 12 was the only viable option.  My heart broke a little but the alternative wasn’t a survivable option. CM 12.1. Grudgingly. Stable and all. To be fair, it’s good, like a smaller brother to its newest variant. Though I am missing the multi-window option and cleaner animations, this will have to do till 13 gets more stable. Now as a senior rightly pointed out, if I was worth my metal, I would provide a patch for the bug. I wish I could, but baby steps for now. The future is wide open….

The hardest part of losing your data?  Google keyboard forgetting all your custom words, and I thought we were so close, completing each other’s sentence 😥