[MOD][XPOSED] Music2SD (v1.8) - Make Google Play Music save music where you want

Search This thread
NOTE: You do not need this app if you do not have external storage or if you are on KitKat or above.

This application requires root and the Xposed Framework - http://forum.xda-developers.com/showthread.php?t=1574401

Do you not have enough room on your Internal Storage or Device Storage for your music, but have plenty of space on your SD Card? No more with Music2SD! You can now force Google Play Music to store your music where you want it.

How To Get Started:
  1. Install Xposed Framework Installer.- http://forum.xda-developers.com/showthread.php?t=1574401
  2. Install Xposed Framework.
  3. Install Music2SD
  4. Open Music2SD and Select a Download Storage Location.
  5. Open Xposed Framework and Enable the Music2SD Module.
  6. Restart your phone/tablet.
  7. Start downloading music!

Currently Tested on:
  • Galaxy S4 (Running CyanogenMod 10.2)
  • Galaxy Note 2 (Running CyanogenMod 10.1)
  • Galaxy Note 10.1 (Running CyanogenMod 10.1)
  • Galaxy Note (Running CyanogenMod 10.1)
  • Infuse 4G (Running Beanstalk)
  • Nexus S 4G (Running CyanogenMod 10.2)
  • Motorola Droid (Running CyanogenMod 9)

Google Play Store
Source Code
 

Attachments

  • Music2SD-1.8.apk
    416.9 KB · Views: 3,437
Last edited:
Change Log:
Version 1.8
  • Fixed Method overwriting for newer version of Google Play Music.
Version 1.7.1
  • German Localization added.
  • Added exception handling for StatFS.
Version 1.7
  • Localization Update (Support for English, French, Italian, Japanese, Korean, Portuguese, Russian, and Spanish)
  • German Support coming soon. (Waiting on translation.)
  • Free disk space fixed. Now using StatFs built in API.
Version 1.6.1
  • Major Bug Fix
  • SD Card Support now sends "df" command.
Version 1.6
  • Storage Location Selector now shows path and free disk space.
  • Storage Locations that would show up as "Device" will now show up as "External"
  • Will now display removable mounts with read/write permissions that do no show up under the environment variables as "Unknown Storage". Use caution when using these.
  • Tested and works with Meenova Mini MicroSD Card Reader.
Version 1.5.2
  • Fixes support for "mount" commands with "on" and "type" verbiage. For real this time.
  • Fixed reported NullPointer Exceptions.
  • Added additional information "SD Card Support" to help pin point device/rom specific issues.
Version 1.5.1
  • Fixed support for "mount" commands with "on" and "type" verbiage.
Version 1.5
  • Fixed Force Close issue.
Version 1.4
  • Improved SD Card detection. Now doesn't look at File System, but instead looks at Environment Variables and compares them to what is mounted and has read/write access.
  • Music2SD Debugger built-in.
  • Added Admod Ads.
Version 1.3
  • Fixed an issue with older devices that emulates a SD Card. For example the Nexus S 4G was showing Device Storage and External Storage.
  • Now checks for root access and Xposed Framework on app start.
  • Now uses root access to automatically create the necessary directories on your SD Card.
Version 1.2
  • Code clean up.
  • Support for multiple external storage locations.
  • Tablets now work in Landscape.
Version 1.1
  • Fixed NullPointerException while searching for SD Card on non-rooted device. (You must be rooted to use this application!)
Version 1.0
  • Initial Release

License:
Code:
Copyright (c) 2014, Lepidus Development LLC
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

  Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

  Redistributions in binary form must reproduce the above copyright notice, this
  list of conditions and the following disclaimer in the documentation and/or
  other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
Last edited:
Awesome, great mod man. This is going to come in handy. About to test on M.O.A.R. rom with Sprint galaxy s3. Sure all will work fine but will report back to let you know.

Sent from a Galaxy within my palm

Curious if everything worked for you. Please let me know if I could be of any assistance. If everything is great please feel free to leave a review on the Google Play Store (If you downloaded from there). Thanks! :D
 

APeaceofStrange

Senior Member
Dec 11, 2010
507
69
Miami
I have not been able to get it to work on a verizon s3. Music is still downloading to internal storage. Do I need to delete any folders on internal storage for it to work?
 

Caradineme2

Senior Member
Nov 3, 2011
134
53
Quinton
I have not been able to get it to work on a verizon s3. Music is still downloading to internal storage. Do I need to delete any folders on internal storage for it to work?

Same thing here on Sprint S3, acted as if it worked. Started re downloading but still went to internal. Any suggestions on this?

Sent from a Galaxy within my palm
 
Last edited:

jwds1978

Senior Member
Installed this on my Samsung Galaxy S4 and am not seeing the "SD Card" option as shown within your video. My internal is at /storage/emulated/0/ ( /mnt/sdcard/ ) and my external is at /storage/extSdCard/ ( /mnt/extSdCard/ ).
 

Attachments

  • Screenshot_2013-08-28-23-18-47.jpg
    Screenshot_2013-08-28-23-18-47.jpg
    16 KB · Views: 1,107
I have not been able to get it to work on a verizon s3. Music is still downloading to internal storage. Do I need to delete any folders on internal storage for it to work?

Same thing here on Sprint S3, acted as if it worked. Started re downloading but still went to internal. Any suggestions on this?

No folders have moved at all. Should I create the parent folders then just cut and paste the files into the created folders?

I have found an issue with Music2SD. You must create the parent folders in your SD Card first. I will release an update to fix this most likely tonight. To get it working right now simply create the following folders in the root of your SD Card: /Android/data/com.google.android.music/

will it save from the point of the mod and you need to manually move the old folder or does the folder get moved by the app?

The folders don't get moved I will try to add this in the next update.

Installed this on my Samsung Galaxy S4 and am not seeing the "SD Card" option as shown within your video. My internal is at /storage/emulated/0/ ( /mnt/sdcard/ ) and my external is at /storage/extSdCard/ ( /mnt/extSdCard/ ).

What file system are you using on your SD Card. Because Android does not have a built-in API for getting the location of the SD Card I'm left to parsing out the "mount" command and parsing out mount points that are using a FAT file system. On top of that the location for an SD Card is different per Manufacturer per rom. (If anyone know a better way of getting this information, please feel free to let me know.) :)
 
Last edited:

Caradineme2

Senior Member
Nov 3, 2011
134
53
Quinton
I have found an issue with Music2SD. You must create the parent folders in your SD Card first. I will release an update to fix this most likely tonight. To get it working right now simply create the following folders in the root of your SD Card: /Android/data/com.google.android.music/



The folders don't get moved I will try to add this in the next update.

Worked like a charm, all music on external sd now. Thanks man, this is great.

Sent from a galaxy within my palm
 
Version 1.3 is now on the Google Play Store and on the main post. The source code has also been updated on GitHub.
  • Fixed an issue with older devices that emulates a SD Card. For example the Nexus S 4G was showing Device Storage and External Storage.
  • Now checks for root access and Xposed Framework on app start.
  • Now uses root access to automatically create the necessary directories on your SD Card.


I actually had code in there to create the subdirectories. However apparently the WRITE_EXTERNAL_STORAGE permission only gives you permission to write on the device storage and not the actual SD Card. After doing some research the only way to write to the SD card is to be a system app with WRITE_MEDIA_STORAGE permission or to do it through root. Seeing as I can't sign my app as a system app, I went with doing it through root. (This is why Music2SD asks for root when you open the app now.)


I also created a video showing how to setup Music2SD, it's on the Google Play Store listing and below:


IMPORTANT: If you have an issue where your external storage is not showing up there will be a new application in the main post called Music2SD-Debugger.apk. Please install and run this application. It's a simple app that gets the output of the "mount" command and puts it into an email. All you have to do is send the email and then I will analyze it and improve the SD Card detection. Android does not come with a built in method for detecting and getting the path of external storage devices, which is why I'm left to these weird and hacky methods of getting the SD Card path.
 

DasGensu

Senior Member
May 20, 2011
114
14
Cologne
works like a charm but you have to delete the music stored in the old music folder and redownload (or move it all)
it is NOT moved automatically

though thanks, have been searching for something like this for months as the downloaded music unnessecarily fills up my /data partition thus making nandroid backups nearly impossible on my 16gb galaxy nexus
 

xhepera

Senior Member
Apr 26, 2010
297
112
Jefferson City, MO
This module works great on my Galaxy S2, running SlimBean 8.1 (4.2.2) Only problem seems to be that all of my music is designated by number in the actual folder. Artwork appears to be all there and Google certainly recognizes what music is on the device, but using ES File Explorer to view the folder shows only numbers. Was this also true of the native folder? I never looked in it, so I don't know.
 

TheSchatz

Senior Member
Apr 3, 2012
263
120
This module works great on my Galaxy S2, running SlimBean 8.1 (4.2.2) Only problem seems to be that all of my music is designated by number in the actual folder. Artwork appears to be all there and Google certainly recognizes what music is on the device, but using ES File Explorer to view the folder shows only numbers. Was this also true of the native folder? I never looked in it, so I don't know.
That is true of the native folder as well.

Awesome module, my 64gb external loves it :)
 

ziddey

Senior Member
Aug 26, 2007
1,790
1,553
I'm having an issue where nothing happens. Granted root and enabled in Xposed.

It detects Internal Storage at /data and Device Storage at /storage/emulated/legacy. After plugging in my USB drive, it detects External Storage at /storage/usbdisk0. All is good. But no matter what I pick, it stays at the screen and nothing happens.

Nexus 4 on CM10.2.

Been simply using a symlink before stumbling upon this module (the default storage location is /data which is ext4).

Cheers


