Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
I have been using MSP on an old 10" tablet for quite a while. All of my PDF sheet music is held in a folder structure on an SD card. I now want to use the program on my 12" tablet and want to keep all my settings and annotations from the old tablet. A full backup from the old, restore to the new doesn't work as all of the PDFs are now placed in the default location rather than pointing at the already existing structure on the SD card now installed in the new tablet.
Is there a way to transfer just the relevant data from MSP on the old tablet to the new one? I'm happy to go and dig around in the file system and copy whatever's necessary, if that will work.
Thanks.
______
SteveR
Posts: 13,381
Threads: 302
Joined: Apr 2012
Reputation:
236
07-23-2021, 03:10 AM
(This post was last modified: 07-23-2021, 07:08 AM by Zubersoft.)
You typically can't cleanly move a library on one device to another if you were using an SD card path. This is because SD cards are mounted with unique paths (which started with Android 6.0), and write access is not granted to them without going through Google's folder picker. Having said that, MobileSheetsPro will attempt to preserve your folder structures if all files and folders that you imported into your library were relative to the storage location. If you unchecked the option to let MobileSheets manage your files, then things become more complicated. So there are two paths depending on whether you let MobileSheets manage your files.
If MobileSheets was managing your files/folders:
1) First, go to Settings->Other Settings->Clear Library to remove all the existing files in the default storage location.
2) Next, go to Settings->Storage->Set MobileSheets Storage Location and pick the folder you want to use on the SD card (picking a custom folder will result in slower write speeds, so just be aware of that)
3) Now go to Settings->Backup and Restore->Restore Library from Backup, select your .msb file and uncheck the option to restore settings. It's very important that you uncheck that option so that the storage location isn't modified as part of the restore.
Once the restore completes, you should see that all of the files were extracted to the storage location and all of the files/folders should mimic what was on the other device.
If you managed your own files/folders:
1) Set the storage location to the folder you are using on the SD card. It's still important to do this if you are managing your own files so that MobileSheetsPro has write permissions. If you have files all over the SD card, then you need to set the root of the SD card as the storage location.
2) Go to Settings->Other Settings->Fix Broken File Paths. Use the automatic option. MobileSheetsPro should scan for all the missing files and hopefully find them under the storage location. This will repair the database and then everything should work.
Let me know if that helps you get things up and running again.
Mike
Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
Thanks for the quick reply. I have set to manage my own folders as I have a folder structure (e.g. Realbooks>Bb, Realbooks>Eb, etc), so I'm hoping that will be reflected when I restore. My experiments so far haven't been successful, but I've restored settings each time. I'll give your suggestion a go when I've got a quiet few minutes to concentrate and will report back.
Cheers, Steve
______
SteveR
Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
Hmm... this didn't work, unfortunately.
My old tablet is set to manage my own folders so MSP didn't copy the files from the SD card, but the storage location is left set at the default.
I set the new tablet to manage my own folders and pointed the default folder at the top level of the structure holding the PDF files for my music. Unexpected folders named after specific tunes were created but were empty. Also, unchecking "Restore settings" means that you have to set your configuration again, which is a pain.
I think this just doesn't work as I'd hoped it would. It seems to me that upgrading to a new tablet would be something that people would want to do now and then, so it would be good to handle this.
I think I'm going to give up for now. Fortunately, I don't have a huge number of annotations so it won't be too painful to rebuild from scratch.
Thanks, Steve
______
SteveR
Posts: 13,381
Threads: 302
Joined: Apr 2012
Reputation:
236
It most likely can be fixed to work correctly with the right sequence of actions, but it might be simpler for you to just rebuild if you don't have a lot of annotations. Things are certainly simpler if you let MobileSheets manage your files, especially when dealing with a removable SD card. In the next couple months, Google is going prevent applications on Android 11 devices from accessing files outside of their application data directory unless those applications have been approved for unrestricted access (most applications won't be granted this). I'm going to apply to see if they will let MobileSheetsPro continue accessing the entire file system as many users want to manage their own files, but if Google rejects my request, then it will no longer be possible for users to manage their own files and folders on Android 11 devices. All files will have to be under /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files or the equivalent path on the SD card.
Mike
Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
07-23-2021, 07:22 PM
(This post was last modified: 07-23-2021, 08:21 PM by raichea.)
Thanks... I understand the way Android is being locked down. I would hope Google would be receptive to allowing MSP some leeway.
As well as annotations, I have some additional info (key, time signature, etc.) on some tunes that it would be less convenient to reconstruct. So I'll continue to experiment with restoring, allowing MSP to manage the files on the SD card and that will better prepare me for future changes to Android and MSP, I guess.
______
SteveR
Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
Depending on exactly how I restore, sometimes my multi-song PDFs get renamed: e.g. Fakebook.pdf becomes First Song TitleFakebook.pdf, all files get dumped into the one directory and a random sample of songs get folders created but contain no files. There's obviously some logic behind what happens but I've spent too much time playing with this now, so I may just rebuild.
I'm quite keen to keep my existing folder structure but, following your comments, I'm a bit concerned that further Android changes may make managing files myself impossible and cause problems when Android 11 is updated as you suggest. I'm not anticipating upgrading my tablet again for a few years at least, so I anticipate Android 12 (which I expect will be made available for my tablet) will be the version it ends up with and will no doubt make things even more difficult.
Can you therefore advise on the best way to have the PDF files and any audio files located on an SD with the best chance of avoiding problems in the future?
Thanks. Steve
______
SteveR
Posts: 874
Threads: 87
Joined: Dec 2013
Reputation:
10
07-23-2021, 11:52 PM
(This post was last modified: 07-23-2021, 11:53 PM by Skip.)
I put all my 'books' into the 'Albums' tab and let MSP manage the files. Some of the books are single multi-song pdf's and some are separated into single songs. I have the file storage location on a SD card. Keeps everything simple for me and I can't see any advantage in managing the files myself.
Dell Latitude 13.5" 2-in-1 Ubuntu/Win 11
Samsung Note Pro SM-P900 12.2 Android 5.0.2
Samsung S7+, Android 12
Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
I have a similar set of PDFS.... four or five multi-song ones and maybe a dozen or so individual songs. The reason I didn't allow MSP to manage the files originally was that the books were already in a directory structure on an SD card with, for example, separate folders for Eb and Bb transposition versions. This made it simple for me to get to particular tunes reasonably quickly using a PDF viewer.
While I was learning to make the most of MSP, I retained that folder structure so that I could still use the PDF viewer. I selected "manage myself" because I didn't want to end up with duplicates of everything taking up space on the SD card.
Now I'm a fairly seasoned user, I agree with you and am happy to let MSP manage the files and can live without the folder structure.
My concern now is that I don't want to end up selecting a folder for MSP to manage that ends up being unusable due to coming changes in Android - just asking for advice on best practice to minimise the possiblity of this happening.
______
SteveR
Posts: 13,381
Threads: 302
Joined: Apr 2012
Reputation:
236
With the Windows 10 version, I modified the code so that if you copy your files and folders under the storage location before importing them, the files won't be moved and the folder structure will be maintained. This also works after backing up and restoring the library. I need to run through some tests on Android, but I don't believe it currently works this way as the option existed to stop MobileSheetsPro from managing the files. If I modify the code to support this mode of working, then you'd be able to both let MobileSheetsPro manage your files but also maintain your directory structure. Unfortunately, I'm not sure how soon I could implement the necessary changes for this as I'd have to do analysis on all the pieces of code that would be impacted. I do think it's going to be very important for me to support this with Android 11 though so that users can still manage their files/folders so long as they are under the storage location required by the OS.
One thing I should mention is that if you had used just internal storage for your library instead of utilizing a removable SD card, then you could have restored the backup file and just selected the option to restore to the original file locations. This would have worked on any device. It's only when a removable SD card is involved that things become difficult due to the SD card being mounted with a unique file path on every device. SD cards have never really worked well on Android in my opinion and Google has made working SD cards painful for developers.
If you want to avoid all potential future issues, you'd need to let MobileSheetsPro manage all your files, and when you go to assign the storage location, tap the SD card on the "Set MobileSheets Storage Location" dialog which will pick a path like /storage/XXXX-XXXX/Android/data/com.zubersoft.mobilesheetspro/files. This path will still be accessible with Android 11+.
Mike
Posts: 394
Threads: 28
Joined: May 2019
Reputation:
12
07-24-2021, 05:40 PM
(This post was last modified: 07-24-2021, 09:27 PM by McAroni.)
As I wrote in this discussion:
https://zubersoft.com/mobilesheets/forum...2#pid33292
Maybe there could be an option for those users with their own folder structure on an SD card to sync or restore only the library (Database) and let MSP do the rest to find the files. Just a point you could tick on or of before synching/restoring, like: include files. To avoid unnecessary copied files.
Maybe this could be helpful for those who have devices with older os versions than Android 11...
Samsung Galaxy Tab S7 FE Android 12
Samsung Note Pro 12.2 LineageOS 14.1
Huawei Media Pad M3 lite Android 7
Posts: 29
Threads: 6
Joined: Jun 2019
Reputation:
0
(07-24-2021, 01:54 PM)Zubersoft Wrote: <snip>
If you want to avoid all potential future issues, you'd need to let MobileSheetsPro manage all your files, and when you go to assign the storage location, tap the SD card on the "Set MobileSheets Storage Location" dialog which will pick a path like /storage/XXXX-XXXX/Android/data/com.zubersoft.mobilesheetspro/files. This path will still be accessible with Android 11+.
Mike
This works fine and happy to operate like this as I don't need the structure any more.
Slightly unexpected behaviour when tapping the SD card icon - the path oscillates between /storage/XXXX-XXXX/... and /storage/emulated/0/.... but selecting the former works fine. I was slightly puzzled (after restoring) that the path wasn't visible on the SD card using the system File Manager - even with Show Hidden Files selected, but I guess that's Android 11 protecting itself, which is slightly irritating. Viewing the SD card on my laptop, the path (and the files) are all there, of course.
Thanks.
______
SteveR
Posts: 13,381
Threads: 302
Joined: Apr 2012
Reputation:
236
McAroni - With Android 11, MobileSheetsPro can't just scan the SD card to find the appropriate paths for the files. So if you backed up only the database, then copied that to another device, the SD card on that device will be mounted under a different path, so MobileSheetsPro won't be able to find the files, won't be able to scan for them (as it doesn't have permission to just scan all of the files and folders on the SD card) and potentially won't be able to access files outside the application data directory if MobileSheetsPro is not given unrestricted access by Google. On earlier Android versions, you could certainly try to fix things with the Settings->Other Settings->Fix Broken File Paths tool, but that's beyond the capabilities of most users, and you would still have to grant MobileSheetsPro access to the root folder of the SD card before doing this, which most people probably wouldn't realize.
Google is moving in this direction whether we like it or not, and there will be fewer and fewer devices available that aren't running the newer Android versions. So I really do think the best option is to support something more similar to the Windows 10 version where you can pick a storage location, then place all your files/folders inside it, then import those files and MobileSheetsPro will retain the folder structure in use. Obviously Android 11 might throw a wrench into this if Google doesn't provide unrestricted access, so users would have to understand that they need to copy their files to the application data directory before importing them if they want to maintain their folder structure.
As a final comment, if you enable Settings->Storage->Expose Database, you can already copy and restore the database without using the library backup/restore functionality. If you use a custom storage location on the internal storage, the database will be under that folder. If you use an SD card, the database is stored under /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files. Just enable expose database on the other device, then overwrite mobilesheets.db with the one from the other device. This accomplishes the same goal but doesn't open up pandora's box by allowing people to incorrectly backup/restore their libraries and then angrily contact me when they've lost their library due to not understanding the consequences of backing up only the database.
Mike
Posts: 394
Threads: 28
Joined: May 2019
Reputation:
12
Understood. Thanks
Samsung Galaxy Tab S7 FE Android 12
Samsung Note Pro 12.2 LineageOS 14.1
Huawei Media Pad M3 lite Android 7
|