Tuesday, 30 October 2012

Building an Android CUSTOM ROM


Building an Android ROM


Maybe it’s in the wrong place , it’s not really a tutorial what you’re about to read. It’s more a simple explanation on how an Android ROM is built. I’m going to discuss several parts that can’t be absent if you want a fully functional Android phone, from the software point of view that is.
Here’s a brief summary :
·         Kernel
·         Libraries (and modules)
·         Bootloader
·         Recovery
·         Radio
·         Apps, framework, core, android-runtime, etc…



Kernel
A kernel is a critical component of every Operating System. It can be seen as a sort of bridge between the applications and the actual hardware of a device. Usually the data processing part is done at hardware level, furthermore the kernel is the most low-level abstraction layer for the resources.
There exist several types of kernels, but I am only discussing the one that is important for the Android ROM. The kernel for the Android ROM is a hybrid kernel, it is based on the Linux kernel. Devices can differ in RAM memory, ROM memory, hardware parts and so on. So it’s really important you have a kernel for your type of device, an HTC Wildfire kernel won’t work on a Nexus One for example.
It is possible to overclock a kernel. What the hell is overclocking you may wonder? Every CPU is designed to work at a certain clock speed. For the HTC Wildfire the Qualcomm ARMv6 processor operates at 528 mHz; This is a limit that is coded in to the kernel because they can’t guarantee a good cooling if you go over this limit. My Wildfire runs at 652.8 mHz, it can go till 768 mHz but it can cause freezes. When you overclock the kernel , the CPU will be instructed to do more calculations per second and will so increase the performance. When you overclock the CPU of your desktop machine it needs extra cooling, it’s not necessary for a smartphone. However keep in mind this will degenerate your CPU more quickly. To overclock an Android phone you must root first, and than install SetCPU from the market , it is a paid app but it’s worth it. Further you have to flash an overclockable kernel , I prefer the OC Kernel of HCDR.Jacob, at XDA-forums (see links right). If you have done these 3 things you’re ready to OC!


Libraries
Imagine you want to program an application for your phone that uses the camera. It can take a picture and turn on the flash LED on. These are things not only your own application will use, there can be tons of applications that have a button , that when you press it , it will take a photo. So think about if they always have to write the machine code for the phone , that it instructs the phone to put on the camera. It would be a lot of code duplication and would make an application slow. Instead for functions like the camera, or loudspeakers, they developped libraries. These are chunk of codes that can be executed by calling them trough a call-method (in java : import somelibrarie.someclass;), these are already pre-written and ready to use. It saves a lot of coding work and keeps the source code small. Libraries in the Windows OS for example are the so called .dll files (Dynamic Linked Libraries) , on your Android ROM or Linux OS these are the .so files (Shared Object), when coding in Java you import .jar libraries before the class signature. On your Android phone you have particular libraries that can’t be absent, or else your ROM won’t even boot.


Bootloader
A bootloader in general is the first bytes of code that a machine executes that will tell the bootsequence and will load the operating system into the RAM. On an Android phone this is the so called HBoot, from here you can go to the recovery partition, the system or data partition,.. If you simple press the power button Hboot will load the OS into your RAM. But if you want to access these partitions it is possible by pressing, if you have a Wildfire, the volume-down button and simultaneously the power button. This will bring up the Hboot menu. The bootloader is used as exploit for rooting an Android phone. Once rooted you can flash custom roms , like ImPrOS, or just edit system files. (for a how-to , check tutorials under Android).

Recovery
When you use a one-click-root application, like Unrevoked3 , it will install a modded recovery. With this modded recovery it is possible to flash a new kernel, radio image (see below), custom rom, install applications (not the best way though),nandroid backup,.. The modded recovery that is flashed by Unrevoked3 is called ClockworkMod.


