AndroidHooker / hooker

Hooker is an opensource project for dynamic analyses of Android applications. This project provides various tools and applications that can be use to automaticaly intercept and modify any API calls made by a targeted application.
GNU General Public License v3.0
408 stars 109 forks source link

ERROR: No module named colorama #4

Open gbossert opened 9 years ago

gbossert commented 9 years ago

Reported by @Ratibhan

cd hooker_xp && python hooker_xp.py -c /home/ratibhan/hooker-master/hooker_xp/sampleAutomaticAnalysis.conf

I have completed all steps, but during execution last command given in README.MD, i got following error, Please tell me the way to resolve it?

ERRROR: No module named colorama

gbossert commented 9 years ago

This error means you need the python library called "colorama". It should have been installed at least with the hooker_common lib. Did you execute the install.sh script ?

In the meantime, you can install this module using pip:

pip install colorama

Ratibhan commented 9 years ago

Yes, I executed install.sh, but i didn't install python library called "colorama" explicitly .

Ratibhan commented 9 years ago

We have installed the Superuser and substrate apk files to root the emulator. Is there any specific necessity to root the emulator and then only run apk files.

I have seen few dynamic analysis systems not rooting the emulator and generate traces from the executed APK file. If you please let me know it would be great.

thanx

gbossert commented 9 years ago

You must execute the install.sh script with the same user than the one you use to play with the Hooker.

gbossert commented 9 years ago

Yes, our solution requires to root the emulator.

Ratibhan commented 9 years ago

Hi,

I am getting following exception while analysis each app given in Sample App

[PoolWorker-2/MainThread/ERROR] 1110145: Exception while executing an experiment : [Errno 2] No such file or directory: '/home/ratibhan/.android/avd/Emulator_0.avd/snapshots.img.default-boot.ini' [PoolWorker-2/MainThread/ERROR] 1110145: Traceback (most recent call last): File "/home/ratibhan/hooker-master/hooker_xp/hooker_xp/AutomaticAnalysis.py", line 97, in executeExperiment device = Analysis.createDevice(iEmulator, emulatorName, mainConfiguration, analysisConfiguration.backupDirectory) File "/home/ratibhan/hooker-master/hooker_xp/hooker_xp/analysis/Analysis.py", line 143, in createDevice return AVDEmulator(adbNumber, name, mainConfiguration) File "/home/ratibhan/hooker-master/hooker_xp/hooker_xp/device/AVDEmulator.py", line 51, in init self.duplicateAVD() File "/home/ratibhan/hooker-master/hooker_xp/hooker_xp/device/AVDEmulator.py", line 197, in duplicateAVD self.replaceContentInFile(defaultSnapshotConfigFile, refAVDName, self.name) File "/home/ratibhan/hooker-master/hooker_xp/hooker_xp/device/AVDEmulator.py", line 207, in replaceContentInFile with open(fileName, 'r') as fd: IOError: [Errno 2] No such file or directory: '/home/ratibhan/.android/avd/Emulator_0.avd/snapshots.img.default-boot.ini'

[PoolWorker-2/MainThread/ERROR] 1110145: Cannot stop the AVD. Please tell me the way to resolve it?

Ratibhan commented 9 years ago

When i try to trace path manually, found '/home/ratibhan/.android/avd/Emulator_0.avd/snapshots.img

but it search for '/home/ratibhan/.android/avd/Emulator_0.avd/snapshots.img.default-boot.in

so how i can resolve it?