Skip to content

Commit

Permalink
gapii/client: Use NativeBridgeABI().
Browse files Browse the repository at this point in the history
May fix tracing Android applications on Chromebooks where the ABI translator cannot deal with libinterceptor.
  • Loading branch information
ben-clayton committed Aug 29, 2017
1 parent 7a535b3 commit 695f69b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gapii/client/adb.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func StartOrAttach(ctx context.Context, p *android.InstalledPackage, a *android.
if abi.SameAs(device.UnknownABI) {
abi = p.Device.Instance().GetConfiguration().PreferredABI(nil)
}

// For NativeBridge emulated devices opt for the native ABI of the emulator.
abi = d.NativeBridgeABI(ctx, abi)

ctx = log.V{"abi": abi.Name}.Bind(ctx)

log.I(ctx, "Turning device screen on")
Expand Down
5 changes: 5 additions & 0 deletions gapii/client/jdwp_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func (p *Process) loadAndConnectViaJDWP(
if abi == nil {
return nil, fmt.Errorf("Unknown ABI %v", abiName)
}

// For NativeBridge emulated devices opt for the native ABI of the
// emulator.
abi = d.NativeBridgeABI(ctx, abi)

return abi, nil
}

Expand Down

0 comments on commit 695f69b

Please sign in to comment.