Adding to this thread as I have struggled to get AFWall+ to persist past reboots for 2 evenings and now got a reproducible set of steps that work after a factory reset and root now. The individual components may help more general troubleshooting as well. This is for a Note Air 2 Plus with firmware version 3.5.3 (ee15f02840).
0. Root goes here, Magisk is installed during the process
1. boot
1.1 Install AFWALL+
1.2 enable firewall, use Floating Ball menu's Optimizer to adjust visuals, enable "Stay active in the background" in the advanced options
1.3 go to Apps, top right menu App Management -> Auto-Start Settings -> enable AFWall+ and Magisk
1.4 Open Magisk and let it reboot, it should prompt to finalize settings if you didn't open it yet
2. boot
2.1 Install Magisk Module afwall-boot-antileak (put the zip on boox, run Magisk -> Modules -> Install from Storage)
2.2 Install other Apps you want to let through the firewall now, I recommend LocalSend
2.3 Set rules enabling these apps in AFWall+. Doing this now lets you test after we're done
2.4 Open Magisk, enable background running via the Floating Ball like with AFWall+
2.5 Go to Apps -> App Management -> App Info -> AFWall+ -> Advanced -> Battery -> Battery Optimization -> (little text at top) All Apps -> AFWall+ -> Don't optimize
3. reboot, check if it works, test 1 blocked app (ie neobrowser) and one excepted app (ie LocalSend)
This may not be optimal (as in there could be less steps) due to it being the product of permutations. There are a lot of things that can go wrong and lead to termination of AFWall after boot in the new firmware. My understanding is that these are: straight-up not starting (solved with Auto Start), starting and being shown in notifications but then being terminated (solved with Floating Ball optimization and Battery Optimization), and getting stuck applying iptables rules (solved with Floating Ball optimization for Magisk).
|