hallvors/marionette_utils

Add adb hack to open URLs in Fx Android to dualdrive.py

Closed this issue · 5 comments

@miketaylr was going to tell me how :)

(The only problem is that the script would actually become "trialdrive" when driving three browsers, and that sounds like very dubious software..)

Joking aside: ping @miketaylr, I think you just need to paste some example code here and I'll take it from there :)

Thanks for the reminder...and being patient. :) Will paste some code here in a second.

So here's some code stolen from a Fennec addon build script:

# Replace this value to push to different release channels.
# Nightly = org.mozilla.fennec
# Aurora = org.mozilla.fennec_aurora
# Beta = org.mozilla.firefox_beta
# Release = org.mozilla.firefox
ANDROID_APP_ID=org.mozilla.fennec

adb shell am start -a android.intent.action.VIEW \
                   -c android.intent.category.DEFAULT \
                   -d file:///mnt/sdcard/"$XPI" \
                   -n $ANDROID_APP_ID/.App && \
echo Pushed $XPI to $ANDROID_APP_ID

The -d is where you can pass the URI. See https://developer.android.com/intl/ru/tools/help/shell.html#IntentSpec for more on that (if you need it).

Also, $ adb shell screencap /sdcard/blah.png will take a screenshot of the device, if you need that.

Fixed by bb97624
(And as I'm considering this a personal utility of limited interest to others, development is anything but clean and tidy :-p)