Is there any way to configure emulator in Android Studio?

Viewed 35

I am doing a project about Android forensics where I need to dump data from android devices so I am using emulator from android studio. using android version 8.1.0. I am following a repo from github here's the link;https://github.com/mspreitz/ADEL In order to dump file the prerequisite is to add configuration in the xml folder sub directory named https://github.com/mspreitz/ADEL/blob/master/xml/phone_configs.xml But I cant find any way to configure the emulator... if anyone could enlighten me will appreciate a lot I have successfully ran the scripts but unable to dump database.the scripts runs ..the code to run '' python adel.py -d emulator-5554'''. I have tried it already but the problem here is the script is unable to dump database for instance: calendar data, contacts data, call logs though I have created these databases and stored it on the emulator when the scripts run it shows " Calendar database doesn't exist" " Contacts database doesn't exist" " database doesn't exist" " mms/sms database doesn't exist"

The code for dumping the contacts database is given :

if float(os_version) < 2.0:
    contactsdb_name = "contacts.db"

else:
    contactsdb_name = "contacts2.db"

try:
    contactsdb = subprocess.Popen(['adb', 'pull', '/data/data/com.android.providers.contacts/databases/' +                                       contactsdb_name, backup_dir], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)

    contactsdb.wait()

    _adel_log.log(contactsdb_name + " -> " + 
contactsdb.communicate(0)[1].split("(")[1].split(         
")")[0] + " -> " + hashlib.sha256(backup_dir + 
 "/contacts2.db").hexdigest(), 3)    
 hash_value.write(contactsdb_name + " -> " + hashlib.sha256(
 backup_dir + "/" + contactsdb_name).hexdigest() + " \n")


except:
      _adel_log.log(  "dumpDBs:       ----> contacts 
      database doesn't exist!", 2)

https://github.com/mspreitz/ADEL/blob/master/_dumpFiles.py this is the link of the full script.

1 Answers

If you config the device as

<phone device="emulator" model="sdk" os_version="8">
            <smartphone_information>
...
</phone>

you should be able to use the emulator. Otherwise post the specific error you are receiving.

Related