Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help #13

Closed
dinasaif opened this issue Apr 7, 2016 · 11 comments
Closed

help #13

dinasaif opened this issue Apr 7, 2016 · 11 comments

Comments

@dinasaif
Copy link

dinasaif commented Apr 7, 2016

Thanks for your amazing project it is what I search for but I use it in windows7 is there any video or tutorial to explain run and test in windows 7 ?
I have some qusitions
1- Is it make static and dynamic analysis for android applications and send report for me (Permissions and APIs used in app)?
2- I installed :
Python version 2.7
Android SDK,and add platform_tools and tools to PATH
androidviewclient
then install droidbot :
git clone https://github.com/lynnlyc/droidbot.git
pip install -e droidbot
and start it : droidbot -h
but when write this command :
droidbot-script.py -d 5554 -a C:\Python27\Scripts\droidbot\app-debug.apk
this message appear:

INFO:Device:waiting for device
Connecting to a device with serialno=5554 with a timeout of 60 secs...
Traceback (most recent call last):
File "C:\Python27\Scripts\droidbot-script.py", line 9, in
load_entry_point('droidbot', 'console_scripts', 'droidbot')()
File "c:\users\hp\droidbot\droidbot\start.py", line 79, in main
quiet=opts.quiet)
File "c:\users\hp\droidbot\droidbot\droidbot.py", line 47, in init
self.device = Device(device_serial, output_dir=self.output_dir)
File "c:\users\hp\droidbot\droidbot\droidbot_types.py", line 57, in init
self.connect()
File "c:\users\hp\droidbot\droidbot\droidbot_types.py", line 138, in connect
self.get_adb()
File "c:\users\hp\droidbot\droidbot\droidbot_types.py", line 186, in get_adb
self.adb, self.serial = ViewClient.connectToDeviceOrExit(verbose=True,serial
no=self.serial)
File "C:\Python27\lib\site-packages\androidviewclient-11.5.1-py2.7.egg\com\dtm
ilano\android\viewclient.py", line 2669, in connectToDeviceOrExit
device = adbclient.AdbClient(serialno, ignoreversioncheck=ignoreversioncheck
, timeout=timeout)
File "C:\Python27\lib\site-packages\androidviewclient-11.5.1-py2.7.egg\com\dtm
ilano\android\adb\adbclient.py", line 171, in init
self.__setTransport()
File "C:\Python27\lib\site-packages\androidviewclient-11.5.1-py2.7.egg\com\dtm
ilano\android\adb\adbclient.py", line 333, in __setTransport
raise RuntimeError("ERROR: couldn't find device that matches '%s' in %s" % (
self.serialno, devices))
RuntimeError: ERROR: couldn't find device that matches '5554' in [<com.dtmilano.
android.adb.adbclient.Device instance at 0x0000000003326748>]

Note that the emulator is run and 5554 is the serial no of it , what is the problem ?
and if it run where the result report will appear ?
3- Is it necessary to setup docker and droidbox? what is benefits from that I setup docker in windows but it doesn't work there is aproblem in connection and I can't run droidbox emulator in windows .
Thanks for your help and I'm sorry for waste your time

@yuanchun-li
Copy link
Collaborator

Hi, the serial no is what you see by typing "adb devices", which might be "emulator-5554" in your case.

The evaluation report is generated by evaluation_scripts/DroidbotEvaluator.py, which requires droidbox being installed.
I don't understand why can't you run droidbox in windows, it worked for me :).

@dinasaif
Copy link
Author

dinasaif commented Apr 7, 2016

thanks for your answer the msg now is:
INFO:Device:waiting for device
Connecting to a device with serialno=emulator-5554 with a timeout of 60 secs...
Connected to device with serialno=emulator-5554
Actual device serialno=emulator-5554
INFO:DroidBot:Starting DroidBot
INFO:AppEnvManager:start deploying environment, policy is none
INFO:AppEventManager:start sending events, policy is none
press ENTER to save current state, type q to exit...
INFO:Device:getting current device state...
WARNING:Device:You have to install PIL to use takeSnapshot()
press ENTER to save current state, type q to exit...
what should i do now?
How droidbox run in windows I download DroidBox411RC and extract it what can I do after that ?
you didn't use linux in your analysis only windows
thanks alot but I realy need your help I tried your project for days ago but I can't reach to the result

@yuanchun-li
Copy link
Collaborator

select an event mode.
For example,
droidbot -d emulator-5554 -a XXX.apk -event dynamic

@dinasaif
Copy link
Author

dinasaif commented Apr 7, 2016

woooooooooooooooooow Yes It works for me then how to stop this test and how to get the result with permissions and APIs
Thank you very very much

@yuanchun-li
Copy link
Collaborator

