Results 1 to 11 of 11

Thread: FLAC support

  1. #1
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0

    Solution FLAC support for Milestone

    Updated libraries:
    29 June 2010: fixed the flac duration reported by the mediascanner
    26 June 2010: applied FLAC decoder lock contention fix by Glenn Maynard


    Link: FLAC for Milestone homepage

    Native support for Free Lossless Audio Codec in Android system. FLAC files can be used also as ring tones.
    FLAC files play in the Music.apk and any other players that use the standard system services.

    Kenny Root's patches adjusted and applied to 2.1_r2 platform source: FLAC on Android - Kenny Root
    Compiled for compatibility with other Milestone system libraries.

    Consists of:
    /system/lib/libFLAC.so
    /system/lib/libmediaplayerservice.so
    /system/lib/libopencore_player.so
    /system/framework/framework.jar - modified MediaScanner and MediaFile in android/media

    Instructions

    Automatic installation from ADBRecovery
    Copy the unpacked ocflac folder to your sdcard.
    Copy the included install.sh script to the recovery folder on your sdcard (so it's like this: recovery/install.sh - do not put it in the scripts subfolder).
    Boot to recovery (power off,hold camera or X + power, then volume up+camera), apply update.zip (use d-pad and enter), then reboot.
    Remove the install.sh file from the recovery folder.

    Manual installation
    Copy the unpacked ocflac folder to your sdcard.
    From adb shell or terminal on the phone do:

    backup:
    Code:
    mkdir /sdcard/ocflacbackup
    cp /system/framework/framework.jar /sdcard/ocflacbackup
    cp /system/lib/libmediaplayerservice.so /sdcard/ocflacbackup
    cp /system/lib/libopencore_player.so /sdcard/ocflacbackup
    modification:
    Code:
    su
    mount -o remount,rw /dev/mtd/mtdblock6 /system
    cp -f /sdcard/ocflac/framework.jar /system/framework
    cp -f /sdcard/ocflac/libFLAC.so /system/lib
    cp -f /sdcard/ocflac/libmediaplayerservice.so /system/lib
    cp -f /sdcard/ocflac/libopencore_player.so /system/lib
    chmod 644 /system/framework/framework.jar
    chmod 644 /system/lib/libFLAC.so
    chmod 644 /system/lib/libmediaplayerservice.so
    chmod 644 /system/lib/libopencore_player.so
    mount -o remount,ro /dev/mtd/mtdblock6 /system
    Then reboot the phone. The first reboot will take longer than usual, be patient. Second reboot might be needed for everything to settle down.

    The framework.jar has been disassembled and reassembled by JesusFreke's smali/baksmali.

    The framework.jar might differ between different builds of Milestone system so I've assembled several versions, use the one appropriate for your build.

    Download FLAC for 2.1

    updated libraries (w/o framework.jar) [29.6.2010]:
    FLAClibsv4.zip

    framework.jar + older libraries:
    SHOLS_U2_02.31, SHOLS_U2_02.34.0 and SHOLS_U2_03.10 (CA/Central Europe/DE/FR/HK/IT/TH/UK 2.1)
    FLACv3_for_MM2.31.zip

    SHOLS_U2_02.34.3 (HK 2.1 fix)
    FLACv3_for_MM2.34.3.zip

    SHOLS_U2_02.36.0 (DE/Central Europe/UK 2.1 fix)
    FLACv3_for_MM2.36.0.zip

    SHOLS_U2_02.38.0 (ES/IT 2.1 fix)
    FLACfrmwrk2.38.0.zip

    SHOLS_U2_02.27.6 (Arabic 2.1)
    FLACv3_for_MM2.27.zip

    SHOLS_U2_02.27.7 (RU 2.1)
    FLACv3_for_MM2.27.7.zip

    SHLA_U2_03.05 (BR 2.1)
    FLACv3_for_MM3.05.zip

    UPDATE: updated libraries
    - fix the flac duration reported by mediascanner
    - FLAC decoder lock contention fix by Glenn Maynard
    Last edited by nadlabak; 07-01-2010 at 09:57 AM. Reason: Updated libraries

  2. The Following User Says Thank You to nadlabak For This Useful Post:

    tomauswustrow (05-11-2010)

  3. #2
    offline Maybe Modder
    Join Date
    Oct 2006
    Posts
    28
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Downloads
    19
    Uploads
    0
    thanks for your contribution, was seeking this information, thanks

  4. #3
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0
    New variants for the Russian 2.1 system SHOLS_U2_02.27.7 and the new 2.1 HK update SHOLS_U2_02.34.3 have been added.

  5. #4
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0
    FLAC for SHOLS_U2_02.36.0 (DE 2.1 fix) has been added.

  6. #5
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0
    The libraries have been updated - applied FLAC decoder lock contention fix by Glenn Maynard

  7. #6
    offline Maybe Modder
    Join Date
    Jun 2010
    Posts
    36
    Thanks
    4
    Thanked 3 Times in 1 Post
    Downloads
    2
    Uploads
    0
    this flac hack only works in the default android player, it crashes "3: and btunes =(

  8. #7
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0
    FLACs play fine for me in both 3 and btunes. Only the seeking in btunes is broken. No FCs for me...
    Last edited by nadlabak; 06-28-2010 at 05:28 PM.

  9. The Following User Says Thank You to nadlabak For This Useful Post:

    Chad_Petree (06-28-2010)

  10. #8
    offline Maybe Modder
    Join Date
    Jun 2010
    Posts
    36
    Thanks
    4
    Thanked 3 Times in 1 Post
    Downloads
    2
    Uploads
    0
    Quote Originally Posted by nadlabak View Post
    FLACs play fine for me in both 3 and btunes. Only the seeking in btunes is broken. No FCs for me...
    actually both program play the files , but 80 % of the times when you play the flac files the app crashes =/

  11. #9
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0
    Are you using the updated libraries for FLAC from 26.6.2010?
    I'm not able to get a single crash, both 3 and btunes are perfectly stable when playing flac on my phone...

    One more update:
    The libraries have been updated again - the duration of a flac file reported by the mediascanner is finally correct.
    This also fixes the broken flac seeking in the bTunes player.
    Last edited by nadlabak; 06-29-2010 at 09:58 AM. Reason: Automerged Doublepost

  12. #10
    offline Maybe Modder
    Join Date
    Jun 2010
    Posts
    36
    Thanks
    4
    Thanked 3 Times in 1 Post
    Downloads
    2
    Uploads
    0
    Quote Originally Posted by nadlabak View Post
    Are you using the updated libraries for FLAC from 26.6.2010?
    I'm not able to get a single crash, both 3 and btunes are perfectly stable when playing flac on my phone...

    One more update:
    The libraries have been updated again - the duration of a flac file reported by the mediascanner is finally correct.
    This also fixes the broken flac seeking in the bTunes player.
    my bad, didnt realize there new updates files, gonna give it a try

  13. #11
    nadlabak's Avatar
    offline Developer
    Join Date
    Feb 2010
    Location
    Praha
    Posts
    86
    Thanks
    3
    Thanked 79 Times in 34 Posts
    Downloads
    14
    Uploads
    0
    Framework.jar with FLAC support for SHOLS_U2_02.38.0 has been added.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •