Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be063cd7 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Add T2 to the Easy Installer

parent b08bbe73
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
# Easy Installer
**Current Version:** v0.12.3-beta
**Current Version:** v0.13.0-beta

Members:
- Gaël
@@ -36,7 +36,7 @@ developer: [Vincent Bourgmayer](vincent.bourgmayer@e.email)


## Changelogs
### v0.12.4-beta (current - unreleased)
### v0.13.0-beta (current - unreleased)
- Download sources in device specific folder (#325)
- update Installation step's title for S9 and S9+ (#339)
- Update german translation - by F. Wildermuth, Mex Salem, Anonymous, Vincent Bourgmayer
@@ -44,6 +44,7 @@ developer: [Vincent Bourgmayer](vincent.bourgmayer@e.email)
- Update basque translation - by Porrumentzio
- Update dutch translation - by Edoardo Regni
- Add new step to make "oem unlock" visible for S9/S9+ (#308)
- Add Teracube 2e support to Easy-installer

### v0.12.3-beta (latest release)
- Start italian translation - by Paolo Pantaleo
+166 −0
Original line number Diff line number Diff line
#!/bin/bash

# Copyright (C) 2021 ECORP SAS - Author: Vincent Bourgmayer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

# Parameter
# $1: DEVICE_ID device id
# $2: ARCHIVE_PATH path to archive
# $3: fastboot folder path
# $4: Java folder path


# Exit status
# - 0 : device flashed
# - 1 : generic error
# - 10: can't unpack system.img
# - 11: can't wipe data
# - 12: can't flash boot
# - 13: can't flash recovery
# - 14: can't flash vbmeta
# - 15: can't flash vbmeta_system
# - 16: can't flash vbmeta_vendor
# - 17: can't reboot on fastboot
# - 18: can't flash system
# - 19: can't flash product
# - 20: can't flash vendor
# - 101 : DEVICE_ID missing
# - 102 : ARCHIVE_PATH missing
# - 103 : fastboot folder path missing

DEVICE_ID=$1
ARCHIVE_PATH=$2
FASTBOOT_FOLDER_PATH=$3
JAVA_FOLDER_PATH=$4

# Check serial number has been provided
if [ -z "$DEVICE_ID" ]
then
  exit 101
fi

# check path to rom has been provided
if [ -z "$ARCHIVE_PATH" ]
then
  exit 102
fi

#check path to adb/fasboot has been provided
if [ -z "$FASTBOOT_FOLDER_PATH" ]
then
  exit 103
fi

# Check java folder has been provided
if [ -z "$JAVA_FOLDER_PATH" ]
then
  exit 104
fi


# Build fastboot path
FASTBOOT_PATH=${FASTBOOT_FOLDER_PATH}"fastboot"

# Build java jar path
JAR_PATH=${JAVA_FOLDER_PATH}"/bin/jar"

# Build archive folder path
ARCHIVE_FOLDER_PATH=$(dirname "$ARCHIVE_PATH")"/"

# unzip for system.img
cd "$ARCHIVE_FOLDER_PATH" || exit 104

if ! "$JAR_PATH" -x -v -f "$ARCHIVE_PATH" ;
then 
  exit 10
fi

echo "unpacked archive"

sleep 1

# Wipe user data
if ! "$FASTBOOT_PATH" -w ;
then 
  exit 11
fi

echo "user data wiped"
sleep 5

# Flash the device
if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash boot boot.img
then
  exit 12
fi
sleep 1
echo "Flashed boot"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash recovery recovery.img
then
  exit 13
fi
sleep 1
echo "Flashed recovery"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta vbmeta.img
then
  exit 14
fi
sleep 1
echo "Flashed vbmeta"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta_system vbmeta_system.img
then
  exit 15
fi
sleep 1
echo "Flashed vbmeta_system"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vbmeta_vendor vbmeta_vendor.img
then
  exit 16
fi
sleep 1
echo "Flashed vbmeta_vendor"


if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" reboot fastboot
then
  exit 17
fi
sleep 6
echo "Rebooted on fastboot"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash system system.img
then
  exit 18
fi
sleep 1
echo "Flashed system"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash product product.img
then
  exit 19
fi
sleep 1
echo "Flashed product"

if ! "$FASTBOOT_PATH" -s "$DEVICE_ID" flash vendor vendor.img
then
  exit 20
fi
sleep 1
echo "Flashed vendor"
 No newline at end of file
+49 −0
Original line number Diff line number Diff line
#!/bin/bash

# Copyright (C) 2019 ECORP SAS - Author: Romain Hunault
# Copyright (C) 2020 ECORP SAS - Author: Vincent Bourgmayer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

# TODO: test if a device go from "sideload" mode to recovery

# Parameter
# $1: DEVICE_ID ID of the device to wait
# $2: ADB_FOLDER_PATH: the path where runnable adb is stored

# Exit status
# - 0 : success
# - 101 : DEVICE_ID missing
# - 102 : adb wait sideload failed

DEVICE_ID=$1
ADB_FOLDER_PATH=$2
ADB_PATH=""

if [ -z "$DEVICE_ID" ]
then
  exit 101
fi

ADB_PATH=${ADB_FOLDER_PATH}"adb"

echo "waiting for sideload"
if ! "$ADB_PATH" -s "$DEVICE_ID" wait-for-sideload
then
    echo "device not detected in sideload"
    exit 102
fi

sleep 1
echo "device found in sideload"
 No newline at end of file
+141 −0
Original line number Diff line number Diff line
:: Copyright (C) 2021 ECORP SAS - Author: Vincent Bourgmayer
::
:: This program is free software: you can redistribute it and/or modify
:: it under the terms of the GNU General Public License as published by
:: the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License
:: along with this program.  If not, see <https://www.gnu.org/licenses/>.

:: Parameter
:: $1: DEVICE_ID device id
:: $2: ARCHIVE_PATH path to archive
:: $3: fastboot folder path
:: $4: Java folder path


:: Exit status
:: - 0 : device flashed
:: - 1 : generic error
:: - 10: can't unpack system.img
:: - 11: can't wipe data
:: - 12: can't flash boot
:: - 13: can't flash recovery
:: - 14: can't flash vbmeta
:: - 15: can't flash vbmeta_systel
:: - 16: can't flash vbmeta_vendor
:: - 17: can't reboot to fastboot
:: - 18: can't flash system
:: - 19: can't flash product
:: - 20: can't flash vendor
:: - 101 : DEVICE_ID missing
:: - 102 : ARCHIVE_PATH missing
:: - 103 : fastboot folder path missing

set DEVICE_ID="%1"
set ARCHIVE_PATH=%~2
set FASTBOOT_FOLDER_PATH=%~3
set JAVA_FOLDER_PATH=%~4

if not defined %DEVICE_ID (
  exit /b 101
)

if not defined %ARCHIVE_PATH (
  exit /b 102
)

if not defined %FASTBOOT_FOLDER_PATH (
  exit /b 103
)

:: Check java folder has been provided
if not defined %JAVA_FOLDER_PATH (
  exit /b 104
)

set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot"


set JAR_PATH="%JAVA_FOLDER_PATH%/bin/jar"

:: Build archive folder path
for %%a in ("%ARCHIVE_PATH%") do (
	set ARCHIVE_FOLDER_PATH=%%~dpa"
	echo %ARCHIVE_FOLDER_PATH%
)
:: unzip for system.img
cd "%ARCHIVE_FOLDER_PATH%"

%JAR_PATH% -x -v -f "%ARCHIVE_PATH%"
if errorLevel 1 ( exit /b 10 )

echo "unpacked archive"

ping 127.0.0.1 -n 1 -w 10000 >NUL

%FASTBOOT_PATH% -w
if errorLevel 1 ( exit /b 11 )

echo "user data wiped"

ping 127.0.0.1 -n 5 -w 10000 >NUL

%FASTBOOT_PATH% -s %DEVICE_ID% flash boot boot.img
if errorLevel 1 ( exit /b 12 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed boot"

%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery.img
if errorLevel 1 ( exit /b 13 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed recovery"

%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta vbmeta.img
if errorLevel 1 ( exit /b 14 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed vbmeta"

%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta_system vbmeta_system.img
if errorLevel 1 ( exit /b 15 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed vbmeta_system"

%FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta_vendor vbmeta_vendor.img
if errorLevel 1 ( exit /b 16 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed vbmeta_vendor"

%FASTBOOT_PATH% -s %DEVICE_ID% reboot fastboot
ping 127.0.0.1 -n 6 -w 10000 >NUL
echo "Rebooted on fastboot"

%FASTBOOT_PATH% -s %DEVICE_ID% flash system system.img
if errorLevel 1 ( exit /b 18 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed vbmeta_vendor"

%FASTBOOT_PATH% -s %DEVICE_ID% flash product product.img
if errorLevel 1 ( exit /b 19 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed product"

%FASTBOOT_PATH% -s %DEVICE_ID% flash vendor vendor.img
if errorLevel 1 ( exit /b 20 )

ping 127.0.0.1 -n 1 -w 10000 >NUL
echo "Flashed vendor"
exit /b 0
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
# Maintainer: efoundation <dev [at] e -dot- email>
# Maintainer: steadfasterX <steadfasterX [at] binbash -dot- rocks>
pkgname=easy-installer
pkgver=0.12.4
pkgver=0.13.0
pkgrel=4
pkgdesc="The Easy Installer is a desktop application which helps users install Android /e/ (https://doc.e.foundation/what-s-e) on supported devices."
arch=('x86_64')
Loading