27
27
os.environ['USBCREATOR_LOCAL'] = '1'
28
28
from usbcreator.frontends.gtk import GtkFrontend
29
29
from usbcreator.backends.udisks import UDisksBackend
30
from usbcreator.backends.fastboot import FastbootBackend
30
31
from usbcreator.misc import sane_path, setup_gettext, setup_logging, text_type
56
57
help=_('allow writing to system-internal devices'))
57
58
parser.add_option('--show-all', dest='show_all', action='store_true',
58
59
help=_('Show all devices'))
60
parser.add_option('--fastboot', dest='fastboot', action='store_true',
61
help=_('Use fastboot backend to flash Android devices.'))
59
62
(options, args) = parser.parse_args()
62
backend = UDisksBackend(allow_system_internal=options.allow_system_internal,
63
show_all=options.show_all)
64
frontend = GtkFrontend(backend, options.img, options.persistent,
65
allow_system_internal=options.allow_system_internal)
66
options.persistent = False
67
backend = FastbootBackend()
69
backend = UDisksBackend(
70
allow_system_internal=options.allow_system_internal,
71
show_all=options.show_all)
72
frontend = GtkFrontend(
73
backend, options.img, options.persistent,
74
allow_system_internal=options.allow_system_internal,
75
fastboot_mode=options.fastboot,
66
77
except DBusException as e:
67
78
# FIXME evand 2009-07-09: Wouldn't service activation pick this up