This blog is about anything technically opensource or copyleft-ed/ GPL-ed, obviously most of it Linux or connected to Linux in some way.

Wednesday, January 7, 2026

Format your Android phone SD card as internal

 I was struggling with my Infinix X671's 64GB ROM being consumed by a lot of apps, their cache and downloads with no way to move them out to the SD card. In comparison to these new Android version (mine being 12), the older ones were much flexible. My 128GB SD card was of no use as I wanted to continue using all these apps that accumulate data on the main internal memory.

The option to format the SD card as internal has been removed in this phone/ Android version. Someone said corrupt the SD card by formatting it using PC as FAT32 or something and then this option comes up. I somehow corrupted the SD card using some tool and this option did show up; however, it was grayed out, meaning I was unable to choose it. The only choice was portable. I was back to square one.

Finally, I found out that adb can help you out. Thats what I did as follows:

1) Enable developer mode. Settings --> About phone --> click build number 7 times.

2) The developer options shows up in the menu now. Click that and enable USB debugging.

3) Find and download USB driver for your phone on your PC or install Google's generic one with their Android Studio (https://developer.android.com/studio). Install the same.

4) Download and unzip the Android SDK tools (https://developer.android.com/tools/releases/platform-tools). Open a powershell in this extracted folder by clicking shift+right click.

5) Connect the USB cable from PC to phone. Set the phone to file transfer or the option other than charging.

6) Allow USB debugging option popping up on the phone. Select "always allow from this computer".

7) "adb devices" should show your device. If adb throws a path error, use .\adb devices.

8) Run .\adb shell and in the shell, run the following three commands:
sm list-disks (to check the id such as "disk:179,0" to be used the command below).
sm set-force-adoptable true
sm partition disk:179,0 private (If you want 25% internal and 75% external, use sm partition disk:179,0 mixed 75%. This latter may take time though)
sm set-force-adoptable false

9) Done, close the shell, unmount USB from PC, remove cable.

10) On the phone, open settings --> storage --> portable --> three dots next to SD card  --> move from internal or something similar. In my case it said 8.1GB will be moved and that it would take 13 minutes. Try it out, if it seems hung up in between like it did for me at 80%, reboot like I did. Retry. Done! Your SD card is now internal.

Tuesday, October 18, 2022

Dual apps on Android phones

MI/  Redmi are the only phones that I know which allow dual apps by default (at least on versions that I have used). Dual apps is different from Second space, which also is available by default. In the latter, a separate space is created with all required apps, meaning a separate login which is differentiated from the other by means of pin/pattern whatever you have set for security. The former clones apps in the same login, thereby consuming less space and both apps being available simultaneously.

Having switched to a non-MI/Redmi phone, I missed this feature for non-social media apps like banking for my aged parents. Infinix does have XClone that allows social-media apps to be cloned, but that isn't good enough. Yet, you can achieve the same result by using open-source apps, Shelter or Insular. Google Play store has the former, but the latest version isn't available on it and the old version didn't respond during installation. Instead, download and install F-droid and search Shelter or Insular there, download and install. I am using Insular now, whereby a work profile is created where you can install the apps that you need cloned from personal profile and then use the same in parallel. 

By the way, if at all any of your installations fail with work profile access errors or admin rights, use the phone's OS to delete the work profile and try again. My pre-F-droid failed Shelter installation had created a partial inaccessible work profile. On deleting it, the installation of Insular through F-droid and follow-on app-cloning, their installations from Google Play store and use went smooth. There may be initial teething issues but the more you play around or read around these issues, they don't seem so much of an issue, considering the open-source benefit you get.

Thanks to the developer community of F-droid, Shelter, Insular and others supporting open-source.

Saturday, August 6, 2022

Use your (old) VGA or HDMI monitor as a wireless display and/ or TV

I was using an external VGA monitor as an extention screen to my laptop during my classes, etc, with an HDMI to VGA convertor. Unfortunately, the junk Dell laptop HDMI port failed! Since months, I've been trying to find an external wireless monitor or even a TV but nothing seemed affordable. So, finally, I found a hack into it. Of course, Google Chromecast comes to mind first, but mirroring is easier than extending the display using Chromecast, or so I hear. Here's what I did instead with a cheaper but better hardware and got free TV features too:

  1. Buy the cheapest Amazon FireStick (AFS).
  2. Buy an HDMI female-to-female coupler.
  3. If you need to use it as a TV, buy a bluetooth headphone/ earphone. If your monitor has built-in speakers, this isn't needed.
  4. If the monitor is VGA only, buy an HDMI to VGA convertor; if your monitor has built-in speakers, buy one with audio socket.
  5. Connect as follows:
    1. Plug the AFS into one end of the HDMI coupler. 
    2. Plug the HDMI cable (OR HDMI-VGA convertor) to the other end of the HDMI coupler and attach it to the HDMI monitor (or the VGA cable to monitor from the convertor).
    3. Plug the AFS to power source.
  6. Switch on. Set up the WiFi network (and Amazon prime account optionally) using the supplied remote.
  7. In Settings->Display and Audio settings->mirroring: switch on mirroring.
  8. On your laptop, setup the display for extension or 2nd display only or duplicate/mirroring.
  9. For TV use, set up bluetooth headphone in Bluetooth Devices. Or if you have speakers built-in, plug in the audio cable to the HDMI-VGA convertor.
I am not going into other details of AFS. However, if you find the extension/ mirroring slow, look up and install freeware Spacedesk on Google Playstore

Sunday, September 1, 2019

Lineage 15.1 on Redmi 5

Xiaomi Redmi 5 called Rosy recently had a MIUI update that slowed it down further more. Congratulations MI, you lasted more than a year on my phone. Last phone MIUI lasted 3 months into the warranty, before I replaced it with Cynogen Mod (CM). Although, unfortunately, CM died down, Lineage continued where they left off. Lineage has no official release for Redmi 5, but an unofficial 15.1 can be downloaded from here. For gapps, prefer pico for 8.1 and then download whatever else you need from Google Playstore once installed.

Details follow. Remember that all this is risky and you can brick your phone:

  • Unlock Redmi 5
    • Enable USB debugging
      • Go to phone settings -> about phone -> click on build number continuously 7-8 times to enable additional settings.
      • Go back and go to additional settings and activate USB debugging.
    • Apply for unlocking the phone on MI website or using the Windows tool
    • If you choose the latter, make sure that the tool is unzipped in C: root or C:\Program Files. Else you will spend an eternity without getting the "Unlock button" to turn active, troubleshooting your drivers and USB cable! 
    • Run the same, unlock, confirm unlock and wait for 72 hours at least for MI to approve unlocking! 
    • Back up phone completely as unlocking it will delete all your data!!
    • After 72 hours at least, repeat the unlock run and hopefully it will be successful. If so... proceed.
  • Download Lineage 15.1 ROM img and whichever gapps zip you prefer from above link.
  • Download latest TWRP here.
  • Download SuperSU to root your phone here.
  • Copy all of the above downloaded images and zips onto a USB pendrive and keep an OTG cable ready as USB mount has trouble at times on TWRP. It didn't work at all for me!
  • Download and setup adb (I found Redmi driver on Windows a pain to get to work. Try everything available online including universal and naked drivers).
  • Repeat the process of activating USB debugging listed at the very beginning.
  • Install TWRP
    • Copy TWRP img file in adb folder. 
    • Open command line there by clicking Ctrl+Shift+mouse right click.
    • Connect phone to PC USB through the data cable.
    • Run: adb reboot bootloader. If this doesn't work, power off the phone and once off, keep Power up +Volume down pressed together till fastboot mode shows up on screen.
    • Run: adb devices OR fastboot devices to ensure that it lists your phone.
    • Run: flashboot flash recovery recovery-xxx-xxx.img to flash the TWRP image where xxx-xxx are the version identifiers.
    • Run: flashboot boot recovery-xxx-xxx.img to get into TWRP mode.
  • Mount OTG.
  • Wipe cache (and preferably more).
  • Install -> image -> select downloaded TWRP image. This is with the hope that MI protection doesn't replace TWRP with fastboot. Mostly it will nonetheless and you will need the above commands to reenter TWRP mode!!
  • Install -> zip -> select downloaded lineage 15.1 zip.
  • Wipe cache (and preferably more).
  • Install -> zip -> select downloaded gapps.
  • Reboot system into Lineage 15.1.

Friday, June 14, 2019

Youtube playlists

I've spent a considerable amount of time since a couple of days trying to use some existing YouTube playlists and trying to sort them in the order of their uploads or in a useful sequence for continuous play. The Chrome extensions or Firefox add-ons that I found wasted quite a lot of time since they work with "new YouTube", whatever that is, thanks to Google's continuous ongoing changes, they don't! Let that be. I shall just share quick tips:

  • To copy someone else's entire playlist to easily work with it, DON't install any plugin. DO the following:
    • Click on the playlist and then on it's URL, append &disable_polymer=1
    • Press enter.
    • Click on the three vertical dots on the top right.
    • Click on Add all to...
    • Select or create playlist.
    • Do whatever you like with this saved playlist.
  • To reverse any playlist:
    • Go to playbackloop.com
    • Paste the playlist URL copied from YouTube there and order as needed from the drop-down list there at the top of the page.
    • Play there itself.
  • To reverse any playlist on YouTube itself, ImprovedTube seems to be working (for me) on Chrome.
    • Install ImprovedTube extension on Chrome.
    • In Playlists, switch on Reverse
    • In  General Settings, try setting YouTube version to new
    • Restart Chrome.
    • Open YouTube playlist.
    • Click on reverse-playlist icon (both up and down arrows side-by-side) on top of the playlist, next to loop and shuffle icons.
    • If you don't see this icon, switch to old YouTube version and repeat above steps from the third bullet.
    • If it still doesn't work, my apologies. You can try the following though.
  • I am yet to try Playlist Sorter extension as it asked for me to login to YouTube via it, and also since I want to move on with using my reversed playlist than waste more time ...beyond this blog entry, of course :-)

