• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[fixed in 1.4.6]Storage Location moved unexpectedly
#1
If the tablet is restarted while MSP is running, it happens "sometimes" (I have not yet investigated the exact conditions when this happens) that MSP reports "database not found, shall the internal backup be restored" or the like. If I answer "No" the library is empty, if I answer "Yes" it seems to work and the restored library seems OK.
BUT: the database is NOT restored to the original directory on the external sdcard that was set before:
/storage/sdcard1/Android/data/com.zubersoft.mobilesheetspro/files
but to SD0 instead.
Now mobilesheets.db exists twice, on SD0 and SD1. The previous one on SD1 is still OK, I can change the path and use it again.
Not a big deal, I know how to handle it and can easily fix it manually. But it should not happen. It's too easy to mix it up, backup the wrong database and rely on an outdated backup that does not contain later changes.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#2
(04-22-2016, 07:49 AM)itsme Wrote: If the tablet is restarted while MSP is running, it happens "sometimes" (I have not yet investigated the exact conditions when this happens)

I have noticed unplugging the charger on my phone sometimes causes apps to restart. Maybe something like that is causing the problem.

I'll let Mike answer about the moving database Smile

Andy
Reply
#3
This post is to report the MSP issue.
One example in my case was caused by Google Now: it is started by swiping up the Android buttons, but I don't use it and don't want to. If I did that swipe accidentally Google Now was opened and invited me to join. Without internet connection that caused a message saying "no internet connection" and that well-known spinning button and prevented all other actions for a long time. To stop that I often had to restart my tablet. The final solution was to install a little app that links into that "swipe up buttons" action and replaces starting Google Now by a menu that allows starting other apps.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#4
That problem would indicate that your device is taking a very long time to mount the external SD card upon reboot. My app waits about 10 seconds for the external SD card to be mounted (if the storage location points to an external SD card), and in the case that it isn't mounted in that time, it reverts to internal storage. That is really strange that your device is taking that long to do that though. If people want, I can change the behavior so that my app will wait for awhile for the SD card, and if it isn't detected, prompt the user for what to do (wait longer, switch to internal storage, close the app).
Reply
#5
This should have been fixed in version 1.4.6 (you will be prompted as to what action you want to take), so please let me know if you see it again.
Reply
#6
Yes, the issue is fixed. When I restart the tablet while MSP displays a song, the new option dialog is shown when restarting MSP. I select "continue waiting" and everything is fine. Many thanks.
May I propose an additional option: let the user replace the storage directory by a different one.
I ran into an issue when I switched from Android 4.2 to 4.4 and back. The different Android versions had changed the folder name of the SD card's root directory. There are other reports in the forum that make me think that this also happens with other Android versions.
Currently the only possibilities to fix this are either moving all the data to the internal memory or using Sciurius' (excellent & useful) external tools.
see
http://zubersoft.com/mobilesheets/forum/...p?tid=3144
http://zubersoft.com/mobilesheets/forum/...p?tid=2978
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#7
I am using an Acer Iconica tablet, Android 5.1

I moved the Mobile Sheets Pro app to the sd card (sd1), however the database that informs the app still points to sd0, so I cannot load any of my music files. I could batch import from the new location on sd1 I suppose, but then I would lose all the metadata connected with the files - genre, collections, setlists etc.

How can I change the database to refer to the new location, but retain all the other information about all my music files?
Reply
#8
You can do this if you expose the database file in the storage settings, transfer that file to your PC, use an application such as sqliteadmin to open the database, run a query on the database to update all paths so they reference sdcard1 instead of sdcard0, then drop the database back on the database and reload the application. A command for updating the database would be something like:

UPDATE Files SET Path = replace(Path, '/sdcard0/', '/sdcard1/' ) WHERE Path LIKE '/sdcard0/%'

You'd obviously need to put the exact path in place of /sdcard0 and /sdcard1.

Mike
Reply
#9
(05-05-2016, 08:52 AM)Zuberman Wrote: You can do this if you expose the database file in the storage settings, transfer that file to your PC, use an application such as sqliteadmin to open the database, run a query on the database to update all paths so they reference sdcard1 instead of sdcard0, then drop the database back on the database and reload the application. A command for updating the database would be something like:

UPDATE Files SET Path = replace(Path, '/sdcard0/', '/sdcard1/' ) WHERE Path LIKE '/sdcard0/%'

You'd obviously need to put the exact path in place of /sdcard0 and /sdcard1.

Crikey!

This is all very well for the more computer literate user, but this is an app primarily used by musicians not tech experts.  It might as welll be written in Ancient Greek for a lot of your customers.

Is there not another way to handle this problem?
Graeme

1: Samsung 12.2" SM-P900: Android 5.0.2 
2: eSTAR GRAND HD Quad-Core 4G 10.2": Android 5.1 
3: Home-built BT pedal

Some of my music here
Reply
#10
Moving the application directory without doing it through MobileSheetsPro itself is not recommended for anyone. If the user changes the MobileSheetsPro storage location in the MobileSheetsPro settings, all of the files will be properly moved and the database will be updated to reflect those changes. There is no benefit to trying to move the application through the OS unless this done before the library is constructed.

Mike
Reply
#11
Please refer also to the Marshmallow Thread in which Sciurius provided me a Perl tool to solve a similar problem due to the marshmallow update. Much easier to use than sqlite.
Reply
#12
Exclamation So, if I move the app back to tablet storage, via the OS settings process, my files should be able to be accessed as before?

Then I could move the storage location to the SD card by using the MobileSheets settings, then the database will be updated to point to the new storage folder?
Reply
#13
In theory, yes, as long as the paths all remained the same as they originally were.
Reply
#14
(05-06-2016, 03:43 AM)Zuberman Wrote: In theory, yes, as long as the paths all remained the same as they originally were.

Smile  Success. I copied my file folder to the folder that MobileSheets said was empty and it all works again - thanks for the help.
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.