Hi,
As a follow up to my question, I have finally managed to run apk activities correctly. For future reference, to run apk in gem5 we need todo the following: 1) get the package_name and activity_name 2) am start -n package_name/.activity_name package_name and activity_name can be obtained from AndroidMainfest.xml (this file is inside the apk file), to decrypt this file, we can use a tool like apktool However, I still have a problem in deciding which activity to run. Usually, most of the apks I am trying to run, has several activities, so which one to run? also, there are some activities that require user interaction, how can I feed in inputs for these activities knowing that connecting to VNC displays the GUI interface but it take too long for a click to be recognized ? Best Regards, Rana ________________________________ From: Rana Elnaggar Sent: Monday, December 11, 2017 2:06:42 PM To: [email protected] Subject: Re: Problem with running apk on gem5-android Hi, As a follow up to my previous problem. I tried another command to run apk. I tried the following am start -a android.intent.action.VIEW -n /system/app/.Calculator The error I get this time is as follows: Starting: Intent {act=android.intent.action.VIEW cmp=/system/app/.Calculator Error type 3 Error: Activity class {/system/app/.Calculator} does not exist I found that some one before had the same issue, but the solution was not mentioned. I was wondering what is the correct way of calling apks in gem5. Best Regards, Rana ________________________________ From: Rana Elnaggar Sent: Monday, December 11, 2017 2:48:20 AM To: [email protected] Subject: Re: Problem with running apk on gem5-android Hi, As a follow up to my previous message, I waited for sometime, and then tried again am start -a android.intent.action.VIEW -n Calculator.apk from inside system/app The error that I get now is : Error Bad component name Calculator.apk I have tried with other apks that I copied and pasted when I mounted the disk image to system/app and the same error appears. Any suggestions on how to run the apk correctly ? Best Regards, Rana ________________________________ From: Rana Elnaggar Sent: Monday, December 11, 2017 12:01:50 AM To: [email protected] Subject: Problem with running apk on gem5-android Hi, I am trying to run applications.apk on gem5-android on arm. I used gem5 from this directory: https://github.com/gem5/gem5 I used the following command to boot android: ./build/ARM/gem5.opt configs/example/fs.py --os-type=android-ics --kernel=./system/binaries/vmlinux.smp.mouse.arm --disk-image=./system/disks/ARMv7a-ICS-Android-rgwb.SMP.nolock.img --machine-type=RealView_PBX --frame-capture --mem-size=256MB --l2cache --caches I tried different android images from here: https://mobilebench.engineering.asu.edu/gem5-images/ Whenever I run an application using e.g am start -a android.intent.action.VIEW -n Calculator.apk I get Error type 2 android.util.AndroidException: Can't connect to activity manager; is the system running? When I searched the previous posts on this error, I found that it is due to unloaded background android services and that we have to wait for them to be loaded. I was wondering if there is a work around this issue or any updated batch to get around this problem or whether I am missing a certain step. Best Regards, Rana
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