Friday, August 21, 2015

CM12 on MI Redmi 1S

This is a short note to share my experience with upgrading to CM12 custom ROM on Redmi 1S. Those who have tried to upgrade and failed just like my earlier quick tries should know that it is as straightforward as it always was, although with a small pre-fix. I had tried some 3-4 upgrades with multiple versions of CM12 with Gapps earlier which resulted in crashes of all sorts of Gapps apps, post installation. The phone was practically unusable. Just CM12 without Gapps wouldn't crash, but that would take away the smartness from the smart phone.

Enough with the blabbering... if you face similar crashes, the fix seems to be simple enough. Just UPGRADE your CWM Recovery to the latest. I had trouble with the latest CWM zip installation also since its threw some "assert()" error. Instead I installed latest version of TWRP.img via fastboot. (I am purposely not mentioning any version since the current latest should suit best).

Having installed TWRP, I just did a clean reinstall, starting with the usual factory reset/ wipe dalvik cache, system, blah, blah, followed by CM12 install and then, Gapps install. That was yesterday, it looks good even today. :)

Ta.

Sunday, August 18, 2013

ACM UVa 369 Combinations

I was looking into this 369: Combinations problem where very very large integer is being used for you have to get combinations C by solving n choose m, where largest n = m= 100. Approximately, we know that the largest no. of digits occur at around 100 choose 50. However, there's a tricky line that says that the value of C will not cross 32-bit long int! That means that such input cases will not exist which will cause a final overflow of long int. However, there is no saying that the intermediate numbers that you use, rather, the numerators and denominators as below won't cross 32-bit. The formula is already given to be:

C = n! / ( (n-m)! x m!)

At first instance it seems scary, but if you recall that each factorial starts with 1 x 2 x 3 x... x n or m or (n-m), then we can put together simple high school math and see that the common numbers from numerator and denominator get cancelled out! (By the way, that last one isn't out factorial. :-P)

If we write the above another way,

C = (n! / m!) / (n-m)!

Clearly, all terms from n! upto m! can just get cancelled out right away. Now, lets see them separately as numerators and denominator so:

num = n! /m! and den = (n-m)!

Taking an example of n = 10, m = 6:

num = (1x2x3x4x5x6x7x8x9x10) / (1x2x3x4x5x6)
= 7x8x9x10
= (m+1) x (m+2) x ... x n

den = 1x2x3x4
= (n-m)!

As we can see, we don't need to deduce both multiplications as of yet, since there are many more reductions in numerator to happen. Moreover, for small nos, there won't be any overflow, but for larger ones there will be. That is, instead of multiplying first, we could see if we can divide individual terms first. Here come the vectors to hold individual terms.

Now, we could use two vectors of long long int for num and den. Then, although its a lot more times than perhaps needed, the following reduction helps:

  • For each term i of num
    • For each term j of den
      • If i is divisible by j
        • replace i from num by i/j
        • erase j from den
        • if i is 1, erase i
Just to see how good it works, lets take our 100 choose 50 example:
Before:
num = 51x52x53x54x55x56x57x58x59x60x61x62x63x64x65x66x67x68x69x70x71x72x73x74x75x76x77x78x79x80x81x82x83x84x85x86x87x88x89x90x91x92x93x94x95x96x97x98x99x100

den = 2x3x4x5x6x7x8x9x10x11x12x13x14x15x16x17x18x19x20x21x22x23x24x25x26x27x28x29x30x31x32x33x34x35x36x37x38x39x40x41x42x43x44x45x46x47x48x49x50

After:
num = 2x53x3x2x59x6x61x2x9x8x65x3x67x2x3x2x71x6x73x2x5x2x77x3x79x5x3x2x83
x4x85x2x87x2x89x5x91x2x93x2x95x4x97x2x3x5

den: 25x28x30x32x36x39x40x42x45x48x50

Possibly the numerator spills over a long long int, but such a test case won't exist in the input. You get the idea here that the numerator has terms that divides the denominator, those can go too if you check for the divisibility other way round.

Cheers!

Saturday, August 17, 2013

ACM UVa runtime

Its been a long time, over 10 years, since I first came to know of ACM UVa and solved 100: 3n +1 problem. Of course, as its easy to recall now, those were the days when I was a novice is programming, even with NCST's MGPTs. (BTW, sadly I didn't know of ACM UVa back when in NCST and struggled much with MGPTs). I am still learning, and will always be, but I've come a long way from then. In this current streak of UVa madness, I solved over 50 problems and didn't just solve it the way I used to earlier. Instead, I focused on bettering the runtime. Solving it is one thing, solving it well is quite another.

