How to Automatically Toggle Samsung Adaptive Fast Charging while at Home

How to Automatically Toggle Samsung Adaptive Fast Charging while at Home

While we haven’t seen a breakthrough in battery technology, many companies have instead opted to focus on innovations in charging technology. Qualcomm offers their Quick Charge technology, Huawei offers what they call SuperCharge, Motorola has their TurboPower, Oppo offers its VOOC, and Samsung has Adaptive Fast Charging. (Our personal favorite charging technology is OnePlus’s DashCharge, which is a modified version of Oppo’s VOOC.)

What these charging technologies have in common is that, well, they all charge your phone really, really fast – provided you use a compatible charger setup. Every OEM’s fast charging technology should be safe to use on your phone, but the higher battery temperatures associated with most fast charging implementations theoretically means your battery longevity could be affected. Also, keeping fast charging enabled can make for an unpleasant experience if you’re actively using the phone due to the heat, so there may be situations where you don’t want to use fast charging.


Samsung’s Adaptive Fast Charging implementation is unique in that they offer a software toggle to disable fast charging without you having to use a different cable. Thanks to this fact, we can automate when we want Samsung’s fast charging enabled or disabled. Say when you’re at home you don’t need your phone to be quick charged, you can turn the toggle off; but when you are at work you can leave the toggle on. To do this, you’ll need the automation app called Tasker.

Note: It is not my intention to suggest that fast charging methods are in any way unsafe or that it is a necessity to disable them to prolong battery longevity. Most fast charging methods offer their peak currents when the battery is between 0-50% capacity, and start to slow down their charging after that. This tutorial is simply aimed at people who want to learn how to automate this toggle for whatever reason they want.


Although I’m using Tasker here, you’re free to use any other automation app of your choice. Tasker is by far the most popular, and it’s the one most people are familiar with, so that’s what I’m using.

Setting up Tasker

(The screenshots used in this tutorial are clearly not from a Samsung phone. They are from my daily driver, a Huawei Mate 9. Rest assured that I did test that these commands work on my colleague’s, Daniel Marchena, T-Mobile Samsung Galaxy S8.)

Here are step-by-step instructions on how to set this script up. I will focus on enabling/disabling Adaptive Fast Charging when you connect/disconnect from your home WiFi network, but you can set up any other trigger you want.

  1. Open up Tasker and tap on the + button in the bottom right to create a new Profile.
  2. Tap “State” to add a State context.
  3. Choose “Net” then “WiFi Connected.”
  4. Under SSID, tap the magnifying glass to bring up a list of saved SSIDs. Choose your home network here.
  5. Press the back key and Tasker will ask you to attach an existing Task or create a new one. Choose “New Task.” Don’t bother naming it.
  6. Once in the Task editing screen, tap on the + icon in the bottom middle to add an Action.
  7. Choose “Code” then “Java Function.”
  8. Hit the coffee icon and select CONTEXT.
  9. Hit the magnifying glass near Function and search for getContentResolver().
  10. A new “Return” field should show up top. Enter “cr” here. Press back to return to the Task editing screen.
  11. Add another Java Function Action (steps #6-7). This time for the Class or Object field hit the magnifying glass and look for Settings$System. For the Function field hit the magnifying glass and select putInt. A set of parameters will now appear. For the Param (ContentResolver) hit the coffee cup and choose the “cr” object. For the Param (String) enter adaptive_fast_charging for wired charging, or wireless_fast_charging to toggle wireless fast charging. For the Param (int) enter 1.
  12. Press back to return to the Task editing screen. Now long-press on the two actions we made and tap on the clipboard button to copy them.
  13. Press back to exit to Tasker’s main screen.
  14. Once at Tasker’s main screen, long-press on the Task we just made and tap on “Add Exit Task.” Don’t bother naming the Task.
    When you’re in the new Task’s editing screen, long-press anywhere in the middle of the screen until the Paste action appears. Tap to Paste the two Actions we copied earlier.
  15. Tap on Action #2 here and scroll down. Change 1 to 0 under Param (int). Tap the back button until you return to Tasker’s main screen, and you’re done!

Tasker will now automatically enable Adaptive Fast Charging when connected to your home WiFi network, but disable it when you are away from your home network. If instead you want to enable/disable AFC based on other conditions, just create a new Profile and choose a different Context, but use the same two Actions we used in the Entry/Exit Tasks.

Follow the XDA Tutorials RSS feed for more content like this. Download XDA Labs to quickly catch up on all the latest news and original features published on the XDA Portal.

About author

Mishaal Rahman
Mishaal Rahman

I am the former Editor-in-chief of XDA. In addition to breaking news on the Android OS and mobile devices, I used to manage all editorial and reviews content on the Portal.

We are reader supported. External links may earn us a commission.