#!/usr/bin/env python3
# Copyright (C) 2024 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# DO NOT EDIT. Auto-generated by tools/gen_amalgamated_python_tools
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

import argparse
import os
import re
import sys
import tempfile
import time


# ----- Amalgamator: begin of python/perfetto/prebuilts/perfetto_prebuilts.py
# Copyright (C) 2021 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Functions to fetch pre-pinned Perfetto prebuilts.

This function is used in different places:
- Into the //tools/{trace_processor, traceconv} scripts, which are just plain
  wrappers around executables.
- Into the //tools/{heap_profiler, record_android_trace} scripts, which contain
  some other hand-written python code.

The manifest argument looks as follows:
TRACECONV_MANIFEST = [
  {
    'arch': 'mac-amd64',
    'file_name': 'traceconv',
    'file_size': 7087080,
    'url': https://commondatastorage.googleapis.com/.../trace_to_text',
    'sha256': 7d957c005b0dc130f5bd855d6cec27e060d38841b320d04840afc569f9087490',
    'platform': 'darwin',
    'machine': 'x86_64'
  },
  ...
]

The intended usage is:

  from perfetto.prebuilts.manifests.traceconv import TRACECONV_MANIFEST
  bin_path = get_perfetto_prebuilt(TRACECONV_MANIFEST)
  subprocess.call(bin_path, ...)
"""

import hashlib
import os
import platform
import random
import subprocess
import sys


def download_or_get_cached(file_name, url, sha256):
  """ Downloads a prebuilt or returns a cached version

  The first time this is invoked, it downloads the |url| and caches it into
  ~/.local/share/perfetto/prebuilts/$tool_name. On subsequent invocations it
  just runs the cached version.
  """
  dir = os.path.join(
      os.path.expanduser('~'), '.local', 'share', 'perfetto', 'prebuilts')
  os.makedirs(dir, exist_ok=True)
  bin_path = os.path.join(dir, file_name)
  sha256_path = os.path.join(dir, file_name + '.sha256')
  needs_download = True

  # Avoid recomputing the SHA-256 on each invocation. The SHA-256 of the last
  # download is cached into file_name.sha256, just check if that matches.
  if os.path.exists(bin_path) and os.path.exists(sha256_path):
    with open(sha256_path, 'rb') as f:
      digest = f.read().decode()
      if digest == sha256:
        needs_download = False

  if needs_download:  # The file doesn't exist or the SHA256 doesn't match.
    # Use a unique random file to guard against concurrent executions.
    # See https://github.com/google/perfetto/issues/786 .
    tmp_path = '%s.%d.tmp' % (bin_path, random.randint(0, 100000))
    print('Downloading ' + url)
    subprocess.check_call(['curl', '-f', '-L', '-#', '-o', tmp_path, url])
    with open(tmp_path, 'rb') as fd:
      actual_sha256 = hashlib.sha256(fd.read()).hexdigest()
    if actual_sha256 != sha256:
      raise Exception('Checksum mismatch for %s (actual: %s, expected: %s)' %
                      (url, actual_sha256, sha256))
    os.chmod(tmp_path, 0o755)
    os.replace(tmp_path, bin_path)
    with open(tmp_path, 'w') as f:
      f.write(sha256)
    os.replace(tmp_path, sha256_path)
  return bin_path


def get_perfetto_prebuilt(manifest, soft_fail=False, arch=None):
  """ Downloads the prebuilt, if necessary, and returns its path on disk. """
  plat = sys.platform.lower()
  machine = platform.machine().lower()
  manifest_entry = None
  for entry in manifest:
    # If the caller overrides the arch, just match that (for Android prebuilts).
    if arch:
      if entry.get('arch') == arch:
        manifest_entry = entry
        break
      continue
    # Otherwise guess the local machine arch.
    if entry.get('platform') == plat and machine in entry.get('machine', []):
      manifest_entry = entry
      break
  if manifest_entry is None:
    if soft_fail:
      return None
    raise Exception(
        ('No prebuilts available for %s-%s\n' % (plat, machine)) +
        'See https://perfetto.dev/docs/contributing/build-instructions')

  return download_or_get_cached(
      file_name=manifest_entry['file_name'],
      url=manifest_entry['url'],
      sha256=manifest_entry['sha256'])


def run_perfetto_prebuilt(manifest):
  bin_path = get_perfetto_prebuilt(manifest)
  if sys.platform.lower() == 'win32':
    sys.exit(subprocess.check_call([bin_path, *sys.argv[1:]]))
  os.execv(bin_path, [bin_path] + sys.argv[1:])

# ----- Amalgamator: end of python/perfetto/prebuilts/perfetto_prebuilts.py

PERMSISION_REGEX = re.compile(r'''uses-permission: name='(.*)'.*''')
NAME_REGEX = re.compile(r'''package: name='(.*?)' .*''')


def cmd(args: list[str]):
  print('Running command ' + ' '.join(args))
  return subprocess.check_output(args)


def main():
  parser = argparse.ArgumentParser()
  parser.add_argument('--apk', help='Local APK to use instead of builtin')

  args = parser.parse_args()

  if args.apk:
    apk = args.apk
  else:
    apk = download_or_get_cached(
        'CtsPerfettoReporterApp.apk',
        'https://storage.googleapis.com/perfetto/CtsPerfettoReporterApp.apk',
        'f21dda36668c368793500b13724ab2a6231d12ded05746f7cfaaba4adedd7d46')

  # Figure out the package name and the permissions we need
  aapt = subprocess.check_output(['aapt', 'dump', 'badging', apk]).decode()
  permission_names = []
  name = ''
  for l in aapt.splitlines():
    name_match = NAME_REGEX.match(l)
    if name_match:
      name = name_match[1]
      continue

    permission_match = PERMSISION_REGEX.match(l)
    if permission_match:
      permission_names.append(permission_match[1])
      continue

  # Root and remount the device.
  cmd(['adb', 'root'])
  cmd(['adb', 'wait-for-device'])
  cmd(['adb', 'remount', '-R'])
  input('The device might now reboot. If so, please unlock the device then '
        'press enter to continue')
  cmd(['adb', 'wait-for-device'])
  cmd(['adb', 'root'])
  cmd(['adb', 'wait-for-device'])
  cmd(['adb', 'remount', '-R'])

  # Write out the permission file on device.
  permissions = '\n'.join(
      f'''<permission name='{p}' />''' for p in permission_names)
  permission_file_contents = f'''
    <permissions>
      <privapp-permissions package="{name}">
        {permissions}
      </privapp-permissions>
    </permissions>
  '''
  with tempfile.NamedTemporaryFile() as f:
    f.write(permission_file_contents.encode())
    f.flush()

    cmd([
        'adb', 'push', f.name,
        f'/system/etc/permissions/privapp-permissions-{name}.xml'
    ])

  # Stop system_server, push the apk on device and restart system_server
  priv_app_path = f'/system/priv-app/{name}/{name}.apk'
  cmd(['adb', 'shell', 'stop'])
  cmd(['adb', 'push', apk, priv_app_path])
  cmd(['adb', 'shell', 'start'])
  cmd(['adb', 'wait-for-device'])
  time.sleep(10)

  # Wait for system_server and package manager to come up.
  while 'system_server' not in cmd(['adb', 'shell', 'ps']).decode():
    time.sleep(1)
  while True:
    ps = set([
        l.strip()
        for l in cmd(['adb', 'shell', 'dumpsys', '-l']).decode().splitlines()
    ])
    if 'storaged' in ps and 'settings' in ps and 'package' in ps:
      break
    time.sleep(1)

  # Install the actual APK.
  cmd(['adb', 'shell', 'pm', 'install', '-r', '-d', '-g', '-t', priv_app_path])

  return 0


sys.exit(main())