Radio
The lowest part of software layer is the radio, this is the very first thing that boots even before the bootloader. This handles the GPS-antenna,GSM antenna ,fires up the CPU, everything what Hboot needs to load the OS. This is also upgradeable by flashing a new radio image trough ClockworkMod. However this is not recommended : flashing a new ROM can’t brick your phone but if anything goes wrong when you flash a ROM with a new radio image this can brick your phone. So unless you experience bad reception or battery drainage, don’t touch the radio!!


Applications, framework, android-runtime,..
Now we have the fundamental software layers, we have to decorate our ROM, it has to have some interface trough where it can communicate with the user. We can install applications like a keyboard, a phone application, a calculator. And last but not least the android-runtime. This is a package of code that represents the Android Virtual Machine. The Android programming language is based on xml and Java (mostly Java) , like every programming language has some sort of virtual machine, (Java has JVM = Java Virtual Machine) Android has android-runtime.

Thursday, 25 October 2012

What is cyanogen(mod) ?





CyanogenMod - CyanogenMod Android Rom



CyanogenMod (pronounced /saɪ.'æn.oʊ.dʒɛn.mɒd/sigh-AN-oh-jen-mod) is an open source replacement firmware for smart phones and tablet computers based on the Android mobile operating system. It offers features and options not found in the official firmware distributed by vendors of these devices.
Features supported by CyanogenMod include native theming support, FLAC audio codec support, a large Access Point Name list, an OpenVPNclient, an enhanced reboot menu, support for Wi-Fi, Bluetooth, and USB tethering, CPU overclocking and other performance enhancements, soft buttons and other "tablet tweaks", toggles in the notification pull-down (such as Wi-FiBluetooth and GPS), app permissions management, as well as other interface enhancements. According to its developers, CyanogenMod does not contain spyware or bloatware.[3][4] CyanogenMod is also stated to increase performance and reliability compared with official firmware releases.[5]
CyanogenMod is developed as free and open source software based on the official releases of Android by Google, with added original and third-party code.
Although only a subset of total CyanogenMod users elect to report their use of the firmware,[6] as of 24 August 2012, CyanogenMod has recorded over 3.1 million installs on a multitude of devices.

About


CyanogenMod (pronounced sigh-AN-oh-jen-mod), is a customized, aftermarket firmware distribution for several Android devices (See above for supported devices & how to install CyanogenMod on said devices). Based on the Android Open Source Project, CyanogenMod is designed to increase performance and reliability over Android-based ROMs released by vendors and carriers such as Google, T-Mobile, HTC, etc. CyanogenMod also offers a variety of features & enhancements that are not currently found in these versions of Android.

History and development

Soon after the introduction of the HTC Dream (named the "T-Mobile G1" in the United States) mobile phone in September 2008, a method was discovered to attain privileged control (termed "root access") within Android's Linux-based subsystem.[9] Having root access, combined with theopen source nature of the Android operating system, allowed the phone's stock firmware to be modified and re-installed onto the phone.
In the following year, several modified firmwares for the Dream were developed and distributed by Android enthusiasts. One, maintained by a developer named JesusFreke, quickly became popular among Dream owners. In August, 2009, JesusFreke stopped work on his firmware, and suggested users switch to a version of his ROM that had been further enhanced by developer Cyanogen (Steve Kondik) called "CyanogenMod".[10]
CyanogenMod quickly grew in popularity, and a small community of developers, called the CyanogenMod Team (and informally, "Team Douche"[11]) made contributions. Within a few months, the number of devices and features supported by CyanogenMod blossomed, and CyanogenMod quickly became one of the most popular Android firmware distributions.
Like many open source projects, CyanogenMod is developed using a distributed revision control system with the official repositories being hosted on GitHub.[12] Contributors submit new feature or bug fix changes using Google's source code review system, Gerrit.[13] Contributions may be tested by anyone, voted up or down by registered users, and ultimately accepted into the code by one of a handful of CyanogenMod developers.
A version of ADW.Launcher, an alternative launcher (home screen) for the Android operating system, became the default launcher onCyanogenmod 5.0.8. The launcher provides additional features not provided by the default Android launcher, including more customization abilities (including icon themes, effects, and behavior), the ability to backup and restore configuration settings, and other features.


List of devices supported by CyanogenModList of devices supported by CyanogenMod.


CyanogenMod
















Wednesday, 24 October 2012

How to flash ClockworkMod Touch Recovery 6.0.1.2 for the Galaxy S3 I9300


How to flash ClockworkMod Touch Recovery 6.0.1.2 for the Galaxy S3 I9300







Can you believe it’s been a few months since ClockworkMod Touch Recovery reached version 6.0? We gave you a guide on how to flash ClockworkMod Touch Recovery 6.0.1.0 to your Samsung Galaxy S3, but if you’re the type of person who always wants to have the latest improvements at the tips of your fingers, you’ll definitely want to take some time to flash version 6.0.1.2. But, why should you, when you’re already nice and comfy with 6.0.1.0?
ClockworkMod Touch Recovery 6.0.1.2 has a few tricks up its sleeve. This update gives you a few new helpful features, such as the ability to flash ZIPs from the external SD card. The update also endows you with the power to Choose Backup Format so you can choose between the new.dup method with the blobs folder or the original .tar method where everything is in the date/time-stamped folder. You can also Create an Image ZIP from a NANDroid Backup.
This guide shows you how to flash ClockworkMod Touch Recovery 6.0.1.2 for the Galaxy S3 I9300.

Warning

  • The instructions in this guide are intended for use with the Samsung Galaxy S3, model number GT-I9300. Applying these instructions on another device or model may produce undesired outcomes.
  • The information in this guide is provided for instructional and educational purposes only. There is no guarantee that these instructions will work under your specific and unique circumstances.
  • Use these instructions at your own risk. We shall not hold any responsibility or liability for whatever happens to you or your device arising from your use of the info in this guide.
  • Read and understand the whole guide first before actually performing the instructions.

Requirements

  • Samsung Galaxy S3 GT-I9300
  • Download the following to your computer:
  • A Windows PC
  • Handset USB drivers installed on the PC. You may install the drivers by installing Samsung Kies.
  • Enable USB debugging on your handset.
  • Disable antivirus, firewall, and other security software. Also disable Samsung Kies and other software that accesses your phone. Such software can interfere with the procedure in this guide.
  • Make sure your device’s battery still has at least 70% power. You don’t want the device to shut down in the middle of the procedure.
  • Backup all personal data on your phone to make sure you have a copy of your personal data (e.g., contacts, SMS, MMS, Internet settings, Wi-Fi passwords, and the like) in case the procedure in this guide erases such data.

Instructions

  1. Extract the contents of the Odin v3.04 ZIP file to your computer to get Odin3_v3.04.exe.
  2. Turn off your Galaxy S3.
  3. Boot into Download Mode by pressing and holding down the Home, Volume Down, and Power buttons. Press the Volume Up button to continue into Download Mode.
  4. On your computer, double-click the Odin3_v3.04.exe file to launch it.
  5. Connect your phone to your computer using the USB cable. You should see an “ADDED!” message in the message box in the lower left of the Odin window.
  6. In Odin, make sure that only Auto Reboot and F. Reset Time are ticked.
  7. Click on the PDA button and select the recovery-cwm-touch-6.0.1.2-i9300.tar file.
  8. Click on Start in Odin to begin flashing ClockworkMod Recovery to your Galaxy S3.
  9. When ClockworkMod Touch Recovery has been flashed to your Galaxy S3, your phone should reboot. You can unplug your device when you see the Samsung logo and when you see a PASSED message in Odin.
  10. To make sure that ClockworkMod Touch Recovery has been successfully installed on your Galaxy S3, boot into Recovery Mode. You can do this by pressing and holding down the Home, Volume Up, and Power buttons.
Hurrah! You’ve just flashed the latest ClockworkMod Touch Recovery 6.0.1.2. Have fun flashing with the power of your fingertips.