Hobby Projects with the Samsung S3 Mini — Part 1: Preparing the Phone

Posted by Felipe Arturo López Bonilla on

I have been working on my Samsung Galaxy S3 Mini, which now has postmarketOS (Nura) installed on it. If you want to learn more, I wrote a complete tutorial about it. Before using this device for my personal projects, I had to change some settings and do some hardware hacks on the smartphone. So in this article I am going to explain what I did.

Power the phone with an external power supply

The battery of my smartphone was completely dead and it was swollen. So I used an old power supply brick with an output of 12 V and 2 A. I believe it was from an old laptop that I no longer have. Then I connected the brick to a DC-DC step-up and step-down converter to bring the voltage down to around 4.1 V.

Power brick connected to the step-up step-down converter.

I reused the battery terminal because it has an internal resistor that the operating system reads to determine the capacity of the battery. To do that, I peeled off the plastic wrap of the battery, and then I removed the terminal from the battery. After that, I soldered two wires to the nickel strips, as you can see in the picture below.

Samsung S3 Mini battery.
Reused battery terminal with wires soldered to the nickel strips.

The smartphone also works if you solder or connect the wires directly to its battery pins. However, you will see an error during the boot process saying that the resistor is not detected, and therefore the battery's capacity cannot be determined.

Battery pins.

The battery terminal has to be pressed against the battery pins to avoid a loose connection. So I cut a piece of cardboard and put it inside the battery compartment. This is a temporary solution that I will probably replace in the future with a 3D-printed piece. I also drilled a hole in the back cover of the smartphone to pass the wires through it.

Not my best work but is is functional.
This is how it looks after putting everything together.
In the kernel logs, you can see that the battery is detected.

Connect the phone to a WiFi network

I was using a USB-to-serial converter to access the console of the device. However, I also needed to send files to the device over WiFi and to install packages from the internet. That is why I needed to set up a WiFi connection. For this step, it is important to have access to the console through the serial terminal, because the device is not connected to any network yet. To connect to a WiFi network, we need to execute the following command. Here I am assuming that you are connecting to your local network, so you already know the SSID and the password:

sudo nmcli connection up  --ask

With the --ask option, the command asks for the password, so you do not have to write it in the command itself.

Disable the console on the screen

For a project that I am working on, I have to display images on the screen. However, after the device finishes booting, it shows a login prompt on the screen. That comes from the virtual console displayed on the framebuffer. To disable the console on the screen, we can run the following command:

echo 0 | sudo tee /sys/class/vtconsole/vtcon1/bind