Skip to content

Commit 1959d66

Browse files
committed
Merge remote-tracking branch 'origin/main' into main
2 parents 69cf9b5 + 299d8ef commit 1959d66

22 files changed

+1340
-299
lines changed

.github/workflows/manual-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
python-version: 3.9
2020
- run: pip install -r requirements.txt
2121
- run: python scripts/download-tools.py
22-
- run: pyinstaller openandroidinstaller/openandroidinstaller.py --noconsole --noconfirm --onefile --icon "/assets/favicon.ico" --add-data "openandroidinstaller/assets:assets" --add-binary "openandroidinstaller/bin/adb:bin" --add-binary "openandroidinstaller/bin/fastboot:bin" --add-binary "openandroidinstaller/bin/heimdall:bin"
22+
- run: pyinstaller openandroidinstaller/openandroidinstaller.py --noconsole --noconfirm --onefile --icon "openandroidinstaller/assets/favicon.ico" --add-data "openandroidinstaller/assets:assets" --add-binary "openandroidinstaller/bin/adb:bin" --add-binary "openandroidinstaller/bin/fastboot:bin" --add-binary "openandroidinstaller/bin/heimdall:bin"
2323
# Optionally verify that it works (provided that it does not need user interaction)
2424
#- run: ./dist/your-code/your-code
2525
- uses: actions/upload-artifact@v3

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
install:
1+
poetry:
22
curl -sSL https://install.python-poetry.org | python3 -
3+
4+
install:
35
poetry install
46
poetry run python scripts/download-tools.py
57

8+
export:
9+
poetry export -f requirements.txt --output requirements.txt
10+
611
test:
712
poetry run pytest tests/
813

@@ -12,6 +17,5 @@ app:
1217
build-app:
1318
poetry run pyinstaller openandroidinstaller/openandroidinstaller.py --noconsole --noconfirm --onefile --icon "/assets/favicon.ico" --add-data "openandroidinstaller/assets:assets" --add-binary "openandroidinstaller/bin/adb:bin" --add-binary "openandroidinstaller/bin/fastboot:bin" --add-binary "openandroidinstaller/bin/heimdall:bin"
1419

15-
1620
clean-build:
1721
rm -rf build/ dist/

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,35 @@ If you wish to backup the TA partition first, you can find tutorials related to
3131
Vendor | Device Name | CodeName | Models | Status
3232
---|---|---|---|---
3333
Samsung | Galaxy A3 2017 | a3y17lte | SM-A320FL | tested
34-
Samsung | Galaxy A5 2016 | a5xelte | | under development
35-
Samsung | Galaxy S7 | herolte | | planned
34+
Samsung | Galaxy A5 2016 | a5xelte | SM-A510F | tested
35+
Samsung | Galaxy S7 | herolte | SM-G930F | tested
36+
Samsung | Galaxy S9 | starlte | | under development
3637
Google | Pixel 3a | sargo | sargo | tested
38+
Google | Pixel 4a | sunfish | sunfish | planned
3739
Sony | Xperia Z | yuga | C6603 | tested
3840
Sony | Xperia Z3 | z3 | | under development
3941
Sony | Xperia ZX | kagura | | planned
4042
Fairphone | Fairphone 2 | FP2 | | under development
41-
Xiaomi | Mi 9 Lite | pyxis | | planned
43+
Fairphone | Fairphone 3 | FP3 | | planned
44+
Motorola | Moto G5 | cedric | | planned
45+
Motorola | moto g7 power | ocean | | under development
4246

4347

4448
## Usage
4549

46-
Currently, only linux is supported.
50+
Currently, Linux (tested with Ubuntu 20.04 LTS) and MacOS are supported.
4751

48-
1. Download the AppImage, .exe or appropriate file for your OS.
49-
2. Download the lineageOS image and the custom recovery image. A source for files can be found here: https://lineageosroms.com
52+
1. Download the AppImage, .exe or appropriate executable file for your OS. You might need to change permissions to run the executable.
53+
2. Download the lineageOS image and the custom recovery image. A source for files can be found on https://lineageosroms.com or you can just search the web for an appropriate version for your device.
5054
3. Start the desktop app and follow the instructions.
5155

5256

5357
## Run OpenAndroidInstaller for development
5458

55-
Currently development is only supported on Ubunut Linux. MacOS should also work fine.
59+
Currently development is only supported on Ubuntu Linux. MacOS should also work fine.
5660

5761
1. Clone the main branch of this repository
58-
2. Run `make install` to install poetry to manage python and install the requirend dependencies like adb, fastboot and heimdall.
62+
2. Run `make poetry` and `make install` to install poetry to manage python and install the required dependencies like adb, fastboot and heimdall.
5963
3. Run `make app` to start the desktop app from the source.
6064

6165

@@ -72,16 +76,25 @@ Every step in the config file corresponds to one view in the application. These
7276
- `confirm_button`: Display the content, as well as a button to allow the user to go to the next step.
7377
- `call_button`: Display the content text and a button that runs a given command. After the command is run, a confirm button is displayed to allow the user to move to the next step.
7478
- `call_button_with_input`: Display the content text, an input field and a button that runs a given command. The inputtext, can be used in the command by using the `<inputtext>` placeholder in the command field. After the command is run, a confirm button is displayed to allow the user to move to the next step.
79+
- `link_button_with_confirm`: Display a button that opens a browser with a given link, confirm afterwards. Link is given in `link`.
7580
- `content`: str; The content text displayed alongside the action of the step. Used to inform the user about whats going on.
7681
- `command`: [ONLY for call_button* steps] str; This is a terminal command run in a shell. (For example fastboot or adb). There are three types of placeholders supported, that will be filled by the tool as soon as information is given.
77-
- `<image>`: The path of the image file.
82+
- `<image>`: The path of the ROM image file.
7883
- `<recovery>`: The path of the recovery file.
7984
- `<inputtext>`: Text from the user input from `call_button_with_input` views.
80-
- `img`: Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
85+
- `img`: [OPTIONAL] Display an image on the left pane of the step view. Images are loaded from `openandroidinstaller/assets/imgs/`.
8186
- `allow_skip`: [OPTIONAL] boolean; If a skip button should be displayed to allow skipping this step. Can be useful when the bootloader is already unlocked.
87+
- `link`: [OPTIONAL] Link to use for the link button if type is `link_button_with_confirm`.
8288

83-
After you created a config file, you can open a pull request to make the file available to other users. The file should be named after device code output by `adb shell getprop | grep ro.product.device` when the devices is connected to the computer. Please also add the device to the supported devices table above.
89+
The file should be named after device name output by `adb shell getprop | grep ro.product.device` when the devices is connected to the computer. You can also get the device code by connecting the device to the computer and run OpenAndroidInstaller to detect the device.
8490

91+
To test your config file with the executable without using the developer setup, place it in the same directory as the executable. There it will be detected by name.
92+
After you created a config file and it works fine, you can open a pull request to make the file available to other users. Please also add the device to the supported devices table above.
93+
94+
#### On unlocking the bootloader
95+
Some devices with require manual steps to unlock the bootloader. In general you will need to create an account at a vendor website and receive some code from there. OpenAndroidInstaller will try to guide you as far as possible. These vendors include *Sony, Motorola, Xiaomi* among others.
96+
97+
Other phone vendors stops allowing to unlock the bootloader all together. There is nothing to be done if you didn't unlock your device in time. These vendors include *Huawei and LG* among others. Support for these vendors will always be very limited.
8598

8699
## Tools
87100

@@ -101,4 +114,4 @@ This program is free software: you can redistribute it and/or modify it under th
101114

102115
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.
103116

