Replace subprocess.run with python library function. Using update_trace and calculate_time_offset library functions. Bug: 217373918 Test: manually. Change-Id: I6c21512519d0033d90765132961d8e93ecfe2dee