Introduction
In the journey of cloud migration, testing on real hardware is invaluable. Old Android phones can serve as cost-effective test nodes for network configurations, app compatibility, and performance benchmarking. However, keeping them running 24/7 poses a battery safety risk. This article explores a software-based solution to power an old phone directly, eliminating battery concerns and making it a reliable cloud migration test device.
The Battery Problem in Long-Running Test Devices
When you repurpose an old phone for continuous testing, the battery is often the weakest link. Over time, constant charging can lead to battery swelling, reduced capacity, and even safety hazards. Traditional solutions involve physically removing the battery and soldering wires to the motherboard, but this is invasive and risky. Fortunately, there's a safer, non-invasive method using a tool called Advanced Charging Controller (ACC).
What is ACC?
ACC is an open-source Android tool that gives you granular control over the charging process. It works by intercepting the system's charging parameters, allowing you to set custom charging thresholds, or even bypass the battery entirely to power the phone directly from the charger. This feature, known as 'battIdleMode' or direct power, is perfect for turning an old phone into a dedicated cloud migration test node without worrying about battery health.
Prerequisites: Root Access and Magisk
To use ACC, your phone must be rooted. Rooting methods vary by device, so I recommend following a general guide like the one from Geekerwan (link in original article). Once rooted, install Magisk, a popular framework for managing root modules. Magisk will allow you to install ACC as a module.
Installing ACC via Magisk
First, download the latest ACC module from its GitHub Releases page. Transfer the .zip file to your phone. Open Magisk, go to Modules, tap 'Install from storage', select the file, and reboot. After reboot, ACC runs in the background with no visible icon. For configuration, you can use a terminal emulator like Termux, which is more reliable than the outdated ACCA or ACC Settings apps.
Setting Up Termux
Install Termux from its GitHub Releases page or F-Droid. Once installed, open it and run pkg update && pkg upgrade -y to update packages. If you encounter network issues, switch to a Chinese mirror by running termux-change-repo and selecting a Chinese mirror group. Then retry the update.
Configuring ACC
Now, in Termux, gain root access by typing su. Check ACC version with acc -v and update it with acc -u dev. Plug in your charger and run acc -t to test which charging switches work with your device. This test may take a while; it will generate a report in /sdcard/Download.
Understanding the Test Report
The test report lists various charging control switches. You're looking for entries that end with 'Switch works ✅' and 'battIdleMode=true'. These indicate the switch can enable direct power mode. For example, an entry might show 'battery/constant_charge_current_max 3300000 0' with tests showing current drops to near zero when off, and increases when on. That's a valid switch.
Specifying the Charging Switch
To use a particular switch, run acc -s s="battery/constant_charge_current_max 3300000 0 --". Verify with acc -s that the charging_switch is set correctly.
Setting Charging Limits
Next, define when to charge and when to use direct power. For example, to charge up to 50% and stop at 40%, run acc 50 40. This means the phone will charge to 50%, then switch to direct power until the battery drops to 40%, then charge again. This cycle keeps the battery healthy and the phone running continuously.
Conclusion
With ACC, you can repurpose an old Android phone as a reliable, battery-safe test node for cloud migration projects. It's a non-invasive, software-only solution that extends the life of old devices and reduces e-waste. Try it out and give your old phone a new purpose in your cloud migration testing toolkit.
Comments (0)
Please sign in to post a comment.
Don't have an account? Create one
No comments yet. Be the first to comment!