Gaia/Email/SecretDebugMode: Difference between revisions

we no longer have to pretend to be a video file, and the permission is no longer prompted for
(we no longer have to pretend to be a video file, and the permission is no longer prompted for)
Line 55: Line 55:
== Dumping log files to disk ==
== Dumping log files to disk ==


We write log files to device storage so you can grab them via adb.  Unfortunately, device storage is a bit strict about what it allows you to store right now.  So we name our files along the lines of  
We write log files to device storage so you can grab them via adb using the sdcard permissionWe name our files along the lines of  
gem-log-TIMESTAMP.json.rm where "TIMESTAMP" is Date.now().
gem-log-TIMESTAMP.json where "TIMESTAMP" is Date.now().


* (Bring up the secret debug menu)
* (Bring up the secret debug menu)
* Press the button labeled "Dump log to storage".  You know it heard you because it will bring up an annoying 'device-storage:videos' prompt.
* Press the button labeled "Dump log to storage".
* click yes on the permission to write to device-storage:videos.
* Your file should now be named gem-log-TIMESTAMP.json and be in devicestorage somewhere.  There should be a console.log that tells you the path to the file that was logged.
* Your file should now be named gem-log-TIMESTAMP.json.rm and be in devicestorage somewhere.


== Getting the log files out ==
== Getting the log files out ==
Line 72: Line 71:
    
    
   # maybe grep instead of
   # maybe grep instead of
   logpath=`adb shell ls /mnt/sdcard/gem-log-*.3gp | head -1 | tr -d '\n\r'`
   logpath=`adb shell ls /mnt/sdcard/gem-log-*.json | head -1 | tr -d '\n\r'`
   echo I am grabbing: $logpath
   echo I am grabbing: $logpath
   adb pull ${logpath} /tmp/gem-log.json
   adb pull ${logpath} /tmp/gem-log.json
Line 84: Line 83:
    
    
   # maybe grep instead of
   # maybe grep instead of
   logpath=`ls ~/Videos/gem-log-*.3gp | head -1 | tr -d '\n\r'`
   logpath=`ls ~/Videos/gem-log-*.json | head -1 | tr -d '\n\r'`
   echo I am grabbing: $logpath
   echo I am grabbing: $logpath
   mv ${logpath} /tmp/gem-log.json
   mv ${logpath} /tmp/gem-log.json
Confirmed users
360

edits