permacomputing

Source repository for the main permacomputing wiki site
git clone http://git.permacomputing.net/repos/permacomputing.git # read-only access
Log | Files | Refs

commit d12f568d6ef6abac0c599fa125d924da51db195f
parent 64bde30440975785e284f6ec211e4b0d97433673
Author: smeeb <smeeb@web>
Date:   Thu, 26 Nov 2026 13:27:20 +0100


Diffstat:
Mrecomposing_ewaste.mdwn | 113-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 113 deletions(-)

diff --git a/recomposing_ewaste.mdwn b/recomposing_ewaste.mdwn @@ -26,119 +26,6 @@ The [Nura Project](https://nura.eco/) was started back in 2017 (under the name " * Collective moment of installing Nura (working Linux machine)(one phone together, after this everyone gets a pre-installed phone). (Presentation) 60 min -### Installing Nura on the Samsung Galaxy SIII - -In this how-to we replace Android with Nura on a Samsung Galaxy SIII. First, we build a Nura system image for the SIII with `pmbootstrap`. Then, we flash that image to the phone over USB with `heimdall`. To follow along you'll need a Samsung Galaxy SIII (`GT-i9300` or `GT-i9305`) and a computer with Debian 13 as the operating system. -#### Installing packages - -Android phones are usually flashed with a sparse image. `android-simg2img` has two small tools: `img2simg` turns a image into a sparse one and `simg2img` does the opposite. Write the following commands one by one on in your computer its terminal application. - -```bash -git clone https://github.com/anestisb/android-simg2img/ -cd android-simg2img -make -sudo cp img2simg /usr/local/bin -``` - -- `git clone` downloads the source code, and `cd` moves us into a folder -- `make` compiles the tools -- `sudo cp img2simg /usr/local/bin` copies the tool into `/usr/local/bin` so we can run `img2simg` from anywhere - -`pmbootstrap` is Nura's tool for building an image for a specific phone. It downloads the right packages and puts together a complete linux system for the phone - -```bash -git clone https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git --depth 1 -cd pmbootstrap -mkdir -p ~/.local/bin -sudo ln -s "$PWD/pmbootstrap.py" /usr/local/bin/pmbootstrap -pmbootstrap --version ## should print 3.12.1 -``` - -- `--depth 1` downloads only the latest version instead of the whole project its history -- `ln -s` makes a shortcut (symlink) in the folder so you can type `pmbootstrap` from anywhere -- `pmbootstrap --version` checks if it works and shows you the current version -#### Building a Nura image -##### Configure the build - -The command `pmbootstrap init` asks a series of questions about the phone and the system you want - -```bash -pmbootstrap init -``` - -The answers we use and why: - -- **work path:** Enter (default). The folder where pmbootstrap builds everything. -- **pmaports path:** Enter (default). The folder for the packages. -- **channel:** `v25.12`. The previous stable release. `v26.06` doesn't seem to work, and `edge` changes frequently, which can cause things to break. -- **vendor:** `samsung` -- **device codename:** `m0`. The codename nura uses for the Galaxy SIII. -- **username:** Enter (`user`). Your login name on the phone. -- **audio backend:** Enter (default). We drive the sound card directly with JACK later, so this doesn't matter much. -- **WiFi backend:** Enter (default). We use the USB cable for the network. -- **usb-moded profile:** Enter (`developer`). Always turns on networking over USB, which we need to log in to the phone. -- **user interface:** `none`. No graphical interface. -- **service manager:** `openrc`. A simple service manager. -- **change additional options?:** Enter (`n`). The defaults are fine. -- **extra packages:** `openssh`. An `ssh` server so we can log in to the phone over USB. You can add more if you want, like `vim` or `nano`. -- **use host timezone?:** Enter (`y`). The phone gets the same timezone as your computer. -- **locale:** Enter (`en_US`). Language settings. -- **device hostname:** `unbrick01`. The phone's name, which shows in the prompt when you're logged in. -- **build outdated packages?:** Enter (`y`) -<<<<<<< HEAD -======= - ->>>>>>> fe40276a540085cf94c3c09d430d93a499874720 -##### Build the image - -``` -pmbootstrap install -``` - -When asked choose `147147`as the password for the user `user`. You need this password to log in to the phone and to use `sudo` on it. We use the same password on every phone so anyone in the workshop can log in to any phone. - -At the end `pmbootstrap` suggests flashing with `pmbootstrap flasher`. We don't do this. Instead we use the alternative it mentions, `pmbootstrap export` and flash with `heimdall` later. -#### Flashing the phone - -Download Mode is a mode of the Samsung bootloader where the phone waits to receive new software over usb. - -Hold the `Volume down` + `Home` + `Power` keys while connecting the device to your computer with a usb cable. A warning screen appears. Press `Volume up` to enter Download Mode. - -If the phone starts normally, unplug it, take the battery out and put it back and try again. hold the keys first, then plug in the cable. This process can take a few tries! -##### Export Nura image - -``` -pmbootstrap export -``` - -This command export images and creates links the the images in the `/tmp/postmarketOS-export` folder. There are two images we need: the system image `samsung-m0.img` and the boot image `boot.img`. -##### Convert to a sparse image - -``` -img2simg /tmp/postmarketOS-export/samsung-m0.img nura-sparse.img -``` - -`img2simg` takes the image from the export folder and writes a sparse version named `nura-sparse.img` in the folder you are currently in -##### Flash the system to the USERDATA partition - -Make sure your Samsung SIII is still in Download Mode then flash the new `nura-sparse.img` with `heimdall` into the user data partition - -``` -heimdall flash --USERDATA nura-sparse.img -``` - -The phone's internal storage is divided into partitions (sections). `USERDATA` is where Android keeps your apps and files. That is where we are flashing Nura. Flashing takes around 5 minutes. Be patient and don't unplug the usb cable while it's uploading, even when it looks like it's stuck! -##### flash the kernel to the BOOT partition - -When uploading the system is done, the phone reboots. We need it in Download Mode again for this step, so switch the phone off completely. Take out the battery and upload the cable. Then put the battery back and enter Download Mode again - -Flash the `BOOT` partition - -``` -heimdall flash --BOOT /tmp/postmarketOS-export/boot.img -``` - -The `BOOT` partition holds what starts the phone. After this, your Samsung Galaxy SIII finally reboots into Nura! 13.00 - 14.00 Lunch