[Magisk] Azaze666:
WhaBind​

What this Module Does? This Module Binds WhatsApp External Storage Media directory to internal WhatsApp Media one tricking the app and allowing to save all WhatsApp Media into the External Storage.

How Does It Work? it runs a script at boot (delayed of 60 seconds) that sets the permissions to access external storage and then runs the bind.

How to set it up? first move internal Whatsapp Media to external storage by doing on a terminal: "su -c mv /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/* /storage/0123-4567/Android/media/com.whatsapp/WhatsApp/Media"

I will leave a script for this (1st_step_whabind.sh) to make the process easier, you will need this once, other times, you will bind the folder automatically using the magisk module.

NOTE: Change your external sdcard path according to the one of your device on both the first command/script and on the magisk module's service.sh last command or the move and the bind will fail.

if for some reason you don't have Magisk you can do:

adb push whabind.sh /data/local/tmp

adb shell

su

cd /data/local/tmp

chmod 777 whabind.sh

chmod +s whabind.sh

./whabind.sh

or you can use Macrodroid or similar to autorun the script, don't forget to set root perms on the autorun app

Note: on other android versions permissions to access external storage may differ, here are some:

adb shell

su

appops set --uid com.whatsapp MANAGE_EXTERNAL_STORAGE allow

pm grant com.whatsapp android.permission.READ_MEDIA_IMAGES

pm grant com.whatsapp android.permission.READ_MEDIA_VIDEO

or at least these are the ones i tried, Android really became fragmented so they may differ for you, note that i was on Android 14.

I used this module as a template, i was trying first to run it with his crond workings but then since it was failing to run i edited it and eventually got it to work, so this guy deserves a mention:https://github.com/powerAn2020/crond4android/tree/1.0.0

I just verified that sadly you have to run the bind script again after every WhatsApp update.... or reboot i suppose, really disappointing but patience. The script is on /data/adb/modules/WhaBind/service.sh if you used the magisk module. To make your life easier you can:

adb push rebind.sh /data/local/tmp

adb shell

su

cd /data/local/tmp

chmod 777 rebind.sh

chmod +s rebind.sh

#all these previous commands needed only once (except adb shell, su, but you can of course run the script from a terminal emulator or from a file explorer like MiXplorer)

sh /data/local/tmp/rebind.sh

OK I created a Macrodroid macro to automate the rebind when WhatsApp updates:"WhaBind_rebind.zip": unzip it and import it on Macrodroid, also do the previous steps to put the script on /data/local/tmp and give it root permissions. As well now the tasker profiles/tasks as Tasker.zip.

I highly suggest this rebind as it skips the 60 seconds delay, and be careful as if the folder is already binded and you run the rebind or the customize.sh all the media will be deleted from external storage, just happened to me, I honestly don't care but be careful, do regular backups and ensure the folder really lost the bind before rebinding it, don't worry as the macrodroid macro works, I did the mess for another reason. That said I hope you will enjoy this module.