yashsingh1/xdaforums huggingface dataset:
[Magisk] VR25:
Next build coming soon. Regarding pattern matching, a dot means "all" in the Linux world (in this particular context). For restoring a single app, you just type a portion of its name (i.e., sp.*fy for Spotify, whats for WhatsApp, etc.). For multiple apps, type something like whats|faceb|titan|goog.
[Magisk] Techguy777:
OK so next update will look for largest partition on the external SD card so it should find fat32 then OK that works. Also from my understanding then if you use this module and it works right twrp data won't back up you're apps because there now hidden in a different part that doesn't get wiped but also doesn't back up. Lastly I still don't understand how to setup config file do I extract the configuration file to sdcard path? I also don't know where to write #inc at does it go under synatx or do I write at the bottom after exc.com.google.GMs example. Thanks for all the information though Im starting to get I think. If you don't extract the configuration file how do I edited cause it won't save inside zip.
[Magisk] VR25:
Thats right.

Here's how it all fits together...

1. The config file is named config.txt and it resides in /data/media/adk.

2. During adk installation, if that file doesn't exist, it's copied from the zip. The default config.txt has every line commented to serve as a guide. Thus, by default, nothing is set.

3. The order of "inc", "inc pkgName" and "exc pkgName" lines does NOT matter. I repeat, it doesn't matter. You can arrange these however you want.

4. Capitalization and full package names do matter (i.e., "exc com.google.GMs" really is "exc com.google.android.gms" as shown in settings -- app info or from other means).

5. No spaces and no quotes before and after config lines -- else, these lines are ignored by adk.

My /data/media/adk/config.txt is exactly as shown below:

inc
inc com.android.inputmethod.latin

It could also be:

inc com.android.inputmethod.latin
inc

Same results...

"inc" alone means "protect all user and updated system apps' data from standard TWRP factory resets.

inc com.android.inputmethod.latin means "protect AOSP keyboard's data from standard TWRP factory resets.

inc and exc keyword really come from the English words include and exclude.

If I wanted the same results, but with Google Play Services left out, I would set up my config like this:

inc
inc com.android.inputmethod.latin
exc com.google.android.gms

Again, the order of lines doesn't matter.

P.S., to all Portuguese and Spanish speakers... I'm fluent in Portuguese as well, and speak some Spanish. If you aren't fluent in English, I can offer support in your language on Facebook.

EDIT: forgot to mention that all app data is automatically moved back to /data/data on the next boot after adk is disabled or removed.
[Magisk] tizio04:
Hi, am I the only that have a bootloop after the update to the latest version, the 2018.8.18?

I always updated it through Magisk Manager with no problem, but this time, once Magisk installs it and I reboot, my S7 freeze on the "Samsung Galaxy S7" logo for about 30 seconds and then it goes into bootloop.

The only way to fix it is to go into TWRP, removing it using MM for Recovery and installing the 2018.8.15 version, which is the last version it works for me.

Is it only me?
[Magisk] qqzwc:
What about a more simple and easy presenting for us? For example two recovery-patch-zips or a all-in-one patch zip?

The only thing we do is that:

Step1: Reboot into recovery,flash data-keeper.zip. It will automatically move all installed user apks and their data folders to /data/media/adk/

Step2: Do a factory reset,optional action is to flash another ROM.

Step3: Flash data-restorer.zip, It will automatically move all files under /data/media/adk/ to real /data partition.

Step4:Reboot and enjoy it.

[A more intelligent way is that the script can determine to "backup" or "restore" itself by checking whether /data is wiped or not]

Maybe just like this?

#!/sbin/sh
# App Data Keeper (adk) Core
# Copyright (C) 2018, VR25 @ xda-developers
# License: GPL v3+

modID=adk
modData=/data/media/$modID
appData=$modData/.appData
apksBkp=$modData/apksBkp
pkgList=/data/system/packages.list

#choose to backup or restore
if [ -d $modData ]; then
echo the choice is to restore!
bkmode=1
else
echo the choice is to backup!
bkmode=0
mkdir $modData
mkdir $appData
mkdir $apksBkp
fi

if [ $bkmode -eq 0 ]; then
echo backup now!
ALL_PKG=`awk '{print $1}' $pkgList`
# read installed APKs
for i in $ALL_PKG
do
if [ -d /data/app/$i* ]; then
#move app apks
mv -f /data/data/$i $appData/
#move app data
mv -f /data/app/$i*/ $apksBkp/
fi
done
else
echo restore now!
#move app apks
mv -f $appData/* /data/data/
#move app data
mv -f $apksBkp/* /data/app/
#delete backup directory
rm -rf $modData
fi
[Magisk] qqzwc:
Is Android 8.1 supported by this module？
[Magisk] jaffa1980:
Might be being REALLY thick. So if I just put 'inc' (including the ' marks) in the config file, that will backup everything? Right?!
[Magisk] J4jks:
On latest version, commented out

"inc

inc com.android.inputmethod.latin" from config.txt

Rebooted more than twice

But apkbkp not created.

.pending for created

Can you add which config is found in config.txt in logs?

Redmi note 3 magisk 16+ systemless xposed

PS: just checked /adk.flolder and apkbkp is created and apks are backedup after 4hrs

Don't know exactly when did they get backed up.

Pps: all the data and apps have been restored after clean flash, with the above set up

Thanks a lot
[Magisk] jaffa1980:
Just had an update from the developer about whats just around the corner in an update.
[Magisk] bigbadmoshe:
Awesome just what i was looking forward to.
[Magisk] bigbadmoshe:
So latest version was only backing up apks. I made sure there was a line with inc.

Restored apks don't survive a rebbot. They disappea

(edit) will try the code you suggested.

PS. The apk restore is super fast.
[Magisk] VR25:
[MENTION=4748725]qqzwc[/MENTION], the idea is great. I've actually thought about that before building this module.

The only issue with your implementation is that system obliterates any data which is not associated to an APK. In other words, target apps must be installed BEFORE the restore operation.

It's still possible to make this work, though.

All you want is a simpler version of adk, which automatically does all the work by default (without keeping app data in /data/media at all times). With one addition, of course... the data migration flashable zip -- used to preserve app data and automatically wipe /data (excluding obvious files/folders) afterwards.

Upon a fresh start, adk kicks in and restores all APK's plus data.

I can certainly implement that as an alternative to the default working mode. Are we on the same page so far?

Regarding extended support, adk is built to work on any ARM/x86 device (64bit included) with Magisk up and running (regardless of Androids version).

To all,

Bootloops? Please, provide logcats and all logs in /data/media/adk/logs. Thanks.

P.S., a new version is up. ;)

**2018.8.28 (201808280)**

- Protected data and respective APK's are automatically backed up to largest_external_partition/adk/backups (fallback -- /data/media/adk/backups)

- Removed 'rollback' executable (obsolete)

- Support for automatic (scheduled) as well as on-demand incremental backups

- Magisk module template 1500

- Migrate app data to '/data/media/adk/appdata'

- More efficient APK backups

- Restrict app data permissions to 'rwx-rwx-x (771)'

- Terminal 'adk' wizard

- Updated documentation

- Zillion+ features, fixes and improvements
[Magisk] qqzwc:
Great! I would appreciate it if you could compelete that.

Waiting for your works~
[Magisk] godofsalt:
I have not really have had any issues.

hopefully, going forward, we can use this in replacement for TB (Due to the fact that this runs so much faster than trying to update all your apps, to where you left off, after a ROM update, or new Rom )

Big Thank you , to you VR25, and your teammates !!!
[Magisk] Looki75:
So I read the whole thread... and after reading that many people had issues... I am wondering: did anyone after all successfully used this module?

I am a bit reluctant to have something moving files, creating symlinks... on a "normal" phone state/situation....

Especially that to have this working, you need Magisk + module... it is a chain made of several links... and if somewhere something goes wrong, you could potentially lose your data because the data itself is located in a place where Android won't look for it...

So to me, the "simpler version of adk" that [MENTION=5228676]VR25[/MENTION] described, based on a suggestion of [MENTION=4748725]qqzwc[/MENTION], seems to be the best way to go....

Way less risky as I could judge from my very limited knowledge of the technical side of things...
[Magisk] kalawy:
I really like the idea .. it makes roms hassle free ..

A gui applicatiin would be like pushing the ideq to perfection
[Magisk] lauralbaby:
New version failed to install,
[Magisk] Oxofrmbl:
Is this compatible to Android Pie?
[Magisk] J4jks:
Same happened to me from Magisk but succeeded from twrp. [MENTION=5228676]VR25[/MENTION]
[Magisk] goldencore:
I installed the module through Magisk and it seems all folders were created. I left the config.txt basically untouched so there is only the backup schedule and inc.

The Apks are backed up, but the appdata folder on the external SD remains empty.

What am I doing wrong?

This is my Config.txt:

App Data Keeper (adk) Config

/data/media/adk/config.txt

bkpFreq=12

inc
[Magisk] VR25:
That's the second report on this. Unfortunately, in both cases, Magisk Manager install log shows nothing relevant. Installing from TWRP seems to be the only way to go, for the time being. By the way, the first report was from a Pixel 2 user. Their device was running Android P and had Magisk 16.7 installed. I suppose your case is the same or similar?...

As suggested by the aforementioned report, no one has yet confirmed it works on Pie.

I suppose your /data/media/adk/appdata folder is also empty, and you're using Magisk 16.7. Is that right?

P.S., ...and a recent /data/media/adk/logs/main.log is missing...
[Magisk] goldencore:
I am using Magisk 16.0

There isn't even a folder named "appdata" in /data/media/adk

This folder exists only on my external SD
[Magisk] A_Random_Guy:
Using Magisk 16.7 and Android Pie, it seems that adk doesn't work. It installs successfully but no logs, no appdata folder and no apks on sd card. Only config.txt and license are made
[Magisk] J4jks:
selinux is set to permissive always are only when backup/restore started?
[Magisk] christian.arvin:
Is setting SELinux to permissive really necessary for this module to work? Have a problem with removing this module, a adk.sh retain in /sbin/.core/img/.core/post-fs-data.d. that's causing the SELinux to permissive.
[Magisk] lauralbaby:
Nope, ResurectionRemix oreo on OnePlus 3t. I did the new one from TWRP, it created all the directories but nothing is in appdata/ yet. Another reboot...
[Magisk] lauralbaby:
I'm on oreo 8.1 (LineageOS) on OnePlus 3t, magisk 16, actually. The latest version hasn't caused any problems yet. Or anything else...
[Magisk] aaz03:
Mh, latest version hasn't created any .appdata or backup folder anywhere, it's been installed for 2 days and config.txt is recognized and properly configured (i tried putting bkpFreq=1 and checking if that made any effect on logs and yes it is recognized but still no backup)
[Magisk] VR25:
/sbin/.core/img/.core/post-fs-data.d/adk.sh self-deletes the next boot after the module is uninstalled.

SELinux is set to permissive for debugging purposes (compatibility). Due to raised concerns, I'll make this optional through a dedicated config keyword.

To everyone whose appdata folder is empty,

- App data backups depend on that. Hence, no data is being backed up.

- Why the folder is empty is still an unsolved puzzle.

- This seems to be a device/ROM-specific issue.

- I'm looking for the cause(s). Logs aren't showing anything relevant, unfortunately. These suggest that adk is doing its job as intended, but something on the system's side is blocking the expected results. It's as if all the process was being sandboxed.

A note on Magisk: do NOT use 16.7. It has some major bugs which prevent several modules from working properly. Unofficial builds allegedly have these fixed. But I recommend downgrading to 16.6.

P.S., is any of you using encryption?
[Magisk] goldencore:
I don't use encryption.

Empty appdata folder on external SD happens for me with Magisk 16.0 and 17.0. Apks are backed up fine using untouched Config.txt

I am on a Xiaomi Redmi Note 4 (Snapdragon) using LiquidRemix 9.1.4 (AOSP based custom rom).

Hope you can solve the riddle!
[Magisk] aaz03:
I'm not using encryption , magisk 1671 and 1700 give same results ,Android pie (havoc )

Edit : if this information can help you : I effectively have a /data/media/adk folder but no .appdata folder (not even an empty one) , I don't have any /externalsdcard/adk folder neither .
[Magisk] pkWhistle:
I've never experienced a more buggy module. Tried this module on 2 different phones. Ended up losing all my data (had them backed up). I couldn't update the module on one phone so I disabled it and what do you know, all my data's gone.

Stay very far away from this module.

It should say, 'unstable', 'buggy' or both in the thread title.

This is FAR from stable.
[Magisk] goldencore:
Maybe you stop whining and help solve the problems..
[Magisk] henningsieh:
It's exactly all that! I'm also on an OP3T and fuc**d up my phone and data EVERYTIME. I havn't seen any of those adk/appdata folders in most cases and restoring did NEVER work, not even once!

So the following is absolutely right and I have made similar title suggestions in this thread, but ... whatever!?!
[Magisk] VR25:
[MENTION=5947784]pkWhistle[/MENTION], you're not being helpful at all. It seems you don't have any interest in having this working for everyone. Did that happen with the latest version (2018.8.28)? If not, which was it? Thanks.

[MENTION=2433195]goldencore[/MENTION], what if you...

1. su

2. mv /sbin/.core/img/.core/post-fs-data.d/adk.sh /sbin/.core/img/adk/post-fs-data.sh

3. chmod 755 /sbin/.core/img/adk/post-fs-data.sh

4. Reboot

I suspect adk.sh is not being executed for some, not finishing execution for others, working perfectly for an equally yet-to-known number of people (including myself).

Anyway, I'm already working on the data migration zip and auto-restore algorithm, as suggested. These will make things much simpler and hopefully more compatible. Still, I'd love to know what exactly is preventing the current version from working on some systems.

---

+1 for your attitude, [MENTION=8357285]henningsieh[/MENTION]!
[Magisk] lauralbaby:
I replaced config.txt with just "inc" and all the APKs are backed up, but no appdata. The folder is present but empty. Fortunately I'm not using this practically yet, more as a tester.
[Magisk] VR25:
[MENTION=5783227]lauralbaby[/MENTION], any constructive report is greatly appreciated. Thanks.

---

At this point, I'm sure Magisk is not executing /sbin/.core/img/.core/post-fs-data.d/adk.sh. Or execution is being halted mid-way. I'm curious to see the outcome of moving that script as described earlier.

No error shows up in any of the provided logs. One thing which stands out is that these are incomplete. This suggests that execution is indeed being interrupted. The absence of an exit code reinforces that possibility.

One thing I didn't ask... is SELinux mode set to permissive for those facing issues as well?
[Magisk] goldencore:
[MENTION=2433195]goldencore[/MENTION], what if you...

1. su

2. mv /sbin/.core/img/.core/post-fs-data.d/adk.sh /sbin/.core/img/adk/post-fs-data.sh

3. chmod 755 /sbin/.core/img/adk/post-fs-data.sh

4. Reboot

I suspect adk.sh is not being executed for some, not finishing execution for others, working perfectly for an equally yet-to-known number of people (including myself).

Nope.

There are not even logs created in the adk folder.
[Magisk] aaz03:
[MENTION=5228676]VR25[/MENTION] , go put debug lines , debug lines everywhere you can . It's the only proper way to see where it's blocking for people . Add a line after each operation and make the logs more constructive. At least we could then help you with some proper logs
[Magisk] VR25:
[MENTION=5573054]aaz03[/MENTION], the log engine echoes comprehensive info (verbose plus regular stodout and stderr outputs). This is more than enough to catch any script errors.

Regarding the issue in question, now I have enough reasons to believe Magisk itelf is to blame. post-fs-data.d/* and regular post-fs-data.sh scripts are not executed on some ROMs. Another issue is that execution (blocking) time may be too short for all modules scripts to run completely. This is especially true when one has many modules using post-fs-data scripts.

Not sure whether [MENTION=4470081]topjohnwu[/MENTION] is aware of this. Unfortunately, I can't reproduce the issue, as I don't have such on my current system (LOS 14.1 (harpia) with squid kernel). I remember having this at some point on my previous device, Moto Z Play. That was fixed quickly, though. I didn't have a chance to report it at the time.

Now it's back...
[MENTION=4667597]Didgeridoohan[/MENTION], have you seen anything similar reported yet?

Anyway, the suggested "lite mode" is almost ready and it doesn't rely on post-fs-data scripts to work, nor does it move app data.
[Magisk] Didgeridoohan:
Well, post-fs-data is a blocking stage, and [MENTION=4470081]topjohnwu[/MENTION] has been saying from the start that it should be avoided unless absolutely necessary... Too many time-consuming scripts in post-fs-data will likely cause issues.
[Magisk] rauleeros:
[MENTION=5228676]VR25[/MENTION] thank you for your hard work to make this work. The idea itself is great and would make it way easier to change ROMS, downgrades, etc.

I have tried the module like some others and had it not being stable. I had a backup as well, so no worries. But yeah, it seems like sometimes it mounted the adk folder right and sometimes not, although the back up folder was always there.

I was using Android 7.1.1 on an encrypted Oneplus 3T with Oxygen OS 4.5.1, magisk version 16.7 (I think you mentioned this might be a problem?) and 17.1 as well. SELinux is set to enforcing.

Again, thank you for all your work.
[Magisk] VR25:
Yeah... definitely post-fs-data scripts can't be trusted. I chose to rely on these exactly for the blocking feature and for being early.

Anyway, handling a bunch of app data in late start service mode isn't a good idea either... that'd be too late for such kind of operations.

So, no more data-moving, no more bind-mounting... so sad.

The good news is, I've been working on different algorithms to achieve the same end results (as suggested by [MENTION=4748725]qqzwc[/MENTION]), and the final product is almost ready.

[MENTION=5734207]rauleeros[/MENTION], you're welcome!

A huge thanks to everyone who's been harvesting positive energies to keep this thing moving forward.

Edit: spoke too soon. Late start service is working!
[Magisk] Didgeridoohan:
[MENTION=5228676]VR25[/MENTION] There might be an issue with post-fs-data scripts... There's nothing definitive yet, but it's under investigation.
[Magisk] lauralbaby:
Permissive here. Sorry for the dupes earlier, I was in a patchy connection area.

In looking at my post-fs-data.d dir, the aml module (audio modification library) also has a script. I'm not positive if it is executed, but the module itself works. File attached if you don't want to install...
[Magisk] VR25:
**2018.9.3 (201809030)**

- Improved log engine

- Misc enhancements

- Most of 'lite mode' is ready

- Moved igniter (adk.sh) from post-fs-data.d to service.d

- service.sh merged into adk.sh

- Updated reference
[Magisk] J4jks:
I'm on magisk 17.1 redmi note 3 with encryption

Updated from magisk manager and rebooted

Then few apps for example silence, MiXplorer, started force close, rebooted twice still force close.

But magisk manager was working , so deleted the module and installed previous version from twrp.

in adk folder logs are not available
[Magisk] totalnoob34:
Using Magisk 17.1 stable on LG G5, RR 6.1.0.

The latest version does not do anything on boot, and the logs folder is empty. I tried deleting the adk folder on external_sd and it is not recreated on boot. Can I manually execute the backup procedure? The updated documentation goes somewhat over my head.

EDIT: Also, what is 'lite mode' added in 9.3 build? I can't find any mention of it in the documentation or in this thread.
[Magisk] VR25:
[MENTION=6697942]J4jks[/MENTION], [MENTION=4628223]totalnoob34[/MENTION], I didn't have a chance to test Magisk 17+ yet. Didn't adk installer tell you that?

I don't know whether Magisk 17+ is fully functional. The last versions I tested are 16.7 (deal-breaker) and 16.6 (my daily driver).

If there's no log, that means once again, Magisk is not executing adk boot script.

Does the previous module version work for you two?

Regarding the "lite mode", it'll eventually be the default. Click the link below for a brief explanation.

https://xdaforums.com/showpost.php?p=77466654&postcount=137
[Magisk] totalnoob34:
I can't remember. Anyway, I'll revert to 16.6 and report back.

EDIT: Everything works flawlessly on 16.6. Sorry.
[Magisk] lauralbaby:
So I upgraded Magisk to 17.1 to get rid of the notification ;) and the log went away for me too. I'll attempt to downgrade to 16.6 and see if that helps.
[Magisk] lauralbaby:
Seems to have helped, but still no appdata. Log attached.
[Magisk] totalnoob34:
Can you add a 'backup now' entry in the adk terminal utility? I'0d like to be able to start a backup procedure manually, and maybe check that everything was backed up successfully.

In the meanwhile, is there a script I can run myself?

EDIT: I'm having trouble with data not being backed up with the latest version. Deleting adk folder has it recreated, but only apks are being backed up. appdata is created but not populated, I pulled main.log if you wish to have a look.
[Magisk] Terrigible:
Yes, we need a "Backup Now" option to see if it even works in the first place. Please make that a thing.

Edit: Typo
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] haqanguven:
Hello friends,

After a long break, MIUITR is back with new regulations.

I have finalized the work with the latest update of Miui10. We will continue with Miui11 ;)

Links:

MOD EDIT: DOWNLOAD LINK REMOVED

MOD EDIT: Telegram link removed

Information:

Rom OS Version: 9.0.0 Pie

Language: Turkish, English, China

Created: 24.07.2018

Last Updated: 19.09.2019
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] haqanguven:
Rezerve
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] siegman1:
Merhabalar; elinize sağlık. Sorum şu gps performansı nasıl acaba ? miui 10 da sürekli gps problemi yaşıyorum, bu yüzden stabil sürüm kullanıyorum.
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] dzidexx:
Thanks for new Miui option.

Is it based on China dev 8.7.19? Earlier? [MENTION=5483893]haqanguven[/MENTION]
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] haqanguven:
No problem
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] haqanguven:
8.7.24
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] haqanguven:
Camera Black Screen Fix
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] mecal:
can xposed be used?
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] nowforever:
Is camera quicksnap working with this ROM?
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] Argonis86:
Can you upload the zip again to solve the problem of the camera? How do you update this ROM afterwards if it does not have an application to update and from settings does it not stop?
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] juv3nal:
link for camera fix doesn't work!! Please re-upload!!

Thanks!
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] TigerKHaN:
Camera link problem

Link 404 Eror
[Xiaomi Mi Note 3 ROMs, Kernels, Recoveries, & Othe] kwelf:
cam2api works?