ROM Android: Arsitektur Android

From OnnoWiki
Revision as of 10:29, 7 November 2014 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

am quite sure that if you are an android owner, once in a while you might have encountered some terms which would have made you utterly confused. Things like rooting, ROM etc. may just sound to you like a waste of time, but to be honest they are the biggest strength of this platform.

In past we have written a few posts about cyanogenmod and custom roms but didn’t give a full overview on what they exactly are. So here I am trying to answer a few questions that were raised.

Cyanogenmod

Let me start with the basics. What is Android?

In a layman’s term, Android is operating system that runs on primarily on mobile platform (Cellphone/tablets). It certainly is not the hardware that you get when you purchase a phone. Architecture of Android

Before I go in depth about ROM and Super User, let me tell you a little about the architecture of android. For any computational device to work there needs to be certain element which interacts with the hardware. Hardware alone can’t do a thing unless it is directed to. This direction/interaction with the hardware is done through the innermost layer of the operating system known as kernel. The Kernel inside android is a fork of present day Linux Kernel.

The layer above kernel is what gives the kernel instruction to perform specific tasks. For instance if your click on the browser icon on the launcher, the input is interpreted by kernel (as it interacts with hardware) but what to do with this input is understood by the next layer, which is application. In this case the launcher. So the question is how does launcher work? It doesn’t directly work with kernel, instead there is an intermediate called Dalvik Virtual Machine which runs these applications. If you are familiar with Java you will understand this quite easily, but if you don’t get it don’t bother.

In short, hardware interacts with kernel which interacts with Dalvik virtual machine which interacts with applications, and all these together combined is called ROM (why, I will explain it next).

ROM, RAM and Firmware

ROM stands for Read Only Memory, there are many kinds of ROM, some which can be erased, some that can be programmed. ROMs are used to store the entire stack that I mentioned above. Whole Kernel, DVM and Applications are stored in these ROM, hence the name.

There is quite a difference between ROM and RAM so don’t get confused. On one hand ROM is like a permanent storage, RAM is the temporary storage. It stores the run time data that is generated during processing.

And, if you hear someone say something about ‘firmware’ don’t get confused because ROM and Firmware are almost the same. What is Rooting? Who is a Super User?

If you are an avid ‘Linux/Unix’ user then I don’t need to answer these, but for others let me put it this way. If you have read till now you would realize that Linux Kernel is in the heart of this device. So all the inherent features of operating system would be same as Linux. Therefore which is the one user which can do anything/everything on a Linux system?

The answer is Root aka super user, and hence the term rooting.

Rooting gives you the rights/permission to do certain tasks on android which has inherently been blocked by the handset makers for both simplicity and security of the device. You might have noticed that when you install any application from android market, it asks for certain permissions. Similarly there are some applications which require system level permissions for them rooting is required.

There are different ways to root android (depending on the version), but we will not deal with them here. Flashing the ROM

As you might know, Android is an open source initiative and anyone can go ahead and build his/her own custom operating system for their handset. There are numerous developers working on building their own versions of Android. One of them that we mentioned previously is known as Cyanogenmod. There are many such ROMs built for many different devices, and process of installing these on the handset is commonly knows as flashing. The process of flashing varies from handset to handset and ROM to ROM. It isn’t a difficult task, but certainly requires lots of research.

I think this should be enough for the basics, though you should know about some common terms used in relation to android.

   Deodexed – If you are new to flashing and modding, don’t bother with this one. It is for those who venture a little deep into it. And if you are really interested in knowing what exactly it is you read about it in this excellent article at addictivetips.com.
   Partitions – Don’t get confused when someone says ‘ROM partitions should be ext4 or Reiserfs’. Partitioning is dividing the internal memory of the handset, and ext4/reiserfs are the file systems. Like in case of Windows, fat32 and ntfs.
   Bootloader – Again, if you are linux user I don’t need to explain you this, but for the ignorant ones, bootloader is what loads the kernel into the main memory so that it can interact with hardware. I won’t go deep into how it works, but would point out that the moment your device starts the first thing that comes up after powering on is Bootloader, which loads the modules of kernel in memory.

Ok enough of complex stuffs, let me tell you about the applications you might need if you think of flashing.

   Odin – Its a Windows application which interacts with the device at hardware level and can write on ROM (Read only memory) of the handset.
   CWM – Clockwork Mod is an application installed on android device that manages the ROM(the stack) installed in the system. It can be used to install or backup the roms.

This is more than enough information for one read. If you wish to know more about your handset post your queries here and I will guide you to right place. Also for most of HTC/Samsung/Motorola phones the best place to venture is XDA Forum.

The objective of this post was to let you know more about Android. I have not discussed the advantages and disadvantages of custom roms or rooting, but then again I said it requires a lot of research. Just a little help to your research, read this article.



4 Basic Android Customizations by: Radu Tyrsina

Updated on April 18th, 2011


   Android

Share 0 Recomended Understand the Basic Android Terminologies Understand the Basic Android Terminologies

Awesome Gmail Themes and Customizations Awesome Gmail Themes and Customizations

Quick Launch: The Ultimate Custom Lock Screen Launcher for Android Quick Launch: The Ultimate Custom Lock Screen Launcher for Android


android-customization

Android phones came with the slogan that was totally in contrary with their major competitor, the iOS from Apple. While Apple has a wide selection of apps that can do pretty much everything you can think of and beyond, Android equipped phones are capable of completely changing the experience of using one. The idea behind Android being an open source one is that people could change anything they wanted. So the app base is already pretty good compared to iOS since the platform is new. The best part of being an open source platform is virtually no limitation to the customizations. Android is just that. If you are interested in Android customizations, then here are some tips:

1. Wallpaper: Good old wallpapers are age old concepts of customizing a device. It is the simplest method too. You can have a lot of wallpapers for free from the internet for your Android device. A different approach made here on this platform is the option of using ‘live wallpapers’. These wallpapers are essentially changing images that are displayed in succession. Some apps and widgets come with their very own version of live wallpapers. You can use them or you can choose your own by searching the internet.

2. Widgets: Widgets are quite familiar to most of us. These are small apps that can be placed on the home screen of a device to add functionality. There are many widgets that provide different information or customization to the home screen. Some of these are available for free and they can still be very useful ways of customization. Widgets usually display information like weather and temperature info, calendar etc.

3. Launcher: Launchers can replace the default bottom part of the screen on your Android device. While the basic function provided also by the basic launcher is the ability to launch applications, they can be used for certain other customization options. There are many free launcher apps. They are like apps, so at any point, you can change or remove them if you don’t want them to function anymore. Some launchers come with widgets that can be useful. You can take a look at their functionality.

4. ROMs: ROMs are the core of all Android phones. But if you want to change the experience at a hardware level, then these are your first steps. Custom ROMs with different functionality are targets of a lot of customers who want to modify their dream devices to make them heavenly ones. Some ROMs are cheaper than others. But you have to make sure that the ROM you are going to buy will work.





Android File System Structure/Architecture/Layout Details February 17, 2013 Android Tutorial, Tutorials

Android File System Structure/Architecture/Layout Details

Most of the Android user are using their Android phone just for calls, SMS, browsing and basic apps, But form the development prospective, we should know about Android internal structure. Android uses several partitions (like boot, system, recovery,data etc) to organize files and folders on the device just like Windows OS. Each of these partitions has it’s own functionality, But most of us don’t know the significance of each partition and its contents. In this article, we will take you on a tour of Android partitions. So lets start the android file system tutorial.

There are mainly 6 partitions in Android phones, tablets and other Android devices. Below is the list of partition for Android File System. Note that there might be some other partitions available, it differs from Model to Model. But logically below 6 partitions can be found in any Android devices.

   /boot
   /system
   /recovery
   /data
   /cache
   /misc

partition-size-in-android-device

Also Below are the for SD Card Fie System Partitions.

   /sdcard
   /sd-ext

Please Note: Only /sdcard partition can be found in all Android devices and the rest are present only in select devices. Know Your Android Device Partition Size using adb Command

You can know which partitions are available along with the partition size for all partition in your android device. Go through the below image and run the adb command as shown in that image. For more adb commands, you can read my atricle Useful adb Commands for Android Development. Also for more details for android architecture, you can read my article Android Architecture.



partition-size-in-android-device

Note: boot and recovery partition is not displayed in the above image. So after adb shell, you need to run mount command. like cat proc/mounts /boot

This is the boot partition of your Android device, as the name suggests. It includes the android kernel and the ramdisk. The device will not boot without this partition. Wiping this partition from recovery should only be done if absolutely required and once done, the device must NOT be rebooted before installing a new one, which can be done by installing a ROM that includes a /boot partition. /system

As the name suggests, this partition contains the entire Android OS, other than the kernel and the ramdisk. This includes the Android GUI and all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM. /recovery

This is specially designed for backup. The recovery partition can be considered as an alternative boot partition, that lets the device boot into a recovery console for performing advanced recovery and maintenance operations on it. /data

Again as the name suggest, it is called userdata partition. This partition contains the user’s data like your contacts, sms, settings and all android applications that you have installed. While you are doing factory reset on your device, this partition will wipe out, Then your device will be in the state, when you use for he first time, or the way it was after the last official or custom ROM installation. /cache

I hope you have some idea about cache, as you are expert on internet browsing. This is the partition where Android stores frequently accessed data and app components. Wiping the cache doesn’t effect your personal data but simply gets rid of the existing data there, which gets automatically rebuilt as you continue using the device. /misc

This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally. /sdcard

This is not a partition on the internal memory of the device but rather the SD card. In terms of usage, this is your storage space to use as you see fit, to store your media, documents, ROMs etc. on it. Wiping it is perfectly safe as long as you backup all the data you require from it, to your computer first. Though several user-installed apps save their data and settings on the SD card and wiping this partition will make you lose all that data.

On devices with both an internal and an external SD card – devices like the Samsung Galaxy S and several tablets – the /sdcard partition is always used to refer to the internal SD card. For the external SD card – if present – an alternative partition is used, which differs from device to device. In case of Samsung Galaxy S series devices, it is /sdcard/sd while in many other devices, it is /sdcard2. Unlike /sdcard, no system or app data whatsoever is stored automatically on this external SD card and everything present on it has been added there by the user. You can safely wipe it after backing up any data from it that you need to save. /sd-ext

This is not a standard Android partition, but has become popular in the custom ROM scene. It is basically an additional partition on your SD card that acts as the /data partition when used with certain ROMs that have special features called APP2SD+ or data2ext enabled. It is especially useful on devices with little internal memory allotted to the /data partition. Thus, users who want to install more programs than the internal memory allows can make this partition and use it with a custom ROM that supports this feature, to get additional storage for installing their apps. Wiping this partition is essentially the same as wiping the /data partition – you lose your contacts, SMS, market apps and settings.

Now when you install a new binary, you can know what you’re going to loose, make sure to backup your data before flash new binary in your android device.

I hope this small tutorial will help you at it’s best. If you have nay query or comments, please share with us, we will get back to you asap.




Referensi