yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
That doesn't necessarily mean backups are being saved there. It's a fallback location. So, perhaps your sdcard wasn't available at that time.

It does actually ship with a client binary. The thing to note is that none of the provided binaries are added to PATH.

You'll have to have this same module installed alongside the upcoming adk version to use the ssh client. More details will be provided once the update goes public. Thanks.

1) As a precaution measure, yes...

3) and 4) Backups are automatic. That option in 4) is meant for manual/custom backups.

There's a config construct to schedule it (bkp <extra rsync option(s)> <SOURCE(s)> <DEST>), example: <bkp --del $i/Download $i/Dukto $e/important_data>. Check the config file for additional details. Keep in mind that this feature has some issues. These will be cleared out on the next update.

The default config should be enough for most people. If you want <wipe> feature as well, simply uncomment the keyword.

inc

inc term|provider|trebuchet

wipe

Blacking up all system apps is not a good idea. The upcoming update will be more flexible in regards to this (i.e., with options to backup only apk or just data).

5) Simply flash the same version again from TWRP and data migration will start right away. There are no additional steps.

6) That's Right. If <wipe> is enabled, adk takes care of all the wiping after data migration.

No data is ever moved during backup operations! That happens during data migration only (right before a factory reset). So, a TWRP backup before the migration would include everything, whereas after, it wouldn't contain the migrated data.

In sum, usage is as follows:

Fist setup

1. Install adk from Magisk Manager or TWRP.

2. Reboot to apply changes.

3. Forget.

Upgrades

0. Remember adk. ;)

1. Install adk from Magisk Manager or TWRP.

2. Reboot to apply changes.

3. Forget once again.

Factory reset

1. Install the same version again from TWRP.

2. If <wipe> is enabled, simply reboot. Else, perform a factory reset manually.

Note: <wipe> preserves most system settings, data such as saved Wi-Fi, contacts, all Magisk modules, and more.

Once system has fully booted, all migrated apps and respective data are automatically restored. You'll see these apps popping on your app drawer, one by one.
[Magisk] Hammerhand.17:
Ok, I almost get it. Thanks for your pacience.

If I understood correctly, once I set backups repeating for 24 hours, they are made automatically.

I don't fully understand the "bkp <extra rsync option(s)> <SOURCE(s)> <DEST>" code, will take a deeper look to it before using it.

I will let the module backup just user apps if it's safer.

If no data is moved, why do I have in /data/media/ask/backups about 5.5 GB. of data? Maybe it's because I used the "test backupd" option? Are they safe to erase now?
[Magisk] VR25:
That's right.

Better leave this alone for now, as you probably won't need it at this point.

That's the actual backup folder! APKs and respective data are copied to that location.

You seem to be confused about migration and backup features. These work independently. However, both follow the same config rules. In other words, the <inc> and <exc> lines dictate which apps+data should be backed up (every $bkpFreq hours) and migrated (before a factory reset).
[Magisk] Hammerhand.17:
Yes, I think this is my problem: I was confused about migration and backup. I think I only need migration for now, to make a clean flash. Can I delete the backup folder, then, as it won't be used for migration after the clean flash?
[Magisk] ssj435:
When selecting option

7) Remove select backups of uninstalled apps

It doesn't remove 'obb' and 'apk' backups only 'data' backup is removed.

BTW Thanks for such a great module..
[Magisk] VR25:
Even better, delete the folder backups and place an empty file named "backups" there. This will prevent the folder from being recreated.

Thanks, I'll take a look.
[Magisk] Hammerhand.17:
This way, backups are not created, but migration is correctly developed?
[Magisk] VR25:
That's right.
[Magisk] Hammerhand.17:
Thanks again for your module and your support. My room have a new version, so this evening I will make a full backup of internal memory and will make the clean flash procedure. Add soon as I'm ready again will post the results here.
[Magisk] fengmubai:
The adk will exit directly if an app restored failed. It should skip the failed app and go on.
[Magisk] cantenna:
Thanks for another great module VR25 :)

Still trying to understand full capabilities here...

Edit; just tried the wipe, working brilliantly! Pretty awesome, I must say.

Now to figure out ssh backups
[Magisk] goldencore:
One question:

When I restore apps via the wizard, is there a way to e.g select all apps, but WhatsApp and Threema, because I used their inbuilt restore features? I am not exactly sure if I can achieve this via the filenmae patterns I can enter.
[Magisk] m.sazzad:
Does this work on miui? I'm running oreo 8.0 miui.
[Magisk] elton_rb:
Pretty cool module man!

