1

Here is my problem:

I want to import a root ca for https on an android device, but the android system asks me to set a password/pin. After the password/pin is setted, my ci test cases have to unlock the screen and input the password/pin, which is difficult to implement. I do not have a good idea to do this part of work. So, I want to ask if there is any way to install a root ca for https on a android devices.

Ps, I have tried on google, only to find that I have to root my devices, which is the least thing I want to do.

Any ideas or solutions are welcomed.

shitoujizu
  • 69
  • 1
  • 9

1 Answers1

0

For test/debug builds you can include the certificate into your app so that it is accepted as trusted root certificate: Using a Custom Certificate Trust Store on Android

There are some ways to automate the PIN/password entry: How to unlock android phone through ADB

Another alternative in certain situation may be apps that keep the device active and therefore prevent the device from enter the locked state.

Community
  • 1
  • 1
Robert
  • 39,162
  • 17
  • 99
  • 152
  • I tried on Android 6.0.1, PIN is still needed. And as a QA engineer, including the certificate into the app is not a good way to do it. The last solution does not suit in common ways. – shitoujizu Sep 05 '16 at 06:37
  • You are right, Android 6 is not a solution, removed it from my answer. – Robert Sep 05 '16 at 08:02
  • @MagnusLindOxlund Stackoverflow is dedicated to question on programming problems or software used for development. Therefore assuming an app development context is IMHO reasonable, especially if the question lacks details. If it is about installing a certificate in Android for a web browser it should have been asked on https://android.stackexchange.com/ – Robert Jun 23 '20 at 15:26