Monday 11 March 2013

How to use Android Emulator to test Custom ROM


You might have a smart phone , more precisely android smart phone and you want to install a fancy customized ROM right?

Well,  before flashing any custom ROM directly on smartphone you can try it on Android virtual device.

Requirement :
Android sdk -tool should be installed on pc/laptop to create AVD (android virtual device)
system image of custom ROM


Follow the steps given below

Step 1: Open Command prompt (run > cmd  hit enter).

Step 2: change path to "tools" folder of your android sdk
it is something like  ..\Android\android-sdk\tools
[Note : if you have set your path variable for Android Sdk then skip this step   ]


Step 3: enter the command : android list target
This command will give you list of available Android targets with ID of perticular target.
Note down the Id number of target for your custom rom
for example if your custom ROM is for ICS then choose ID number of 4.0 like wise

Example Outout :

Available Android targets:
----------

id: 3 or "android-7"
     Name: Android 2.1
     Type: Platform
     API level: 7
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
     ABIs : armeabi

----------
id: 5 or "android-8"
     Name: Android 2.2
     Type: Platform
     API level: 8
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
     ABIs : armeabi
----------
id: 15 or "android-15"
     Name: Android 4.0.3
     Type: Platform
     API level: 15
     Revision: 3
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854,
     XGA720, WXGA800
     ABIs : armeabi-v7a, x86



Here for ICS we can chose ID- 15

Created AVD 'abc' based on Android 4.0.3, ARM (armeabi-v7a) processor,
with the following hardware config:
hw.lcd.density=240
vm.heapSize=48
hw.ramSize=512

Step 4 : now we will create avd for our target sdk
command : android create avd -n NameOfEmualtor -t TargetID
hit enter ,If you receive error message : Error: This platform has more than one ABI.

Please specify one using --abi. find out abi for your target from previous "android list target" command output and now run
command: android create avd -n Name_Of_Emulator -t TargetID --abi AbiType

Example: android create avd -n myemulator -t 15 --abi armeabi-v7a
Now it will prompt : Do you wish to create a custom hardware profile [no] :
if you dont want to create custom hardware then simply give enter, It will chose default settings. and will give you following output

Step 5:
now you can see that folder named after you avd will be created in
"C:\Users\your_user_name\.android\avd" folder
copy your all Images like user image, data image, system image to this folder.

Step 6: now you can start emulator with your custom ROM by following
command : emulator -avd Name_Of_Emulator

For the first time it may take several minutes to start your AVD.

Done !
your comments, questions and suggestions are always welcome.

16 comments:

  1. Can I flash roms through this or test them? If yes, how?

    ReplyDelete
  2. Thank you! It's easy to understand.

    ReplyDelete
  3. of all the tutorial this was easy ..simple and clean.
    But if i have zip of my custom rom how do i place it? instead of system image files.

    ReplyDelete
  4. be great if you add a screenshot for every step. but overall, this tutorial is easy to understand even though I'm a beginner :D

    thanks for sharing :)
    regardz

    ReplyDelete
  5. emulator is coming as empty , not booting in to android 4.4.2 :(

    ReplyDelete
  6. Only black screen on emulator! Run great with generic sdk .img, but nothing happens with custom .img.
    Any idea?

    ReplyDelete
  7. how to convert zip into img of custom rom help me plz

    ReplyDelete
  8. To create .img of system folder try yaffey

    ReplyDelete
  9. Not working ... screen remains blank

    ReplyDelete
  10. Valid ABIs: no ABIs.
    What do?

    ReplyDelete
  11. Great job bro...helped a lot..

    ReplyDelete
  12. It’s appropriate time to make some plans for the future and it is time to be happy. I have read this post and if I could I wish to suggest you few interesting things or advice. Perhaps you could write next articles referring to this article. I desire to read even more things about it! baixar emulador de android para pc

    ReplyDelete