To stop testing, type ctrl+C.
To generate the report you need to run evaluation_scripts/DroidbotEvaluator.py with droidbox.
Note that the report is not a production of DroidBot, instead it is just what I used to compare DroidBot with Monkey.

@dinasaif
Copy link
Author

dinasaif commented Apr 8, 2016

when I write this command in Git to Create avd Start the avd with droidbox image
$ sh startemu.sh droidbox
this message appear
PANIC: Could not find droidbox.ini file in $ANDROID_AVD_HOME nor in $HOME/.android/avd
I don't understand how to Create an avd named droidbox
or use android avd manager or use android create avd command.
and Start the avd with droidbox image in windows 7 , you said you do that how can you do that with details please

@dinasaif
Copy link
Author

dinasaif commented Apr 8, 2016

now I write this command
$ sh startemu.sh Nexus_6_API_21_4
the emulator start but with only black screen and this msg :
$ Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
WARNING: userdata image already in use, changes will not persist!
WARNING: cache image already in use, changes will not persist!
WARNING: SD Card image already in use: C:\Users\hp.android\avd\Nexus_6_API_21_4.avd/sdcard.img
emulator: device fd:692

emulator: The memory needed by this VM exceeds the driver limit.

HAX is not working and emulator runs in emulation mode
creating window 54 57 345 612

@dinasaif
Copy link
Author

dinasaif commented Apr 9, 2016

Hi,
I want to know how can I run droidbox plz in windows7
I want the report for static & dynamic analysis

I write this command
$ sh startemu.sh Nexus_6_API_21_4
the emulator start but with only black screen and this msg :
$ Creating filesystem with parameters:
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
WARNING: userdata image already in use, changes will not persist!
WARNING: cache image already in use, changes will not persist!
WARNING: SD Card image already in use:
C:\Users\hp.android\avd\Nexus_6_API_21_4.avd/sdcard.img
emulator: device fd:692

emulator: The memory needed by this VM exceeds the driver limit.

HAX is not working and emulator runs in emulation mode
creating window 54 57 345 612

and when write this command:

python DroidboxEvaluator.py -d emulator-5554 -a app-debug.apk

the result is:

INFO:DroidboxEvaluator:Evaluator initialized

INFO:DroidboxEvaluator:apk_path:C:\Python27\Scripts\droidbot\evaluation_scripts\

app-debug.apk

duration:200

count:200

inteval:2

report title:Evaluation_Report_2016-04-09_2009 // I can't find this report

INFO:DroidboxEvaluator:evaluating [1.default] mode

Exception in thread Thread-1:

Traceback (most recent call last):

File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner

self.run()

File "C:\Python27\lib\threading.py", line 754, in run

self.__target(*self.__args, **self.__kwargs)

File "DroidboxEvaluator.py", line 153, in default_mode

self.droidbox.set_apk(self.apk_path)

File "c:\users\hp\droidbot\droidbox_scripts\droidbox.py", line 128, in
set_apk

cwd=os.path.dirname(os.path.realpath(__file__)))

File "C:\Python27\lib\subprocess.py", line 522, in call

return Popen(*popenargs, **kwargs).wait()

File "C:\Python27\lib\subprocess.py", line 710, in init

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 958, in _execute_child

startupinfo)

WindowsError: [Error 2] The system cannot find the file specified

what's wrong with me???????????

On Thu, Apr 7, 2016 at 11:43 AM, Lynn notifications@github.com wrote:

To stop testing, type ctrl+C.
To generate the report you need to run
evaluation_scripts/DroidbotEvaluator.py with droidbox.
Note that the report is not a production of DroidBot, instead it is just
what I used to compare DroidBot with Monkey.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#13 (comment)

@yuanchun-li
Copy link
Collaborator

It seems you didn't boot up DroidBox correctly, and perhaps there is something wrong in your emulator configuration.
However, it is inappropriate to talk about DroidBox configuration here.
I'm going to close this issue, but maybe I can help you in private.

@dinasaif
Copy link
Author

Thanks for your reply can you help me in private I want to ask you some
questions you are very Collaborator.😃

On Thu, Apr 14, 2016 at 3:14 AM, Lynn notifications@github.com wrote:

Closed #13 #13.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#13 (comment)

@yuanchun-li
Copy link
Collaborator

My pleasure.
It seemed you have trouble booting DroidBox, could you describe the issue in more detail?
My email address is pkulyc@gmail.com mailto:pkulyc@gmail.com

On Apr 18, 2016, at 18:02, dinasaif <notifications@github.com mailto:notifications@github.com> wrote:

Thanks for your reply can you help me in private I want to ask you some
questions you are very Collaborator.😃

On Thu, Apr 14, 2016 at 3:14 AM, Lynn <notifications@github.com mailto:notifications@github.com> wrote:

Closed #13 <#13 #13>.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
<#13 (comment) #13 (comment)>


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub #13 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants