0

I need to push a folder which contains a video into Android /sdcard and will use it as a new photo gallery.

It works well in Android 10, but I couldn't get this photo gallery in Google Pixel 4(Android 11)

 $ tree newcase
newcase
└── jet_half.mp4

$ adb push newcase /sdcard
newcase/: 1 file pushed, 0 skipped. 31.7 MB/s (365194876 bytes in 10.983s)

$ adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/newcase/jet_half.mp4
Broadcasting: Intent { act=android.intent.action.MEDIA_SCANNER_SCAN_FILE dat=file:///sdcard/newcase/jet_half.mp4 flg=0x400000 }
Broadcast completed: result=0
pvd
  • 1,303
  • 2
  • 16
  • 31
  • 2
    Try /sdcard/Documents/newcase/... Further it is unclear if you cannot copy the folder or that you cannot let it scan. – blackapps Sep 25 '20 at 09:48
  • @blackapps Indeed, please reply it as an answer, I'll accept it – pvd Sep 27 '20 at 00:47
  • What am I doing wrong in Android 10, then? I'm using this exact command (only the path changed as appropriate) but neither the stock Files app nor Google Photos notices the new image! – Michael Feb 08 '22 at 01:49

1 Answers1

2

Android 11 will not let you touching root of external storage.

Try

/sdcard/Documents/newcase/... 
blackapps
  • 8,011
  • 2
  • 11
  • 25