104-
You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
117+
You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
Lines changed: 47 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,51 @@
11
metadata:
22
maintainer: Tobias Sterbak (tsterbak)
33
devicename: Fairphone 2
4-
requirements:
4+
devicecode: FP2
55
steps:
6-
- title: "Flash a custom recovery"
7-
type: confirm_button
8-
content: "Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating, adapting and repairing of the operating system."
9-
- title: "Flash a custom recovery"
10-
type: call_button
11-
content: "Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue."
12-
command: "adb reboot bootloader"
13-
- title: "Flash a custom recovery"
14-
type: call_button
15-
content: "Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue."
16-
command: "fastboot flash recovery <recovery>"
17-
- title: "Flash temporary recovery"
18-
type: call_button
19-
content: "Press the button to reboot. Then confirm here to continue."
20-
command: "fastboot reboot"
21-
- title: "Flash LineageOS"
22-
type: confirm_button
23-
content: "In this step, you finally flash LineageOS. Confirm to continue."
24-
- title: "Flash LineageOS"
25-
type: confirm_button
26-
content: "Select 'Recovery Mode' on your smartphone screen and press the Start-Button to confirm. Then confirm here."
27-
- title: "Flash LineageOS"
28-
type: confirm_button
29-
content: "Now tap Factory Reset, then Format data / Factory reset on your phone screen and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one)."
30-
- title: "Flash LineageOS"
31-
type: confirm_button
32-
content: "Return to the main menu on the phone."
33-
- title: "Flash LineageOS"
34-
type: confirm_button
35-
content: "On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. Then confirm here."
36-
- title: "Flash LineageOS"
37-
type: call_button
38-
content: "Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start! This might take a while. Confirm after it's done."
39-
command: "adb sideload <image>"
40-
- title: "Flash LineageOS"
41-
type: confirm_button
42-
content: "Flashing finished. Now press 'back' (arrow) and then 'Reboot system now' on the phone screen to finish the installation."
6+
unlock_bootloader:
7+
flash_recovery:
8+
- title: "Flash a custom recovery"
9+
type: confirm_button
10+
content: >
11+
Now you need to flash a custom recovery system on the phone. A recovery is a small subsystem on your phone, that manages updating,
12+
adapting and repairing of the operating system.
13+
- title: "Flash a custom recovery"
14+
type: call_button
15+
content: Once the device is fully booted, you need to reboot into the bootloader again by pressing 'Confirm and run' here. Then continue.
16+
command: "adb reboot bootloader"
17+
- title: "Flash a custom recovery"
18+
type: call_button
19+
content: Flash a custom recovery (temporarily) by pressing 'Confirm and run'. Once it's done continue.
20+
command: "fastboot flash recovery <recovery>"
21+
- title: "Flash temporary recovery"
22+
type: call_button
23+
content: Press the button to reboot. Then confirm here to continue.
24+
command: "fastboot reboot"
25+
install_os:
26+
- title: "Flash LineageOS"
27+
type: confirm_button
28+
content: In this step, you finally flash LineageOS. Confirm to continue.
29+
- title: "Flash LineageOS"
30+
type: confirm_button
31+
content: Select 'Recovery Mode' on your smartphone screen and press the Start-Button to confirm. Then confirm here.
32+
- title: "Flash LineageOS"
33+
type: confirm_button
34+
content: >
35+
Now tap Factory Reset, then Format data / Factory reset on your phone screen and continue with the formatting process.
36+
This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one).
37+
- title: "Flash LineageOS"
38+
type: confirm_button
39+
content: Return to the main menu on the phone.
40+
- title: "Flash LineageOS"
41+
type: confirm_button
42+
content: On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. Then confirm here.
43+
- title: "Flash LineageOS"
44+
type: call_button
45+
content: >
46+
Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start!
47+
This might take a while. Confirm after it's done.
48+
command: "adb sideload <image>"
49+
- title: "Flash LineageOS"
50+
type: confirm_button
51+
content: Flashing finished. Now press 'back' (arrow) and then 'Reboot system now' on the phone screen to finish the installation.
Lines changed: 51 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,55 @@
11
metadata:
22
maintainer: Tobias Sterbak (tsterbak)
33
devicename: Samsung Galaxy A3 (2017)
4-
requirements:
5-
- heimdall
4+
devicecode: a3y17lte
65
steps:
7-
- title: "Boot into bootloader"
8-
type: call_button
9-
content: "As a first step, you need to boot into the bootloader. A bootloader is the piece of software, that tells your phone who to start and run an operating system (like Android). Your device should be turned on. Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done."
10-
command: "adb reboot download"
11-
- title: "Flash custom recovery"
12-
type: call_button
13-
content: "In this step, you need to flash a custom recovery on your device. Press 'Confirm and run' to start the process. Confirm afterwards to continue."
14-
command: "heimdall flash --no-reboot --RECOVERY <recovery>"
15-
- title: "Boot into recovery"
16-
type: confirm_button
17-
content: "Unplug the USB cable from your device. Then manually reboot into recovery by pressing the Volume Down + Power buttons for 8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off, hold Volume Up + Home + Power."
18-
- title: "Flash LineageOS"
19-
type: confirm_button
20-
content: "Now swipe right to allow modifications then tap 'Wipe' on your phone. Next tap 'Format Data' and follow the instructions on your phone to continue with the formatting process. This will remove encryption and delete all files stored in the internal storage. Confirm to continue once you are done."
21-
- title: "Flash LineageOS"
22-
type: confirm_button
23-
content: "Return to the previous menu on your phone by going back two times. Them tap 'Advanced Wipe', and select the 'Cache' and 'System' partitions and then 'Swipe to Wipe'. Confirm to continue once you are done."
24-
- title: "Flash LineageOS"
25-
type: confirm_button
26-
content: "Now connect the phone to the computer again with the USB-cable. On the device, go back three times and select “Advanced”, then “ADB Sideload”. Select 'Wipe cache' and 'Wipe dalvik cache', then swipe to begin sideload. Then confirm here."
27-
- title: "Flash LineageOS"
28-
type: call_button
29-
content: "Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start! This might take a while. Confirm after it's done."
30-
command: "adb sideload <image>"
31-
- title: "Reboot into LineageOS"
32-
type: call_button
33-
content: "As a final step, reboot into LineageOS to finish the installation by pressing the button."
34-
command: "adb reboot"
6+
unlock_bootloader:
7+
flash_recovery:
8+
- title: "Boot into bootloader"
9+
type: call_button
10+
content: >
11+
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
12+
that tells your phone who to start and run an operating system (like Android). Your device should be turned on.
13+
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
14+
command: "adb reboot download"
15+
- title: "Flash custom recovery"
16+
type: call_button
17+
content: >
18+
In this step, you need to flash a custom recovery on your device.
19+
Press 'Confirm and run' to start the process. Confirm afterwards to continue.
20+
command: "heimdall flash --no-reboot --RECOVERY <recovery>"
21+
- title: "Boot into recovery"
22+
type: confirm_button
23+
img: samsung-buttons.png
24+
content: >
25+
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for
26+
8~10 seconds until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
27+
hold *Volume Up* + *Home* + *Power*.
28+
install_os:
29+
- title: "Flash LineageOS"
30+
type: confirm_button
31+
content: >
32+
Now swipe right to allow modifications then tap 'Wipe' on your phone. Next tap 'Format Data' and follow
33+
the instructions on your phone to continue with the formatting process. This will remove encryption and delete all files stored
34+
in the internal storage. Confirm to continue once you are done.
35+
- title: "Flash LineageOS"
36+
type: confirm_button
37+
content: >
38+
Return to the previous menu on your phone by going back two times.
39+
Them tap 'Advanced Wipe', and select the 'Cache' and 'System' partitions and then 'Swipe to Wipe'.
40+
Confirm to continue once you are done.
41+
- title: "Flash LineageOS"
42+
type: confirm_button
43+
content: >
44+
Now connect the phone to the computer again with the USB-cable. On the device, go back three times and select “Advanced”,
45+
then “ADB Sideload”. Select 'Wipe cache' and 'Wipe dalvik cache', then swipe to begin sideload. Then confirm here.
46+
- title: "Flash LineageOS"
47+
type: call_button
48+
content: >
49+
Now it's time to flash the LineageOS image. Don't remove the USB-Cable and press 'Confirm and run' to start!
50+
This might take a while. Confirm after it's done.
51+
command: "adb sideload <image>"
52+
- title: "Reboot into LineageOS"
53+
type: call_button
54+
content: As a final step, reboot into LineageOS to finish the installation by pressing the button.
55+
command: "adb reboot"

0 commit comments

Comments
 (0)