- Download and untar PocketData Log file from https://www.phone-lab.org/experiment/request/
- Say the $LOG_BASE_LOC is the 'logcat' folder of untared tar file.
- NOTE: 1. Just extract the tar ball. You shouldn't extract each and every .gz log files. 2. PhoneDataParser app automatically reads the .gz files.
- Clone the git repo to your local machine. Say the cloned location is $PHONE_DATA_PARSER_BASE
The application is tested with the following
- Apache ANT version 1.9.4 (The code may work in lower version of ANT)
- Oracle Java 1.8.0_20 (The code may work on 1.7 but has not been extensively tested)
- Mac OS-X (The code does support Windows but haven't been extensively tested on a Windows PC)
- cd to $PHONE_DATA_PARSER_BASE/java/PhoneDataParser
- ant clean
- ant
- Note: default task in ant is build.
- PhoneDataParser.jar should be built in $PHONE_DATA_PARSER_BASE/java/PhoneDataParser/dist
- Mac
java -jar dist/PhoneDataParser.jar --help
- Windows PC
java -classpath lib/*;dist/PhoneDataParser.jar edu.ub.tbd.Main --help
- cd to $PHONE_DATA_PARSER_BASE/java/PhoneDataParser
OBJECT_GEN mode reads from PocketData Log files and creates JSQLParser Objects. This Phase should be run at least once before running PhoneDataParser in any other mode.
java -jar dist/PhoneDataParser.jar --mode obj_gen --objects schemagen --src $LOG_BASE_LOC
- Note: The Object files created using the flag --mode obj_gen can only be used for SCHEMA_GEN as it parses only unique SQLs
- You can parse all SQLs by the flag --mode full (This might take 6.5 hrs)
- --dest This flag can be added to change where the destination files have to go. By default it is OUTPUT folder in the same location.
SCHEMA_GEN mode reads the Object files created in OBJECT_GEN mode and creates SCHEMA.xml file.
java -jar dist/PhoneDataParser.jar --mode schema_gen --src OUTPUT
Note: This is assuming --dest in OBJECT_GEN mode was OUTPUT