use test app's data folder as filter directory

During a retry, test methods to be retried are written into a
file, pushed onto device and read by the test instrumentation
for execution.

The default location for such filter file is /data/local/tmp,
which is prohibited for access by system uid packages, such
as the system UI tests package.

This change uses the test app's data folder for filter: this
is not generally applicable for all the tests since root
permission is required, but it is a relatively safe assumption
in case of testing against system uid pakcages since it
implies userdebug build is being used.

Bug: 152001555
Change-Id: I7db354b30c4b7d307285df14acf5b2ec519c992b
Test: http://go/forrest-run/L60800000952177537
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index 4188ee2..f616872 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -14,6 +14,9 @@
      limitations under the License.
 -->
 <configuration description="Run Phone application tests.">
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
+        <option name="force-root" value="true" />
+    </target_preparer>
     <option name="test-suite-tag" value="apct" />
     <option name="test-suite-tag" value="apct-instrumentation" />
     <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
@@ -26,5 +29,6 @@
         <option name="package" value="com.android.phone.tests" />
         <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
         <option name="hidden-api-checks" value="false"/>
+        <option name="test-filter-dir" value="/data/data/com.android.phone" />
     </test>
 </configuration>