'Is it possible to dump a device hardware profile to create an equivalent AVD?

In Android Studio, when one are going to create a new Android Virtual Device, there are the option to import the Hardware Profile instead of manually fill each device parameter.

enter image description here

I know there are some AVD config repositories around the internet. But, does anyone know if it is possible to generate the file to be imported based on a plugged device? Maybe via adb command?



Solution 1:[1]

You need to mount your device filesystem, then use a list of shell command to scrap all information we need from different config file.

CPU, Partitionning, RAM size, flash memory size, screen size, android version etc...

Then build your own Hardware Profile using the results of all previous commands.

Solution 2:[2]

Just right click the profile that you want to export in the "Create virtual device" window, and the option to export your hardware profile as an xml shows up

Solution 3:[3]

You should be able to click New AVD, then right-click a Hardware Profile, then click Clone.

Solution 4:[4]

To create an AVD starting with a copy

  1. From the Virtual tab of the Device Manager, click Menu and select Duplicate.

    The Verify Configuration page appears.

  2. Click Change or Previous if you need to make changes on the System Image and Select Hardware pages

  3. Make your changes, and then click Finish.

    The AVD appears in the Virtual tab of the Device Manager.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 A STEFANI
Solution 2 Teodor Hurtigh
Solution 3
Solution 4 Paresh Mangukiya