Skip to content

Commit 62763e8

Browse files
committed
Minor fix
1 parent 7bf540f commit 62763e8

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ChangeLog
22

3+
### 0.7.36
4+
- CHANGE: Minor fix
5+
36
### 0.7.35
47
- CHANGE: tool objection
58

mpt/console.py

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from mpt import functions
1717

18-
__version__ = '0.7.35'
18+
__version__ = '0.7.36'
1919

2020
from mpt import settings, logger
2121
from mpt.config import Config
@@ -508,19 +508,24 @@ def run_tool_objection():
508508
conf = Config()
509509
package = conf.load_config('package-name')
510510
application_label = conf.load_config('application-label')
511+
command = settings.ANDROID_TOOLS['objection']['bin']
511512

512-
app = f"\"{application_label}\" ({package})"
513-
options = [f"run objection for app {app}", "run objection"]
514-
terminal_menu = TerminalMenu(options, title="Please select an option:")
515-
menu_entry_index = terminal_menu.show()
513+
if len(application_label) > 0:
516514

517-
command = settings.ANDROID_TOOLS['objection']['bin']
518-
if menu_entry_index == 0:
519-
objection_command = f"objection --gadget \\\"{application_label}\\\" explore"
520-
command = command.rsplit(";", 1)[0] + f"; {objection_command}; exec $SHELL"
521-
log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} {objection_command}"
522-
if menu_entry_index == 1:
523-
# replace last objection mit exec $SHELL
515+
app = f"\"{application_label}\" ({package})"
516+
options = [f"run objection for app {app}", "run objection"]
517+
terminal_menu = TerminalMenu(options, title="Please select an option:")
518+
menu_entry_index = terminal_menu.show()
519+
520+
if menu_entry_index == 0:
521+
objection_command = f"objection --gadget \\\"{application_label}\\\" explore"
522+
command = command.rsplit(";", 1)[0] + f"; {objection_command}; exec $SHELL"
523+
log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} {objection_command}"
524+
if menu_entry_index == 1:
525+
# replace last objection mit exec $SHELL
526+
command = command.rsplit(";", 1)[0] + "; objection --help; exec $SHELL"
527+
log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} ..."
528+
else:
524529
command = command.rsplit(";", 1)[0] + "; objection --help; exec $SHELL"
525530
log_info = f"Running command in {Style.BRIGHT + Fore.CYAN}kitty terminal{Style.RESET_ALL} ..."
526531

0 commit comments

Comments
 (0)