ADB pull from B2G Installer broken

RESOLVED FIXED

Status

()

Firefox
Developer Tools: WebIDE
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: gerard, Assigned: jryans)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

2 years ago
After updating ADB Helper and Gecko to latest nightly of today, B2G Installer addon is unable to pull anything from device:

> Devices._devices["0d38fb1e0c599f53"].pull("/fstab.hammerhead", "/tmp/b2g-installer/hammerhead/blobs/fstab.hammerhead").then(v => { console.debug(v); }, e => { console.debug(e); });
> Object { , 1 de plus… }
> BAD_RESPONSE

> Devices._devices["0d38fb1e0c599f53"].pull("/system/bin/bridgemgrd", "/tmp/b2g-installer/hammerhead/blobs/system/bin/bridgemgrd").then(v => { console.debug(v); }, e => { console.debug(e); });
> Object { , 1 de plus… }
> BAD_RESPONSE

Both can be pulled by hand from CLI.
(Reporter)

Comment 1

2 years ago
Created attachment 8668981 [details]
debug log
(Reporter)

Comment 2

2 years ago
Any help?
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jryans)
(Reporter)

Comment 3

2 years ago
https://github.com/mozilla/adbhelper/commit/95cf54f3ca8ef5667655bcb9fcc0451431bfa063#diff-369a5f292b913be569e8eafd45b090baL279
https://github.com/mozilla/adbhelper/commit/95cf54f3ca8ef5667655bcb9fcc0451431bfa063#diff-369a5f292b913be569e8eafd45b090baL279
> _checkResponse: function adb_checkResponse(aPacket, expected) {
...
> return view[0] == expected;

This was called by: (!client.checkResponse(aData, STAT))

Now we have from adb-client.js:
> function checkResponse(aPacket) {
...
> return view[0] == OKAY;

So the second parameter is not even used.
(Reporter)

Comment 4

2 years ago
Created attachment 8668993 [details] [review]
ADB Helper PR

That fixes the improper response checking.
Attachment #8668993 - Flags: review?(jryans)
(Reporter)

Comment 5

2 years ago
Created attachment 8668996 [details]
New errors after fixing checkResponse()
(Reporter)

Comment 6

2 years ago
(In reply to Alexandre LISSY :gerard-majax from comment #5)
> Created attachment 8668996 [details]
> New errors after fixing checkResponse()

Added debug:
> ADB Addon Helper: fileData.set(pkgData, 0);
I've got a complete fix, will post my own PR.
Assignee: nobody → jryans
Blocks: 1206746
No longer blocks: 1201392
Status: NEW → ASSIGNED
Flags: needinfo?(poirot.alex)
Flags: needinfo?(jryans)
Attachment #8668993 - Flags: review?(jryans)
Created attachment 8669112 [details] [review]
Repair pull / push for Gecko 43+
Attachment #8668993 - Attachment is obsolete: true
Attachment #8669112 - Flags: review?(poirot.alex)
(Reporter)

Comment 9

2 years ago
Great! I'll test this locally :).
(Reporter)

Comment 10

2 years ago
Comment on attachment 8669112 [details] [review]
Repair pull / push for Gecko 43+

Looks like it fixes the issue on my side too! Thanks!
Attachment #8669112 - Flags: feedback+
Comment on attachment 8669112 [details] [review]
Repair pull / push for Gecko 43+

Good catch, Thanks!
Attachment #8669112 - Flags: review?(poirot.alex) → review+
Merged: https://github.com/mozilla/adbhelper/commit/f662242e08f00995434d752f788d21a1b344d65a

Will start preparing 0.8.2 release.
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
0.8.2 released.  May take up to 24 hours to appear available.
(Reporter)

Updated

2 years ago
Blocks: 1166276
(Reporter)

Updated

2 years ago
Blocks: 1214761
You need to log in before you can comment on or make changes to this bug.