Now that the solved numbers are up in a short time, I could also look back and resolve the ones that had taken longer to solve. I decided to check whatever has taken over a second of runtime and see if I could improve those. 3n+1 was one, Cats was another and so was Software CRC too. I knew Cats is a little difficult to revisit now, having solved it only in this streak, so I decided to redo the others. 3n+1 had taken over 3.268s, while Software CRC was timed at 1.391s!! On recoding and resubmitting, the improved timings are 0.052s and 0.082s, respectively. These are pretty satisfying values and the ranking improved, thereby. Someday, I might improve slightly over a sec taken by Cats.

Its been fun and I hope to keep this streak going as long as I can.


ACM UVa 673 Parenthesis Balance

The Parenthesis Balance problem, though a simple one to solve, gave me lot of WAs. I wanted to solve it without using a stack at first, using the same input string that the parenthesis is scanned into. After 6-8 WAs, I finally gave up and wrote a stack using an array. I still got a WA! Now, this is something I'd suspected earlier on, but lazed about fixing it. Finally, the fix was simple and I tried to post this onto the UVa forum, but the forum is refusing to log me in for some reason.

Although the problem statement says that the we can assume that the string size will not exceed 128, we ought to consider that there may be trailing spaces exceeding 128 after the no of test cases are given! Now this seems like a deliberate thing that the UVa guys have done as one of their tricks. :) Of course, this is not an issue if you're using C++ I/O calls and cin.ignore(), but for C I/O calls, most likely you're using gets(), getline() or the safer, fgets(), unless, worse yet, you used a getchar()! In any case, if you're lazy like me, you'd be using the same character array that you've reserved for reading the input parenthesis string. And if that, the size needs to be more than 129 (one that you will have definitely added for newline character). After multiple failures, I changed the size to 1024 and both, the stack as well as non-stack version got AC. :)

Cheers! C++, ... er, C you around. :P

Wednesday, July 17, 2013

My trouble with Cats

I've struggled a lot with Cats, with multiple codes and submits, across a huge time period, with a wide range of WAs and TLs. The latter is the major part of the problem, that needed a different approach to solving. After getting value of n, my code is pretty simple. I tried getting n by:

  • pow(): this failed since pow(5, 2) gave me 24 and I got a shock of my life... great learning though. :)
  • multiple loops: w and h are worker cats and height of initial cat given in input. tempW and tempH are temporary copies of these to work with in the loop. Outer while loop checks that both w and n are divisible by "potential" n & n+1 respectively. If they are, then the inner two for() loops check that w is the same power of "potential" n as h is a power of "potential" n+1. This check is by i == j at the end of the following code, meaning both have same depth (so that when the height of cats reduces to one from given height, the cats would have reached the given number of worker cats). As simple as that. It all works fine with all the test cases I could find online. Unfortunately, I didn't generate the highest number that int can go to, to test, perhaps thats why I get a TL! Commented it out.
 /*            while(n++) {
                if(w%n || h%(n+1))
                   continue;
                //cout << "n= " << n << endl;
                m = 2;
                tempW = 1;
                for(i= 0; tempW < w; i++) {
                    tempW *= n;
                }
                if(tempW != w)
                    continue;
                tempH = 1;
                cout << i << endl;
                for(j = 0; tempH < h; j++)
                    tempH *= (n + 1);
                if(tempH != h)
                    continue;
                //cout << j << endl;
                if(i == j)
                    break;
            }
*/
  • logarithms: I gave up the above and went exponential via logarithms. :) Now, I am bad at math... so, I'd to read up how logs work and look into some code. I worked the below given beautiful three line code manually through a calculator understanding how it works... and then, voila, Judge gave an AC!! This simple method of using the loghw, "logarithmic ratio of h to w" as a perfect guide for the ratio of their respective factors n+1 and n to have, is sheer beauty! You just have to see that the difference between the two ratios is 0 (or so close to zero, as in < 1^-10). I have worked through some examples of n w.r.t. loghw, and saw that as the "potential" n changes from "real" n, (whether one lesser or one higher than needed), the difference in the mentioned logarithmic ratios is enormous (here, > 1^ -10). Its so simple, yet so powerful; I am happy to learn. :)
            double loghw = log (h) / log (w);
            while (fabs(log(n + 1)/log(n) - loghw) > 1e-10)
                n++;

The remaining part of the code is to calculate nw, non-working cats and th, total height of all cats. I use tempN and tempH as copies of n and h for the loops. Since the depth for h to reach 1 is same as 1 cat to become w:

for tempH:= h to 1
  • Reduce tempH by a factor of n+1
  • Increase tempN:= 1 by a factor of n (no. of cats will automatically reach w). 
  • Increase nw:= by tempN, the no of cats at each depth. (I remove no. of cats at the last depth from this after the loop since they are working ones, to get non-working cats)
  • Increase th, total height:= by height x no. of cats at each depth. (Since I started with value of h for th in the beginning, I knock it off in the end. Might work if start with 0 for it and not remove h off it in the end).
