quinta-feira, junho 09, 2011

How to re-upload Endomondo's workout after having deleted it on the site

Imagine you've deleted a workout from your endomondo's profile in Endomondo's website. As of today there is no possibility to recover it to the site even if it still is in the phone.

In my case either was my phone having network problems or Endomondo's site was with problems. After my workout only part of it was in the site. It the phone the usual checked signed was replaced by two self-pointing arrows (later I discovered it means that the upload is not yet finished).

So, in Endomond's site, I deleted it and try to re-upload from the phone (Manual Upload and turning off/On Online Tracking) a few times... still didn't work. When network came back (or Endomondo fixed the problems in their site) the arrows were replaced by the usual icon. But in the site the workout was still missing. And in the phone, re-upload function disappeared. So I posted in Endomondo's facebook page: 
Today, because of network problems in the area where I was training, my workout was only partially uploaded.When I arrived home I saw a icon different than usual, two arrows. I tried to do "Manual upload" but no success (probably due to network problems still going).The problem was that I deleted the workout from Endomond's Page in order to try to solve the problem above... 
 Now phone network OK, and the arrows gone, but no workout on page.How can I solve this? I still have the workout on my android phone.
Endomondo's Answer:
Hi, we had some minor issues last night, but it is fixed now. If you have deleted the from your profile at endomondo.com there is no way of getting it back unfortunately. Sorry, Ture
Crap, there is an obvious missing functionality, like "force re-upload", undelete or, at leat, the question "are you sure... ?" should warn that there is is not possible to re-upload.
But I think this is only temporary as Endomondo will look into this problem somewhere in the future. Meanwhile I wanted my workout in the site.

But there is a solution, at least in android phones with SDCard (all I think):
I find out there is, on android phones, a way of exporting Endomondo's database (db).
Also, there is a way of importing it.
Analyzing the file I discovered that DB is actually an SQL Lite DB, so I copied it, downloaded an SQL Lite Editor and tried my luck:

So, my guess was that, if I changed the right values I might be lucky.
All my uploads were done, so I needed an incomplete one. To achieve this I turned off all networks on my android phone and recorded a new workout, re-exported the database and opened it in SQLite editor. The new workout record was different with uploadStatus=0, lastUpload=-1, the rest were normal fields.

In the missing workout, I changed those values and re-imported the modified db in Endomondo, connected the network and a few minutes later, finally, it appeared in the website.

So the instructions are:
The following, if not done properly might damage your Endomondo database. You might loose your workouts on your phone. If you do not feel comfortable in the following instructions don't do it)
  1.  Backup Endomondo DB. See instructions here:  http://endomondo.helpserve.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=79&nav=0,2,5
  2. Copy the file created in last step to your computer (Endomondo's backup will be a file in SDCard root named EndomondoDatabase).
  3. Backup the copied file because you will modify it and if it gets corrupted you'll only notice in Endomondo. And it that case it will be to late, you loose your data.
  4. Use a SQLite Editor and open the database file. You can use this one: http://sourceforge.net/projects/sqlitebrowser/
  5. Find the missing workout (for example by distance or other criteria like starttime);
  6. Change the fields uploadStatus and lastUpload to 0 and 1  respectively;
  7. Save the database (don't forget step 3); 
  8. Replace the modified database in your sdcard root directory with the one modified (in step 7).
  9. Re-Mount the sdcard.
  10. Start endomondo.
  11. Import the new DB into Endomondo. See instructions here:  http://endomondo.helpserve.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=79&nav=0,2,5
  12. In Endomondo, go to Settings > Workout Preference > Online Tracking, turn it off and and again back.Make sure your mobile phone has network, and a few seconds later your workout should be in the site (it may take a while to the data to be transmitted).
 Note: It looks there is a an sqllite db editor to Android. You may try to edit it directly in the phone. In this case don't forget to backup the backup.

20 comentários:

C3 disse...

Hi, I've the same problem but I'm not able to view data when I open the endomondodatabase with the SQLite Database browser ...
I use android and it should be as you describe, but ...

Any idea ?

Maybe the db is now encrypted ?

Thanks

Hugo

Nathan disse...

I also get no data when I open the database with this program. Any ideas?

evilripper disse...

thanks! please insert the link to new site support in my nexus S the backup tip works only without password (the field password must be empty)! I wasted my time to discovering this thing! :-)

http://getsatisfaction.com/endomondo/topics/can_i_copy_my_history_in_the_phone_and_move_it_to_the_pro_app_or_a_new_phone

Karel Hübl disse...

I followed your instructions, but after reuploading workout to the server, the workout was still missing on the web pages. Maybe endomondo added some aditional validation logic...
But finally I succeded:

I had to switch off online tracking in the endomondo app. Then create new workout (start and stop workout in android app) before backupping the database.
Then I used workoutId of this new workout instead of the workoudId of workout deleted from the server. This means:
1) delete [workout,trackpoint, laptimes, music] tables where workoutId=[new workoutId].
2) update [workout,trackpoint, laptimes, music] set workoutId=[new workoutId] where workoutId=[deleted workoutId]
3) follow step 5 in the original instructions.

Regards K.

Anónimo disse...

Thanks Karel !

You give my the good way.

I'm not sql expert, so please find my sql query for example

delete from workout where workoutid='376762741714215611';


update workout set workoutId='376762741714215611' where workoutId='1134294434260756611';

Anónimo disse...

delete from workout where workoutId = '-4548365382744780217';
delete from trackpoint where workoutId = '-4548365382744780217';
delete from laptimes where workoutId = '-4548365382744780217';

update workout set workoutId='-4548365382744780217' where workoutId = '5419760935111422556';
update trackpoint set workoutId='-4548365382744780217' where workoutId = '5419760935111422556';
update laptimes set workoutId='-4548365382744780217' where workoutId = '5419760935111422556';

Anónimo disse...

Thank you, thank you, thank you : it works !

Anónimo disse...

is there a way to update more then one line at same time? i need a day to update trackpoint :s

Beto disse...

Thanks! It's work!

sysadmin disse...

This method did not work for me. Restoring modified database, workout appears not uploaded but when endomondo uploads to web, did not appear. I have made another change, modify workoutid value. I think that web record this id and trying to reload same workout is not permitted.

Anónimo disse...

if you can't open endomondo database with SQLite Database browser, try SQLite Studio...
http://sqlitestudio.one.pl/index.rvt?act=download

I opened with it..

Anónimo disse...

I am sure this pаragraph has touched all the internet people,
іts really really good aгticlе
on builԁіng up new ωeb sitе.

Here is mу page: tasmy led wrocław

Anónimo disse...

I аm not ѕure ωhеre уou are
gettіng your info, but great tоpiс.
І needs tо sρend somе time learning much more or unԁerstanding mοre.
Thаnks for fantaѕtіc infоrmаtiоn Ι was loοking for thіs infoгmation foг my mіssion.


Loοκ intο my wеblog; http://lavegaent.com/

Anónimo disse...

We stumbled over herе coming frоm a diffеrent web adԁгesѕ and thought I may аs wеll check things
out. I liκe what I see so noω і'm following you. Look forward to looking at your web page again.

My homepage oświetlenie led

Anónimo disse...

It's impressive that you are getting ideas from this post as well as from our argument made here.

Also visit my page: Strona WWW

Anónimo disse...

This is а topic whісh iѕ near tο my heаrt.
.. Best wishes! Where aге yοur contact detаilѕ though?



My wеblog - Ogrzewacze

Anónimo disse...

I always spent my half an hour to read this blog's articles all the time along with a cup of coffee.

Stop by my webpage ... campostonline.com

Anónimo disse...

There is definately a great deal to find out about this topic.
I like all of the points you have made.

my blog: Ccccofva.Org

Anónimo disse...

In the past, the gold standard and an ineffective or nonexistent
Federal Reserve have enabled financial and economic calamity,
economists have found.

My web-site: ADP Dental Plans

FAramka disse...

Hi,

I don't know how to make backup of database, because link http://endomondo.helpserve.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=79&nav=0,2,5 is out of date.
Could you please to describe how to do it? (I can't find any solution in the Internet)

Thank you in advance!