• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

ADB command is not permanent - Solved

Johncoool

Member
I am using the Synergy app on Android Lollipop. It requires rooting and an ADB command to work properly.

It is used to share the PC mouse and keyboard with Android device.

The ADB command apparently only work on Android Lollipop.

It does work. But the problem is that it needs to be redone after each reboot.

I want a solution to make it permanent.

Can anyone suggest a solution for this?

Maybe a more modified ADB command or by using a script?

I never used scripts on Android devices yet.

The command is:

adb shell su 0 setenforce 0

https://symless.com/synergy
 
You could try this app:
https://f-droid.org/en/packages/com.mrbimc.selinux/

Here is a thread for the app on xda that will explain what it does:
https://forum.xda-developers.com/t/app-root-4-2-selinuxmodechanger-v10-0-24-07-2017.2524485/

Other than that, I don't know what device you have or what kind of development is available for your device, but flashing a custom kernel with these changes built in could be an option.

Or if you're so inclined, and have the ability to modify your own boot.img, you could make those changes yourself and flash your custom boot.img
 
Solved!

The suggested app worked well in permissive mode.

It even worked on Android Oreo. It is a little more buggy on Oreo but it might just need some updates. That is perfect for me because the phone running Oreo has dead zone on the touch screen that did not get resolved with the piezo lighter shock solution.

Now I can share the keyboard and mouse from Windows instead of attaching external keyboard and mouse to the OTG cable.

Thanks a lot Brian706.
 
Awesome! I'm glad that worked. I doubt that app will be updated anymore because it hasn't been updated since 2017. It looks like development has stopped on that app. But I did see that somebody open sourced it so it's possible that it could get picked up again at some point by anybody. Or perhaps it's just not needed on newer devices? I have no idea.
 
Yes I know that. I meant updating network settings or the PC side of the program if any.

It seems that the bugs are mostly related to the LAN connection. I noticed that it drops packets quite often. So If I fix that then it should work much smoother.

I tested other apps and got similar results.

Maybe you can help the project and post the new update after testing it because many have problems with it and this new information can help them.
 
Last edited:
I tested the app on 3 phones (All are rooted because that is the requirement.). One is running custom ROM 4.4.4 CM11 (Does not require SeLinux). The other is Running stock ROM Lollipop and the third is custom ROM Oreo AOSP.

The router that I have has two connections. One is for the old devices with a top speed of 34mbps. The other connection reaches over 160mbps. Maybe 300 but my subscription is only for 160 so I don't know its top speed.

Anyway, it worked much better on the CM11 which is on the slower speed because it dropped less packets while working. I connected the other devices to the same connection and all worked at about 88% percent efficiency with no disconnections at all.
 
Back
Top Bottom