<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" 
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" 
   xmlns:html="http://www.w3.org/1999/html" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
   <title>Mast Kalandar</title>
   <link>http://www.imsc.res.in/~kapil/blog</link>
   <description>bandar's colander of random jamun aur aam</description>
   <language>en</language>
   <copyright>Copyright 2008 Kapil Hari Paranjape</copyright>
   <ttl>60</ttl>
   <pubDate>Sun, 19 May 2013 02:19 GMT</pubDate>
   <managingEditor>kapil@imsc.res.in</managingEditor>
   <generator>PyBlosxom http://pyblosxom.sourceforge.net/ 1.3.2 2/13/2006</generator>
<item>
   <title>Role Playing</title>
   <guid isPermaLink="false">iiserm/role_playing-2013-05-19-07-49</guid>
   <link>http://www.imsc.res.in/~kapil/blog/iiserm/role_playing-2013-05-19-07-49.html</link>
   <description><![CDATA[

  <p>The three tags above would be seen as a succession! Those who
  administer educational institutes can learn to avoid feeling
  frustrated by learning from (for example) those who administer
  large Linux distributions.</p>

  <p>The following quote from <a href=
  "http://lwn.net/Articles/549658/">Adam Wilkinson</a> found via
  <a href="http://lwn.net">Linux Weekly News</a> makes it
  clear:</p>

  <blockquote>
    <p>You're working on a massive project that involves
    hundreds/thousands of people. It is not possible, however you
    organize such a project, for everyone to have a voice in
    everything. It is not possible to subject every decision to
    some kind of public review process. It is a statistical
    certainty that things you disagree with are going to happen.
    This is something you need to reconcile yourself to. Of course
    you can raise your voice on topics that concern you, and of
    course we can try to make our processes as open as possible,
    but however we do things, <em>stuff you don't like is going
    to happen</em>, and you've got to be comfortable
    with that, or you're going to get frustrated and burnt out very
    quickly.</p>
  </blockquote>

  <p>This applies <em>equally</em> to the lowly worker as to the
  leader of a project. The former is more likely to figure this out
  than the latter! If leaders do not recognise contradictions
  between proposed policies and the ground reality, the smallest
  issues will often escalate to the highest level---and the leaders
  will have to deal with them.</p>

  <p>Everyone has ambitions that go beyond the role(s) assigned to
  them---goals that require various resources beyond those
  available to their assigned role. As a leader, the precious resource
  is time and so one way to try to extract such "extra-curricular" goals
  is by dumping work on someone else (typically a lowly worker). The
  lowly worker might respond by "papering over" problems until one day,
  they blow up.</p>

  <p>However, this is not called "playing a team game", it is
  "playing a game against your team-mates". Team players do not
  play zero-sum games against their colleagues and compatriots.</p>

  <p>A lowly worker can work "outside the system" to pursue a
  private project. A leader does not have such a luxury and must
  <em>step outside</em> the leadership role to achieve a
  private goal.</p>

  <p>This is not to say that one should not have such goals---far
  from it. In fact, no matter how democratic, transparent and other
  such good-ness (that you find in) an organisation, there is always
  a use/need to explore "the fringes of normality".</p>

  <p>So everyone should play their role(s) to the best of their
  abilities ... and once in a while, take a break and step outside
  for a breath of fresh air!</p>


]]></description>
   <category domain="http://www.imsc.res.in/~kapil/blog">iiserm</category>
   <pubDate>Sun, 19 May 2013 02:19 GMT</pubDate>
