RxLogger APIs

RxLogger 13.0

Overview

The functionality of RxLogger can be controlled using Android intents within a third-party application.


Enable RxLogger

Initiates data collection for all enabled modules, equivalent to tapping the Start button. Special instructions apply when RxLogger is operated in Secure Mode.

Intent:

    com.symbol.rxlogger.intent.action.ENABLE

Secure Mode

To enable RxLogger in Secure Mode, use one of the following methods:

  • Enable RxLogger via shell command:

    com.symbol.rxlogger.intent.action.ENABLE_SHELL
    
  • Enable RxLogger via third-party app:

    com.symbol.rxlogger.intent.action.ENABLE -e "token" "<token-id>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Enable Status

Informs the third-party app that RxLogger has begun capturing logs. RxLogger sends this acknowledgment intent once it enters the running state.

Intent:

    com.symbol.rxlogger.intent.action.ENABLE_STATUS

Disable RxLogger

Stops data collection for all modules; the equivalent of tapping the Stop button. Special instructions apply when RxLogger is operated in Secure Mode.

Intent:

    com.symbol.rxlogger.intent.action.DISABLE

Secure Mode

To disable RxLogger in Secure Mode, use one of the following methods:

  • Disable RxLogger via shell command:

    com.symbol.rxlogger.intent.action.DISABLE_SHELL
    
  • Disable RxLogger via third-party app:

    com.symbol.rxlogger.intent.action.DISABLE -e "token" "<token-id>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


Disable Status

Informs the third-party app that RxLogger has stopped capturing logs. RxLogger sends this acknowledgment intent once it stops log capture.

Intent:

    com.symbol.rxlogger.intent.action.DISABLE_STATUS

BackupNow

Triggers a backup of the log files in the RxLogger folder, compressing them into a zip file named Backup-<date>-<HHMMSS>.zip, where <date>-<HHMMSS> represents the date time stamp. Special instructions apply when RxLogger is operated in Secure Mode.

Intent:

    com.symbol.rxlogger.intent.action.BACKUP_NOW

Secure Mode

To trigger a backup in secure mode, use one of the following methods:

  • BackupNow via shell command:

    com.symbol.rxlogger.intent.action.BACKUP_NOW_SHELL  -e "password" "<password>"
    
  • BackupNow via third-party app:

    com.symbol.rxlogger.intent.action.BACKUP_NOW -e "token" "<token-id>" -e "password" "<password>"
    

    A token must be passed as an extra in the intent. Replace <token-id> with the token obtained, see Third-Party App Token Request.


BackupNow Status

Provides the status of the backup operation. RxLogger sends an acknowledgment intent to convey the backup status, including extras such as status, message and the absolute path of the backup zip file. These extras vary based on whether Secure Mode is enabled.

Intent:

    com.symbol.rxlogger.intent.action.BACKUP_NOW_STATUS

Non-secure (Legacy) RxLogger:

Extra Success Message Failure Message
status success failed
message Backup Success Backup Failed
filepath /sdcard/rxlogger/Backup-<date>-<HHMMSS>.zip null


Secure RxLogger:

Extra Success Message Failure Message
status success failed
message Backup Success Backup Failed
filepath /<Secure_RxLogger_Path>/SecureBackup-<date>-<HHMMSS>.zip

Where "<Secure_RxLogger_Path>" represents one of the following:
   • Internal storage path: /sdcard/Android/data/com.symbol.rxlogger/RxLogger/secure/log_data/
   • External storage path: /storage/<UUID>/Android/data/com.symbol.rxlogger/RxLogger/secure/log_data/
null

Remote Info Logging

In the event of a failure with remote intents while in Secure Mode, error information can be found in the RxError.txt file.

Starting with RxLogger v13.0.12.69, this file is renamed toRxInfo.txt and contains both success and error information.

