X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/20d3c5e2cf4fd91e35205a1abfae24456c05fc2e..ccf0dd161fca0730b5aa753f0eae6933ea89b489:/tools/helpers/drivers.py diff --git a/tools/helpers/drivers.py b/tools/helpers/drivers.py index 31005a5..cf708f0 100644 --- a/tools/helpers/drivers.py +++ b/tools/helpers/drivers.py @@ -12,16 +12,19 @@ import tools.helpers.run BINDER_DRIVERS = [ "anbox-binder", "puddlejumper", + "bonder", "binder" ] VNDBINDER_DRIVERS = [ "anbox-vndbinder", "vndpuddlejumper", + "vndbonder", "vndbinder" ] HWBINDER_DRIVERS = [ "anbox-hwbinder", "hwpuddlejumper", + "hwbonder", "hwbinder" ] @@ -58,7 +61,10 @@ def allocBinderNodes(args, binder_dev_nodes): for node in binder_dev_nodes: node_struct = struct.pack( '256sII', bytes(node, 'utf-8'), 0, 0) - fcntl.ioctl(binderctrlfd.fileno(), BINDER_CTL_ADD, node_struct) + try: + fcntl.ioctl(binderctrlfd.fileno(), BINDER_CTL_ADD, node_struct) + except FileExistsError: + pass def probeBinderDriver(args): binder_dev_nodes = [] @@ -83,7 +89,9 @@ def probeBinderDriver(args): if len(binder_dev_nodes) > 0: if not isBinderfsLoaded(args): - command = ["modprobe", "binder_linux"] + devices = ','.join(binder_dev_nodes) + command = ["modprobe", "binder_linux", + "devices=\"{}\"".format(devices)] output = tools.helpers.run.user(args, command, check=False, output_return=True) if output: logging.error("Failed to load binder driver")