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

Error 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 the following platforms and RxLogger versions, this file is renamed toRxInfo.txt:

  • Android 13 on all platforms - RxLogger 13.0.12.69
  • Android 11 on SD660 platform - RxLogger v7.0.4.43
  • Android 11 on SM6375 platform - RxLogger v7.75.5.49
  • Android 11 on QC6490 platform - RxLogger v7.0.5.38

Refer to Zebra Platform Devices list.

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();