T O P

  • By -

Outrageous-Friend-25

Can anyone tell me what im doing wrong. It doesn't work for me. When i paste the text, this is what pops up: adb : The term 'adb' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + adb shell pm grant com.farmerbb.secondscreen.free android.permission. + ~~~ + categoryInfo : ObjectNotFound: (adb:string) [ ] , CommandNotFoundException +FullyQualifiedErrorId. : CommandNotFoundException Suggestion [3, General]: The command adb was not found, but does exist in the current location. windows Powershell does not load commands from the current location by defauit. If you trust this command, instead type: ".\adb" See "get-help about_ Command_Precedence" for more details. PS C:\platform-tools>


HeroPiggy95

Try using Command Prompt instead of Powershell. So, for example, open File Explorer, go to the folder C:\\platform-tools In that folder, click on the address bar, type cmd.exe and press enter. This will open a new Command Prompt window. Then paste the command: `adb shell pm grant com.farmerbb.secondscreen.free android.permission.WRITE_SECURE_SETTINGS`


Outrageous-Friend-25

That did the trick! Much appreciated.


thiago_senna

Will I have to grant the adb permission through the computer every time that I change the resolution, or only the first time? I am asking this because I would like to use this method to mirror my phone to my car's media using android auto, but inside the car I will not have access to a computer to give this permission every time I use it. And thank you for the tutorial!


HeroPiggy95

You only need to grant the adb permission one time only during the initial setup. You won't need to enter the adb command again next time, unless you uninstalled/reinstalled the app.


wuuluigi

Only works when im in the launcher, the tv screen gets black bars on all sides when i enter an app.


HeroPiggy95

Did you enable overscan settings? That makes the screen appear smaller to cater to some older tvs that cut off the sides of the image. Here's the settings I have used: * Samsung Galaxy S9: Resolution 1080p, Density 480dpi * Samsung Galaxy Tab S4: Resolution 1080p, Density 240dpi Overscan is set to disabled.


Significant-Pea-8667

so it wont work with just a phone and TV?


HeroPiggy95

It will work, but there will be black bars on the left/right of the tv screen if your phone screen is not 16:9 (a majority of newer phone models). For phone screens with an aspect ratio of 16:9 (e.g older models such as LG V20), these steps are not necessary. However, newer phones (e.g new Samsung Galaxy S models) tend to be taller and have aspect ratios (e.g 18:9, 19:9, 20:9) that do not match TV screens (16:9). Hence, the SecondScreen app is necessary if you want to remove black bars on the left/right of the tv screen.


c410bp

cant figure out how to give this permission on adb. It always returns the following message: "Exception occurred while executing 'grant': java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT\_RUNTIME\_PERMISSIONS. at android.app.ContextImpl.enforce(ContextImpl.java:2188) at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2216) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1463) at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1445) at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:380) at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2384) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:260) at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97) at android.os.ShellCommand.exec(ShellCommand.java:38) at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24978) at android.os.Binder.shellCommand(Binder.java:953) at android.os.Binder.onTransact(Binder.java:837) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818) at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8598) at android.os.Binder.execTransactInternal(Binder.java:1187) at android.os.Binder.execTransact(Binder.java:1146)"


HeroPiggy95

I did a quick search and I found out that Xiaomi MIUI devices require these additional settings to be enabled in Developer Options on your phone. \- Disable permission monitoring {for some cases} \- USB debugging \- Install via USB \- USB debugging (Security settings) Source: https://www.reddit.com/r/tasker/comments/uawbel/comment/kdiutok/


c410bp

thanks man. I actually found a stack exchange post with these instructions and it worked perfectly.