Android Studio - Device file explorer stop working

From few days Device File Explorer of Android Studio shows me this message:

Error executing shell command pm list packages

enter image description here

And can't see files and apps from data folder, for example gets database from my Flutter app. Any ideas to solve this problem? Thanks in advance!


UPDATE 29/11/2022

After searching a little I found way to execute adb shell commands from windows CMD, when executes 'adb shell pm list packages' command the CMD throws this Exception:

Exception occurred while executing 'list':
java.lang.SecurityException: Shell does not have permission to access user 150
 com.android.server.am.ActivityManagerService.handleIncomingUser:14872 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3499
        at com.android.server.am.UserController.handleIncomingUser(UserController.java:2672)
        at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14872)
        at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4802)
        at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3499)
        at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:965)
        at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:861)
        at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:720)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:222)
        at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
        at android.os.ShellCommand.exec(ShellCommand.java:38)
        at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6922)
        at android.os.Binder.shellCommand(Binder.java:1085)
        at android.os.Binder.onTransact(Binder.java:903)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4909)
        at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6906)
        at android.os.Binder.execTransactInternal(Binder.java:1321)
        at android.os.Binder.execTransact(Binder.java:1280)

According forums and other websites this code 150 signify that android studio try to open device file explorer in Samsung Secure Folder when my Flutter app it's installed in normal device storage, this error apparently appairing in Samsung devices with Secure folder. How we execute Device File Explorer in normal device storage, any idea?

Upvotes: 8

Views: 7338

Answers (3)

Hasim D
Hasim D

Reputation: 142

this is the correct answer: https://stackoverflow.com/a/76659633/8105487

if it does not work, just make sure you invalidate caches and restart

Upvotes: 0

Nikhil Soni
Nikhil Soni

Reputation: 949

In Samsung because of Secure folder we can't access data/data folder in Android Studio, therefore follow the below steps to uninstall it :- enter image description here

After this you will be able to access it.

Upvotes: 9

adatadoc
adatadoc

Reputation: 359

I've this problem too. I've uninstalled the Secure Folder to use the Device File Explorer still somebody get the solution Android Studio Error: One UI 5 upgrade (Android 13) Adb error executing shell command pm list on data/data/ folder

Upvotes: 3

Related Questions