Can't scan videos on ubuntu touch (flo, image 100)

Bug #1334940 reported by Ricardo Salveti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mediascanner2 (Ubuntu)
Fix Released
Critical
Jamie Strandboge

Bug Description

current build number: 100
device name: flo
channel: ubuntu-touch/utopic-proposed
last update: 2014-06-27 02:47:20
version version: 100
version ubuntu: 20140626.2
version device: 20140625

Flashed a clean image, tried to import the videos from http://people.canonical.com/~rsalveti/videos/, but mediascanner 2 is unable to index such files.
phablet@ubuntu-phablet:~$ mediascanner-service-2.0
Mount directory does not exist
0 files deleted from disk.
In subdir /home/phablet/Videos
Extracting metadata from /home/phablet/Videos/big_buck_bunny_480p_H264_AAC_25fps_1800K.MP4.
Error when indexing: Unable to discover file /home/phablet/Videos/big_buck_bunny_480p_H264_AAC_25fps_1800K.MP4
Extracting metadata from /home/phablet/Videos/big_buck_bunny_480p_MPEG4_MP3_25fps_1600K.AVI.
Error when indexing: Unable to discover file /home/phablet/Videos/big_buck_bunny_480p_MPEG4_MP3_25fps_1600K.AVI
Extracting metadata from /home/phablet/Videos/sintel[REC].mp4.
Error when indexing: Unable to discover file /home/phablet/Videos/sintel[REC].mp4
Extracting metadata from /home/phablet/Videos/sintel_trailer-1080p.mp4.
Error when indexing: Unable to discover file /home/phablet/Videos/sintel_trailer-1080p.mp4
Watching subdirectory /home/phablet/Videos, 1 watches in total.

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Worked fine when mediascanner 1 was used instead.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Are there any apparmor denials for mediascanner? (grep DEN /var/log/syslog)

Changed in mediascanner2 (Ubuntu):
status: New → Incomplete
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

I thought I checked that when submitting this bug, but yeah, follows the denial:
Jun 27 04:46:40 ubuntu-phablet kernel: [ 92.764892] type=1400 audit(1403844400.411:73): apparmor="DENIED" operation="open" parent=3331 profile="/usr/bin/mediascanner-service-2.0" name="/android/system/lib/libmedia_compat_layer.so" pid=3405 comm="multiqueue0:src" requested_mask="r" denied_mask="r" fsuid=32011 ouid=0

Changed in mediascanner2 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

As mediascanner uses gst directly, I imagine the policy needs to be similar to media-hub (libhybris/etc).

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Worked fine after I added the following at /etc/apparmor.d/usr.bin.mediascanner-service-2.0:
"""
  /dev/ashmem rw,

  # libhybris
  /{,var/}run/shm/hybris_shm_data rw,
  /usr/lib/@{multiarch}/libhybris/*.so mr,
  /{,android/}system/build.prop r,
  # These libraries can be in any of:
  # /vendor/lib
  # /system/lib
  # /system/vendor/lib
  # /android/vendor/lib
  # /android/system/lib
  # /android/system/vendor/lib
  /{,android/}vendor/lib/** r,
  /{,android/}vendor/lib/**.so m,
  /{,android/}system/lib/** r,
  /{,android/}system/lib/**.so m,
  /{,android/}system/vendor/lib/** r,
  /{,android/}system/vendor/lib/**.so m,

  # attach_disconnected path
  /dev/socket/property_service rw,

  # Android logging triggered by platform. Can safely deny
  deny /dev/log_main w,
  deny /dev/log_radio w,
  deny /dev/log_events w,
  deny /dev/log_system w,

  /{,android/}system/etc/media_codecs.xml r,
  owner @{HOME}/.cache/gstreamer*/ rw,
"""

Changed in mediascanner2 (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Interesting-- I had all these at first but it didn't need it on mako when I implemented the profile. That was on the latest promoted though, so perhaps something changed. I'll get an update out immediately.

Changed in mediascanner2 (Ubuntu):
assignee: nobody → Jamie Strandboge (jdstrand)
Changed in mediascanner2 (Ubuntu):
status: Confirmed → In Progress
Changed in mediascanner2 (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mediascanner2 - 0.101+14.10.20140627-0ubuntu1

---------------
mediascanner2 (0.101+14.10.20140627-0ubuntu1) utopic; urgency=medium

  [ Jussi Pakkanen ]
  * Disable short query test to work around a behavioral change in
    SQLite.
 -- Ubuntu daily release <email address hidden> Fri, 27 Jun 2014 17:30:35 +0000

Changed in mediascanner2 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

The 0.101+14.10.20140627-0ubuntu1 doesn't show the actual fix. This does:
mediascanner2 (0.101+14.10.20140625-0ubuntu2) utopic; urgency=medium

  * debian/usr.bin.mediascanner-service-2.0: updates for libhybris based on
    work by Ricardo Salveti. (LP: #1334940)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.