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 = []
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")