</item>
<item>
   <title>Fixing GPS for Wildfire with "blackmagic"</title>
   <guid isPermaLink="false">floss/gps_fix_blackmagic-2013-04-27-13-57</guid>
   <link>http://www.imsc.res.in/~kapil/blog/floss/gps_fix_blackmagic-2013-04-27-13-57.html</link>
   <description><![CDATA[

  <p>As explained in <a href=
  "su_debian_cyanogen-2013-04-20-00-11">an earlier post</a>
  my HTC Wildfire phone is now running <a href=
  "http://cyanogenmod.org">Cyanogenmod</a> version <a href=
  "http://download.cyanogenmod.org/get/jenkins/2808/cm-7.2.0-buzz.zip">
  7.2.0 for Wildfire (Buzz)</a>. The phone is pretty snappy with
  this image. I have not even felt the need for "Google Apps"
  except for those parts that are connected with Google Maps
  (primarily NetworkLocator and Maps but also some support files
  for these).</p>

  <p>However, after installing Maps, I noticed that it was not able
  to get a tight fix on my location. (Note that Maps also gets a
  "loose" fix by getting the co-ordinates of the nearest cell tower
  using the NetworkLocator.) Searching the web turns up thousands
  of "GPS fix" therapies from all kinds of places.</p>

  <p>In <a href=
  "unlock-htc-2013-04-16-20-29.html">earlier</a> <a href=
  "clockwork_mod-2013-04-18-10-16.html">experiments</a>, I
  had been wary of "brick"ing my phone. Now that it is working so
  well, I am doubly so! Hence, any solution which seemed to be
  reversible was acceptable and those which were not, were not.
  Solutions that involved software changes alone would appear to be
  reversible. Hence, I tried:</p>

  <ul>
    <li>Making changes to <code>/system/etc/gps.conf</code>, such
    as putting in <code>in.pool.ntp.org</code> in place of a
    European NTP server, or removing the SUPL entries etc. (All
    these changes were made after making a backup of this file and
    noting its exact permissions of course!)</li>

    <li>Installing the GPSStatus application for Android and using
    it to reset the GPS internal state and download a-GPS data from
    the net.</li>

    <li>Re-installing the earlier HTC "stock" version of Android
    from backup, then reset-ting GPS internal state and finally
    booting back to Cyanogenmod 7.2.0</li>

    <li>Powering down, removing and re-inserting the battery.
    Clearing the cache from recovery.</li>
  </ul>

  <p>All of these resulted in the following experience:</p>

  <ol style="list-style-type: decimal">
    <li>Immediately after cold-start (power-off, battery removal
    and re-insert and reboot), the GPS fix would be done in
    seconds.</li>

    <li>About a minute or so later this GPS fix would be
    lost.</li>

    <li>In a completely un-predictable way, the GPS fix would be
    re-gained at different times and places only to be lost in a
    minute or so again!</li>
  </ol>

  <p>One solution suggested in various places was to re-flash the
  radio. However, given the equally large number of warnings about
  "brick"ed phones due to radio flashing, I was unwilling to give
  it a go. Moreover, the current radio on the phone is
  "13.55.55.24H_3.35.20.10" which appears to be the latest (and
  last!) version for this model.</p>

  <p>Finally, I came across <a href=
  "https://h4oxer.wordpress.com/2011/07/22/rom2207-wild-ginger-gingerbread-2-3-4-aosp-stable-jit-smooth-ui-honeycomb-launcher/">
  a suggestion</a> (see the fourth entry under Modifications to the
  System) that the file <code>/system/lib/libgps.so</code> from an
  earlier build (Froyo?) would fix the problem. Now, the file
  <code>/system/lib/libgps.so</code> on Cyanogenmod 7.2.0 is actually the same
  as that on the HTC stock image that was backed-up from my phone.
  So, I was a bit disbelieving, but the change was easy and
  reversible, so why not?</p>

  <p>So I downloaded the <a href=
  "https://h4oxer.wordpress.com/2011/07/22/rom2207-wild-ginger-gingerbread-2-3-4-aosp-stable-jit-smooth-ui-honeycomb-launcher/">
  Wild Ginger ROM</a> by following a link on the same page and
  extracted the 96Kb file (from a 70Mb download ;-)). I then installed
  this file in place of the default
  <code>/system/lib/libgps.so</code>. Reboot the phone and GPS is
  working stably for 10 minutes! Go indoors for 5 minutes come back
  out and its back again!</p>

  <p>Now a hacker cannot just let this go! So what would happen if
  I put back the CM-7.2.0 version of
  <code>/system/lib/libgps.so</code>? Surprisingly, the GPS
  continued to be stable! Perhaps there was something in the
  volatile memory, so do a cold-restart (power-off, re-insert
  battery and boot). Still stable! Wipe out the "Dalvik cache", the
  GPS loses its compass and pitch-roll settings. However, the
  wonderful GPSStatus can be used to fix that. Sure enough, once
  those are fixed, GPS is back to being stable again!</p>

  <p>This feels like blackmagic! The software running on the phone
  is the same as before, but GPS which was not working earlier is
  working now. The indication seems to be that the older (HTC Froyo)
  library managed to "kickstart" the GPS somehow. Perhaps the
  downloading and injection of aGPS data into the GPS sensor was
  not working with the newer library. Perhaps there was some flag
  that needed to be reset.</p>

  <p>So a lot of questions remain and at this point it just looks
  like blackmagic. In summary, I am now running the same software
  that I was running earlier --- even the firmware has not (as far
  as I can see) been changed. By some sort of "blackmagic" GPS is
  now working!</p> 


]]></description>
   <category domain="http://www.imsc.res.in/~kapil/blog">floss</category>
   <pubDate>Sat, 27 Apr 2013 08:27 GMT</pubDate>
</item>
<item>
   <title>Root, Recovery, Unlocked bootloaders, S-OFF</title>
   <guid isPermaLink="false">floss/htc_hboot_explanations-2013-04-24-19-16</guid>
   <link>http://www.imsc.res.in/~kapil/blog/floss/htc_hboot_explanations-2013-04-24-19-16.html</link>
   <description><![CDATA[

  <p><a href=
  "http://www.pocketables.com/2012/08/the-difference-between-root-s-offon-lockedunlocked-bootloader-in-the-htc-evo-series.html">
  Here is a good write-up</a> that explains the differences between
  different kinds of "unlocking" for Android phones/tablets.</p>

  <p>The following is a brief summary of what I understood from
  that write-up and my experience with the HTC Wildfire over the
  past week.</p>

  <p><code>root</code>: This is simply having a root shell on a
  running phone (which is after all running some version of Linux
  and shell). This means one can make whatever modifications one
  wants to the portions of the system that are not hardware locked
  or otherwise inaccessible to the running kernel. (One can run
  shell commands on the phone using a program called "adb"
  distributed by Android/Google.)</p>

  <p><code>recovery</code>: this is a separate system-partition
  which has limited functionality. Mainly meant for "recovery" in
  case of corrupted or un-installed "system" partition.</p>

  <p><code>unlocked bootloader</code>: This means that you are
  permitted to flash the "system" partition, "kernel" partition and
  the "recovery" partition of the phone through the bootloader
  (using a program called "fastboot" distributed by Android/Phone).
  Some checks are made on images before they are "flash"ed.</p>

  <p><code>S-ON</code>: The "radio" partition and the bootloader
  itself cannot be over-written. Before booting normally or into
  recovery, the "kernel" partition is locked and possibly the
  "recovery" partition as well.</p>

  <p><code>S-OFF</code>; all security restrictions in the
  bootloader are off. No checks are made on any images being
  flashed.</p>

  <p>So, with an "unlocked" bootloader (even with S-ON) one can
  make whatever modifications one wants to the O/S. First using the
  bootloader to flash a custom recovery and/or kernel and then
  using that recovery to change the "system" partition as and when
  required.</p>

  <p>However, one cannot change the configration of the radio
  (which handles GSM and GPS) or the bootloader. Since the latter
  should have nothing to do with a running phone and the former is
  really something that is like "firmware" for a wireless/ethernet
  card, most people would not need to mess with either. (Note that
  this is not true in places where the Phone/Tablet is obtained
  from some phone network company as they may have put some sort of
  restricted "radio" which cannot connect to a different
  network.)</p>


]]></description>
   <category domain="http://www.imsc.res.in/~kapil/blog">floss</category>
   <pubDate>Wed, 24 Apr 2013 13:46 GMT</pubDate>
