ユーザーの介入なしにADBからBluetoothを起動することは可能ですか? 私が試した:ADBか起動時にBluetoothを起動しますか?
am start -a android.bluetooth.adapter.action.REQUEST_ENABLE
が、これは[OK]を押して、ユーザが必要になります。そして:
service call bluetooth 3
は何もしません。 init.rcでbluetoothdサービスを有効にしても機能しません。
service bluetoothd /system/bin/bluetoothd -n
class main
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
enabled
そして、私はADBからのコマンドを好むでしょう。 (もし誰かが不思議に思うのであれば、私はFCCテストのためにそれが必要です)。
はい、これは最後の手段(BluetoothONアプリとBluetoothOFFアプリ)のためのアプリを作ることを考えました。アプリ引き出しからアプリを隠すことは可能ですか(4.1.2を参照)そして、 "adb shell am start"を使って起動してください。 –
隠し情報で答えを更新 – allprog