Simple enough, I guess.
        nw = 1;
        tempN = 1;
        tempH = h;
        th = h + w;
        for (i = 0; tempH > 1; ++i) {
            th += tempH * tempN;
            tempN = n * tempN;
            nw += tempN;
            tempH /= (n+1);
        }
        nw = nw - tempN;
        th -= h;

        cout << nw << " " << th << endl;

    }
}

Looks like all "worked hard like a dog" chasing the "cats in the hat". :)

Thursday, December 6, 2012

How to brick your SE X8 (E15i)... and recover it.

Obviously, how-to for bricking your Android phone is meant as an unintentional happening here, but it helps to know what kind of stupidity leads to such disastrous effects. I could give many reasons as to how I managed to do so, such as being sleepy, unalert, whatever, but the fact remains that I was stupid enough to click a wrong version of ROM to download for my kernel. To be specific, I downloaded GingerDX v029 (to upgrade from my earlier v028) meant for Alfs/nAa kernel than my stock SEMC kernel. For one, I didn't know that there are two different versions (my ignorance) and for another, the fellows who named the file, in their wisdom, decided that one file should be called GingerDX-v029-shakira.zip and the other as GingerDX-v029-shakira-stock.zip (a nomenclature mistake, I must say). Of course, I accept all the blame for being unalert, yet I wish to point out that if a person were to use the file looking at its name, maybe years later, still he should know that just shakira means Alfs/nAa! Thats very unlikely. Be it as it may, lets just say that I bricked the X8 when I loaded the shakira ROM instead of shakira-stock ROM onto my SEMC stock kernel.

For those who don't know what a (soft) bricked phone looks like, it looks just like an X8 (no, really, it doesn't look like a brick :P) which shows a Sony Ericsson logo that comes up during the boot cycle and just that. It hangs in there, without even the power off working. You ought to remove the battery to let it power down. For all practical purposes, its a brick.

The options available for you to unbrick the X8 (using "Windoze") are:

(If you have Sony PC Companion installed, try Option 2 directly).
  1. Flashtool: 
    1. Download Flashtool (107MB) (or a newer available version) & install it.
    2. Download stock ROM E15i_X8i_2.1.1.A.0.6_Baseband_015.7z (or your E15a, etc, version of X8 or a valid custom ROM such as shakira-stock) and unzip it, getting its ftf file.
    3. Copy/move that file to Flashtool's /firmware folder.
    4. Run Flashtool/drivers/Flashtool-drivers.exe, choose your X8 phone drivers and install them.
    5. Run Flashtool.
    6. Choose to flash, selecting X8. Follow Flashtool instructions on when to power off X8/connect/unplug USB cable/hold back button of X8/plug USB cable, etc.
    7. If this works, well and good, unplug USB cable, power up X8 and you're done (Note: First boot takes a long time, giving symptoms similar to a bricked phone!
    8. If it doesn't boot up even after a long time or Flashtool gave an error at step 6 above as to drivers not being found, USB debugging being off, 2011 mode blah-blah or whatever, follow next set of instructions below.
  2. Sony PC Companion (PCC):
    1. If you don't have it already, download PCC (26MB) & install it
    2. Run it & try its update/ repair options.
    3. If that doesn't unbrick the X8, move on reading below to last option that worked for me.
  3. Sony Upgrade Service:
    1. Download Update Service (38.1MB) or later version & install it. Takes a while if the service app itself has another update due.
    2. Run Update Service application, selecting the device as X8 from many SE phones listed. Connect the X8 device via USB cable following instructions on when to power off, hold the back button, etc.
    3. Let it install drivers.
    4. Now, you have a choice to go back to option 1 of Flashtool and burn available stock or custom ROM, or continue with this service and let it update the X8 after downloading 120MB stock ROM.
    5. If you go with latter, let the update download finish and flash your connected X8.
    6. Unplug the USB cable, power up X8 and wait long for first run. You'd be back with factory X8 settings.
Hope this blog entry helps some other sleepy head like me, who'd rather have postponed upgrading his X8 to a day when he felt more wakeful! :)

Happy unbricking! Cheers!!

Sunday, July 10, 2011

Sony Ericsson X8

Be it after a long delay, I finally did catch up with Android by getting myself a Sony Ericsson X8 phone. Why X8, some may ask? I want to start by saying that I've a bias towards Sony devices. I like their sound quality more than anything else. I've used an SE phone before, a T610 and except for the battery, it was simply great. On Android, I do know that SE has been crawling releasing 2.1 Eclair on new launches, when the competition has moved beyond 2.2 Froyo onto 2.3 Gingerbread. X8 specifically has a low memory with its standard release giving only 128MB, while even LG's Optimus gives 512MB in a similar pricing! Then again, as they say... its a Sony! :) Worse yet, unless one gets a newer manufacture, 2.1 is available only as an upgrade to 1.6 Donut.

That said, I still chose SE X8 because it is a good phone and although SE has officially announced that there shall not be further upgrades to X8, XDA forum currently has both Froyo and Gingerbread releases for X8! There are many other flavours also, including one in between, called FroyoBread. The last one is supposed to be a well-tested release with Froyo's stability and Gingerbread's features. In this blog, I wish to mention some of the features of the standard SE release with the requirements to hack the phone for non-standard upgrades. Mind you, this voids the warranty [unless you can get the phone back to factory release before claiming warranty ;) ] I've bought an additional warranty of another 12 months from the seller beyond the standard 1 year by SE.

Initially, I liked the SE X8, with a decent 3" screen. Both GSM Edge as well as WiFi worked just fine. The still as well as video camera is great. One issue with 2.1 is that its applications soon fill up the memory and since Android has its own memory management, with hardly any applications having an "exit", Advanced Task Killer is necessitated as a first install from Android's market. Yet another hurdle with enjoying more apps on 2.1 is that it doesn't allow moving apps to SD card. So my buying a 16GB card didn't turn out much useful yet. Having seen my 2.3 GingerBread on my brother's HTC Wildfire S, I couldn't wait to root the phone. Further, I found out that Quadrant Advanced clocks 440 as a benchmark with SE Eclair. This is expected to turn out to be rock-bottom with other releases, which I'll talk of in upcoming posts.

Sunday, December 26, 2010

MAC cloning

I never thought that cloning MAC addresses was so simple, especially in Linux. But first I will digress as usual and start off as to what led me to cloning the MAC address. To skip all the blabber, goto to the bullets where it says skipblabber. :) Since my Toshiba laptop went out for service, it has started giving many problems in a row. First the heating issue led to a shutdown problem, then I messed up the alcohol used to clean the chips' heatsinks and conked my display off. The service guys fixed that but damaged all the navigation keys which almost need me to stand on them to move intermittently. With so many problems, how would I not suspect the laptop's networking when my ISP refused to connect?

My ISP kept on giving me errors on all flavours: Vista, Maverick and even downgrade installations to Jaunty! The error code indicated authentication problems, which may be protocol issues. I went ahead and got the ethernet and wifi checked elsewhere and all worked fine. Only then did I call my ISP and ask what the heck was going on. It turns out that my ISP has recently locked the account to a single MAC address for "security reasons". They wanted me to fill up a form to say that they should open my account to other MAC addresses and any misuse then would be my responsibility. I went straightaway looking for forms but they didn't tell me that Sunday their branch here is closed. I came back disappointed, but a search online landed me a simpler solution. Why go out at all signing forms when a few keystrokes get the job done?! :) So here goes:


skipblabber:
  • Get your source system (my PC thats locked with the ISP) MAC address by ipconfig /all if you're in Windoze or in good ol' Linux you check the entry for ether by ifconfig. This MAC is used further as xx:xx:xx:xx:xx:xx
  • Repeat the above for the target system (my laptop thats locked out from the ISP) so that I can jot it down in case something ever goes wrong. Contingency, that is. :)
  • To change the target MAC on Linux:
    • sudo ifconfig eth0 down
    • sudo ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
    • sudo ifconfig eth0 up (Goes off on reboot)
    • OR in recent Ubuntu systems, just right click on network ->Edit Connections -> Eth0 -> Edit -> add xx:xx:xx:xx:xx:xx to Clone MAC. (Stays on reboot)
  • To change the target MAC on Windoze:
    • Go to LAN properties -> General -> Configure (LAN card) -> Advanced -> Network Address (Property) -> add xx:xx:xx:xx:xx:xx to Value -> OK
    • Disable & enable the LAN or reboot (the Windoze way) :)
    • OR regedit/ regedit32 and expand HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}
    • While there, check all subkeys 0001, 0002... till you get your LAN card in DriverDesc.
    •  Add xx:xx:xx:xx:xx:xx to NetworkAddress value.
    • Reboot.
If all went well, ipconfig /all or ifconfig should show you xx:xx:xx:xx:xx:xx as your new MAC. You need to try connecting to your ISP after the MAC change. In case of Linux, this would mean:
  • sudo poff -a dsl-provider
  • sudo pon dsl-provider
  • OR sudo pppoeconf (if not already done earlier)
Note: In case your pppoeconf is stuck at 100% and goes nowhere, you're fast and lazy at the same time like me. :) You didn't read all that pppoeconf throws and pressed enter, enter,... If that, pppoeconf is likely stuck searching other network interfaces for announcements; this is a guess, by the way. Best way to get ahead immediately now is to unplug the LAN cable and replug it. :) Don't worry, its at 100% on eth0 search, so it will have those settings.

Thursday, December 16, 2010

Using Linux for Windows fix!

I downloaded the trial version of BitDefender antivirus for my XP today and in its scanning during the installation itself, it found some 3 issues with Windows files and quarantined them. It asked for a reboot to continue installation. On reboot, it resumed or started the scan afresh without even really giving me my desktop; it was a blank screen with BitDefender scanning in the foreground. Meanwhile, a pop-up box told me that SYSTEM is going for a shutdown as the explorer.exe or some other service crashed. Well, okay, hardly a choice! However, on restart this time, I got a command line message on NTOSKRNL.EXE missing. Obviously, BitDefender knocked it off for a virus or something and am stuck with a command line. Worse yet, I can't restore it because I don't have a DVD/CD ROM drive. (It *burnt* a couple of months back).

So much for background. Next, I rebooted in Ubuntu Maverick and searched my system for an XP install ISO dumped. Maverick is awesome, because it opened .iso as is. Within that I386 folder, there was this NTOSKRNL.EX_ that needed to be expanded. I sent it straight down to my pen drive, ran an expand on it from Vista on my laptop and got it back here. All I needed now is to get the expanded NTOSKRNL.EXE (renamed from expanded NTOSKRNL.EX_) into C:\Windows\System32\. Phew.

Windows is mighty sick but my bank webpages and software unfortunately works only with Windows. :(

Friday, September 3, 2010

Maverick Meerkat 10.10 beta

I installed the Maverick beta today and had device string error or something like that as soon as I ran off the install from the USB drive. I went to the expert mode and installed it using the old CUI interface.

I also have an XP for dual boot on my PC and chose Grub instead of Grub 2 for boot loader. Everything went well till I tried to boot XP, which too failed with an "Error 11: Unrecognized device string". On edit, I found that the boot string for XP had  (hd0, msdos1). This is wrong and works with (hd0, 0) which is Grub language for /dev/sda1. Looks like this same error had caused the install failure. I'm not sure if any or all of this is mentioned in known issues; I didn't read through them in the excitement of getting things go. :)

I'm happy with installing Maverick beta over Lucid instead of an upgrade because my Lucid had some unresolvable issue of taking the entire RAM immediately on boot up. I wasted enough time finding what was taking so much memory, but didn't succeed there! Maverick doesn't hog as much memory.

Sunday, March 7, 2010

Getting hands dirty

Its been a while since I played with any core hardware. I've been postponing my temptations to get a beagle (now more options of hawk/leopard) board since over a year for reasons best known to me in my sleep. ;) I've been itching to get my hands dirty with one thing or the other. Last I held my soldering gun was when my ADSL was screwed up due to line static. I went around checking the cause for noise in the internal wiring and hunted it down to the rosette box. I tried bypassing that seeming balloon and that needed manhandling of the delicate telephone wire onto a rugged external line. I managed to solder it out. Its a penny job if you look at it, but the pleasure of holding the solder gun with the 60-40 melting is indescribable. :)

This time around, I was pissed off with how my Toshiba A100 laptop dies off due to overheating. Since the past 2-3 Ubuntu releases, long usages have been shutting off the laptop with the touchpad almost burning. I've tried to get a laptop cooling pad in vain, but what use are external set of fans when Toshiba overheats to death on its own? Its a shame. Vista, the junk that came loaded with the A100, used to keep the laptop booted for longer hours than Ubuntu as per my usage. That, however, doesn't solve my problem. My earlier experience with trying to pull the DVD drive off the laptop or pulling the HDD didn't seem userfriendly with the Toshiba. I'm a fan of Japanese products, but all the Jap products I've used are really service unfriendly! Sadly, I tried my hands to get to the internal fan yesterday not wanting to travel to a service centre which is quite far from here, not to mention that I hardly trust any of those people to do a good job and in time.

I've this addictive habit of taking a task to its very end knowing the risks at most times. So I opened the laptop which was a painful effort. I almost assumed that I will break a couple of plastic locks and then they won't fit back easily needing a bit of gluing together. To my surprise that didn't happen, but I was shocked out enough to write off 45k (cost price) worth of my laptop because the fan was way difficult to get to and all the cables between the top and bottom of laptop came off loose! This design sickens me to no end. All the cables are half my finger's length-- no exaggeration there-- 3 buses on the main board were held on to the connectors with latching locks. (Sadly, these connectors are new to me). It scared the hell out of me when they came off due to some tagging on to them when pulling the panels apart. Not only is the distance insufficient to put them back together but now I need to push the bus in the lock putting my thick hands between the panels and then push the lock to latch in the bus with the other hand. Crazy freaks! 3 of them!! Putting them together brought out other end of one of these sick buses. That was pathetic. After I got them together, somehow, there were 2 more button type grounding-like pins. What were they thinking making those dumb gold pin button connectors? To put these back on and keep them in place while playing with other connectors was an add-on pain. When I got all this together, I was good to go... Oh! I did not mention the reason I opened the laptop was the fan, which got taken care of. Before this mess of wiring got put together, I'd pulled off the fan and pulled the parts apart, blown away a ton of dust and washed the fan, save the coils. :)