</item>
<item>
   <title>supseruser, Debian and cyanogen</title>
   <guid isPermaLink="false">floss/su_debian_cyanogen-2013-04-20-00-11</guid>
   <link>http://www.imsc.res.in/~kapil/blog/floss/su_debian_cyanogen-2013-04-20-00-11.html</link>
   <description><![CDATA[

  <p>In an <a href="clockwork_mod-2013-04-18-10-16">earlier
  post</a>, I have explained how "clockworkmod" has been installed
  on my HTC Wildfire (Buzz) phone. This is a "recovery" mode that
  permits one to install the "superuser" application, that gives
  root access to the phone. One can then use this to install
  Debian. One can also use "clockworkmod" to install the Cyanogen
  version of the Phone OS Android (as developed by the Android Open
  Source Project).</p>

  <p>The "superuser" application <a href=
  "http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip">
  Superuser-3.1.3-arm-signed.zip</a> can be downloaded from
  "andoidsu.com". It can then be put on the SD card. Since one does
  not have "root" access, this cannot be installed---and that
  appears to be a "Catch-22". However, by booting into ClockworkMod
  "recovery", one can select this application to be installed as an
  "update" to the existing operating system. This then installs the
  relevant binary "su" so that one can log in as root after booting
  the phone.</p>

  <p>In addition, this installs a "superuser.apk" as a system
  application so as to control if and when an application running
  on the phone is granted "root" privileges. In case, non-market
  applications are disabled on your phone (as they usually are on
  mine) then you must temprarily enable such applications in order
  to complete the installation of "superuser.apk".</p>

  <p>Having done this one can follow <a href=
  "http://wiki.debian.org/ChrootOnAndroid">the excellent guide</a>
  or <a href="http://cryptojedi.org/misc/nexuss-debian.shtml">an
  alternative guide</a> to install and use Debian in a chroot. I
  join the authors of those write-ups in thanking the developers
  who made it possible to use my phone this way!</p>

  <p>Finally, if one is tired of pussy-footing around with the
  existing operating system, it is best to download the <a href=
  "http://download.cyanogenmod.org/get/jenkins/2808/cm-7.2.0-buzz.zip">
  latest stable build of Cyanogen for Buzz</a> by following the
  <a href="http://wiki.cyanogenmod.org/w/Buzz_Info">instructions
  regarding Buzz on the Cyanogen Wiki</a>. However, <a href=
  "http://wiki.cyanogenmod.org/w/Install_CM_for_buzz">the
  instructions page</a> indicates that gaining "S-OFF" is
  necessary. It is not!</p>

  <p>The downloaded ".zip" file needs to be placed on the SD card.
  We then reboot the phone into ClockworkMod recovery. It is best
  to take a backup before doing anything else. The backup will be
  stored on SD card. Next one uses the "recovery" menu to wife the
  the main partition, the "userdata" and the (Dalvik) "cache".
  After this one selects "install from .zip" file in the
  ClockworkMod recovery menu. Finally, once installation is
  complete, one can boot into Cyanogen.</p>

  <p>Note that the first boot takes a while. Be patient, have a
  snooze or something! The great thing one notices after the
  installation and first-boot is complete, is how responsive the
  phone has become! Moreover, the memory and storage usage has also
  been drastically reduced. Now all one has to do is to restore the
  Concats (which were stored as vcard on the SD card) and one is
  good to go!</p>

]]></description>
   <category domain="http://www.imsc.res.in/~kapil/blog">floss</category>
   <pubDate>Fri, 19 Apr 2013 18:41 GMT</pubDate>
</item>
<item>
   <title>Unlocked --- Now What?</title>
   <guid isPermaLink="false">floss/clockwork_mod-2013-04-18-10-16</guid>
   <link>http://www.imsc.res.in/~kapil/blog/floss/clockwork_mod-2013-04-18-10-16.html</link>
   <description><![CDATA[

  <p>As explained in <a href="unlock-htc-2013-04-16-20-29">an
  earlier post</a>, the HTC Wildfire (Buzz) that has been my phone
  for a few years has been "bootloader unlocked" using the facility
  provided by HTC at their <a href="http://www.htcdev.com">site for
  developers</a>. Note that this is not the same as "S-OFF". The
  phone is still "S-ON" so some sort of "security" (as determined
  by the manufacturer!) is still "on". As seen below this does not
  prevent us from installing "Clockworkmod Recovery" which is a
  useful tool.</p>

  <p>Note that this does not change the "normal" functionality of
  the phone. It merely prepares the phone for "non-standard" usage
  by replacing the "recovery" image.</p>

  <p>First of all one needs the "Clockworkmod" image. The possible
  images can be seen on the <a href=
  "http://clockworkmod.com/rommanager">ROM Manager homepage</a>. My
  phone, the HTC Wildfire (Buzz) is listed as "Buzz" with the
  Clockworkmod recovery version 5.0.2.0. Unfortunately, the file
  for the image on that page is wrong. The correct file is <a href=
  "http://download2.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.0-buzz.zip">
  recovery-clockwork-5.0.2.0-buzz.img</a>. This can be downloaded
  by a simple</p>

  <blockquote>
    <p>wget
    http://download2.clockworkmod.com/recoveries/recovery-clockwork-5.0.2.0-buzz.zip</p>
  </blockquote>

  <p>Now that we have the image, it has to be flashed.</p>

  <p>Note that this will <em>erase</em> the existing recovery image
  so the potential for "brick"ing is ever present! I was impatient
  and did not backup the recovery image. Perhaps a more cautious
  approach would be to install the "su" binary and then use an
  application like "ROM Manager" to backup the recovery first.
  Luckily, it all worked for me!</p>

  <p>The phone has to be rebooted into "fastboot usb" mode. This
  can be done by connecting the USB cable and running 'adb reboot
  bootloader'. (It may be worth reading the <a href=
  "floss/unlock-htc-2013-04-16-20-29">earlier post</a> to figure
  out the different states of the bootloader if you get error
  messages.) After this the procedure is simple</p>

  <blockquote>
    <p>fastboot flash recovery
    recovery-clockwork-5.0.2.0-buzz.img</p>
  </blockquote>

  <p>Once it completes, reboot the phone and disconnect the
  USB.</p>

  <p>To get a hang of using "ClockworkMod", reboot to the
  bootloader in "fastboot" mode and highlight "recovery" with the
  Volume Button. Now press the power button once to run recovery.
  You should see the "clockworkmod" screen. The buttons work as
  follows:</p>

  <ul>
    <li>Use the Volume Button to highlight items on the
    clockworkmod menus</li>

    <li>Use the back button (at the touch screen base) to go to a
    previous menu</li>

    <li>Use the camera/pointer button (little circular button below
    the touch screen) to execute the selected menu item. (Some
    guides indicated that the power button was for this but that
    does not work.)</li>
  </ul>

  <p>The first thing to do is to run the "backup" from clockworkmod
  and backup your current state of the phone to (micro) SD card. It
  is probably a good idea to copy this from the SD card to your
  laptop in a safe location.</p>

]]></description>
   <category domain="http://www.imsc.res.in/~kapil/blog">floss</category>
   <pubDate>Thu, 18 Apr 2013 04:46 GMT</pubDate>
</item>
</channel>
</rss>
