Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.35k stars 582 forks source link

Error: Requires permission android.permission.WRITE_SECURE_SETTINGS #5

Closed CoderBuck closed 7 years ago

CoderBuck commented 7 years ago

XiaoMi4 Android 6.0 MIUI8

$ ./gnirehtet rt
Starting gnirehtet...
'adb' reverse tcp:31416 tcp:31416
'adb' shell am startservice -a com.genymobile.gnirehtet.START
Starting service: Intent { act=com.genymobile.gnirehtet.START }
Error: Requires permission android.permission.WRITE_SECURE_SETTINGS
'java' -jar relay.jar
2017-04-06 17:31:05.886 I Main: Starting server...
Stopping gnirehtet...
'adb' shell am startservice -a com.genymobile.gnirehtet.STOP
Starting service: Intent { act=com.genymobile.gnirehtet.STOP }
Error: Requires permission android.permission.WRITE_SECURE_SETTINGS

[Edit by @rom1v] Solution: https://github.com/Genymobile/gnirehtet/issues/302#issuecomment-973850470

rom1v commented 7 years ago

Arf, it seems that your shell user does not have this permission… It should have it.

This requirement (a bit hacky) had been introduced by commit e7b84076a05effebf4aa2f47c9ad8ffff4fda382 (the commit message provides some details).

Does anyone have an idea to get the same "restriction" without the WRITE_SECURE_SETTINGS permission?

yashrajtalan commented 7 years ago

Have same issue with Xiaomi Redmi 3S Prime MIUI8 Android 6.0.1 Permissions granted to the app according to the phone are 'full network access' and 'view network connections'.

When I try adb shell pm grant com.genymobile.gnirehtet android.permission.WRITE_SECURE_SETTINGS I get Operation not allowed: java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

rom1v commented 7 years ago

@CoderBuck @yashrajtalan Could you give the permissions of your Android shell, please?

First, locate Shell.apk:

$ adb shell pm list package -f com.android.shell
package:/system/priv-app/Shell/Shell.apk=com.android.shell

Then pull it:

adb pull /system/priv-app/Shell/Shell.apk

Finally, print its permissions:

aapt d permissions Shell.apk

(aapt is available in $ANDROID_SDK/build-tools/25.0.2/aapt, or there is an aapt package in Debian)

Maybe we could find a better permission which works also for your devices ;-)

CoderBuck commented 7 years ago
$ adb shell pm list package -f com.android.shell
package:/system/priv-app/Shell/Shell.apk=com.android.shell

$ adb pull /system/priv-app/Shell/Shell.apk
adb: error: remote object 'D:/Develop/Git/Git/system/priv-app/Shell/Shell.apk' does not exist
CoderBuck commented 7 years ago

I am not familiar with this ;-0

rom1v commented 7 years ago

@CoderBuck It seems you are using git bash on Windows: http://stackoverflow.com/questions/16344985/how-do-i-pass-an-absolute-path-to-the-adb-command-via-git-bash-for-windows

Try with cmd.exe instead, since git bash mangles pathes at some point.

EDIT: or:

adb pull //system/priv-app/Shell/Shell.apk
CoderBuck commented 7 years ago

thanks ;-)

package: com.android.shell
uses-permission: name='android.permission.SEND_SMS'
uses-permission: name='android.permission.CALL_PHONE'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-permission: name='android.permission.READ_CONTACTS'
uses-permission: name='android.permission.WRITE_CONTACTS'
uses-permission: name='android.permission.READ_CALENDAR'
uses-permission: name='android.permission.WRITE_CALENDAR'
uses-permission: name='android.permission.READ_USER_DICTIONARY'
uses-permission: name='android.permission.WRITE_USER_DICTIONARY'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
uses-permission: name='android.permission.ACCESS_LOCATION_EXTRA_COMMANDS'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.BLUETOOTH'
uses-permission: name='android.permission.EXPAND_STATUS_BAR'
uses-permission: name='android.permission.DISABLE_KEYGUARD'
uses-permission: name='android.permission.REAL_GET_TASKS'
uses-permission: name='android.permission.CHANGE_CONFIGURATION'
uses-permission: name='android.permission.REORDER_TASKS'
uses-permission: name='android.permission.SET_ANIMATION_SCALE'
uses-permission: name='android.permission.SET_PREFERRED_APPLICATIONS'
uses-permission: name='android.permission.WRITE_SETTINGS'
uses-permission: name='android.permission.WRITE_SECURE_SETTINGS'
uses-permission: name='android.permission.BROADCAST_STICKY'
uses-permission: name='android.permission.SET_DEBUG_APP'
uses-permission: name='android.permission.SET_PROCESS_LIMIT'
uses-permission: name='android.permission.SET_ALWAYS_FINISH'
uses-permission: name='android.permission.DUMP'
uses-permission: name='android.permission.SIGNAL_PERSISTENT_PROCESSES'
uses-permission: name='android.permission.KILL_BACKGROUND_PROCESSES'
uses-permission: name='android.permission.FORCE_BACK'
uses-permission: name='android.permission.BATTERY_STATS'
uses-permission: name='android.permission.INTERNAL_SYSTEM_WINDOW'
uses-permission: name='android.permission.INJECT_EVENTS'
uses-permission: name='android.permission.RETRIEVE_WINDOW_CONTENT'
uses-permission: name='android.permission.SET_ACTIVITY_WATCHER'
uses-permission: name='android.permission.READ_INPUT_STATE'
uses-permission: name='android.permission.SET_ORIENTATION'
uses-permission: name='android.permission.INSTALL_PACKAGES'
uses-permission: name='android.permission.MOVE_PACKAGE'
uses-permission: name='android.permission.CLEAR_APP_USER_DATA'
uses-permission: name='android.permission.DELETE_CACHE_FILES'
uses-permission: name='android.permission.DELETE_PACKAGES'
uses-permission: name='android.permission.ACCESS_SURFACE_FLINGER'
uses-permission: name='android.permission.READ_FRAME_BUFFER'
uses-permission: name='android.permission.DEVICE_POWER'
uses-permission: name='android.permission.INSTALL_LOCATION_PROVIDER'
uses-permission: name='android.permission.BACKUP'
uses-permission: name='android.permission.FORCE_STOP_PACKAGES'
uses-permission: name='android.permission.STOP_APP_SWITCHES'
uses-permission: name='android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY'
uses-permission: name='android.permission.GRANT_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.REVOKE_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.SET_KEYBOARD_LAYOUT'
uses-permission: name='android.permission.GET_DETAILED_TASKS'
uses-permission: name='android.permission.SET_SCREEN_COMPATIBILITY'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_MEDIA_STORAGE'
uses-permission: name='android.permission.INTERACT_ACROSS_USERS'
uses-permission: name='android.permission.INTERACT_ACROSS_USERS_FULL'
uses-permission: name='android.permission.CREATE_USERS'
uses-permission: name='android.permission.MANAGE_DEVICE_ADMINS'
uses-permission: name='android.permission.BLUETOOTH_STACK'
uses-permission: name='android.permission.GET_ACCOUNTS'
uses-permission: name='android.permission.RETRIEVE_WINDOW_TOKEN'
uses-permission: name='android.permission.FRAME_STATS'
uses-permission: name='android.permission.BIND_APPWIDGET'
uses-permission: name='android.permission.UPDATE_APP_OPS_STATS'
uses-permission: name='android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS'
uses-permission: name='android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.CHANGE_APP_IDLE_STATE'
uses-permission: name='android.permission.MOUNT_UNMOUNT_FILESYSTEMS'
uses-permission: name='android.permission.MOUNT_FORMAT_FILESYSTEMS'
uses-permission: name='android.permission.MODIFY_PHONE_STATE'
uses-permission: name='android.permission.REGISTER_CALL_PROVIDER'
uses-permission: name='android.permission.REGISTER_CONNECTION_MANAGER'
uses-permission: name='android.permission.REGISTER_SIM_SUBSCRIPTION'
uses-permission: name='android.permission.GET_APP_OPS_STATS'
rom1v commented 7 years ago

OK so it declares using android.permission.WRITE_SECURE_SETTINGS.

Could you give the result of the following commands, please:

adb shell id
adb shell cat /proc/'$$'/status

EDIT: in fact, these commands will not help.

CoderBuck commented 7 years ago

Ok.

adb shell id

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
uid=2000(shell) gid=2000(shell) groups=2000(shell),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:shell:s0

adb shell cat /proc/'$$'/status

/system/bin/sh: cat: /proc/$$/status: No such file or directory
rom1v commented 7 years ago

To summarize:

  1. android.permission.WRITE_SECURE_SETTINGS has protection level "signature"
  2. sending the intent from shell leads to error Requires permission android.permission.WRITE_SECURE_SETTINGS
  3. shell declares using the permission android.permission.WRITE_SECURE_SETTINGS

One possibility is that Shell.apk is not signed with the same signature as the ROM. Which is very strange…

rom1v commented 7 years ago

Could you replace android.permission.WRITE_SECURE_SETTINGS by android.permission.WRITE_SETTINGS (a permission with normal protection level) here, build, and try again, please?

If it works, it suggests that the problem is related to Shell.apk signature…

CoderBuck commented 7 years ago

error

Error: Requires permission android.permission.WRITE_SETTINGS
rom1v commented 7 years ago

So you have a shell with no permissions… Can you find a permission listed from Shell.apk that does work?

rom1v commented 7 years ago

What about:

adb shell am startservice -a com.genymobile.gnirehtet.START --user 0
adb shell am startservice -a com.genymobile.gnirehtet.START --user -2
adb shell am startservice -a com.genymobile.gnirehtet.START --user -3

?

rom1v commented 7 years ago

The result of this command may also be interesting:

adb shell dumpsys package com.android.shell
rom1v commented 7 years ago

@CoderBuck @yashrajtalan Could you please give the result of:

adb shell dumpsys package com.android.shell

And also try these commands.

Thank you :)

yashrajtalan commented 7 years ago

The issue seems to be resolved by heading over to Developer Options on MIUI, and enabling the following: USB debugging -Debug mode when USB is connected Install via USB -Allow installing apps via USB USB debugging (Security Settings)- Allow granting permissions and simulating input via USB debugging

The first was already enabled, and I installed the apk file manually so I didn't need the second option.

I'm guessing the issue can be pinned down to the last option, which allows granting the necessary permissions. @CoderBuck please confirm.

Thank you @rom1v for this amazing app. This is a worthy free replacement for ReverseTethering NoRoot.

CoderBuck commented 7 years ago

@rom1v @yashrajtalan Sorry to replay late! @yashrajtalan you are right!

thanks a lot!

rom1v commented 7 years ago

Great, thank you :+1: So I close the issue.

Biswa96 commented 6 years ago

@yashrajtalan Your procedure requires MI account in Xiaomi Redmi phones. You just remove android.permission.WRITE_SECURE_SETTINGS in manifest file (mentioned in #40).

SonalDalal commented 6 years ago

@yashrajtalan, Thanks a lot, your solution worked for me.

Mark-Joy commented 4 years ago

edit gnirehtet-run.cmd as below:

@echo off
adb shell "su -c 'setenforce 0'"
adb shell "su -c 'am start -a com.genymobile.gnirehtet.START -n com.genymobile.gnirehtet/.GnirehtetActivity'"
adb shell "su -c 'setenforce 1'"
gnirehtet.exe run
pause

Note: if your device's SELInux mode is Permissive then you can remove setenforce commands

@echo off
adb shell "su -c 'am start -a com.genymobile.gnirehtet.START -n com.genymobile.gnirehtet/.GnirehtetActivity'"
gnirehtet.exe run
pause
elswerky commented 4 years ago

edit gnirehtet-run.cmd as below:

@echo off
adb shell "su -c 'setenforce 0'"
adb shell "su -c 'am start -a com.genymobile.gnirehtet.START -n com.genymobile.gnirehtet/.GnirehtetActivity'"
adb shell "su -c 'setenforce 1'"
gnirehtet.exe run
pause

Note: if your device's SELInux mode is Permissive then you can remove setenforce commands

@echo off
adb shell "su -c 'am start -a com.genymobile.gnirehtet.START -n com.genymobile.gnirehtet/.GnirehtetActivity'"
gnirehtet.exe run
pause

thank you this worked for me on realme 2 pro ColorOs android pie and realmeUi android Q i made a script file to work on Arch linux from your commands ,, here is its contents

!/bin/sh

adb shell "su -c 'setenforce 0'" adb shell "su -c 'am start -a com.genymobile.gnirehtet.START -n com.genymobile.gnirehtet/.GnirehtetActivity'" adb shell "su -c 'setenforce 1'" gnirehtet run

ahmadabdelsattar commented 4 years ago

What about:

adb shell am startservice -a com.genymobile.gnirehtet.START --user 0
adb shell am startservice -a com.genymobile.gnirehtet.START --user -2
adb shell am startservice -a com.genymobile.gnirehtet.START --user -3

?

how to run them ?

kachuy commented 3 years ago

@CoderBuck @yashrajtalan Could you give the permissions of your Android shell, please?

First, locate Shell.apk:

$ adb shell pm list package -f com.android.shell
package:/system/priv-app/Shell/Shell.apk=com.android.shell

Then pull it:

adb pull /system/priv-app/Shell/Shell.apk

Finally, print its permissions:

aapt d permissions Shell.apk

(aapt is available in $ANDROID_SDK/build-tools/25.0.2/aapt, or there is an aapt package in Debian)

Maybe we could find a better permission which works also for your devices ;-)

root@www:/mnt/c/scrcpy-win64-v1.16# aapt d permissions Shell.apk
package: com.android.shell
uses-permission: name='android.permission.SEND_SMS'
uses-permission: name='android.permission.CALL_PHONE'
uses-permission: name='android.permission.READ_PHONE_STATE'
uses-permission: name='android.permission.READ_CONTACTS'
uses-permission: name='android.permission.WRITE_CONTACTS'
uses-permission: name='android.permission.READ_CALENDAR'
uses-permission: name='android.permission.WRITE_CALENDAR'
uses-permission: name='android.permission.READ_USER_DICTIONARY'
uses-permission: name='android.permission.WRITE_USER_DICTIONARY'
uses-permission: name='android.permission.ACCESS_FINE_LOCATION'
uses-permission: name='android.permission.ACCESS_COARSE_LOCATION'
uses-permission: name='android.permission.ACCESS_LOCATION_EXTRA_COMMANDS'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
uses-permission: name='android.permission.ACCESS_WIFI_STATE'
uses-permission: name='android.permission.BLUETOOTH'
uses-permission: name='android.permission.LOCAL_MAC_ADDRESS'
uses-permission: name='android.permission.EXPAND_STATUS_BAR'
uses-permission: name='android.permission.DISABLE_KEYGUARD'
uses-permission: name='android.permission.MANAGE_NETWORK_POLICY'
uses-permission: name='android.permission.MANAGE_USB'
uses-permission: name='android.permission.USE_RESERVED_DISK'
uses-permission: name='android.permission.FOREGROUND_SERVICE'
uses-permission: name='android.permission.REAL_GET_TASKS'
uses-permission: name='android.permission.CHANGE_CONFIGURATION'
uses-permission: name='android.permission.REORDER_TASKS'
uses-permission: name='android.permission.SET_ANIMATION_SCALE'
uses-permission: name='android.permission.SET_PREFERRED_APPLICATIONS'
uses-permission: name='android.permission.WRITE_SETTINGS'
uses-permission: name='android.permission.WRITE_SECURE_SETTINGS'
uses-permission: name='android.permission.BROADCAST_STICKY'
uses-permission: name='android.permission.SET_DEBUG_APP'
uses-permission: name='android.permission.SET_PROCESS_LIMIT'
uses-permission: name='android.permission.SET_ALWAYS_FINISH'
uses-permission: name='android.permission.DUMP'
uses-permission: name='android.permission.SIGNAL_PERSISTENT_PROCESSES'
uses-permission: name='android.permission.KILL_BACKGROUND_PROCESSES'
uses-permission: name='android.permission.FORCE_BACK'
uses-permission: name='android.permission.BATTERY_STATS'
uses-permission: name='android.permission.PACKAGE_USAGE_STATS'
uses-permission: name='android.permission.INTERNAL_SYSTEM_WINDOW'
uses-permission: name='android.permission.INJECT_EVENTS'
uses-permission: name='android.permission.RETRIEVE_WINDOW_CONTENT'
uses-permission: name='android.permission.SET_ACTIVITY_WATCHER'
uses-permission: name='android.permission.READ_INPUT_STATE'
uses-permission: name='android.permission.SET_ORIENTATION'
uses-permission: name='android.permission.INSTALL_PACKAGES'
uses-permission: name='android.permission.MOVE_PACKAGE'
uses-permission: name='android.permission.CLEAR_APP_USER_DATA'
uses-permission: name='android.permission.CLEAR_APP_CACHE'
uses-permission: name='android.permission.DELETE_CACHE_FILES'
uses-permission: name='android.permission.DELETE_PACKAGES'
uses-permission: name='android.permission.ACCESS_SURFACE_FLINGER'
uses-permission: name='android.permission.READ_FRAME_BUFFER'
uses-permission: name='android.permission.DEVICE_POWER'
uses-permission: name='android.permission.INSTALL_LOCATION_PROVIDER'
uses-permission: name='android.permission.BACKUP'
uses-permission: name='android.permission.FORCE_STOP_PACKAGES'
uses-permission: name='android.permission.STOP_APP_SWITCHES'
uses-permission: name='android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY'
uses-permission: name='android.permission.GRANT_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.REVOKE_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS'
uses-permission: name='android.permission.SET_KEYBOARD_LAYOUT'
uses-permission: name='android.permission.GET_DETAILED_TASKS'
uses-permission: name='android.permission.SET_SCREEN_COMPATIBILITY'
uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission: name='android.permission.WRITE_MEDIA_STORAGE'
uses-permission: name='android.permission.INTERACT_ACROSS_USERS'
uses-permission: name='android.permission.INTERACT_ACROSS_USERS_FULL'
uses-permission: name='android.permission.CREATE_USERS'
uses-permission: name='android.permission.MANAGE_DEVICE_ADMINS'
uses-permission: name='android.permission.MANAGE_COMPANION_DEVICES'
uses-permission: name='android.permission.ACCESS_LOWPAN_STATE'
uses-permission: name='android.permission.CHANGE_LOWPAN_STATE'
uses-permission: name='android.permission.READ_LOWPAN_CREDENTIAL'
uses-permission: name='android.permission.BLUETOOTH_STACK'
uses-permission: name='android.permission.GET_ACCOUNTS'
uses-permission: name='android.permission.RETRIEVE_WINDOW_TOKEN'
uses-permission: name='android.permission.FRAME_STATS'
uses-permission: name='android.permission.BIND_APPWIDGET'
uses-permission: name='android.permission.UPDATE_APP_OPS_STATS'
uses-permission: name='android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS'
uses-permission: name='android.permission.CHANGE_APP_IDLE_STATE'
uses-permission: name='android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST'
uses-permission: name='android.permission.MOUNT_UNMOUNT_FILESYSTEMS'
uses-permission: name='android.permission.MOUNT_FORMAT_FILESYSTEMS'
uses-permission: name='android.permission.MODIFY_PHONE_STATE'
uses-permission: name='android.permission.REGISTER_CALL_PROVIDER'
uses-permission: name='android.permission.REGISTER_CONNECTION_MANAGER'
uses-permission: name='android.permission.REGISTER_SIM_SUBSCRIPTION'
uses-permission: name='android.permission.GET_APP_OPS_STATS'
uses-permission: name='android.permission.MANAGE_APP_OPS_MODES'
uses-permission: name='android.permission.VIBRATE'
uses-permission: name='android.permission.MANAGE_ACTIVITY_STACKS'
uses-permission: name='android.permission.START_TASKS_FROM_RECENTS'
uses-permission: name='android.permission.ACTIVITY_EMBEDDING'
uses-permission: name='android.permission.CONNECTIVITY_INTERNAL'
uses-permission: name='android.permission.CHANGE_COMPONENT_ENABLED_STATE'
uses-permission: name='android.permission.MANAGE_AUTO_FILL'
uses-permission: name='android.permission.NETWORK_SETTINGS'
uses-permission: name='android.permission.CHANGE_WIFI_STATE'
uses-permission: name='android.permission.SET_TIME'
uses-permission: name='android.permission.SET_TIME_ZONE'
uses-permission: name='android.permission.DISABLE_HIDDEN_API_CHECKS'
uses-permission: name='android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME'
uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='android.permission.CHANGE_OVERLAY_PACKAGES'
uses-permission: name='android.permission.RESTRICTED_VR_ACCESS'
uses-permission: name='android.permission.MANAGE_BIND_INSTANT_SERVICE'
uses-permission: name='android.permission.SET_HARMFUL_APP_WARNINGS'
uses-permission: name='android.permission.MANAGE_SENSORS'
uses-permission: name='android.permission.MANAGE_AUDIO_POLICY'
uses-permission: name='android.permission.MANAGE_CAMERA'
uses-permission: name='android.permission.ACCESS_INSTANT_APPS'
uses-permission: name='android.permission.MANAGE_BLUETOOTH_WHEN_PERMISSION_REVIEW_REQUIRED'
uses-permission: name='android.permission.MANAGE_WIFI_WHEN_PERMISSION_REVIEW_REQUIRED'
uses-permission: name='android.permission.WATCH_APPOPS'
uses-permission: name='android.permission.CONTROL_KEYGUARD'
root@www:/mnt/c/scrcpy-win64-v1.16# apt install adb
lywit commented 3 years ago

