Fix RestoreSessionHostSideTest by checking adb command status.
The installPackage method in RestoreSessionHostSideTest was verifying the success of an `adb install --incremental` command by checking for the string "Success" in its standard output.
This is no longer a reliable check, as the output format can vary, leading to test failures like those seen in b/417362926.
This change refactors the installWithAdb helper method to return a CommandResult object instead of the raw stdout string.
This allows the test to check the command's exit status directly, which is a more robust way to confirm success.
The assertion is updated to use result.getStatus() == CommandStatus.SUCCESS.
Additionally, the failure message is improved to include the command's status, stdout, and stderr for easier debugging.
Bug: 431926427
Bug: 417348387
Test: android.cts.backup.RestoreSessionHostSideTest
Flag: TEST_ONLY
Change-Id: I9df690febe693b8baae2b778a05304ed16cde7e7
1 file changed