AquaMail Forum

English - Android => How do I... => Topic started by: Khaled.Rifa3i on May 28, 2015, 02:56:31 am

Title: How to completely move the app and the messages to new Phone
Post by: Khaled.Rifa3i on May 28, 2015, 02:56:31 am
Hi All,
I've just got my new phone, i want to move all the data related to Aqua Mail from the old phone to the new one ( including Mail Messages), because the emails are deleted from the server so can't sync them to the new phone, my new phone is not rooted.

Please Help It's completely Urgent.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Khaled.Rifa3i on May 28, 2015, 12:31:23 pm
Hello ParisGeek,
thanks for your help
my old phone is Huawei Ascend P6 (P6-U06) Running Android KitKat 4.4.2 With EMUI 3.0 ( Rooted )
my new Phone is Galaxy S6 Duos (SM-G920F) Running Android Lolipop 5.0.2 ( Not Rootes ) and i don't want to root to avoid voiding the warranty.
Aqua Mail Version: 1.5.5.34.
on my old phone i can access the the system files with root explorer, but again i don't want to root the new handset.

i know there is titanium backup, with it i can backup and restore the AquaMail, but it requires root and i am not welling to root.

Is there any solution without rooting the new handset, If not i would like to mention that i ran through Helium App from ClockworkMod,
which allows Apps and data transfer from phone to phone without needing root access, but while trying it I've got this message  ( Screen Shot ).

Title: Re: How to completely move the app and the messages to new Phone
Post by: Khaled.Rifa3i on May 28, 2015, 12:44:39 pm
Thanks Again for your prompt response,
yes i am using pop3 , our company mails only support POP3 with only 15 MB inbox size that's why i need to move the messages from phone to phone.

P.S. i've edited my 1st comment.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Khaled.Rifa3i on May 28, 2015, 01:02:05 pm
Thanks Alot,
I welcome his answer to this especially regarding the Helium app, as it looks like he can save me 2 years of email messages. 
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on May 28, 2015, 03:41:22 pm
AquaMail does not support copying messages between devices -- you can backup and restore your app settings and accounts, and it's assumed that messages are still available on the mail servers and will re-sync.

Now, if both of your devices were rooted, you'd be able to copy all of the app's data (including the message database), but that isn't something I can "officially" support either.

I see that in your case, neither applies, because of 1) a very limited mail storage quota and 2) not wanting to root the new tablet...

Well, I'm really sorry.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on May 28, 2015, 05:33:19 pm
adb backup/restore doesn't reauire root, but it requires some skills.

So databases can't be part of AquaMail's backup? I think you (well, app) can access your own files in app data directory, or now it is not possible?
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on May 28, 2015, 07:36:47 pm
Well, I could save the database -- with some additional work to reconnect various _id values (accounts, folders, etc).

As for "adb backup" -- I have "android:allowBackup="false"" because Google's developer agreement says you can't store passwords in their backup.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on May 28, 2015, 07:45:33 pm
How can they verify it? :D
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on May 28, 2015, 08:15:09 pm
I'm just not going to have any experiments here.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on May 28, 2015, 11:15:29 pm
Well, I could save the database -- with some additional work to reconnect various _id values (accounts, folders, etc).

As for "adb backup" -- I have "android:allowBackup="false"" because Google's developer agreement says you can't store passwords in their backup.

Kostya,
The current backup file already contains passwords (from the account configurations).
Will be also a password stored in the message database file(s).
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on May 28, 2015, 11:59:36 pm
Yes, but it's just a file, and the user can store it anywhere they wish, it's their decision.

I'm talking about the agreement between me and Google, necessary to use Android's built-in "back up your apps, settings and WiFi passwords".

Apparently backing up passwords is a no-no there.

There is also a requirement to notify the user before backing anything up -- seems intrusive, I mean someone just installed the app, and gets prompted for "Allow back up data to Google cloud?" -- I'm sure it's going to scare a certain percentage of new users.

But now that backup & restore support Google Drive, it should cover more people.

---

