Bluetooth Enable Disable ADB command and open Android action with Android driver not working on some Android 7 devices

Result: Parcel( 0x00000000: ffffffff 0000006e 0065004e 00640065 '....n...Need' 0x00000010: 00420020 0055004c 00540045 004f004f ' .BLUETOO' 0x00000020: 00480054 00410020 004d0044 004e0049 'TH .ADMIN' 0x00000030: 00700020 00720065 0069006d 00730073 ' .permiss' 0x00000040: 006f0069 003a006e 004e0020 00690065 'ion:. .Nei' 0x00000050: 00680074 00720065 00750020 00650073 'ther .use' 0x00000060: 00200072 00300032 00300030 006e0020 'r. .2.0.0.0. .n.' 0x00000070: 0072006f 00630020 00720075 00650072 'or .curre' 0x00000080: 0074006e 00700020 006f0072 00650063 'nt .proce' 0x00000090: 00730073 00680020 00730061 00610020 'ss .has .a.' 0x000000a0: 0064006e 006f0072 00640069 0070002e 'ndroid..p.' 0x000000b0: 00720065 0069006d 00730073 006f0069 'ermissio' 0x000000c0: 002e006e 004c0042 00450055 004f0054 'n...BLUETO' 0x000000d0: 0054004f 005f0048 00440041 0049004d 'OTH_.ADMI' 0x000000e0: 002e004e 00000000 'N....... ') 

When you run the following ADB command, the above error in the CLI.

Include:

call adb shell service bluetooth_manager 6

Disable:

call adb shell service bluetooth_manager 9

Also tried to work with appium android driver application. Almost the same resolution problem in Samsung Galaxy Note 8 (7.1.1), Samsung Galaxy Note 2 (7.0). But both the activity and the ADB team work great in the area of ​​the Samsung Galaxy S7 (7.0).

Android driver activity error:

 org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error occured while starting App. Original error: Error executing adbExec. Original error: 'Command '/home/user/Android/Sdk/platform-tools/adb -P 5037 -s 83f0374b42535532 shell am start -W -n com.android.settings/com.android.settings.bluetooth.BluetoothSettings -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' exited with code 1'; Stderr: 'java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.bluetooth.BluetoothSettings launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } } from null (pid=24744, uid=2000) requires android.permission.BLUETOOTH_ADMIN at android.os.Parcel.readException(Parcel.java:1693) at android.os.Parcel.readException(Parcel.java:1646) at android.app.ActivityManagerProxy.startActivityAndWait(ActivityManagerNative.java:3646) at com.android.commands.am.Am.runStart(Am.java:658) at com.android.commands.am.Am.onRun(Am.java:392) at com.android.internal.os.BaseCommand.run(BaseCommand.java:51) at com.android.commands.am.Am.main(Am.java:125) at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)'; Code: '1' (WARNING: The server did not provide any stacktrace information) 

Any solutions would be appreciated.

+5
source share

Source: https://habr.com/ru/post/1276084/


All Articles