A sugestion: is it possible to include a status bar, or some way to know the progress of the recovery?
[Magisk] Terrigible:
[MENTION=5228676]VR25[/MENTION] I have an issue where the config.txt resets every 2 or so reboots. Any idea why?

OnePlus 6

OB5

Latest Magisk Canary
[Magisk] VR25:
I have most of the new algorithms on paper. However, the actual code will be written only after I'm done updating fbind, mcs and MagicGApps modules.

---

Thought I bashed that already. Thanks for reporting.

Well, if you restore these apps and your adk backups are all recent, then there no reason to use the inbuilt restore options. This is still a real issue, though. It's possible to add filters, but I didn't test that yet. Will announce this once I go through it. Thanks.

I made this as generic as possible, to support all ROMs. However, only MIUI users can answer your question for sure.

I've been thinking on that. Thanks. :)

This could be related to Magisk. Could you post logs? Preferably all possible log files you can find (logcat, Magisk logs, /data/media/adk/logs). Thanks.
[Magisk] VR25:
Telegram

- Group: https://t.me/adk_magisk/

- My profile: https://t.me/vr25xda/

What's about to come

- There might be a relatively easy way to add encryption support, using EncryptFS binaries.

- Bluetooth settings will also be preserved.

- Custom and more flexible backup scheduling

- Fix the custom rsync+ssh backup feature (bkp).

- Option to backup only APKs or just data, selectively.

Debugging

- If backups aren't working, manually create adk/backups/ path in your sdcard, if you have one, or in /data/media/ otherwise.

---

Post was last edited on Mon, Oct 29, 1:31 PM, GMT+1.
[Magisk] Hammerhand.17:
I promised to post here when I could use the module. I know it was a little time ago, but I couldn't make it work until yesterday. For me (oneplus 3t, havocOS), the right order (as [MENTION=5228676]VR25[/MENTION] posted and I dismissed) was:

- Set wipe option in config.txt; reboot to recovery.

- Flash the same version of the module.

- REBOOT RECOVERY (If I don't, I can't make it work properly)

- Flash new rom +MAGISK.

- Reboot to system and wait for apps to appear in launcher.

Thanks again!!
[Magisk] henningsieh:
I also got it working since few days, but with a similar problem/question. Rebooting recovery was not necessary for me, perhaps because of flashing MSM Update the dirty way. So, migrating works for me without rebooting to recovery by booting the dirty flashed new ROM.

But, when I tried to switch the ROM (which means CLEAN FLASH INCL. WIPING SYSTEM PARTITION), there was no reinstall of my migrated apps.

So, my question is nearly the same: what do I have to do AND in which order to migrate apps to a clean flashed new ROM with a wiped system partition in between?

Thank you!
[Magisk] VR25:
This is most likely an issue specific to your device and TWRP, not adk. I took note, though, just in case. Thanks.

Assuming adk is already installed and set up, you can proceed to the steps below.

The default setup is good enough for most people. However, if you want the full power of the data migration feature, uncomment #wipe (remove the hashtag).

If there isn't at least one <inc> line in config.txt, no app(s) will be migrated. In other words, only inc'd packages and respective data are migrated.

Now, to the actual steps...

1) Flash the same adk version again from TWRP.

- Everything, including wiping (exc. /system) will be done for you.

- ALL Magisk modules used on the previous ROM are preserved.

- Do NOT hit <wipe data factory reset option>. It defeats the purpose of adk's <wipe>.

- You can wipe /system either before or after this step.

2) Flash new ROM, GApps, etc.

- Do NOT forget to install Magisk afterwards. New ROM means new boot.img to patch!

- Do not reinstall modules. These are still intact.

3) Reboot.

---

In short...

1) Reflash adk from TWRP.

2) Flash new ROM + GApps + Magisk (no modules) + custom kernel, etc..

3) Reboot.

Wipe /system (optional) either before or after step (1).

---

Obviously, If you're upgrading/downgrading your ROM and you have systemless Xposed installed, it must be upgraded/donwgraded as well! The same applies to other API-specific modules.
[Magisk] henningsieh:
My wipe feature is always enabled. Your steps seem to be clear so far! :svetius:

I have 2 little questions regarding your very last sentence:

1) Does "upgrading/downgrading your ROM" mean flashing new versions of the same ROM (MSM Xtended in my case) without MANUAL wiping anything (except adk's automatic data wipe!)?

2) canceled due to typo correction :p "Xposed"...

Many thanks for helping so fast. :)
[Magisk] VR25:
1) By upgrading/downgrading, I meant switching Android versions.

Going from, say, LOS 14.1 2018.10.29 to LOS 14.1 2018.10.30 doesn't apply, as these are both Android Nougat 7.1.2.

2) Systemless Xposed is Xposed packed into a Magisk module. The purpose of it is really what the name implies... installing Xposed without touching the actual /system.

This doesn't apply to regular Xposed versions, as these generally must be reinstalled after ROM updates. :)

EDIT

Got it. :p
[Magisk] Tomatot-:
Hi, your module seems very interesting, feature-rich and useful.

I own a OnePlus 6, which means that my phone in encrypted and I have A/B partitions.

I would like to know:

1) Is there a way to only backup user apps and no system apps at all? For example, if I go for an AOSP rom, I wouldn't want any OnePlus apps left.

2) When I change ROM, is it ok if I change partition (from A to B for example). I guess yes because /data isn't affected by partitions AFAIK.

3) When I change ROM, I guess I can also wipe system without having to worry?

Thank you for your help. I'm very excited to try it.
[Magisk] VR25:
1) By default, system apps aren't included (for obvious reasons). You have to set <inc pkgName> to backup a system app.

2) Sure

3) Yes, no worries

Thanks
[Magisk] Tomatot-:
Hi, I'm coming back to you. I haven't had the chance to try your module yet but I'm going to, today.

However, I've noticed that, despite my config file, I have a "backup" folder in the /adk folder, full of apk and apps data. Why is that? Can I safely delete this folder?

See screenshots

EDIT: So I've tried to flash a new ROM but I think I've missed something. Once I have the magisk module installed, what do I need to do? I need to flash the magisk in TWRP before wiping data? In that case I didn't do it so it's normal it didn't work lol. And that would be my bad because I didn't read the instructions properly.

But no worries, I have a backup from TB. :)
[Magisk] VR25:
If you only want to use adk for migrating and restoring data before and after a factory reset, replace that backup folder with an empty file with the same name.

You have that folder because in addition to preserving data across factory resets, this module also backups up that data in a way similar to that of Titanium Backup's.

Essentially, data migration and backup are two distinct features. However, both use the exact same config constructs.
[Magisk] Tomatot-:
Maybe I didn't understand how the module works then. I thought it was preventing TWRP from deleting the user apps.

So what I want is only to have my apps back after a factory reset. I should leave the config file as default and then flash the module right before wiping data?
[Magisk] VR25:
Yes, but note that if the module is not already installed, you have to flash it twice, then wipe data. Also, recall that formatting data destroys the whole purpose.

Don't forget to replace that backup folder with an empty file with the same name.

---

From the README:
[Magisk] Tomatot-:
What do you mean? Thank you for your patience lol...
[Magisk] VR25:
Wiping /data means removing only the obvious. That means, not all data is sent to the graveyard. For instance, /data/media/ remains intact and that's were apps+data are migrated/moved to.

Now, if you format the userdata partition, everything in it is obliterated.

TWRP even warns you about formatting data and it clearly states that a wipe doesn't affect /data/media/. :p
[Magisk] Tomatot-:
Ohhhh yeah of course. When I say wipe data, I mean the option from TWRP where it saves /data/media. Otherwise I'd have said "internal storage". Anyway, next time, I'll give you my feedback! Thank you again.
[Magisk] moscic:
Has anyone tried wipe option on encrypted data?
[Magisk] ms225:
Will this allow us to select which app's data to keep or will it keep data of all the apps?
[Magisk] Atrate:
Read the usage guide
[Magisk] goldencore:
I am suddenly receiving the error "mod path not found" when trying to use adk wizard in terminal. I haven't changed anything as far as I know and the scheduled backups seem to work.
[Magisk] A_Random_Guy:
It hasn't been updated to Magisk 18 yet
[Magisk] goldencore:
Ah, that makes perfect sense.
[Magisk] brux4me:
me too.

happens after flash magisk v18.
[Magisk] richardkemp:
I gave this module a good go, but couldn't get the post-wipe restore function to work. I installed and confirmed it was active/functional by doing a manual test backup to sdcard. I set my config to

inc

wipe

and re-flashed the adk zip in twrp. I understand this is supposed to perform a data wipe, but preserve magisk modules, and then restore apps automatically. What happened: nothing. The module did not appear to be installed.

Next I tried to flash magisk (17.2) and then flash adk. When Android loaded up Magisk active and my old modules are restored. However, other apps never got restored. I used terminal to force restoring the rest of my apps, but nothing worked and I got 'x application has stopped working' popups every second.

I look forward to future updates making this app usable as the idea has promise. That said... is the 'post-wipe app restore' function not effectively just wiping non-app data while preserving app data?? Wouldn't it be simpler to do that directly?
[Magisk] kaizokan:
Hmm interesting. I'm not sure if I can use this with force-encrypted phone cause a Data format (internal storage) would be required to remove the encryption for the first boot up in to recovery in order to flash anything until another format before being able to flash again in the future.

But in case i'm wrong I will write down what i want to do.

I use TWRP recovery. Magisk for root and Xposed for XprivacyLua only. I want to be able to do phone updates without much hassle and reboots. Restoring Magisk, Xposed and XprivacyLua including data! as easy as possible. Note that I can only flash files through TWRP once after an initial Data format because after that the phone will automatically force encryption again. (there was no patch for this before but even if there is now i rather have my data protected and thus keep it like this)
[Magisk] VR25:
[MENTION=269556]richardkemp[/MENTION], doing that directly won't work. APK paths change when apps are updated/reinstalled. Symbolic links must be updated accordingly. Otherwise, restored apps wouldn't function. Besides, migrating data also implies setting correct ownership and permissions.

[MENTION=4602076]kaizokan[/MENTION], Magisk can disable forced encryption. If you want to live encrypted without enduring hardship, your TWRP must be patched/updated to properly handle decryption.

___

**adk 2018.12.25 (201812250)**

- [adkd] Pause execution until /data is decrypted

- [General] Fixes and optimizations

- [General] Magisk 18 support

- [Misc] Updated building and debugging tools

- ["wipe"] Preserve Bluetooth settings

Regular updates are back. This applies to other projects too.

Merry Christmas!
[Magisk] ssj435:
When i select 'remove backup of uninstall app'

It only remove app data, Shouldn't it remove apk file and obb file also.

I think i have reported this issue earlier.
[Magisk] christian.arvin:
[MENTION=5228676]VR25[/MENTION] I need your help man, I performed a data wipe on my device and did a backup using adk. After the clean install I manually restored my apps using adk via terminal. I encountered no issues when restoring the apps the problem lies when restoring the app data. Then multiple apps suddenly starts crashing at the same time. Whats worst is sometimes the system_ui cannot handle the crashes and forces a reboot to an non-bootable state.

I selected one app to debug (com.google.android.apps.messaging) the problem and pinpointed it to a error where the system cannot access its data (/data/user/0/com.google.android.apps.messaging/*).

BTW: com.googe.android.apps.messaging is also a system app

Here are some logs from my logcat

Attached

ADK Wizard Logs

Attached
[Magisk] jhedfors:
Please attach or link logs, instead of putting them in your message.

It is not a good experience when viewing on mobile device.
[Magisk] VR25:
[MENTION=6611204]ssj435[/MENTION], I focus on incremental work, rather than trying do do everything in one sitting. That's fixed now. The next update is near.

Thanks

[MENTION=6642823]christian.arvin[/MENTION], thanks for the comprehensive information.

Could you tell me what the permissions and ownership of the failing folders are?

Does the issue persist after setting the directories' permissions to 777? Yes, I known that's "a bit" insecure, but bear with me for now.
[Magisk] ssj435:
Thank you for fixing it.

And best wishes for New year.:fingers-crossed:
[Magisk] christian.arvin:
I did and also check the ownership and to the point of checking context but unfortunately it did not solve the problem. I also did tried to run-as the app via terminal and do an ls on its data folder unfortunately it only works on debug app. ? Its also pretty weird that wiping data doesn't help only by reinstalling the app.

Thanks for the reply man, I already remedy the problem by reinstalling the app and used google backup to retrieved my data.

This is not the first time I encountered this ever since your early release it always happens. I only encounter this error if I do a system & data format of the partition and install a ROM and do a data restore.

But seems like TB handles this hiccup for me quite nicely..

If ever I get a new driver I will digger deeper with this issue on this device.
[Magisk] andrizmitnick:
hi, btw thanks for the module. i'm planning to use this to replace my current backup method. just 1 question, will it preserve permission, special permission (e.g usage access, etc), accessibility option, etc of the apps when we restore?

thanks before
[Magisk] VR25:
Currently, only filesystem level permissions are handled.

Preservation of runtime permissions is a nice feature suggestion.

Thanks
[Magisk] godofsalt:
I Second that!

Have been using since start and I do love the idea, but really have not wiped out stuff, then see if this works. I can see that this project, works. I have truly dud some minor testing, and it seem to work at the start

Keep up the good work!

This is awesome.

Tanx again!
[Magisk] DrPhant0m:
So... I installed this a while ago, when I was interested in a stable backup of my phone, apps, etc.

I have a sizable "adk" folder on my extSD card (LG V30s), and I presume that everything is A-OK, though I interpreted one of the early comments in this threat that it wasn't actually supposed to take up additional space, just protect your app data across ROM wipes.

Anyway... I'm in a situation where I think I might have to wipe my phone and reinstall the stock ROM. What do I need to do? Anything? Do I just do the factory data reset in TWRP, and then install the ROM, and when the phone boots up, everything will be back where I left it?

Thanks

***UPDATE***

I did the TWRP factory data reset, flashed the new ROM (I moved incrementally in stock LG V30 roms), and booted up. I don't have any apps installed, let alone all of the apps and their data.

However, I installed the adk module via Magisk, Termux via the Play Store, and I attempted to restore my apps + app data via the terminal UI. Maybe I was mistaken that it's supposed to preserve your apps in-place?

Is the intent that when you do a factory data reset in TWRP, that your apps and app data are not wiped? Or, that there's an easy restore method?

Also... while it was restoring, I kept getting a message that says android.process.media keeps stopping. I have the option of closing the app... but knowing that my adk data is in the /media folder, I've just let it go. adk seems to be doing it's job in the background, so I'm left well enough alone.

Unfortunately... the error messages did not stop after it finished restoring. I tried to open some of my apps, but they all reported that the data was corrupted, or they just closed without opening. I couldn't install anything from the google play store, because it started crashing too.

After a few reboots of the phone, the constant app crashes never stopped, and I couldn't open anything successfully, so I'm re-installing the ROM and I'll try titanium backup to get my apps restored again.

I don't doubt that this app works... but I do doubt that I did everything correctly, made the proper preparations, etc. For instance, when I would do:

su
adk

in Termux, I wouldn't get any backup options... just restore and some diagnostic options. I think I'm supposed to see backup options too, right?

Can anyone help? Thanks!
[Magisk] goldencore:
The crashing of the apps seems rather a faulty flash to me. I don't think the process crashing has anything to do with adk or the /media folder.

To have automatic restore of your apps you have to put the 'wipe' command in your config.txt and then reflash the adk zip from TWRP.
[Magisk] DrPhant0m:
Thanks for the heads up. I'm going to be honest... I don't understand the config.txt file. There's so much plaintext, and none of it seems to be commented out. All kinds of examples and stuff... where do I actually put the configuration that I want? If the config.txt file is really parsed through, shouldn't it only be like 1 line long? Or, 1 line and everything else is commented out?

Thanks.
[Magisk] goldencore:
It's explained in the Readme. Every line with a leading space or # sign is ignored.

I use something like this

bkpFreq=8

inc

inc term|provider

exc com.google.*

wipe

I don't want any Google stuff backed up, because that sometimes messes things up for me when I switch to another rom, but that might be unnecessary.
[Magisk] VR25:
**2019.2.1 (201902010)**

- Always reinstall on reflash (boot mode only).

- Auto-wipe on reflash (recovery mode only) is enabled by default. `nowipe` disables it.

- Do not start automatic backup/restore until system has fully booted.

- Do not treat updated system apps as user apps.

- General fixes

- Increased SDcard wait timeout to 30 minutes (fail-safe).

- Major optimizations

- More accurate encrypted data detection

- New name: Migrator

- rsync 3.1.3 stable

- Updated building and debugging tools.

- Updated documentation & default config (simplified). Note: user config will be reset.

- Verbose is disabled by default.

Posts #1 and #2 were updated. Read the updated documentation before installing.
[Magisk] KaMyKaSii:
[MENTION=5228676]VR25[/MENTION] just to know, did you get the idea of ​​this project based on the app data sharing feature in Dual Boot Patcher?