class_docstr: Hexagon Launcher for Android.
class_docstr_tok: ["Hexagon","Launcher","for","Android","."]
docstr: Abstract method implementation. See description in HexagonLauncherRPC.
docstr_tok: ["Abstract","method","implementation",".","See","description","in","HexagonLauncherRPC","."]
code: def get_profile_output(
      self,
      hex_profiler: HexagonProfiler,
      session: Session,
  ):
      """Abstract method implementation. See description in HexagonLauncherRPC."""
      profile_data = ""
      if hex_profiler.is_lwp_enabled():
          temp_dir = hex_profiler.get_temp_dir()
          remote_path = hex_profiler.get_remote_path()
          if not temp_dir:
              raise RuntimeError("tempdir not passed")
          fname = "lwp.json"
          out_path = os.path.join(remote_path, fname)
          profile_data = temp_dir.relpath(fname)
          ret = session.get_profile_output(
              hex_profiler.get_mode(), fname
          )
          if ret:
              subprocess.check_call(
                  self._adb_device_sub_cmd
                  + ["pull", out_path, profile_data]
              )
          else:
              raise RuntimeError("Error generating profile output")
      elif hex_profiler.profiling_mode == "etm":
          hex_profiler.pull_files_for_etm_processing(self._workspace)
      else:
          raise RuntimeError("Profiling not enabled")
      return profile_data
  
imports: import abc
  import datetime
  import logging
  import multiprocessing
  import os
  import pathlib
  import signal
  import socket
  import stat
  import random
  import string
  import subprocess
  import sys
  import tempfile
  from typing import Union
  from tvm.contrib.hexagon.hexagon_profiler import HexagonProfiler
  from ..._ffi import libinfo
  from .session import Session
  from .tools import HEXAGON_SIMULATOR_NAME
label_desc: Use image node_id 20 for calling the HexagonLauncherAndroid obj's underlying member method code with example usage: obj.get_profile_output(hex_profiler, session) and returns: profile_data