It's stuck on "Starting: Intent { act=com.genymobile.gnirehtet.STOP cmp=com.genymobile.gnirehtet/.GnirehtetActivity }" for me I don't see these two options on Samsung One UI 2.5:

Install via USB -Allow installing apps via USB USB debugging (Security Settings)- Allow granting permissions and simulating input via USB debuggingInstall via USB -Allow

rom1v commented 3 years ago

Please test enabling "security settings" in developer options: https://github.com/appium/appium/issues/13802#issuecomment-587802222

Deepjyoti7147 commented 2 years ago

Could you replace android.permission.WRITE_SECURE_SETTINGS by android.permission.WRITE_SETTINGS (a permission with normal protection level) here, build, and try again, please?

If it works, it suggests that the problem is related to Shell.apk signature…

I am having similar issues is there any way I can overwrite the permission?

rom1v commented 2 years ago

See https://github.com/Genymobile/gnirehtet/issues/302#issuecomment-973850470

predi commented 2 years ago

On my OnePlus Nord 2T 5G (Android 12, OxygenOS 12.1), I also had to tick Developer options > Disable permission monitoring along with USB Debugging to get past a similar exception.

P.S.: apologies for reviving this old issue.

flocsy commented 1 year ago

I had the same problem on OnePlus 8t, and the solution was to go to the Developer Settings on the phone and enable: Developer Options > Apps > Disable permission monitoring