edit: Well I'll be damned. New 1.6.1 fixed it right the **** up. Thanks
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 30
    NOTE: You do not need this app if you do not have external storage or if you are on KitKat or above.

    This application requires root and the Xposed Framework - http://forum.xda-developers.com/showthread.php?t=1574401

    Do you not have enough room on your Internal Storage or Device Storage for your music, but have plenty of space on your SD Card? No more with Music2SD! You can now force Google Play Music to store your music where you want it.

    How To Get Started:
    1. Install Xposed Framework Installer.- http://forum.xda-developers.com/showthread.php?t=1574401
    2. Install Xposed Framework.
    3. Install Music2SD
    4. Open Music2SD and Select a Download Storage Location.
    5. Open Xposed Framework and Enable the Music2SD Module.
    6. Restart your phone/tablet.
    7. Start downloading music!

    Currently Tested on:
    • Galaxy S4 (Running CyanogenMod 10.2)
    • Galaxy Note 2 (Running CyanogenMod 10.1)
    • Galaxy Note 10.1 (Running CyanogenMod 10.1)
    • Galaxy Note (Running CyanogenMod 10.1)
    • Infuse 4G (Running Beanstalk)
    • Nexus S 4G (Running CyanogenMod 10.2)
    • Motorola Droid (Running CyanogenMod 9)

    Google Play Store
    Source Code
    3
    I have not been able to get it to work on a verizon s3. Music is still downloading to internal storage. Do I need to delete any folders on internal storage for it to work?

    Same thing here on Sprint S3, acted as if it worked. Started re downloading but still went to internal. Any suggestions on this?

    No folders have moved at all. Should I create the parent folders then just cut and paste the files into the created folders?

    I have found an issue with Music2SD. You must create the parent folders in your SD Card first. I will release an update to fix this most likely tonight. To get it working right now simply create the following folders in the root of your SD Card: /Android/data/com.google.android.music/

    will it save from the point of the mod and you need to manually move the old folder or does the folder get moved by the app?

    The folders don't get moved I will try to add this in the next update.

    Installed this on my Samsung Galaxy S4 and am not seeing the "SD Card" option as shown within your video. My internal is at /storage/emulated/0/ ( /mnt/sdcard/ ) and my external is at /storage/extSdCard/ ( /mnt/extSdCard/ ).

    What file system are you using on your SD Card. Because Android does not have a built-in API for getting the location of the SD Card I'm left to parsing out the "mount" command and parsing out mount points that are using a FAT file system. On top of that the location for an SD Card is different per Manufacturer per rom. (If anyone know a better way of getting this information, please feel free to let me know.) :)
    2
    Change Log:
    Version 1.8
    • Fixed Method overwriting for newer version of Google Play Music.
    Version 1.7.1
    • German Localization added.
    • Added exception handling for StatFS.
    Version 1.7
    • Localization Update (Support for English, French, Italian, Japanese, Korean, Portuguese, Russian, and Spanish)
    • German Support coming soon. (Waiting on translation.)
    • Free disk space fixed. Now using StatFs built in API.
    Version 1.6.1
    • Major Bug Fix
    • SD Card Support now sends "df" command.
    Version 1.6
    • Storage Location Selector now shows path and free disk space.
    • Storage Locations that would show up as "Device" will now show up as "External"
    • Will now display removable mounts with read/write permissions that do no show up under the environment variables as "Unknown Storage". Use caution when using these.
    • Tested and works with Meenova Mini MicroSD Card Reader.
    Version 1.5.2
    • Fixes support for "mount" commands with "on" and "type" verbiage. For real this time.
    • Fixed reported NullPointer Exceptions.
    • Added additional information "SD Card Support" to help pin point device/rom specific issues.
    Version 1.5.1
    • Fixed support for "mount" commands with "on" and "type" verbiage.
    Version 1.5
    • Fixed Force Close issue.
    Version 1.4
    • Improved SD Card detection. Now doesn't look at File System, but instead looks at Environment Variables and compares them to what is mounted and has read/write access.
    • Music2SD Debugger built-in.
    • Added Admod Ads.
    Version 1.3
    • Fixed an issue with older devices that emulates a SD Card. For example the Nexus S 4G was showing Device Storage and External Storage.
    • Now checks for root access and Xposed Framework on app start.
    • Now uses root access to automatically create the necessary directories on your SD Card.
    Version 1.2
    • Code clean up.
    • Support for multiple external storage locations.
    • Tablets now work in Landscape.
    Version 1.1
    • Fixed NullPointerException while searching for SD Card on non-rooted device. (You must be rooted to use this application!)
    Version 1.0
    • Initial Release

    License:
    Code:
    Copyright (c) 2014, Lepidus Development LLC
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without modification,
    are permitted provided that the following conditions are met:
    
      Redistributions of source code must retain the above copyright notice, this
      list of conditions and the following disclaimer.
    
      Redistributions in binary form must reproduce the above copyright notice, this
      list of conditions and the following disclaimer in the documentation and/or
      other materials provided with the distribution.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2
    Version 1.3 is now on the Google Play Store and on the main post. The source code has also been updated on GitHub.
    • Fixed an issue with older devices that emulates a SD Card. For example the Nexus S 4G was showing Device Storage and External Storage.
    • Now checks for root access and Xposed Framework on app start.
    • Now uses root access to automatically create the necessary directories on your SD Card.


    I actually had code in there to create the subdirectories. However apparently the WRITE_EXTERNAL_STORAGE permission only gives you permission to write on the device storage and not the actual SD Card. After doing some research the only way to write to the SD card is to be a system app with WRITE_MEDIA_STORAGE permission or to do it through root. Seeing as I can't sign my app as a system app, I went with doing it through root. (This is why Music2SD asks for root when you open the app now.)


    I also created a video showing how to setup Music2SD, it's on the Google Play Store listing and below:


    IMPORTANT: If you have an issue where your external storage is not showing up there will be a new application in the main post called Music2SD-Debugger.apk. Please install and run this application. It's a simple app that gets the output of the "mount" command and puts it into an email. All you have to do is send the email and then I will analyze it and improve the SD Card detection. Android does not come with a built in method for detecting and getting the path of external storage devices, which is why I'm left to these weird and hacky methods of getting the SD Card path.
    1
    Seem to have found a problem with the Music2SD app. At first the application did what it did , changing the location of Google music data to my exsd card. After updating the new version of Google Music v5.2.1233L it's seem that the Music2SD is not working and Google Music is now redownload all my music that was in my sd crad into my internal memory (5 Gb of music T_T )

    Sent from my SPH-L710 using Tapatalk

    Seems fine on my device. Both with caching new songs and downloading albums for offline play.

    Sent from my GT-N7100 using Tapatalk
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone