X-Ray is a powerful capabilty provided by Mason that gives you a view into your production devices for debugging.
X-Ray and ADB
X-Ray is built on top of
adb, the Android Debug Bridge. This suite of tools provides powerful access to any provisioned Mason device, giving you remote access to the device and the power of the tooling
One of the most commonly used tools in
adb is called
logcat, which provides a steam of global logs across the entire system.
Looking for a walkthrough on
adb? Visit our guide for using ADB on a Mason devkit
The Mason CLI wraps
adb logcat so that you can remotely access your production devices. The command
mason xray logcat gives you the power of
adb across your entire fleet of devices.
Collecting logs from a Production device
mason xray logcat on a Mason device can give you insights into CPU power states, network changes, and other details that are relevant to application performance and stability.
The logs provided by the command
mason xray logcat also include logs from the applications you've deployed to your devices, helping you debug repeated crash loops or unexpected behavior.
For more detailed logs, try using the
mason xray bugreportcommand. Visit our CLI documentation to learn more
Navigating the file system of a Production device
Another common use of
adb is working with the Android file system. Being based on Linux, Android follows its conventions. For example,
/ is the root of the file system, similar to
C:/ in Windows.
You can use the Mason CLI command
mason xray shell to navigate the directories on a production device.
Important directories to note
/sdcard directory is where user-accessible files are stored
- If an app takes a picture, it will be saved to
- If a user downloads a file, it will be saved to
/data directory is where apps store their private data
- Authentication credentials and database configs live here
On a production Mason device, you will not have access to
/data, even for your own app, for security reasons
Interacting with files on a Production device
X-Ray gives you the ability to put files on your devices with the
mason xray push command or download files with the
mason xray pull command.
push allows you to move files on to your production device.
pull allows you to copy files from your production device.