Error details may include instances where remote intents failed to start, stop, or back up RxLogger. The error file is located in either of the following folders:

  • Internal storage path: /sdcard/RxLogger/
  • External storage path: /storage/<UUID>/RxLogger/ (where <UUID> is the device's unique identifier)

Third-Party Token Request

When secure mode is activated, any third-party app trying to start/stop RxLogger or trigger a backup via intent must include a token as an extra within the intent. This token is obtained via any of the following methods:

  • Zebra Device Manager with delegation scope
    • The keys for the token and password are “token” and “password” respectively.
    • The delegation scope is delegation-zebra-com-symbol-secure-rxlogger.
  • Access Manager in StageNow:
    • The package name, signature and service identifier (for Android 13 or higher: delegation-zebra-com-symbol-secure-rxlogger) must be granted access through Service Access Action.

Follow this procedure to request the token and send an intent with the token as an extra:

  1. Download the library BroadcastProtectionLibrary.aar and import it into your application project.

    import com.zebra.security.broadcastprotection.BroadCastAuthenticator;
    
  2. Instantiate BroadCastAuthenticator() in your activity, fragment or service.

    BroadCastAuthenticator vIntentprotect=new BroadCastAuthenticator();
    
  3. Add the following code in the onCreate() method:

    vIntentprotect.initialize(getApplicationContext());
    
  4. If your application needs to request a token, call the getToken() API:

    String token=vIntentprotect.getToken("delegation-zebra-com-symbol-secure-rxlogger");
    
  5. Send the required intent along with the token as extras:

    Intent intent = new Intent();
    intent.setAction("<specify_intent>");
    intent.putExtra("token", token);
    sendBroadcast(intent);
    

    Replace <specify_intent> with the intent to send, e.g. com.symbol.rxlogger.intent.action.ENABLE or com.symbol.rxlogger.intent.action.BACKUP_NOW.

  6. Add the following code in the onDestroy() method:

    vIntentprotect.terminate();
    

Reset to Default

This resets RxLogger settings to their default values across all modules. Special instructions apply when RxLogger is in Secure Mode.

Select the method to perform a reset to default based on whether secure mode is enabled:

  • Standard Method (Non-secure) - Send an intent:

    com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT
    
  • Secure Method - Choose one of the following:

    • AppOps (Recommended) - Send an intent from a third-party app:

      com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT 
      
    • App Token - Send an intent with a token from a third-party app, replacing <token-id> with the obtained token (see App Token):

      com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT  -e "token" "<token-id>"
      
    • Shell Command - Execute the following command:

      com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT_SHELL
      

Status

This intent notifies the third-party app that RxLogger settings have been restored to their default state. RxLogger dispatches this acknowledgment intent upon completing the reset process.

Intent:

    com.symbol.rxlogger.intent.action.RESET_TO_DEFAULT_STATUS 

Delete Logs

This removes logs located in the RxLogger folder. Special instructions apply when RxLogger is in Secure Mode.

Select the method to delete logs based on whether secure mode is enabled:

  • Standard Method (Non-secure) - Send an intent:

    com.symbol.rxlogger.intent.action.DELETE_LOGS -e logType <logType>
    

    Replace <logType> with one of the following values:

    • 0 - (default) Delete all logs and backup files
    • 1 - Delete only log files
    • 2 - Delete only backup files Any other value or absence of this value defaults to deleting all files.
  • Secure Method - Choose one of the following:

    • AppOps (Recommended) - Send an intent from a third-party app:

      com.symbol.rxlogger.intent.action.DELETE_LOGS  -e logType <logType>
      
    • App Token - Send an intent with a token from a third-party app, replacing <token-id> with the obtained token (see App Token):

      com.symbol.rxlogger.intent.action.DELETE_LOGS   -e "token" "<token-id>" -e logType <logType>
      
    • Shell Command - Execute the following command:

      com.symbol.rxlogger.intent.action.DELETE_LOGS _SHELL -e logType <logType>
      

    Replace <logType> with one of the following values:

    • 0 - (default) Delete all logs and backup files
    • 1 - Delete only log files
    • 2 - Delete only backup files Any other value or absence of this value defaults to deleting all files.

Status

This intent notifies the third-party app that the RxLogger logs have been deleted. RxLogger issues this acknowledgment after completing the deletion process.

Intent:

    com.symbol.rxlogger.intent.action.DELETE_LOGS_STATUS  

Bug Report

This initiates the process of generating a bug report, providing comprehensive diagnostic information to aid in troubleshooting and performance analysis. Special instructions apply when RxLogger operates in Secure Mode.

Select the method to delete logs based on whether secure mode is enabled:

  • Standard Method (Non-secure) - Send an intent:

    com.symbol.rxlogger.intent.action.RX_BUGREPORT
    
  • Secure Method - Choose one of the following:

    • AppOps (Recommended) - Send an intent from a third-party app:

      com.symbol.rxlogger.intent.action.RX_BUGREPORT 
      
    • App Token - Send an intent with a token from a third-party app, replacing <token-id> with the obtained token (see App Token):

      com.symbol.rxlogger.intent.action.RX_BUGREPORT -e "token" "<token-id>"
      
    • Shell Command - Execute the following command:

      com.symbol.rxlogger.intent.action.RX_BUGREPORT_SHELL
      

Status

This intent alerts the third-party app that RxLogger has successfully generated the bug report. RxLogger issues this acknowledgment once the bug report is generated.

Intent:

    com.symbol.rxlogger.intent.action.RX_BUGREPORT_STATUS