mrrfv / open-android-backup

Back up your device without vendor lock-ins, using insecure software or root. Supports encryption and compression out of the box. Works cross-platform.
http://openandroidbackup.me/
GNU General Public License v3.0
674 stars 37 forks source link

This is a fake issue. [3in1] #43

Open eshate opened 1 year ago

eshate commented 1 year ago

Yeah, sorry. I know that Github isn't for social stuff, Github is for work. But sometimes this is the only direct space to address appreciation to Devs. So, yeah - you can label it "APPRECIATION".

... okay, I will manage something, but really - i'm forcing it. I don't really feel that I've encountered an issue. So I don't know I can reproduce it technically without any doubts. So just take it as "user story" or sth.

Device info

Manufacturer/Model: Xiaomi Android version: Migration from 9 to 11 Custom ROM/rooted: Migration from MIUI 11 to ArrowOS 11 (Gapps, stable) Model: Redmi Note 5 (Whyred)

System info

Available disk space: A lot Operating system: Linux / PopOS


Task: I wanted to backup simple stuff for my girlfriend's old phone, which has stock MIUI, bloaty as hell. I'm running on ArrowOS on my Lavender (XRN7) - and from there I know that it's very, very stable and fast. Also, I used the script before, for my phone, and it made it's job smoothly (only export, no restoring).

Let's split it like that:

  1. ISSUE? While copying files from Redmi Note 5 the script just stopped working. I don't have any logs, because my thoughts was "okay, it was 50GB of data, it could break". It was somehow normal to me. After manually copying the biggest folder (DCIM of course) - I ran it again and it worked just fine. I cannot say that it was a script problem, because later on I've noticed that I didn't turn debugging "fully on" - in Xiaomi you need to have SIM inside or be logged to Xiaomi Account for enabling debug app install or something like that. I think it was a connection problem, so I don't know why I'm writing this, maybe just to tell what I've encountered.
  2. ACTUAL PROBLEM/QUESTION/ENHANCEMENT? What is interesting for me, though, is the problem of moving data from closed stock to AOSP-like ROM. I had no problems with restoring this backup (technically), but I have these thoughts:
    • Backup included MIUI apps which will have to be deleted by me manually. Maybe there is an area of improving the script here, when user want to make action like mine? I know that this is not a "migration" script, but "backup". But it could be nice to have option to mark if you're moving from stock to custom. After this, script could automatically delete system apps with no use on the new device. But that's a meaning of hooks, I suppose? These are too hard for me for now, sorry if I'm noobing here.
    • Second thing is more likely an issue - no contacts were restored! In backup-tmp I see that every contact is written in it's own .vsc file. But no single one was restored. Cannot tell why. But I have all the files, so I can restore them manually. Maybe also there could be a naming space for this? For example - I'm putting all contacts in one file, packing it and just "pushing" to device with help of your script?
    • Cleaning - even though I have a lot of shitty MIUI folders - everything works. There are no stability problems. I will try to delete some things manually and hope to not destroy anything. Maybe in the future this kind of simple cleaning could work?
  3. ACTUAL REASON OF THIS POST I want to say - THANK YOU! This is very simple and needed tool. It's so simple that it is clear - problems were on my/device side. This script is the future - every other backup solution is complicated and slow. I really love it. I wish you all the best and want to giving you my words of support - hope that this project will have future. Thanks again!

🦄 💙 🍾

mrrfv commented 1 year ago

Thanks for the kind words! This is the first issue I've opened after being on hiatus for a while, and it's been heartwarming to say the least.

no contacts were restored!

This sounds like user error, or an issue with the companion app, which wasn't the best code I've ever written. Just to confirm, did you press the "auto-restore contacts" button on your phone when the script asked you to? I don't have a Xiaomi device with me and most of my testing is done on clean AOSP, but I'll try to reproduce this nonetheless.

Maybe in the future this kind of simple cleaning could work?

I feel like this is out of scope, as auto-cleaning like this could be destructive to the user's files. Not a bad idea though!

Backup included MIUI apps which will have to be deleted by me manually

The script backups apps by getting the app list from adb and individually pulling each app from the device. adb is specifically told to only give us the list of third-party apps, so technically MIUI apps shouldn't be there as they'd be classified as system apps. Not sure what's happening there.

the script just stopped working

This is likely an issue with the cable you were using.

mrrfv commented 1 year ago

I just tested the companion app, and it's fully working on my test device running phhusson's Android 12 Treble GSI.

eshate commented 1 year ago

Oh, I forgot to maitain this issue, sorry.

did you press the "auto-restore contacts" button on your phone when the script asked you to?

I do not recall that I've even noticed this button. Answer is probably very simple - I didn't.

technically MIUI apps shouldn't be there

Well, I don't know "how" ADB knows this, so if I can ask - by saying "third party apps" you mean "not-systemized" apps? If yes, then maybe not all apps from MIUI are systemized, but when I see givecom.mi.android.globalFileexplorer - I'm not sure.

This brings me to another question, tell me if I'm wrong (I cannot read code, sorry for not checking this by myself): If it's true and ADB is picking only "third party apps", and leaves "systemized" apps - then maybe it should be written somewhere bold? Because, for example - I have rooted phone with some third-party apps which I systemized for some reason. And it's good to know that I should un-systemize them before I will make backup. Maybe it's obvious for some people, but as we talked somewhere else - you're aiming for non-technical users also, so maybe it's a good idea to point that out somewhere.

Just waiting for your answer and I will close this soon.

mrrfv commented 1 year ago

Sorry for the delay, didn't notice your reply.

I have rooted phone with some third-party apps which I systemized for some reason. And it's good to know that I should un-systemize them before I will make backup

This is a valid point, and I'll include this in the documentation later. Thanks!

by saying "third party apps" you mean "not-systemized" apps?

Yes.