10.07.2015 Views

dissertation

dissertation

dissertation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}}Bundle e x t r a s = i n t e n t . g e t E x t r a s ( ) ;boolean usbConnected =e x t r a s . getBoolean ( UsbManager .USB CONNECTED) ;boolean adbEnabled =e x t r a s . g e t S t r i n g ( UsbManager .USB FUNCTION ADB). e q u a l s ( UsbManager .USB FUNCTION ENABLED ) ;a c t i v i t y . addLogMessage (” onReceive ( ” + i n t e n t . getAction ( ) + ” ) : ” +( usbConnected ? ”” : ” d i s ” ) + ” connected , ” +( adbEnabled ? ”ADB on” : ”ADB o f f ” ) ) ;a c t i v i t y . addLogMessage (” Extras : ” + e x t r a s . keySet ( ) . t o S t r i n g ( ) ) ;} else {a c t i v i t y . addLogMessage (” onReceive ( ” + i n t e n t . getAction ( ) + ” ) ” ) ;}C.1.6USBUeventObserver.javapackage uk . ac . g l a . a r t s . h a t i i . usbmonitor ;import android . os . UEventObserver ;public class USBUeventObserver extends UEventObserver {}/∗∗∗ The a c t i v i t y t h a t s t a r t e d us .∗/private USBMonitorActivity a c t i v i t y = null ;public USBUeventObserver ( USBMonitorActivity parent ) {a c t i v i t y = parent ;}@Overridepublic void onUEvent ( UEvent event ) {// UEventObservers run in t h e i r own i m p l i c i t// thread , and cannot touch t h e UI by t h e m s e l v e s .// Post a message to t h e a c t i v i t y to have t h e UI// t h r e a d add t h e l o g message f o r us .a c t i v i t y . addLogMessageFromOtherThread (”UEvent : ” + event . t o S t r i n g ( ) ) ;}C.2 Instrumentation of contacts providerThis is the code which instruments the contacts provider, providing a logof the calls made from forensics tools. It is provided as a patch on top ofCyanogenMod. The original CyanogenMod source code repository is availableat git://github.com/CyanogenMod/69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!