Installing e/os (de-google-ified android) on a Samsung smartphone

Button combinations to start in alternate modes

  • Recovery mode : bigsby + volume up + power -> release power and bigsby when the samsung logo appears
  • Download mode : bigsby + volume down + connect USB

Prepare your computer

  • download and install Samsung USB driver - https://developer.samsung.com/android-usb-driver
  • download and install adb drivers - https://adb.clockworkmod.com/
  • download and install zadig - https://zadig.akeo.ie/
  • download adb sdk - https://developer.android.com/tools/releases/platform-tools?hl=fr
  • download e/os recovery and main image files from the documentation dedicated to you device on the e/os website : https://doc.e.foundation/devices

To interact with Samsung Download Mode, don’t download standard Heimdall, which is buggy - https://glassechidna.com.au/heimdall/
Instead, build latest alternative heimdall 1.42 (could be from https://github.com/Benjamin-Dobell/Heimdall/tags -or- https://git.sr.ht/~grimler/Heimdall/
(error on the heimdall official build page : add mingw-w64-ucrt-x86_64-gcc to the make command)

  • download and install msys - https://www.msys2.org/ and open a msys console
    • Pacman -Syu
    • Pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-libusb mingw-w64-x86_64-qt5-static make git cmake
    • check that it worked -> gcc --version
    • export PATH=“/mingw64/bin:$PATH”
    • git clone https://git.sr.ht/~grimler/Heimdall/
    • mkdir build
    • cd build
    • cmake -G “MSYS Makefiles” -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/mingw64/qt5-static/lib/cmake/Qt5Widgets …
    • make
    • make install
  • find files in C:\msys64\home\Administrateur\Heimdall\build\bin or C:\Program Files (x86)\Heimdall
  • move to a folder and add to that folder https://libusb.info/ + https://gnuwin32.sourceforge.net/packages/zlib.htm + libgcc_s_seh-1.dll and libstdc+±6.dll and libwinpthread-1.dll and libzstd.dll from C:\msys64\mingw64\bin

BEFORE STARTING

  • with phone plugged and started, check .\adb devices
  • activate developper options and activate usb debugging and OEM unlock (if it doesn’t show connect to wifi or phone and activate “automatic time”)
  • start in Download mode
  • Volume up long press to unlock bootloader
  • validate all and warnings
  • check that OEM lock is off

  • start zadig
  • options -> show all
  • select “gadget device”
  • check ID is 04E8 685D
  • install WinUSB

TO CHECK IF IT WORKED (optional)

  • .\heimdall print-pit --verbose --stdout-errors
  • phone will reboot
  • restart in Download mode and do again the zadig WinUSB step

TO INSTALL THE RECOVERY PARTITION

  • reboot phone in Download mode
  • copy the recovery img to the compiled heimdall path
  • .\heimdall flash --RECOVERY recovery-xxx.img --no-reboot

TO INSTALL E/OS FROM THE RECOVERY PARTITION

  • reboot phone in Recovery mode
  • check .\adb devices
  • Select Factory reset -> Format data / Factory reset option -> Select Format data to proceed or Cancel if you want to go back
  • go back to main screen (top left arrow)
  • Apply Update -> Apply update from adb
  • copy e/os image file to adb folder (could add option -d after adb command to see debug info)
  • .\adb sideload e-xxx.zip
  • message should be “Total xfer: 1.00x”

Some greats open-source appz (that you can get from fdroid that you have to install from https://f-droid.org/) :

  • ACTIVITIES : openfoodfacts, wikipedia, whobird, deepl
  • TOOLS : orion viewer, open tasks, heliboard (with swype input), sms import export, barcode scanner, cache cleaner, davx5, etar, eduroamcat
  • MEDIA PLAYERS : Audile, Fossify audio, Antenapod, campfire, newpipe, xtra, vlc
  • MAPS : Navit, cartes IGN, trekarta, organic maps, osmand
  • COMUNICATION : element, jitsi, fork telegram, moshidon / pachli / tusky, fairemail (fdroid version doesn’t work with microsoft OAuth. Github or Play version are required)