Skip to content

Commit 69b35c0

Browse files
committed
Fix some issues with flashing addons
1 parent 386a927 commit 69b35c0

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
metadata:
2+
maintainer: Tobias Sterbak (tsterbak)
3+
devicename: Samsung Galaxy S7
4+
devicecode: herolte
5+
steps:
6+
unlock_bootloader:
7+
flash_recovery:
8+
- type: call_button
9+
content: >
10+
As a first step, you need to boot into the bootloader. A bootloader is the piece of software,
11+
that tells your phone who to start and run an operating system (like Android). Your device should be turned on.
12+
Then press 'Confirm and run' to reboot into the bootloader. Continue once it's done.
13+
command: adb_reboot_download
14+
- type: call_button
15+
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.
16+
command: heimdall_flash_recovery
17+
- type: confirm_button
18+
img: samsung-buttons.png
19+
content: >
20+
Unplug the USB cable from your device. Then manually reboot into recovery by pressing the *Volume Down* + *Power buttons* for 8~10 seconds
21+
until the screen turns black & release the buttons immediately when it does, then boot to recovery with the device powered off,
22+
hold *Volume Up* + *Home* + *Power button*.

openandroidinstaller/tooling.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@ def adb_twrp_install_addons(bin_path: Path, addons: List[str], is_ab: bool) -> b
266266
Only works for twrp recovery.
267267
"""
268268
logger.info("Install addons with twrp.")
269-
if is_ab:
270-
sleep(7)
269+
sleep(5)
270+
logger.info("Sideload and install addons.")
271+
for addon in addons:
271272
# activate sideload
272273
logger.info("Activate sideload.")
273274
for line in run_command("adb", ["shell", "twrp", "sideload"], bin_path):
@@ -276,20 +277,17 @@ def adb_twrp_install_addons(bin_path: Path, addons: List[str], is_ab: bool) -> b
276277
logger.error("Activating sideload failed.")
277278
yield False
278279
return
279-
280-
# now flash os image
281-
sleep(5)
282-
logger.info("Sideload and install addons.")
283-
for addon in addons:
280+
sleep(2)
281+
# now flash os image
284282
for line in run_command("adb", ["sideload", f"{addon}"], bin_path):
285283
yield line
286284
if (type(line) == bool) and not line:
287285
logger.error(f"Sideloading {addon} failed.")
288286
# TODO: this might sometimes think it failed, but actually it's fine. So skip for now.
289287
# yield False
290288
# return
289+
sleep(7)
291290
# finally reboot into os
292-
sleep(7)
293291
if is_ab:
294292
# reboot into the bootloader again
295293
logger.info("Rebooting device into bootloader with adb.")

0 commit comments

Comments
 (0)