Hmm, I was saying I was good to go... or so I thought. While closing the panels together I saw that there was this flat connector which I suspected to be the display cable. Now, believe you me when I say that this Toshiba design bottoms off even those sick main board connectors! This weirdo cable was half my nail's length from the panel, loosely changing its angle, and I'm supposed to fit this onto the main board while closing the panel! Barely a forcep's flat side was reaching into this gap! No press fit this one. I closed the panels praying that maybe they are press-fitting each other... high hopes. :) The laptop booted up, but without display, a much expensive problem to fix. Well, at least I was sure that its the display cable. I tried much and gave up yesterday. Now, I'd a bigger problem to look at: find a good service centre and somehow convince them to take an open laptop without display for a fan problem! An impossible proposition, very expensive, if possible. Just for a fan, I was quoted 2k+approx 1k labour. 3k there. Add the cost of explaining an open laptop without display! Hah! I realized I wrote off 45 grands, possibly.

Today I took the issue in broad daylight. Why the hell is the cable so short? I got no answers, not even dumb ones. I opened more parts around the cable to no avail. Then I decided to pull onto the cable with all my forcep-strength. I got another half a nail's length. Whoa! More pulling risked the cable/connector/display.. God knows whats at the other end of that cable. With multiple forceps, crushed fingers and God's will I got the connector in. And the A100 is working... to what cooling benefit I do not know. If I find a powerful fan, I will likely open it again. :D


Why such excruciating details, you may ask and I'll say fair question indeed. How else do you expect me to share my pain of accepting burning 45 grands due to many sick unthought designs into an otherwise good Japanese brand called Toshiba?! :D

--

Saturday, October 24, 2009

BBC's 24 hours with Ubuntu! Really?

This is in response to BBC's review of Ubuntu on its blog, spending only 24 hours with it, that too after they made erroneous statements about Ubuntu while advertising Windows 7 on their breakfast show. This follow-on for reviewing Ubuntu by BBC, after that faux pas on the show, was initiated by Canonical.

Most of it has been said, I'll try to say some things that got left out. Not one person made a point about how simple Ubuntu install can be for a Windows user who wants to try his toe in the water: wubi (ubuntu installer for windows)! Just download wubi.exe, run it from Windows, define how much space to use for Ubuntu, choose login creds, take a coffee/ lunch break, return to your comp with a dual install! Days of Linux install have become simpler since Knoppix launched a live CD that announced vocally on what devices are detected and installed! Just when I thought it doesn't get any simpler than that, Ubuntu gets better with each release.

Microsoft is so greedy, that when I bought my Toshiba laptop, I was forced to buy it with Vista, with a caveat that said "Installing any other OS voids the warranty". Even if I wanted to have dual boot, I couldn't do that in warranty. Funnily enough, any reinstall of Vista and other Windows flavours arrogantly overwrites any other OS! Why?

For almost everything that Linux can do with a command line for a desktop user, Ubuntu can do with GUI. Another thing about people who just hate to use keyboards are missing a loud point even in Windows GUI: all those menus have keyboard 'short'-cuts! Sometimes, keyboard is faster than the mouse.

If you've tried detecting and transferring files between XP and Vista on your network, that would tell you why expecting all your Windows machines to just popup on your Ubuntu map, without any protocol setups, is plain bias.

MrFaulty talks of WiFi install issues as a techie. WiFi on Vista has been a pain for me; it gets some godforsaken IP on a DHCP mode and I need to hardcode it to work well! Windows should have perfected it by now, but no; OTOH, it works smoothly in Ubuntu. And he also talks of RAID 0 when the article is about a layman desktop user. What you can do with Win for RAID, a similar experienced person on Ubuntu can do it in a jiffy too. But then again, if you are a technology person, you ought to mention developers, rate at which bugs get fixed on Ubuntu and umpteen development tools that come free, all of these things beat down Windows to death.

Getting hold of Wine to run Spotify is not as much of a bother as needing to get hold of Win7 pro version to do something as simple as getting an XP app/ device to work! The latter means shelling more money out to get Win7 do something that your XP did initially, which you'd already paid for, and MS made you buy Win7 instead. The former means installing Wine with a couple of steps and you're ready to go... simpler than buying local wine! :)

Finally, Rory, I think Ubuntu survived your 24 hours with it. Had you been a Linux user as long as you were using Windows and had to spend 24 hours with Windows 7 instead, I'm certain you'd have flushed the Windows netbook/laptop by now! :)

Friday, September 11, 2009

Getting Firefox backspace work on Ubuntu

For some like me who love the keyboard, more than mouse at times, Firefox on Ubuntu could get a little irritating to navigate between already surfed pages. On WinDoze, Firefox by default allows backspace to take you back to last visited page (while shift+backspace takes you one page forward). Of course, this is only with default settings and mostly everything is customizable. However, being the lazy me, I didn't do anything about it thus far.

Today, I did the following simple change to get it working and it didn't even need a browser-restart :)

i) Go to about:config by typing the same in the URL.
ii) Promise to be careful with it :)
iii) Type backspace in the filter-bar.
iv) Change the value of browser.backspace_action to 0 (by default, its 2)

You're done. No need to close the browser. Just press backspace and go back to where you left off before irritating yourself because backspace didn't work! ;)

Followers