Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp305458ybb; Thu, 9 Apr 2020 23:58:04 -0700 (PDT) X-Google-Smtp-Source: APiQypL4Z6ioQxwh6peZ9Q3TFD+rKyUk/sQl+X0gujjf8GgxQEwhsHH7R7KZuChznCqjRweTm7Gp X-Received: by 2002:ac8:568b:: with SMTP id h11mr3173946qta.197.1586501884592; Thu, 09 Apr 2020 23:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586501884; cv=none; d=google.com; s=arc-20160816; b=KcpZ6L8VXzNsP8oOvFSQrA3w8mvSRpDZ3xOceWIo/ua6DOZBazRVxXXLe3cb7yzrW2 MVZBPf4PQLxN7pg2Ju6WQem9oZtXps0MmMnmB0W+Olfh7V1guBOCKEGYu/iHWx/7My2e bjYOB4zuNR2CmHfOFSSZIKPjY9qFjl1Jads03XfMz1rgQAInpL7/7rUs5S61Kd/UtySx z7dPu9rwn26P+CGb9wJCZ0AkOeDViWSAbvhb0Tq97ruJUMwZsNeNwAdSNcCuO8bNvD8L HXNImgLfms5fKvU6GVVVZh/Q6M+Yiwp11+c+/xoivDmqJ59HScDBG4NrHP7PCyQEnAXW vFxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=MTWuebj6Gynb9OsGCqZjonE9QNyDR5Ixe5nPkR8vWFM=; b=RGGH4b464DCRX9wqCX3YfhLl860ze9bu9Rcv0x5oTYsgpuG60CkE2K9b9k5lCSZiSj +TZrndMBEoupA4zoWAWcMhJc12oO4i0+eFJCsi7idpMbwcihMdada5KpOV9NbMNq4nmv IaV4EpdbGGqsyqdaGDID88fWwMllxhNcEFwWaSfvzcUVLErgi05L0XuV5gOXVOpEU3KN xSCl1q3+cYv73OTeyNF9YRxQvyKAHTRQvYAXbI3mzhvaYgYxaebOVtDkxk3tR+dYKPlr 4CFCwGBfZGtcIyNZ03NCnMq2VWvbfA+d0C5EPamFt3k+Aa0K3O0gqmDwN9UxjjyfFTQZ bEgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 68si670594qta.42.2020.04.09.23.57.48; Thu, 09 Apr 2020 23:58:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgDJG5i convert rfc822-to-8bit (ORCPT + 99 others); Fri, 10 Apr 2020 02:57:38 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:50977 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbgDJG5i (ORCPT ); Fri, 10 Apr 2020 02:57:38 -0400 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id BEE2ECED05; Fri, 10 Apr 2020 09:07:12 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH 1/5] D-Bus API changes for managing SDP records From: Marcel Holtmann In-Reply-To: Date: Fri, 10 Apr 2020 08:57:37 +0200 Cc: Bluez mailing list , Rahul Chaturvedi Content-Transfer-Encoding: 8BIT Message-Id: References: <20200401221434.12185-1-sonnysasaka@chromium.org> To: Sonny Sasaka X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Sonny, > This was needed to support emulation of Android apps's Bluetooth API > on top of BlueZ. Android expects to be able to access the SDP database > of a remote device via its HAL interface > (https://android.googlesource.com/platform/system/bt/+/master/include/hardware/bt_sdp.h#38). > > Thanks for the feedback, we will revisit this and see if a redesign > based on your suggestion is possible. if you can get this done by using existing APIs and the Profile API, then that would be best. I would have to get myself a bit more familiar with the Android APIs. However in the worst case, we can introduce an Android specific D-Bus API as part of a plugin. It would be then disabled in standard Linux systems. From BlueZ for Android project, we fundamentally took the Android HAL parts 1:1 and mapped them to a Unix based protocol. Then the Android bluetoothd had to do the rest of the work. A similar approach (and using D-Bus) might be most efficient here actually. However as Luiz noted, we need to be careful that bluetoothd system services / profiles are not messed with. Meaning bluetoothd has to play guardian on what Android apps can do. On a side note, I am going to remove the BlueZ for Android code from the tree. Let me know if you find parts of it still useful. It is git, so we can always bring it back, but if you already have some idea on how to utilize it, feel free to start with that right away. Regards Marcel