Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide: Steps for adding Xiaomi devices to STF (e.g. Xiaomi Redmi 4A , MIUI 8.2.6.0) #603

Open
sorccu opened this issue Jun 2, 2017 · 9 comments

Comments

Projects
None yet
3 participants
@sorccu
Copy link
Member

commented Jun 2, 2017

To add Xiaomi devices to STF, there are extra steps that must be taken.

  1. To enable Developer options, to go SettingsAbout phone and tap on MIUI version until it says developer mode has been turned on.
  2. Go to SettingsMi Account and create or log in to a Mi account. This is required for the next step.
  3. Go to SettingsAdditional settingsDeveloper options. Turn USB debugging (for ADB access), Install via USB (needed for installing STFService.apk) and USB debugging (Security settings) (needed for running minitouch) on. You must have a MI account set up to enable USB debugging (Security settings), otherwise it won't let you.
    • Note: there are reports that some versions of MIUI may require a SIM card or these settings can't be turned on.
  4. Connect the device to your computer. Allow the ADB key and select "Always allow."
  5. Run STF. A dialog will pop up on the device confirming installation of STFService. You must allow the installation to go through. Note that you may need to do this again in the future if the service is updated.
  6. If STF fails to start after installing STFService.apk, go to SettingsPermissionsAutostart and enable STFService.
  7. The device should now work in STF.

Common errors:

If you see an error that says:

Setup had an error Error: /data/local/tmp/STFService.apk could not be installed [INSTALL_CANCELED_BY_USER]

It means that you haven't enabled the Install via USB option.

Steps tested on:

Redmi 4A

  • MIUI 8.2.6.0
  • MIUI 8.5.1.0
@iqianxing

This comment has been minimized.

Copy link

commented Sep 6, 2017

The device requires sim card in the device.
If doesn't, Install via USB (needed for installing STFService.apk) and USB debugging (Security settings) (needed for running minitouch) can't on.

@sorccu

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2017

Hmmmm that's weird, I don't have a SIM card in mine. Which device and MIUI version is it?

@iqianxing

This comment has been minimized.

Copy link

commented Sep 6, 2017

MIUI 8.5.1.0

@sorccu

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2017

Strange... does it actually tell you that you need a SIM card?

@iqianxing

This comment has been minimized.

Copy link

commented Sep 6, 2017

Yes , perhaps the os is different in China.

@sorccu

This comment has been minimized.

Copy link
Member Author

commented Sep 6, 2017

Possible. I've added your findings to the guide.

@lukassos

This comment has been minimized.

Copy link

commented Jan 18, 2018

Any update on this matter ?
Same issue here. I need sim card inside the phone to install/dev apps on the phone too.
I have unpacked new Redmi Note 5A with android 7.1.2 N2G47H (2017-12-01) and MUIU 9.2.1.0 NDFMIEK and the issue persist .
In android studio INSTALL_FAILED_USER_RESTRICTED, which implies the admin app has not permitted such operation. And in Xiaomi phone it is part of MIUI as I recall.

@sorccu

This comment has been minimized.

Copy link
Member Author

commented Jan 18, 2018

What kind of an update are you looking for? If the manufacturer forces you to set up a SIM card there’s nothing we can do about that.

@lukassos

This comment has been minimized.

Copy link

commented Jan 19, 2018

You're right. There is nothing you can add to this matter. I have researched about it a bit more and this is really an issue of MIUI 8+. They have added verification on chinese servers and gather unique id (UUID) of the phone on unlock of unknown souce apk. This UUID is generated from sim card secure element and thus you need a sim card indeed. Foremost thanks for really fast answer 😉 So for anybody else reading this, you need any sim card inside. There is no need for sim card to be active on cellular. On the other hand internet connection is required too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.