rezyyyy commented 1 year ago

The issue seems to be resolved by heading over to Developer Options on MIUI, and enabling the following: USB debugging -Debug mode when USB is connected Install via USB -Allow installing apps via USB USB debugging (Security Settings)- Allow granting permissions and simulating input via USB debugging

The first was already enabled, and I installed the apk file manually so I didn't need the second option.

I'm guessing the issue can be pinned down to the last option, which allows granting the necessary permissions. @CoderBuck please confirm.

Thank you @rom1v for this amazing app. This is a worthy free replacement for ReverseTethering NoRoot.

Screenshot_2023-03-09-20-44-36-545_com android settings

turning on the install via usb option requires an internet connection and currently am unable to do that. Is there a way to do this without having to connect to the internet. Note: the option is turned on in the screenshot but it automatically switches off after a couple of seconds..

HoussemNasri commented 1 year ago

I had the same problem on OnePlus 8t, and the solution was to go to the Developer Settings on the phone and enable: Developer Options > Apps > Disable permission monitoring

The same solution worked for Oppo.

maciejkrol18 commented 1 year ago

I had the same problem on OnePlus 8t, and the solution was to go to the Developer Settings on the phone and enable: Developer Options > Apps > Disable permission monitoring

Also works on OnePlus Nord

onyedikachi-david commented 10 months ago

I had the same problem on OnePlus 8t, and the solution was to go to the Developer Settings on the phone and enable: Developer Options > Apps > Disable permission monitoring

This solution worked for me. Thanks. Oppo CPH2269

zanjie1999 commented 2 months ago

Open this on Color OS can fix 打开禁止权限监控可以解决问题

image
lordofscripts commented 3 weeks ago

This:

Developer Options > Apps > Disable permission monitoring

does not work on my device (RMX3241) a realme 8 (ColorOS)

lordofscripts commented 3 weeks ago

Open this on Color OS can fix 打开禁止权限监控可以解决问题 image

That's in Chinese, can't understand any of it. could you at least put the translated text?

zanjie1999 commented 3 weeks ago

禁止权限监控

may be "Disable permission monitoring"? translated with google. you can find it next of "ShortcutManager"

Julioevm commented 1 week ago

The issue seems to be resolved by heading over to Developer Options on MIUI, and enabling the following: USB debugging -Debug mode when USB is connected Install via USB -Allow installing apps via USB USB debugging (Security Settings)- Allow granting permissions and simulating input via USB debugging

The first was already enabled, and I installed the apk file manually so I didn't need the second option.

I'm guessing the issue can be pinned down to the last option, which allows granting the necessary permissions. @CoderBuck please confirm.

Thank you @rom1v for this amazing app. This is a worthy free replacement for ReverseTethering NoRoot.

Any change to add this to the readme? It seems like a common issue with Xiaomi devices and would save a lot of people digging this information.

Thanks for the solution by the way.