Android: Root always defaults to /Android/data/(...)

Get answers about the current release of MediaMonkey for Android

Moderator: Gurus

theta_wave
Posts: 310
Joined: Fri Apr 13, 2007 12:54 am

Android: Root always defaults to /Android/data/(...)

Post by theta_wave »

Android 5
Sync: MMW -> microSDcard
Interface: SDcard reader
OS: Win7
MMW: 1769
MMA: 0502

Now, the root directory always defaults to /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/. Prior to recent changes in Android and Mediamonkey, I had relatively few issues syncing my MMW playlists to my Android phone connected to my computer via USB MTP (all 50+ GB worth). Music was always stored under /storage/extSdCard/Music to allow other programs like Play Music to discover my collection. Since USB MTP has become unreliable lately and wifi is a no-go (syncs directly to /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/), I've resorted to powering off my phone, taking out my microsdcard, placing it in an sdcard caddy and syncing it to MMW directly.

If the following storage.xml file under /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/ is left alone, MMW will believe the root directory is under /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/ and not under /storage/extSdCard/. MMW will proceed to delete all 50+ GB worth of music from /storage/extSdCard/Music even though "Enforce use of sync mask for files already on the device" is checked. What should happen is that all of the files under /Music should move according to the default root directory that MMW enforces. Instead, MMW says "fuck it all" and proceeds to delete 8800 songs from my microsd card. Changing the below "read-write limited</type><current>1</current>" to "read-write limited</type><current>0</current>" appears to restore the root as /storage/extSdCard/ and my files are updated accordingly. Really guys, it shouldn't be this hard! Hopefully making it that xml file read-only will put a stop to this silliness.

Code: Select all

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><storages version="1.1" storageGuid="###############"><storage><title>Internal storage</title><path>/storage/emulated/0</path><info>/storage/emulated/0/MediaMonkey/files/storageInfo.xml</info><type>read-write</type><current>0</current></storage><storage><title>SD card</title><path>/storage/extSdCard</path><info>/storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/files/storageInfo.xml</info><type>read-write limited</type><current>1</current><appFolder>/storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/</appFolder><folder>/storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/</folder><folder>/storage/extSdCard/</folder></storage></storages>
MM Gold Lifetime since 2.5.5.998
Computer: Lenovo Y580 System: Win7 Ultimate x64 SP1 / Arch Linux Mediamonkey 4: w/ Monkeyrok 5.6, Minilyrics 1.4b, iMonkey Skin
Lowlander
Posts: 58316
Joined: Sat Sep 06, 2003 5:53 pm

Re: Android: Root always defaults to /Android/data/(...)

Post by Lowlander »

Wifi sync follows Androids SD card limitations (as App is writing files) and thus doesn't adhere to user settings. This may have been relaxed a little with the latest betas of MMA and MMW.
theta_wave
Posts: 310
Joined: Fri Apr 13, 2007 12:54 am

Re: Android: Root always defaults to /Android/data/(...)

Post by theta_wave »

Lowlander wrote:This may have been relaxed a little with the latest betas of MMA and MMW.
May main critique is that the SD card restrictions have been ratcheted up lately probably due to recent updates to Android that makes it more difficult for MMW to recognize the Android device. Even if I remove the microSD card from the device and place it in my computer to sync to avoid horribleness that is MTP, the storageInfo.xml still has the restrictive flag that points to the Android directory as root instead of the root directory of the microSD card. This has not been an issue for several months until now (wifi sync notwithstanding because I never used it outside for testing purposes).

What I find now is the following:
* Plug in the Android Lollipop device via USB (or take microSD out and plug it into the computer) and initiate sync through MMW
* See that only few files need to update (see pic below)
* MMW proceeds to wipe the ENTIRE collection (here 8899 tracks totaling 54GB), ignoring the directory structure that synced perfectly fine before and syncing the ENTIRE collection to the KitKat default root directory under the Android folder.

Image

EDIT: Okay, clearing out /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/storageInfo.xml prevents MMW from wiping out my collection. Changing the values in that file does nothing other than prevent MMW from syncing my tracks to /storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/. What happens is that MMW will remove EVERYTHING under the directory masks I set up in the device options and copy the files back to the same user-selected location! Stupid, stupid. With no documentation online on storageInfo.xml, I feel like I'm fumbling in the dark when dealing with it. Removing it completely restores the ability to sync changes to an already synced collection rather than REMOVING it entirely.
MM Gold Lifetime since 2.5.5.998
Computer: Lenovo Y580 System: Win7 Ultimate x64 SP1 / Arch Linux Mediamonkey 4: w/ Monkeyrok 5.6, Minilyrics 1.4b, iMonkey Skin
pauby
Posts: 9
Joined: Fri Dec 20, 2013 9:48 am

Re: Android: Root always defaults to /Android/data/(...)

Post by pauby »

I just came here to say exactly the same thing with one exception - MMA was not deleting my Music collection but was moving it to /Android/data/com.ventismedia........ from my /Music/ folder on my SD card (since I uninstalled and reinstalled it has stopped doing this). This behaviour was not present in previous versions and I have not updated my phone Android (as it's rooted Samsung fails to install any updates). So this is a change in behaviour for MMA not Android.

I am on Android 4.4.4, Samsung Galaxy Note 4 with MMA 1.1.3.0502 (just uninstalled and reinstalled).
theta_wave
Posts: 310
Joined: Fri Apr 13, 2007 12:54 am

Re: Android: Root always defaults to /Android/data/(...)

Post by theta_wave »

pauby wrote:I just came here to say exactly the same thing with one exception - MMA was not deleting my Music collection but was moving it to /Android/data/com.ventismedia........ from my /Music/ folder on my SD card (since I uninstalled and reinstalled it has stopped doing this). This behaviour was not present in previous versions and I have not updated my phone Android (as it's rooted Samsung fails to install any updates). So this is a change in behaviour for MMA not Android.

I am on Android 4.4.4, Samsung Galaxy Note 4 with MMA 1.1.3.0502 (just uninstalled and reinstalled).
Thanks for the information, good to know. I'll try to uninstall and reinstall both MMA and MMA-Pro on my phone. Then again, deleting

Code: Select all

/storage/extSdCard/Android/data/com.ventismedia.android.mediamonkey/files/storageInfo.xml
prior to syncing the microSD to MMW (removal of microSD card after powering off the phone or unmounting it from the phone) works fine right now: MMW updates new/updated files accordingly rather than deleting all of the songs from the microSD card.
MM Gold Lifetime since 2.5.5.998
Computer: Lenovo Y580 System: Win7 Ultimate x64 SP1 / Arch Linux Mediamonkey 4: w/ Monkeyrok 5.6, Minilyrics 1.4b, iMonkey Skin
Post Reply