Test

Powered by Blogger.

Sunday 11 January 2015

Customization of ROM on your Android Phone

You might have read or heard people talking about custom ROMs they have installed on their Android devices. Here's how to do it quickly and safely… 

One of the main reasons people like to root their devices is to install a new or different version of the operating system. The open source nature of the OS means that it's possible for anyone to view the code that makes up Android and then modify it as they see fit, in a similar way to which the Linux-based desktop operating systems work.

Custom ROMs can offer new features over the standard ones, allowing you to tailor your device to your needs. They also allow developers to port other manufacturers' interfaces to other device makes – for instance, HTC's Sense UI onto Samsung phones – or to remove a heavily customised ROM altogether. Another reason is to hurry along the update process: you are no longer tied to waiting on the phone manufacturers and the mobile operators to push out the latest version of Android. Installing a new ROM is a relatively simple and quick process thanks to the ROM Manager app which can be downloaded for free from the Android Market.

First of all you need to root your phone and there are a few methods for doing so. Some of the most popular are: SuperOneClick, Universal Androot and Z4Root. Check the compatibility with your particular device before attempting to gain root access. Here's how we'll do it:

For this example we'll use Z4 Root. Download it from here, as it isn't available on the Market. You will need to register first. Now, copy the .apk file you've downloaded to your SD card and then install using an app such as 'Easy Installer' or by clicking on the apk in your favourite file manager.

Open Z4Root and in the centre you will see a button saying 'Root'. Click on the button and wait for a short while, for the process to complete; the progress is shown in the bottom bar. After it has finished, the phone will reboot. You now have root access!

Once you've rooted your phone, ROM Manager makes backing up, installing a custom recovery and downloading the new one a breeze – and will even enable you to restore your original ROM if you prefer! This tutorial will take you through the process step by step and help you on the way to a fresh new experience with your phone…

Disclaimer
Rooting your phone and installing ROMs on your device may void your manufacturer warranty. You undertake the procedure outlined in this tutorial at your own risk. Android Magazine and Imagine Publishing Ltd. cannot be held responsible for loss of data or damage to your device.

Words by: Kieron Howard

  1. How to install a new ROM on your Android smartphone

    Installing ROM Manager

    First off, you will need to install the ROM Manager app. The good news its that it's a free one (although there is a premium version that offers more features). Open up the Android Market from your apps list and search for 'ROM Manager', then click the icon and install.

  2.  
  3. How to install a new ROM on your Android smartphone

    Install Clockwork recovery

    When you rooted your Android device (see page 68), it's quite likely that at the same time you installed a piece of 'custom recovery' software. ROM Manager will check that you have this installed and that you have the latest version that's available.

  4.  
  5. How to install a new ROM on your Android smartphone

    Back up your ROM, part 1

    Open up ROM Manager, click on the Backup Current ROM button, give the backup a name (perhaps something like 'Standard ROM Backup') and then click OK. You might be asked to allow ROM Manager superuser access and you'll need to grant this.

  6. How to install a new ROM on your Android smartphone

    Back up your ROM, part 2

    The phone will now automatically reboot into recovery mode. The backup process can take a little while, so make sure you aren't expecting any important calls! The recovery backs up your current ROM to the microSD card, so it's important not to format this.

  7.  
  8. How to install a new ROM on your Android smartphone

    Choose your ROM

    Back in ROM Manager, click 'Download ROM'. This will bring up a list of available ROMs for your device. In this example we will install CyanogenMod 7, one of the most popular custom versions of Android due to its stability and wide device support.

  9.  
  10. How to install a new ROM on your Android smartphone

    Download the ROM

    Choose the CyanogenMod version you wish to download – the latest version at time of writing is 7.1.0-RC. It's strongly advisable to stay away from the 'Nightly' builds, as these are largely experimental. Google apps don't come as standard, so click to download them.

  11. How to install a new ROM on your Android smartphone

    Installing the ROM, part 1

    Once the ROM and Google Apps have finished downloading, reopen ROM Manager and you will see the ROM pre-installation screen. Tick the 'Wipe Dalvik' and 'Wipe Data and Cache' boxes. Click OK and the phone will now reboot into recovery again.

  12.  
  13. How to install a new ROM on your Android smartphone

    Installing the ROM, part2

    The new ROM will now install. This might take a little while. Once complete, the phone will reboot again. The first boot of any new ROM can take a while, sometimes up to 15 minutes, so be patient and don't panic if the device appears to have frozen.

  14.  
  15. How to install a new ROM on your Android smartphone

    Set up Google account

    Once the phone has booted up, you will then be prompted to enter your Google account details. Doing this will automatically download and set up all your contacts, settings and apps back onto the phone. You now have a brand new ROM to explore!

  16. How to install a new ROM on your Android smartphone

    Calibrate battery (optional)

    Plug in your Android device while it's on and let it charge fully. Disconnect and turn off, then reconnect the power cable and wait until the LED goes green. Disconnect and turn back on, turn off again and reconnect the charger until the LED goes green again.

Build your Own Kernel with Ubuntu

Create a kernel specifically for your Android device in just 10 steps

One of the reasons Android has been able to do so well in the mobile markets is thanks to the open source, Linux base for the system. Because it has this open system, it means that the development and licensing is a lot cheaper for phone and tablet manufacturers and Google still gets to make its money via advertising revenue and the Google Play store.

While the business model is interesting in itself, it's the core kernel, though, that we're focussing on today. This is the element that bridges the gap between the software and the hardware, which also includes drivers and modules for specific chips in the device. On full-blown Linux distributions, you can get busy changing what modules are compiled along with the kernel, making it smaller and faster to create a speed boost on your system.

When it comes to an Android system, the kernels are quite well optimised for individual devices, however there's always a little bit more you can do to optimise it for the way you use your phone. Removing the bluetooth module or various input drivers are a couple of examples, however you can also add elements to the kernel for if you think you are going to do some physical hacks to the device.

In order to build the kernel, you'll need to use the Linux distribution Ubuntu. You don't have to go to install it though; you just need to have it on some flash storage or a CD so you can live boot it on a PC or laptop. Then you are ready to get kernal building!

This tutorial first appeared in Android Magazine issue 44, which is available from all good shops and to download now.

 

  1. Build you own Android kernel with Ubuntu

    Go to Ubuntu

    If you're using Ubuntu 12.04 or later already, you're all good to go. Otherwise, head to the Ubuntu website and download the latest version of the operating system. Once done, burn the ISO to a disc or use Unetbootin in order to create a live-bootable USB stick.

  2.  
  3. Build you own Android kernel with Ubuntu

    Boot into Ubuntu

    Reboot your computer with the USB stick or disc in your system. Look out for an option to open the boot menu right as it turns on and select the medium on which you're accessing Ubuntu from. After a little wait you'll be asked if you want to try or install Ubuntu, so click Try.

  4.  
  5. Build you own Android kernel with Ubuntu

    Preparing Ubuntu for building

    Ubuntu is not quite ready yet for making the kernel, so first you need to install some extra software. Press the Ubuntu logo or the Windows key and search for the terminal and then type in: $ sudo apt-get install build-essential kernel-package libncurses5-dev bzip2

  6. Build you own Android kernel with Ubuntu

    Get your kernel source

    Each device has a specific kernel and you'll need to Google your device to get the exact one. There are some general ones on AOSP, and HTC and Samsung have dedicated pages for kernels. Download the appropriate one to the main hard drive and create a new folder for it.

  7.  
  8. Build you own Android kernel with Ubuntu

    Download the NDK

    Head to the Android NDK site and download the 32 or 64-bit Linux version depending on what you're live booting. Put it in the same folder as kernel source code and extract it. If the kernel source was compressed, make sure you extract that as well.

  9.  
  10. Build you own Android kernel with Ubuntu

    Prepare to configure

    Back in the terminal, use cd to navigate to the kernel folder and use:
    $ export CROSS_COMPILE=[folder location]/androidkernel/android-ndk-r10b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
    In the kernel source, find the defconfig file with your devices code on and rename it to maker.defconfig or maker_defconfig.

  11. Build you own Android kernel with Ubuntu

    Go to the kernel menu

    Back in the terminal use the two following commands:
    make maker.config
    make menuconfig
    After the second you'll be shown the kernel configuration menu where you can start making changes to what modules are included in your kernel.

  12.  
  13. Build you own Android kernel with Ubuntu

    Configure the kernel

    It's very important that you know what you're changing in the menu. Removing random modules will likely just result in your phone not booting but some may actually damage your device. Google the options if you don't know what you want to change.

  14.  
  15. Build you own Android kernel with Ubuntu

    Build your new kernel

    Once you're happy with the configurations and have saved what you've done, you can now begin to build your brand new kernel. Use the following command, replacing X with the number of cores in your devices' CPU:
    $ make -jX ARCH=arm

  16. Build you own Android kernel with Ubuntu

    Flash to phone

    To use the shiny new kernal on your phone, you'll first need to find a flashable kernel zip for your device and then copy the zImage created from the build into the kernel. This is also your chance to add even more modules, such as Wi-Fi, to fully customise your phone to run exactly as you want.

Android Kernel Customization

The kernel, in this regard, is extremely customizable. Not only does the manufacturer have to plug in the necessary drivers to get all of the hardware to work correctly, but there are a lot of variables that they need to set. They can mess with all sorts of things, such as:

  • the minimum and maximum frequencies that the CPU can scale up or down to
  • how busy the CPU should be before it enables extra cores that it normally has disabled to save battery
  • the frequency the CPU should boost to whenever it detects touch input (to ensure a smoother wake up)
  • the CPU governor (which determines how quickly it tends to ramp up the frequency or not) that should be used
  • change the voltage of the CPU during all possible frequencies
  • the maximum frequency of the GPU
  • enable USB fast charge (for USB 3.0 ports)
  • configure the I/O scheduler that is used

How A Replacement Kernel Benefits You

That's great and all, but what can a custom kernel do for you? There are many different custom kernels for virtually every Android device in existence, so you'll have a lot of options to choose from. Depending on your needs, you can pick kernels that are optimized for performance, or ones that are optimized for power savings. Others have a good balance of both.

custom_kernel_franco
There are some developers who switch out some drivers with others (for varying reasons), or develop their own patches for problems they identify. A lot of developers also try to include upstream Linux kernel patches, or use their own toolkits for compilation. For example, for my Nexus 5, there's one developer who uses his own toolkit, which includes the latest version of GCC, a Linaro toolchain with optimizations specifically for the CPU architecture used, and maximum optimization flags for the compiler.

Developers can even add some additional features from other kernels that don't officially exist for your device. For example, there are some kernels for the Nexus 5 that include the "double tap to wake" feature that first appeared on the LG G2.

Most of all, a handful of kernels allow you to access the configurable variables yourself, so that you can use the code that the kernel developers release but tweak it to adjust its behavior to your liking. However, you'll want to research some of the options available before you actually start to change values for them. In other words, a custom kernel can provide improvements, extra features, specialization, and extreme configurability.

Where To Find Android Kernels

It's rather easy to find a kernel for your device. Assuming that you have your device rooted and acustom recovery installed, you can browse through the XDA-Developers forum, look in the subforum for your specific device, search through the threads for any that have a [KERNEL] tag in the thread's title, download one that you like, and flash the .zip file via your custom recovery.

custom_kernel_xda
There may also be a sticky thread that may contain a list of popular kernels available for easy searching. Once you've decided on a kernel you'd like to use, just download it (it should be in a .zip file) and flash it using the custom recovery. Be sure to adhere to all instructions that the kernel developer may provide, and any of their instructions would override any of my advice.

RSS

Categories

Followers

Blog Archive

rTechIndia

RtechIndia->technology ahead

rtech

rtechindia

RtechIndia

Go rtechindia

Go rtechindia

RtechIndia

Sunday 11 January 2015

Customization of ROM on your Android Phone

You might have read or heard people talking about custom ROMs they have installed on their Android devices. Here's how to do it quickly and safely… 

One of the main reasons people like to root their devices is to install a new or different version of the operating system. The open source nature of the OS means that it's possible for anyone to view the code that makes up Android and then modify it as they see fit, in a similar way to which the Linux-based desktop operating systems work.

Custom ROMs can offer new features over the standard ones, allowing you to tailor your device to your needs. They also allow developers to port other manufacturers' interfaces to other device makes – for instance, HTC's Sense UI onto Samsung phones – or to remove a heavily customised ROM altogether. Another reason is to hurry along the update process: you are no longer tied to waiting on the phone manufacturers and the mobile operators to push out the latest version of Android. Installing a new ROM is a relatively simple and quick process thanks to the ROM Manager app which can be downloaded for free from the Android Market.

First of all you need to root your phone and there are a few methods for doing so. Some of the most popular are: SuperOneClick, Universal Androot and Z4Root. Check the compatibility with your particular device before attempting to gain root access. Here's how we'll do it:

For this example we'll use Z4 Root. Download it from here, as it isn't available on the Market. You will need to register first. Now, copy the .apk file you've downloaded to your SD card and then install using an app such as 'Easy Installer' or by clicking on the apk in your favourite file manager.

Open Z4Root and in the centre you will see a button saying 'Root'. Click on the button and wait for a short while, for the process to complete; the progress is shown in the bottom bar. After it has finished, the phone will reboot. You now have root access!

Once you've rooted your phone, ROM Manager makes backing up, installing a custom recovery and downloading the new one a breeze – and will even enable you to restore your original ROM if you prefer! This tutorial will take you through the process step by step and help you on the way to a fresh new experience with your phone…

Disclaimer
Rooting your phone and installing ROMs on your device may void your manufacturer warranty. You undertake the procedure outlined in this tutorial at your own risk. Android Magazine and Imagine Publishing Ltd. cannot be held responsible for loss of data or damage to your device.

Words by: Kieron Howard

  1. How to install a new ROM on your Android smartphone

    Installing ROM Manager

    First off, you will need to install the ROM Manager app. The good news its that it's a free one (although there is a premium version that offers more features). Open up the Android Market from your apps list and search for 'ROM Manager', then click the icon and install.

  2.  
  3. How to install a new ROM on your Android smartphone

    Install Clockwork recovery

    When you rooted your Android device (see page 68), it's quite likely that at the same time you installed a piece of 'custom recovery' software. ROM Manager will check that you have this installed and that you have the latest version that's available.

  4.  
  5. How to install a new ROM on your Android smartphone

    Back up your ROM, part 1

    Open up ROM Manager, click on the Backup Current ROM button, give the backup a name (perhaps something like 'Standard ROM Backup') and then click OK. You might be asked to allow ROM Manager superuser access and you'll need to grant this.

  6. How to install a new ROM on your Android smartphone

    Back up your ROM, part 2

    The phone will now automatically reboot into recovery mode. The backup process can take a little while, so make sure you aren't expecting any important calls! The recovery backs up your current ROM to the microSD card, so it's important not to format this.

  7.  
  8. How to install a new ROM on your Android smartphone

    Choose your ROM

    Back in ROM Manager, click 'Download ROM'. This will bring up a list of available ROMs for your device. In this example we will install CyanogenMod 7, one of the most popular custom versions of Android due to its stability and wide device support.

  9.  
  10. How to install a new ROM on your Android smartphone

    Download the ROM

    Choose the CyanogenMod version you wish to download – the latest version at time of writing is 7.1.0-RC. It's strongly advisable to stay away from the 'Nightly' builds, as these are largely experimental. Google apps don't come as standard, so click to download them.

  11. How to install a new ROM on your Android smartphone

    Installing the ROM, part 1

    Once the ROM and Google Apps have finished downloading, reopen ROM Manager and you will see the ROM pre-installation screen. Tick the 'Wipe Dalvik' and 'Wipe Data and Cache' boxes. Click OK and the phone will now reboot into recovery again.

  12.  
  13. How to install a new ROM on your Android smartphone

    Installing the ROM, part2

    The new ROM will now install. This might take a little while. Once complete, the phone will reboot again. The first boot of any new ROM can take a while, sometimes up to 15 minutes, so be patient and don't panic if the device appears to have frozen.

  14.  
  15. How to install a new ROM on your Android smartphone

    Set up Google account

    Once the phone has booted up, you will then be prompted to enter your Google account details. Doing this will automatically download and set up all your contacts, settings and apps back onto the phone. You now have a brand new ROM to explore!

  16. How to install a new ROM on your Android smartphone

    Calibrate battery (optional)

    Plug in your Android device while it's on and let it charge fully. Disconnect and turn off, then reconnect the power cable and wait until the LED goes green. Disconnect and turn back on, turn off again and reconnect the charger until the LED goes green again.

