# PerfettoSdkHandshake.LibrarySource

# PerfettoSdkHandshake.LibrarySource

Artifact:[androidx.tracing:tracing-perfetto-handshake](https://developer.android.com/jetpack/androidx/releases/tracing)  
[View Source](https://cs.android.com/search?q=file:androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.kt+class:androidx.tracing.perfetto.handshake.PerfettoSdkHandshake.LibrarySource)  
Added in[1.0.1](https://developer.android.com/jetpack/androidx/releases/tracing#1.0.1)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource "View this page in Java")

<br />

```
sealed class PerfettoSdkHandshake.LibrarySource
```

<br />

*** ** * ** ***

Provides means to sideload Perfetto SDK native binaries

## Summary

|                                                               ### Public companion functions                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PerfettoSdkHandshake.LibrarySource](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource) | [aarLibrarySource](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource#aarLibrarySource(java.io.File,java.io.File,kotlin.Function2))`(` ` aarFile: `[File](https://developer.android.com/reference/java/io/File.html)`,` ` tempDirectory: `[File](https://developer.android.com/reference/java/io/File.html)`,` ` moveLibFileFromTmpDirToAppDir: (srcFile: `[File](https://developer.android.com/reference/java/io/File.html)`, dstFile: `[File](https://developer.android.com/reference/java/io/File.html)`) `->` `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) `)` Provides means to sideload Perfetto SDK native binaries with a library AAR used as a source                 |
| [PerfettoSdkHandshake.LibrarySource](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource) | [apkLibrarySource](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource#apkLibrarySource(java.io.File,java.io.File,kotlin.Function2))`(` ` apkFile: `[File](https://developer.android.com/reference/java/io/File.html)`,` ` tempDirectory: `[File](https://developer.android.com/reference/java/io/File.html)`,` ` moveLibFileFromTmpDirToAppDir: (srcFile: `[File](https://developer.android.com/reference/java/io/File.html)`, dstFile: `[File](https://developer.android.com/reference/java/io/File.html)`) `->` `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) `)` Provides means to sideload Perfetto SDK native binaries with an APK containing the library used as a source |

|                                                                 ### Protected constructors                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LibrarySource](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource#LibrarySource())`()` |

## Public companion functions

### aarLibrarySource

Added in[1.0.1](https://developer.android.com/jetpack/androidx/releases/tracing#1.0.1)  

```
fun aarLibrarySource(
    aarFile: File,
    tempDirectory: File,
    moveLibFileFromTmpDirToAppDir: (srcFile: File, dstFile: File) -> Unit
): PerfettoSdkHandshake.LibrarySource
```

Provides means to sideload Perfetto SDK native binaries with a library AAR used as a source  

|                                                                                                                                    Parameters                                                                                                                                    |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `aarFile: `[File](https://developer.android.com/reference/java/io/File.html)                                                                                                                                                                                                     | an AAR file containing`libtracing_perfetto.so`                                                                                                                                                                                                                                                |
| `tempDirectory: `[File](https://developer.android.com/reference/java/io/File.html)                                                                                                                                                                                               | a directory directly accessible to the caller process (used for extraction of the binaries from the zip)                                                                                                                                                                                      |
| `moveLibFileFromTmpDirToAppDir: (srcFile: `[File](https://developer.android.com/reference/java/io/File.html)`, dstFile: `[File](https://developer.android.com/reference/java/io/File.html)`) `->` `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | a function capable of moving the binary file from the[tempDirectory](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource.Companion#aarLibrarySource(java.io.File,java.io.File,kotlin.Function2))to an app accessible folder |

### apkLibrarySource

Added in[1.0.1](https://developer.android.com/jetpack/androidx/releases/tracing#1.0.1)  

```
fun apkLibrarySource(
    apkFile: File,
    tempDirectory: File,
    moveLibFileFromTmpDirToAppDir: (srcFile: File, dstFile: File) -> Unit
): PerfettoSdkHandshake.LibrarySource
```

Provides means to sideload Perfetto SDK native binaries with an APK containing the library used as a source  

|                                                                                                                                    Parameters                                                                                                                                    |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `apkFile: `[File](https://developer.android.com/reference/java/io/File.html)                                                                                                                                                                                                     | an APK file containing`libtracing_perfetto.so`                                                                                                                                                                                                                                                |
| `tempDirectory: `[File](https://developer.android.com/reference/java/io/File.html)                                                                                                                                                                                               | a directory directly accessible to the caller process (used for extraction of the binaries from the zip)                                                                                                                                                                                      |
| `moveLibFileFromTmpDirToAppDir: (srcFile: `[File](https://developer.android.com/reference/java/io/File.html)`, dstFile: `[File](https://developer.android.com/reference/java/io/File.html)`) `->` `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | a function capable of moving the binary file from the[tempDirectory](https://developer.android.com/reference/kotlin/androidx/tracing/perfetto/handshake/PerfettoSdkHandshake.LibrarySource.Companion#apkLibrarySource(java.io.File,java.io.File,kotlin.Function2))to an app accessible folder |

## Protected constructors

### LibrarySource

```
protected LibrarySource()
```