But back to backing up actual messages -- that's different, it's something that would need time before it works, and I still think (even though the OP's case is different) -- that these days,  most people's emails are there on the servers, including older ones.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on May 29, 2015, 12:58:48 am
Okay, thanks for your explanations . I understand  your thoughts.

However, it's a specific issue which is related  only for POP3' accounts when the messages are downloaded to the device and deleted on the server.

A solution for this case would be very helpful for the affected users.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on May 29, 2015, 12:58:06 pm
It's not limited to POP3 -- someone may have a low server quota and turn off "sync deletions" for IMAP so that old messages stay.

But -- and sorry if this doesn't sound nice:

I think when someone has a *business* mail account where old messages are *important* because they have to do with *customers* and their *activity* (and so on and so forth) --

-- then maybe, just maybe, such *business* mail account shouldn't have a storage quota that only lasts a week?
Title: Re: How to completely move the app and the messages to new Phone
Post by: Khaled.Rifa3i on June 02, 2015, 07:51:14 pm
Dear Kostya,

First I am not the owner of this organization or responsible of the IT Dept Here, my desktop still have all the Data, but i am travelling all the time and i need them on my mobile.

I would really appreciate if you take a look to this App by ClockworkMod (Helium), It's really fantastic, after i bought the pro Version i was able to sync most of my apps from the old handset to the new one ( Including their Data) without root and it worked like charm - except for AquaMail and two more apps - where backup is not allowed, through this app, i connected the both devices to the computer to enable the app on them, after that i connected them both to my dropbox account, where the Sync process take place.

better than that, although i am pro edition owner of Aqua Mail, i found a free app called Type Mail, and i tried this process (Helium App) between my two handsets and it worked perfectly both ways including attachments.

i think enabling the backup option in Aqua Mail will not break any privacy conditions or policies, it gives the owner of the messages the right to move them to another device if he wanted to, in fact it's a huge advantage for users like my Case. 
 
P.S. my old handset still have the Aqua Mail, and i am still syncing it, just hoping you to decide to enable the backup option, so i can migrate it to my new phone, because really it's two years of business emails and they are very important to me, Just can't loose them.

Just let me know your decision.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on June 02, 2015, 10:21:49 pm
Maybe Kostya can build APK with that flag for you (and maybe do such APKs for every stable versions).

Not ideal, but it is a good compromise.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on June 03, 2015, 12:48:16 am
The flag is useless without an API key from Google, it won't back up or restore.

And to get an API key, one must accept the "terms of use".

And they say:

https://developer.android.com/google/backup/signup.html

Quote
4.10 You agree that in your use of the Service, you and your Applications will protect the privacy and legal rights of users. You must provide legally adequate privacy notice and protection for users whose data your Applications back up to the Service. Further, your Application may only use that information for the limited purpose of backing up the data to the Service unless the user has given you permission for further use. If the user has not given you permission to back up information to the Service, you may not transmit such information to the Service.

4.11 You agree that you and your Applications will not transmit or store sensitive user information, such as user names, passwords, or credit card numbers, through the Service.

I'm not a lawyer, but the above is quite clear to me.

If there is another app developer that (on purpose or through ignorance) violates Google's terms of service for backup, well, it's their decision.

Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on June 05, 2015, 06:48:17 pm
Wrong, use of adb backup feature or Helium app by ClockWorkMod (which re-uses adb backuo android code) does NOT require Google as backup agent. You need ONLY allowedBackup flag set as true. Believe me, I hacked this stuff via Xposed :D

Since Android M, every app will be backed up to Google servers, even sensitive info.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on June 05, 2015, 10:16:21 pm
>> Wrong, use of adb backup feature or Helium app by ClockWorkMod (which re-uses adb backuo android code) does NOT require Google as backup agent. You need ONLY allowedBackup flag set as true. Believe me, I hacked this stuff via Xposed :D

Would it cause anything bad to happen with respect to Google Play backup?

Like, error messages, failures?

I have Play backup turned off on all my phones / tablets, so if you know the answer, please share.

>> Since Android M, every app will be backed up to Google servers, even sensitive info

Wonder if they'll be changing the developer agreement.

Many apps store user logins and passwords (but it's not an excuse to violate the current policy, as far as I'm concerned).
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on June 05, 2015, 11:06:15 pm
Since you don't have Google servers as backup agent in manifest, you can enable allow backup flag without worries.

Google backs up app data only if app declares Google as backup agent in manifest and request api key code for it (relqtively quite a hard implementation, Android M will change it hopefully)
You just enable backing app AquaMail data using adb/Helium.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on June 06, 2015, 12:10:11 am
>> Many apps store user logins and passwords (but it's not an excuse to violate the current policy, as far as I'm concerned).

I think that it's only necessary to backup the database where AquaMail stores the already downloaded emails / attachments - not even user logins and passwords (the user can backup / restore account configurations incl.  login / passwords separately with backup feature which is already available in AquaMail's settings). This should be able without violating the (current) policy, don't...?
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on June 06, 2015, 01:05:24 pm
As far as I know you CAN use even Google backup agent because you can define which preference file you wanf backp and whether include databases too and which one yes/no. Simply passwords/logins you wouldn't i clude in backup or encrypt it so Google or nobody else with bad ideas could break it
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on June 06, 2015, 11:29:03 pm
Well, it doesn't make sense to exclude logins (or passwords, actually -- interesting, how will they deal with that in M...)