Build your Own Kernel with Ubuntu

Create a kernel specifically for your Android device in just 10 steps

One of the reasons Android has been able to do so well in the mobile markets is thanks to the open source, Linux base for the system. Because it has this open system, it means that the development and licensing is a lot cheaper for phone and tablet manufacturers and Google still gets to make its money via advertising revenue and the Google Play store.

While the business model is interesting in itself, it's the core kernel, though, that we're focussing on today. This is the element that bridges the gap between the software and the hardware, which also includes drivers and modules for specific chips in the device. On full-blown Linux distributions, you can get busy changing what modules are compiled along with the kernel, making it smaller and faster to create a speed boost on your system.

When it comes to an Android system, the kernels are quite well optimised for individual devices, however there's always a little bit more you can do to optimise it for the way you use your phone. Removing the bluetooth module or various input drivers are a couple of examples, however you can also add elements to the kernel for if you think you are going to do some physical hacks to the device.

In order to build the kernel, you'll need to use the Linux distribution Ubuntu. You don't have to go to install it though; you just need to have it on some flash storage or a CD so you can live boot it on a PC or laptop. Then you are ready to get kernal building!

This tutorial first appeared in Android Magazine issue 44, which is available from all good shops and to download now.

 

  1. Build you own Android kernel with Ubuntu

    Go to Ubuntu

    If you're using Ubuntu 12.04 or later already, you're all good to go. Otherwise, head to the Ubuntu website and download the latest version of the operating system. Once done, burn the ISO to a disc or use Unetbootin in order to create a live-bootable USB stick.

  2.  
  3. Build you own Android kernel with Ubuntu

    Boot into Ubuntu

    Reboot your computer with the USB stick or disc in your system. Look out for an option to open the boot menu right as it turns on and select the medium on which you're accessing Ubuntu from. After a little wait you'll be asked if you want to try or install Ubuntu, so click Try.

  4.  
  5. Build you own Android kernel with Ubuntu

    Preparing Ubuntu for building

    Ubuntu is not quite ready yet for making the kernel, so first you need to install some extra software. Press the Ubuntu logo or the Windows key and search for the terminal and then type in: $ sudo apt-get install build-essential kernel-package libncurses5-dev bzip2

  6. Build you own Android kernel with Ubuntu

    Get your kernel source

    Each device has a specific kernel and you'll need to Google your device to get the exact one. There are some general ones on AOSP, and HTC and Samsung have dedicated pages for kernels. Download the appropriate one to the main hard drive and create a new folder for it.

  7.  
  8. Build you own Android kernel with Ubuntu

    Download the NDK

    Head to the Android NDK site and download the 32 or 64-bit Linux version depending on what you're live booting. Put it in the same folder as kernel source code and extract it. If the kernel source was compressed, make sure you extract that as well.

  9.  
  10. Build you own Android kernel with Ubuntu

    Prepare to configure

    Back in the terminal, use cd to navigate to the kernel folder and use:
    $ export CROSS_COMPILE=[folder location]/androidkernel/android-ndk-r10b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
    In the kernel source, find the defconfig file with your devices code on and rename it to maker.defconfig or maker_defconfig.

  11. Build you own Android kernel with Ubuntu

    Go to the kernel menu

    Back in the terminal use the two following commands:
    make maker.config
    make menuconfig
    After the second you'll be shown the kernel configuration menu where you can start making changes to what modules are included in your kernel.

  12.  
  13. Build you own Android kernel with Ubuntu

    Configure the kernel

    It's very important that you know what you're changing in the menu. Removing random modules will likely just result in your phone not booting but some may actually damage your device. Google the options if you don't know what you want to change.

  14.  
  15. Build you own Android kernel with Ubuntu

    Build your new kernel

    Once you're happy with the configurations and have saved what you've done, you can now begin to build your brand new kernel. Use the following command, replacing X with the number of cores in your devices' CPU:
    $ make -jX ARCH=arm

  16. Build you own Android kernel with Ubuntu

    Flash to phone

    To use the shiny new kernal on your phone, you'll first need to find a flashable kernel zip for your device and then copy the zImage created from the build into the kernel. This is also your chance to add even more modules, such as Wi-Fi, to fully customise your phone to run exactly as you want.

Android Kernel Customization

The kernel, in this regard, is extremely customizable. Not only does the manufacturer have to plug in the necessary drivers to get all of the hardware to work correctly, but there are a lot of variables that they need to set. They can mess with all sorts of things, such as:

  • the minimum and maximum frequencies that the CPU can scale up or down to
  • how busy the CPU should be before it enables extra cores that it normally has disabled to save battery
  • the frequency the CPU should boost to whenever it detects touch input (to ensure a smoother wake up)
  • the CPU governor (which determines how quickly it tends to ramp up the frequency or not) that should be used
  • change the voltage of the CPU during all possible frequencies
  • the maximum frequency of the GPU
  • enable USB fast charge (for USB 3.0 ports)
  • configure the I/O scheduler that is used

How A Replacement Kernel Benefits You

That's great and all, but what can a custom kernel do for you? There are many different custom kernels for virtually every Android device in existence, so you'll have a lot of options to choose from. Depending on your needs, you can pick kernels that are optimized for performance, or ones that are optimized for power savings. Others have a good balance of both.

custom_kernel_franco
There are some developers who switch out some drivers with others (for varying reasons), or develop their own patches for problems they identify. A lot of developers also try to include upstream Linux kernel patches, or use their own toolkits for compilation. For example, for my Nexus 5, there's one developer who uses his own toolkit, which includes the latest version of GCC, a Linaro toolchain with optimizations specifically for the CPU architecture used, and maximum optimization flags for the compiler.

Developers can even add some additional features from other kernels that don't officially exist for your device. For example, there are some kernels for the Nexus 5 that include the "double tap to wake" feature that first appeared on the LG G2.

Most of all, a handful of kernels allow you to access the configurable variables yourself, so that you can use the code that the kernel developers release but tweak it to adjust its behavior to your liking. However, you'll want to research some of the options available before you actually start to change values for them. In other words, a custom kernel can provide improvements, extra features, specialization, and extreme configurability.

Where To Find Android Kernels

It's rather easy to find a kernel for your device. Assuming that you have your device rooted and acustom recovery installed, you can browse through the XDA-Developers forum, look in the subforum for your specific device, search through the threads for any that have a [KERNEL] tag in the thread's title, download one that you like, and flash the .zip file via your custom recovery.

custom_kernel_xda
There may also be a sticky thread that may contain a list of popular kernels available for easy searching. Once you've decided on a kernel you'd like to use, just download it (it should be in a .zip file) and flash it using the custom recovery. Be sure to adhere to all instructions that the kernel developer may provide, and any of their instructions would override any of my advice.