Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#13322 closed Patch - Bug Fix (fixed)

gdb not working for android 5.1 in amazon fire stick

Reported by: Peter Bennett Owned by: Mark Spieth
Priority: minor Milestone: 30.0
Component: Ports - Android Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Some adb commands work differently in the amazon version of android 5.1.

  1. adb shell run-as $PACKAGE_NAME fails if you follow it with a shell internal command. you have to use adb shell run-as $PACKAGE_NAME sh -c
  2. An extra carriage return is attached to the result of pwd
  3. adb shell <command> always returns zero even if the command returned nonzero, so you have to add ;echo $? and capture the result.

Fixes are in attached patch.

Also added quotes around $ARM64 in one place so that there is not a failure when ARM64 is unvalued.

The fixes are also compatible with newer android versions.

Attachments (1)

20180925_1334_gdb_fix.patch (1.4 KB) - added by Peter Bennett 15 months ago.
fix for gdb.sh

Download all attachments as: .zip

Change History (4)

Changed 15 months ago by Peter Bennett

Attachment: 20180925_1334_gdb_fix.patch added

fix for gdb.sh

comment:1 Changed 15 months ago by mspieth

the stripping of lf at end of line is wrong. what it will do is strip all whitespace. Any path with whitespace will be wrong.

Otherwise LGTM. Fix and ship.

comment:2 Changed 15 months ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: newclosed

In d4e2285a6/packaging:

android: Fix gdb shell script to work for amazon fire stick

Some commands work differently in the amazon fire stick version of
android. Fixes to use forms that are compatible with that version
as well as later versions.

Fixes #13322

comment:3 Changed 15 months ago by Stuart Auchterlonie

Milestone: needs_triage30.0
Note: See TracTickets for help on using tickets.