I would be happy to allow backup without a Google Backup API key, if someone is willing to test:

1 - that Helium would work

2 - that there is no error message related to missing Google Backup API key
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on June 07, 2015, 01:20:00 am
I just posted a separate .apk with android:allowBackup="true":

http://www.aqua-mail.com/forum/index.php?topic=3636.0

Any Helium users here? Want to see if it would work?
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on June 07, 2015, 02:55:04 pm
Tested. It works well.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on June 07, 2015, 02:59:58 pm
Great.

It was really easy to add a new build "flavor" and override the manifest setting with Android's "new" Gradle based build system.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on June 07, 2015, 07:50:35 pm
So this change will be part of main branch or you will build separatd build with that change? I hope/vote for #1 since it can't worse anything. Just + for end users.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on June 07, 2015, 11:43:31 pm
Well, for now, I'm keeping it separate -- would like to give it more time in case it causes "anything bad" (tm) to happen.

And remember, most people's emails (I think) are available on their servers, low storage quotas are just not as typical today as they were in the nineties :)
Title: Re: How to completely move the app and the messages to new Phone
Post by: mastercb on July 08, 2015, 11:06:36 pm
@Kostya: When you google the internet, there are MANY aquamail-customers, that want to backup and/or transfer their Messages without rooting the device.

So I (and many of your customers) would really appreciate, if you could integrate the "backup enabled" in the official version.

Please do not forget, that the possibility to be able to backup messages with heliun is one more argument for many (potentially new) aquamail buyers !

Thank you very much in advance @the maker of the best mail app ever seen !
Title: Re: How to completely move the app and the messages to new Phone
Post by: mastercb on July 08, 2015, 11:31:02 pm
Why not to use "Pro" ?

This app is phantastic, so why not to support the creator ?

@Kostya: As you see: This feature could be on more argument to switch to "pro"  ;)
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on July 08, 2015, 11:44:36 pm
Why not to use "Pro" ?

This app is phantastic, so why not to support the creator ?

@Kostya: As you see: This feature could be on more argument to switch to "pro"  ;)
+1
I agree to integrate the (extended) backup option as a Pro feature.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 09, 2015, 10:26:29 pm
Afaik that's not possible to implement as Pro only feature since Pro is not done as separated APK, but normal free app is unlocked by unlocker. And the app can't switch that flag by some API or so.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on July 09, 2015, 11:39:07 pm
Afaik that's not possible to implement as Pro only feature since Pro is not done as separated APK, but normal free app is unlocked by unlocker. And the app can't switch that flag by some API or so.

Why do you say that? Pro unlocks the use of identities, for example. Why not this feature?
I also think that this could be possible.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 10, 2015, 10:03:38 pm
"Backup enabled or not" is a build-time setting, it's an entry in an XML file inside the .apk. Not a runtime function.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on July 10, 2015, 10:16:42 pm
"Backup enabled or not" is a build-time setting, it's an entry in an XML file inside the .apk. Not a runtime function.

And that means what...(regarding to define as a Pro feature or even not) ?
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 10, 2015, 10:24:08 pm
It's not something I can enable or disable at run time, from the app's code (depending on some logic).

It's something *fixed* in the app's installation file.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 17, 2015, 01:16:01 pm
Anyway, I would make it enabled by default. I see no potentional issues.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mastercb on July 17, 2015, 04:54:24 pm
+1
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 17, 2015, 08:59:13 pm
I explained above why I will not be enabling it by default.

Title: Re: How to completely move the app and the messages to new Phone
Post by: mastercb on July 17, 2015, 10:45:17 pm
No, that's not right. You explained NOT, why you will not enable it, but you said, you need some time for "testing" ;)


Well, for now, I'm keeping it separate -- would like to give it more time in case it causes "anything bad" (tm) to happen.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 17, 2015, 11:54:51 pm
I'm still not sure about the possible consequences regarding this:

http://www.aqua-mail.com/forum/index.php?topic=3604.msg18169#msg18169

Title: Re: How to completely move the app and the messages to new Phone
Post by: mastercb on July 18, 2015, 12:56:03 am
Aquamail will NOT "transmit or store" something!!
It only provides the ABILITY the user to do so!! (which can even in future ONLY be performed   by the user himself)

So this can never be a violation of the terms of use.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 18, 2015, 09:29:05 am
This^.

I ckecked K9Mail's AndroidManifest file and app even doesn't declare this flag so it means that defualt value (True) is used.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 19, 2015, 09:18:39 pm
Quote
Aquamail will NOT "transmit or store" something!!
It only provides the ABILITY the user to do so!! (which can even in future ONLY be performed   by the user himself)

So this can never be a violation of the terms of use.

Was that qualified legal counsel?

Are you a licensed practicing lawyer?

Would you represent me in communications with Google Play support, should the need arise?

Quote
I ckecked K9Mail's AndroidManifest file and app even doesn't declare this flag so it means that defualt value (True) is used.

Good for them.

Now, is it true that soooo many people don't have their old messages on the mail servers? So they can't just be re-synced?

Or are we having this discussion "in search of the greater truths", meaning "just for the hell of it"?

PS - I may be too cautious here, but, you know, "better safe than sorry".
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 19, 2015, 11:18:01 pm
"However, it's a specific issue which is related  only for POP3' accounts when the messages are downloaded to the device and deleted on the server."

POP3 does not necessarily mean "downloaded and deleted from the server".

And it's very common these days, more and more so, to just leave everything on the server. Especially if you're using more than one device / mail app (desktop or mobile).
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 20, 2015, 01:21:44 pm
Well, we should understand Kostya's fear. Google could remove his app(s) from Store if their bot machine (not humans) finds it breaks their rules.

Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 20, 2015, 01:23:51 pm
And anyway, he can build stable version with "backup enabled" and share it via his website. Is it ok, no?
You will be able to install it as any normal APK.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 20, 2015, 07:30:20 pm
definitely not a fork. I believe Kostya's can do a magic script to do it (release stable version with that flag)
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 21, 2015, 04:35:46 pm
Yes, it's not a "fork" it's just a different build config.

Well, to a user, it's still a different .apk to install, in order to backup / restore. So it *is* an inconvenience.

On the other hand, there has been only one or two cases like this, very low compared to all the other discussion here.

Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 30, 2015, 10:21:16 am
http://android-developers.blogspot.sk/2015/07/auto-backup-for-apps-made-simple.html?linkId=15932577&m=1

You *can* exclude login/password info from backup and you are ready to go.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 30, 2015, 03:23:06 pm
That's M only.
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 30, 2015, 03:54:25 pm
But you will support M, right?  ;D
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 30, 2015, 04:53:18 pm
1.5.9 already runs on M, which 1.5.7 did not, remember the Apache HTTP debacle?

So yes, I support M already, have it on a Nexus 5 in front of me.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on July 30, 2015, 09:18:25 pm
Google walks us through Android M’s promising Auto Backup for Apps feature:
http://www.androidauthority.com/android-m-auto-backup-for-apps-630094/

They call it “Auto Backup for Apps” and according to them, developers come implement this with “zero lines of application code.” Awesome. They do mention that developers will first need to update the targetSdkVersion to 23 in order to enable it and test in the latest Android M Developer Preview. Of course, opting out is also possible and developers can exclude specific app data.

Watch "Android Auto Backup for Apps" on YouTube:
 https://youtu.be/HXacyy0HSW0
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 30, 2015, 09:30:08 pm
This jumped at me right away:

"Apps are limited to 25MB of backup data"

May be enough for a lot of users, but there a certainly enough whose message DB is going to be larger.

"Zero lines of application code.” Awesome.

Yes, "awesome". They always say things like that.
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on July 30, 2015, 09:33:51 pm
This jumped at me right away:

"Apps are limited to 25MB of backup data"

Yes, this "limitation" I've also noticed...  CAAARL!!!l
 8)
Title: Re: How to completely move the app and the messages to new Phone
Post by: pyler on July 31, 2015, 09:29:52 am
25 MB seems enough for me. Why we have to flood servers? Can't be some compression used in DBs?
Title: Re: How to completely move the app and the messages to new Phone
Post by: Kostya Vasilyev on July 31, 2015, 01:42:44 pm
It quite amazes me how much attention this thread is getting.

Given that I pretty much know (or assume) that most people here -- keep their messages on the servers, so the app re-syncs just fine, and also use the app's own backup / restore feature.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Midori on December 29, 2019, 06:40:28 pm
It quite amazes me how much attention this thread is getting.

Given that I pretty much know (or assume) that most people here -- keep their messages on the servers, so the app re-syncs just fine, and also use the app's own backup / restore feature.

Here I am now 4.5 years later, fretting how to transfer my wife's aquamail to a new device. I read all of this thread and hate negative'ism. So easy surely to fix it for the masses like me who have severe server-storage limitations.    Can I not dump the database on an sd card somehow? 
Title: Re: How to completely move the app and the messages to new Phone
Post by: ring on December 30, 2019, 07:01:15 pm
Yes, but it's just a file, and the user can store it anywhere they wish, it's their decision.

I'm talking about the agreement between me and Google, necessary to use Android's built-in "back up your apps, settings and WiFi passwords".

Apparently backing up passwords is a no-no there.

There is also a requirement to notify the user before backing anything up -- seems intrusive, I mean someone just installed the app, and gets prompted for "Allow back up data to Google cloud?" -- I'm sure it's going to scare a certain percentage of new users.

But now that backup & restore support Google Drive, it should cover more people.

---

But back to backing up actual messages -- that's different, it's something that would need time before it works, and I still think (even though the OP's case is different) -- that these days,  most people's emails are there on the servers, including older ones.

You need update android the last version.
Title: Re: How to completely move the app and the messages to new Phone
Post by: Midori on December 30, 2019, 09:07:12 pm

You need update android the last version.

The new (destination) phone IS latest Android update.  The old (source data) phone is no longer updateable to same f/w current s/w, which is why I have to migrate to a new phone !

Title: Re: How to completely move the app and the messages to new Phone
Post by: das1996 on January 08, 2020, 10:50:39 am
Can't you just perform a settings/account backup, then restore that on the new phone?
Title: Re: How to completely move the app and the messages to new Phone
Post by: Midori on January 08, 2020, 11:45:23 am
Can't you just perform a settings/account backup, then restore that on the new phone?

Tried that. Finally, I resolved issue by uninstalling Aquamail and using the stock App which comes with Android.  Easy as Pie !
Title: Re: How to completely move the app and the messages to new Phone
Post by: mikeone on January 09, 2020, 08:23:11 am
Can't you just perform a settings/account backup, then restore that on the new phone?

Well, AquaMail has a Backup / Restore feature in the settings:
-> Settings -> Data storage -> 'Backup and restore'
Title: Re: How to completely move the app and the messages to new Phone
Post by: das1996 on January 10, 2020, 10:52:28 am
I just used titaniumbackup to backup/restore.  Now that's easy as pie.  Only issue is it requires both devices to be rooted (at least temporarily) to create and restore the backup.