When I put my Android device to charge, the lock screen says "Charging slowly":
Is it a particular software setting that tells Android to charge slowly?
How to make Android charge fast?
This is not a software setting: Android is just telling you that the power source you connected the device to is not giving enough electrical power to charge as fast as it could.
It seems that:
The solution is to make more electrical power come to your device:
Edit: Please see @beeshyams' answer explaining why charging slowly is actually a good thing when your battery is already quite full.
Other answers have explained about how to make it charging faster, this answer tries to explain more about the threshold that the Android uses.
The charging speed is not configurable; it's just a status that Android shows to let the user knows about it.
When it was first implemented, it's based on the how much current (in milliAmpere) it receives. As shown on the commit log, "Show charging speed on Keyguard", specifically, the config.xml file, the default values were,
<!-- Threshold in micro amperes below which a charger is rated as "slow" --> <integer name="config_chargingSlowlyThreshold">1000000</integer> <!-- Threshold in micro amperes above which a charger is rated as "fast" --> <integer name="config_chargingFastThreshold">1500000</integer>
5 months later, the implementation was changed to be based on power (in microWatts) it receives. As shown on the commit log, "Charging speed based on voltage", from the same config.xml file, the default values were,
<!-- Threshold in micro watts below which a charger is rated as "slow"; 1A @ 5V --> <integer name="config_chargingSlowlyThreshold">5000000</integer> <!-- Threshold in micro watts above which a charger is rated as "fast"; 1.5A @ 5V --> <integer name="config_chargingFastThreshold">7500000</integer>
Now, the default values and current behavior (using microWatts instead of Amperes) might be problematic on some devices (e.g. Nexus 5). However, those values are also adjustable by vendor/OS maker, as seen in LineageOS' case.
The default slow charge threshold in the framework is set to 5000000 microwatts. This assumes the devices OEM wall charger output is 1A @ 5V.
The OEM LG Nexus 5 wall charger can only output 1.1A @ 4.8V at its max. Then that is further reduced to around 1A @ 4.3V by the charging driver in the kernel. This results in the lock screen incorrectly displaying "Charging slowly" all the time.
Prior to Nougat, the threshold was based on microAmperes and was set to 1000000, which the charger/device could easily do, resulting in the lock screen displaying "Charging".
This change lowers the threshold from 5000000 to 4200000 microwatts so that wall chargers show "Charging" on the lock screen, returning it to stock Marshmallow behavior.
Note: This threshold only affects what is displayed on the lock screen. It does not affect actual charging current.
This is by way of supplementing OP's research with additional relevant inputs
Current drawn for charging is not uniform. It varies depending on the stage of charging as can be seen from Figure 1 here
This is reiterated by OEM-see footnote 1
Battery must be substantially depleted; charging rate slows as charging progresses
Andrew's answer explains the associated current and power limits depending on which the mode changes and is android feature. Aside, Samsung has come up with user configurable options to enable/disable fast charging
Options suggested by OP are all valid with a caveat- While mixing and matching cables to maximize current as quoted by you (example for 6P/ 5X from my earlier answer) is a good idea, you need to bear in mind the following