Updates from June, 2011 Toggle Comment Threads | Keyboard Shortcuts

  • Kartik 12:00 AM on June 30, 2011 Permalink
    Tags: Bluetooth, , Data Communications, , , , , , , Smartphone, , , Wi-Fi, Wireless, Wireless LAN,   

    Use rfkill to Enable/Disable Wireless on your Linux Laptop 

    This notebook computer is connected to a wirel...

    This notebook computer is connected to a wireless access point using a PC card wireless card. (Photo credit: Wikipedia)

    Imagine a situation when you have to book an air/train ticket in a jiffy, or check an important mail quickly and the only option you have is a wi-fi connection from either your smart phone or surroundings, and you have only some Linux variant installed on your system. And even after installing all the necessary drivers, you are unable to get the wi-fi on your laptop working? Frustrating right? If yes, then you might want to read on about this useful utility called rfkill which you can keep in handy for those weary situations.

    I own a Dell Studio XPS 1645 and have always found it cumbersome to get the wi-fi working on my system, mainly during those geek/hacker meetups, the only times I have to use wireless Internet. I remember randomly switching wireless on and off through the hardware switch and rebooting my system multiple times in order to get it working. Well, this was the situation until I discovered rfkill – a tool for enabling and disabling wireless devices including Wireless LAN, Bluetooth, etc. Here follows a tutorial on how to use it (fire up the Terminal before proceeding):

    rfkill’s list command lets you see all the available devices, if you don’t find any of your devices, make sure you have turned the hardware switch ON and have installed the drivers for each. Here is what I get on my system after enabling the hardware switch:

    kartik@PlatiniumLight ~ $ rfkill list
    0: brcmwl-0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
    1: dell-wifi: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
    2: dell-wwan: Wireless WAN
    Soft blocked: yes
    Hard blocked: yes
    3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    Apart from Bluetooth, I usually find all other devices to be in a random state of yes or no. To enable them, issue the unblock command as shown:

    kartik@PlatiniumLight ~ $ rfkill unblock 0
    kartik@PlatiniumLight ~ $ rfkill unblock 1
    kartik@PlatiniumLight ~ $ rfkill unblock 2
    kartik@PlatiniumLight ~ $ rfkill list
    0: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes
    1: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    2: dell-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
    3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    You can also try using the unblock all command for enabling all the devices together:

    kartik@PlatiniumLight ~ $ rfkill unblock all

    Sometimes it happens that even after unblocking once, some device(s) may show up as blocked (see the 0th device above, which shows hard blocked as yes). To correct this just issue the unblock command again for that particular device:

    kartik@PlatiniumLight ~ $ rfkill unblock 0
    kartik@PlatiniumLight ~ $ rfkill list
    0: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    1: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    2: dell-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
    3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    When you get all the devices unblocked, you will not face any trouble connecting to wi-fi devices around. 🙂

    Bonus Tip: If you have a common hardware switch for wireless radios, you can turn off additional devices like Bluetooth (or vice versa) to save some battery life using the block command of rfkill:

    kartik@PlatiniumLight ~ $ rfkill block 3
    kartik@PlatiniumLight ~ $ rfkill list
    0: dell-wifi: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    1: dell-wwan: Wireless WAN
    Soft blocked: no
    Hard blocked: no
    2: brcmwl-0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
    3: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no
    kartik@PlatiniumLight ~ $

    Stay Dignified!

    • Kartik

    Originally published at http://www.digimantra.com/linux/rfkill-enabledisable-wireless-linux-laptop/

    Advertisements
     
  • Kartik 12:00 AM on June 26, 2011 Permalink
    Tags: boot, , , , , , Microsoft Windows, Mount (Unix), Sudo, , ,   

    Restore GRUB in Ubuntu after installing Windows 

    So, you had Ubuntu (or any of its derivative) installed on your system and then decided to install Windowswith it? And after installing Windows, you can’t load Ubuntu again, just follow the steps to get this working:

    1. Boot the system using a Ubuntu Live disk.
    2. After you reach the desktop, open Terminal (press Alt+F2, type “gnome-terminal” without quotes and press enter).
    3. Execute:
      sudo fdisk -l
    4. Execute (after replacing sda7 with your corresponding linux root partition, which you will be able to identify from the output of the previous command – it’s usually marked as Linux):
      sudo mount /dev/sda7 /mnt
    5. Just check whether you got the root partition right, if you have more than 1 linux partition on your hard disk:
      cd /mnt
      ls

      If the listing contains names like bin, boot, dev, etc, home, tmp, usr, var, et cetera then you are in the right partition. If not, unmount this using:

      sudo umount /mnt

      and follow the above step again using another partition.

    6. Now:
      sudo grub-install --root-directory=/mnt /dev/sda

      and grub will get installed if it shows no errors.

    7. As a last step unmount your /mnt directory using:
      sudo umount /mnt

      and restart the system. You will find the friendly grub boot manager giving you the choice to boot into Linux or Windows.

    An edited version of this post first appeared at http://www.digimantra.com/linux/restore-grub-in-ubuntu-after-installing-windows/


    Kartik – The TechGlider Guy
    http://www.techglider.in

     
  • Kartik 12:00 AM on June 24, 2011 Permalink
    Tags: Disk Management, , GParted, Hard disk drive, Home directory, , NTFS, ,   

    Recommended Linux Partitioning Scheme 

    Partitioning Basics:

    When we need to install linux on our systems, we need to partition our hard disk as we do for windows. In the case of windows, partitions are called as c: ,d:, e:, etc. But on linux they are represented in the form of following (there are many others, but these are the most essential):

    1. swap:
      This is meant for use by the system when it runs out of memory (RAM); it’s much like virtual memory in windows where the system utilizes that space as extra memory.
    2. /:
      This is called the root partition; the most important partition, where all the system files are stored.
    3. /home:
      This partition is meant for use by the users of the system to store their files and preferences. Although it can be merged with the / partition, but it is advised to have this as different partition so that you can store your files and preferences and reinstall the system (in /).

    You don’t see the partitions as different drives (as in windows) under linux, they are visible as directories inside the root partition (/).

    The Scheme:

    After a lot of searching and reading on the topic. I have decided on the following scheme to be very suitable for most (home desktop) purposes:

    • swap – 1.5 to 2 times [size of RAM] (e.g. I have 1.5 GB RAM so my swap is 3GB)
    • / – 5 to 10 GB (5 GB is sufficient in most cases, but if you have large harddisk, like me, allocate at least 10 for /)
    • /home – Greater than 10 GB or rest of the space (because this is where you will save all your work and downloads, etc; 40 GB in my case). And yes, you can leave other space on your hard disk as a storehouse for games, videos, music or files in the form of NTFS partitions, if you happen to use windows also (else make more room for /home).

    Remember: things are not that complex, we make them complex. So, stick to a simple partition scheme like this and keep things simple.

    Gparted showing my hard disk partition structure

    Gparted showing my hard disk partition structure

    Bonus Tip: Use Gparted instead of the partition editor that comes within the installer of most linux installers to have a complete control over your hard disk’s partitions.

    This article first appeared at http://www.digimantra.com/linux/recommended-linux-partitioning-scheme/

     
  • Kartik 10:31 PM on June 21, 2011 Permalink
    Tags: , , , , , , ,   

    Root Samsung Galaxy S i9000 running GINGERBREAD.DDJV6 using Ubuntu Linux 

    I bought a Samsung Galaxy S i9000 just last month. The most prominent reason to buy an Android phone was that it’s based on Linux and I love the UNIX-based OS. Besides, Android as a platform provides so many opportunities into application development (and even kernel hacking) that I was simply tempted to buy one since last year.

    I have explored the phone since I got my hands on it – trying various apps, playing with 3G internet speeds (3.1 Mbps!), tons of widgets, shooting hundreds of pics with various modes and settings, upgrading to latest official firmware (from Froyo to Gingerbread), chatting (GTalk, Facebook), emailing, tweeting, keeping updated with latest news, instantly looking up words in dictionaries, managing my day with to-do lists, reading eBooks, playing Angry Birds, scanning random barcodes, watching videos, sending free SMS (via Free SMS Sender app), listening to music, blogging, etc. …the list is almost endless.

    The only thing I had delayed to do was rooting/flashing my phone as it voids the warranty from the manufacturer and there is always a little risk of things going bad. Another reason for this delay was my ignorance of availability of any Linux-compatible tool to do the actual flashing as I have grown so used to my latest Linux Mint install that I simply forget to boot Windows every time. Almost all the guides out there describe the process using a leaked out utility from Samsung – Odin – that works only on Windows. Today I managed to root my phone using a cross-platform and open source utility called Heimdall.

    Disclaimer: Follow the steps at your own risk, the author can not be held responsible for any damage that may occur to your device in the process.

    Here are the steps:

    1. Go to http://www.glassechidna.com.au/products/heimdall/ and download the latest binary for your platform for both command line tool and the GUI front end. In my case I downloaded Debian Linux (AMD64 / Intel 64) editions of Heimdall 1.2.0 – Command Line and Heimdall Frontend 1.1.1 as I am running Linux Mint 64-bit (based on Ubuntu 11.04).
    2. Install them one by one by double clicking on the downloaded deb files – first the command line deb and then the front end one.
    3. Press Alt+F2 and launch ‘heimdall-frontend’ to check whether it installed properly.
    4. Carefully read instructions given at http://forum.xda-developers.com/showthread.php?t=788108, take necessary precautions as mentioned there and download proper version of CF-Root kernel from the same page. As JV6 is not listed, I downloaded JVO (v3.2) as it is known to work with most of the Gingerbread builds. Extract the zip obtained two times to get the zImage.
    5. Power off your Galaxy S and enter into ‘Download mode’ by pressing and holding VOLUME DOWN, POWER and HOME keys together till you see a yellow triangle with ‘Downloading’ message.
    6. Connect the phone to the computer via USB cable and make sure it is recognized by running lsusb command in the Terminal. You will see something similar to
      Bus 002 Device 003: ID 04e8:6601 Samsung Electronics Co., Ltd Z100 Mobile Phone

      in the output if it is recognized.

    7. Launch ‘heimdall-frontend’ as in step 3 and load the ‘zImage’ obtained in step 4 in Kernel (zImage) section.

      Heimdall Frontend 1.1

      Heimdall Frontend

    8. Press Start and within a few seconds your phone will automatically reboot and you can disconnect the cable. You will find 3 new apps – CWM, Superuser, and Tweaks installed.

    Now you can enjoy even more applications on your phone which need root access (like backup apps), or go on to install a custom ROM (as rooting is usually the first step in installing most custom firmwares) or simply play with the Linux terminal by installing Terminal Emulator (this app doesn’t need root access, but without rooting you don’t get access to even the simplest of shell commands like cat or less).

    Comments and questions are welcome (as usual 🙂

    References:

    Happy rooting,
    Ciao

     
    • Pranav 12:24 AM on June 23, 2011 Permalink | Reply

      Great! I rooted my 1 week old ZTE Blade (XCD35) jus yesterday! 😀

      • Kartik 9:31 AM on June 23, 2011 Permalink | Reply

        Yeah, I know. In fact, your tweet regarding the same encouraged me to do this for my phone too. 🙂

    • jadi 11:12 AM on August 28, 2011 Permalink | Reply

      Thanks. Helped me a lot and worked like a charm

    • Karthik 11:16 AM on October 25, 2011 Permalink | Reply

      Dude, what apps have you tried out after rooting? Anything interesting? I want to know if its actually worth making the warranty void.

      • Kartik 2:18 PM on October 25, 2011 Permalink | Reply

        It’s definitely worth it. My whole purpose of buying an Android was this level of customization available with the platform.

        I recently flashed my phone with CyanogenMod 7.1 based on latest version of Android Gingerbread – 2.3.7, while the official updates from Samsung are still stuck at 2.3.3.

        Among apps – I am using
        1. AdFree – get rid of ads in apps
        2. ConnectBot – easy SSH from phone
        3. Clockwork ROM Manager – helps in flashing the phone with most custom mods
        4. Terminal Emulator – with busybox on rooting, provides most basic shell commands on the phone itself.
        5. Titanium Backup – take any type of backups including apps, and restore easily
        6. Superuser – the app which grants root permissions to the above mentioned apps.

        Hope this will convince you enough to try out rooting. Also CyanogenMod provides loads of changes in the UI and performance and feature enhancements, check its website for more.

    • Pranjal 10:33 AM on January 4, 2012 Permalink | Reply

      everything goes as mentioned in steps but after heimdall finishes the phone does not auto start and no apps are installed, I believe that even though it is showing that device detection yet its not properly detected because same problem of detection is what I am facing in windows, odin does not detect phone in debugging mode only..!!
      please help

      • Kartik 11:58 AM on January 4, 2012 Permalink | Reply

        If the problem is similar for ODIN too, there might be some hardware issue. Try posting your query in xda forums for expert advice on this.

  • Kartik 6:50 PM on June 11, 2011 Permalink
    Tags: ,   

    Current Android App List 

    Alchemy: http://market.android.com/details?id=me.zed_0xff.android.alchemy

    Angry Birds: http://market.android.com/details?id=com.rovio.angrybirds

    ASTRO: http://market.android.com/details?id=com.metago.astro

    Barcode Scanner: http://market.android.com/details?id=com.google.zxing.client.android

    Dropbox: http://market.android.com/details?id=com.dropbox.android

    English Dictionary: http://market.android.com/details?id=com.diotek.diodict.galaxys.engeng

    Entrepreneur: http://market.android.com/details?id=com.handmark.mpp.entrep

    Evernote: http://market.android.com/details?id=com.evernote

    Facebook: http://market.android.com/details?id=com.facebook.katana

    FBReader: http://market.android.com/details?id=org.geometerplus.zlibrary.ui.android

    Firefox: http://market.android.com/details?id=org.mozilla.firefox

    Free SMS Sender: http://market.android.com/details?id=cz.vojtisek.freesmssender

    Google Sky Map: http://market.android.com/details?id=com.google.android.stardroid

    Linux Command List: http://market.android.com/details?id=com.application.LinuxCommandList

    NDTV: http://market.android.com/details?id=com.july.ndtv

    Opera Mini: http://market.android.com/details?id=com.opera.mini.android

    Perfect Viewer: http://market.android.com/details?id=com.rookiestudio.perfectviewer

    ShareMyApps: http://market.android.com/details?id=com.mattlary.shareMyApps

    Terminal Emulator: http://market.android.com/details?id=jackpal.androidterm

    Twitter: http://market.android.com/details?id=com.twitter.android

    WordPress: http://market.android.com/details?id=org.wordpress.android

    XDA: http://market.android.com/details?id=com.quoord.tapatalkxda.activity

    Generated by: ShareMyApps

     
  • Kartik 1:26 AM on June 2, 2011 Permalink
    Tags: , , ,   

    Sharing Internet Connection from my Laptop to my Android-based Phone 

    I was disheartened to know that my newly bought Samsung Galaxy S i9000 could not connect to an ad-hoc network created from my laptop.

    After a little Googling, I found out the easiest way to turn a laptop into a WiFi Hot Spot (for uses such as sharing Internet connection with my Android phone) – Virtual Router and now I am enjoying fast internet on my phone.

    As I call the above the easiest, it’s not the best method and doesn’t offer much features either. If your needs are not satisfied you can look for Connectify – the inspiration behind Virtual Router.

    I forgot to mention that both of these methods work for windows, I still have to figure out a way to do the same under Linux.

    EDIT (2012-04-28): Okay, it’s been too long, frankly because I was not using Linux much all this while (thanks to my laptop which used to turn into a heater with almost all distros I tried), but finally I found a way to share net from Linux too. I am on Android 2.3.6 XXJW4 on my SGS i9000. The following steps should work well with all versions of gingerbread:

    • Root your Android. Folks at Android Advices usually come out with the easiest possible tutorials for things like this, I followed the steps available here, YMMY.
    • Take a backup of your current /system/bin/wpa_supplicant file using a root-enabled file manager (Root Manager is a good option, though not available for gratis)
    • Download the latest version of AdHoc fix available at this thread at XDA Forums, and transfer it your phone’s sdcard.
    • Either apply the fix using by booting into recovery or just extract wpa_supplicant file from the zip and overwrite it at /system/bin using your favorite root-enabled file manager.
    • Create a new ad hoc network in your linux system, and voilà you will magically find it when your phone scans for wi-fi networks.
     
    • Vivek 1:32 PM on June 2, 2011 Permalink | Reply

      root the phone and adhoc network works!

    • Kartik 7:10 PM on June 2, 2011 Permalink | Reply

      Thanks for comment Vivek. I was suffering from an internet infrastructure breakdown here at home, gonna try it asap now. 🙂

    • BRG 1:38 PM on July 19, 2011 Permalink | Reply

      I tried both, but when using Connectify, the galaxy s and computer connects but the internet doesn’t work on the phone.
      And when i used Virtual Router, it automatically stops in a while

      Please help

      • Kartik 11:45 AM on July 21, 2011 Permalink | Reply

        What are the versions of windows on your system and android on your phone? I am unable to reproduce your problem.

        By automatic stop do you mean the phone drops the wifi connection or the net simply stops working?

    • Saood 2:25 PM on November 21, 2011 Permalink | Reply

      How you did this. Please tell me the steps you followed.
      Thanks

      • Kartik 5:36 PM on November 21, 2011 Permalink | Reply

        I just installed Virtual Router, shared the ethernet connection. Then on the phone the connection was visible after enabling wi-fi, and voila it connected. 🙂

    • Adamya 2:28 PM on December 12, 2011 Permalink | Reply

      afterr clicking on create wifi hotspot connectify is saying that some piece of program is blocking it, but after disabling my firewall and antivirus its showing the same message plese help me to make connectify work on my laptop

      • Kartik 2:51 PM on December 12, 2011 Permalink | Reply

        Sorry, I personally prefer using Virtual Router, and don’t have much experience with Connectify. Please try switching to VR or see the help on Connectify’s website.

    • obet 6:45 PM on July 3, 2012 Permalink | Reply

      not work in android 4.0.4

      • Kartik 12:57 AM on July 5, 2012 Permalink | Reply

        You forgot to mention which method – windows/linux?

        As mentioned within the post, the methods work for Gingerbread. I am yet to try these out with ICS, will update as soon as I get time.

    • Paul Suquet (@PaulSuquet) 12:12 PM on October 1, 2012 Permalink | Reply

      The wpa_supplicant provided does NOT work for JellyBean (galaxy nexus)…

      • Kartik 1:05 PM on October 1, 2012 Permalink | Reply

        Agreed. It doesn’t. Are you aware of any alternative for JB?

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel