def METHOD_NAME(self, target_path: str, target: bytes, mode=0o100755, mtime: int = None):
    """ push data to device """
    self.request('sync:', True)
    request = b'%s,%d' % (target_path.encode(), mode)
    self.sock.send(b'SEND' + struct.pack('<I', len(request)) + request)
    buf = bytearray(65536+8)
    buf[0:4] = b'DATA'
    idx = 0
    while idx < len(target):
        content = target[idx:idx+65536]
        content_len = len(content)
        idx += content_len
        buf[4:8] = struct.pack('<I', content_len)
        buf[8:8+content_len] = content
        self.sock.sendall(bytes(buf[0:8+content_len]))
    if mtime is None:
        mtime = int(time.time())
    self.sock.send(b'DONE' + struct.pack('<I', mtime))
    response = self.sock.recv_exactly(8)
    if response[:4] != b'OKAY':
        raise RuntimeError('push failed')