[Library] ADB Toggle Access (For developers of root apps) - Android Apps and Games

Here I'm introducing a small library project that allows developers of root apps to toggle USB debug settings easily. Enabling/disabling the USB debug settings properly is only possible for system apps, and since not everyone wants to have his app installed in the system partition it's probably more reasonable if you just can call on another app to do the job...
What? Why?
Usually you have the USB debug settings enabled when you are developing on your phone, or otherwise love to play around with Custom ROMs, and well... use other root apps that are only working if this setting is enabled.
The USB debug settings are rather dangerous when enabled as everyone can access your phone no matter if you have locked it or not. That's why I have developed ADB Toggle.
In the free version you can toggle the settings from a home screen widget. But third party apps are also able to use ADB Toggle and enable/disable as they need.
In the paid version there's also an automatic mode that enables USB debug settings if you have your phone unlocked and connect it to your PC, and turns it off when you leave.
Check out ADB Toggle from Google Play:
https://play.google.com/store/apps/details?id=com.ramdroid.adbtoggle
The developer library
I'm already using the library in my other project App Quarantine. However I'd love to see it implemented in more root apps!
Here's the Github page for full details:
https://github.com/ramdroid/AdbToggleAccessLib

Related

[APP][ROOT][MARSHMALLOW] MTP enabler

You can place a widget of 'MTP enabler' onto the Home Screen and tap it after you connect the USB-cable to PC. So can initiate a refresh on the PC-File-Transfer-Window without disconnect, reconnect USB-cable.
The MTP mode will be enable automatically by this actions...
And you can place a shortcut to 'MTP enabler's Action onto the Home Screen for quick Access now.
(Widget or shortcut - your decision)
The widget changes it backgroundcolor to orange, if usb-cable is connected.
MTP enabler doesn't touch any system-file (no init component is touched or needed)! - But it needs a rooted device!
And Google's security intent by User-Action for USB-connection remains preserved!
In the App-window (MTP enabler setup ) you can checkmark one option 'ask me for action', if you want to be able to select the connection type manually.
If you leave the checkbox unchecked the app will (try) to do the automatically taping MTP-option.
Note: If have enabled MTP enabler, it will start automatically after every reboot!
NEW(!):
You can activate notifications(with or without sound, with or without Android Wear notification) optinal.
See builtin interactive tutorial(showcase)
MTP enabler should work now stable on all Devices / all Marshmallow ROMs!
#Root is required!
Downloads Link:good:
https://uploadex.com/gvoexbhh779w
Credits>http://forum.xda-developers.com/member.php?u=2981094

NFC Tags to toggle MTP connection on Android

I got a bunch of NFC tags with a couple of things in mind to do with them. One thing I often do is turn the MTP storage on and off but I can't find a task for that.
Considering I'm using Android I figured I could toggle any of the options available in settings, which is reasonable to think so. Even if I had to root, although I see no reason to root.
Settings > Storage > ⋮ > USB computer connection > Media Device (MTP)
I want to be able to tap on a tag to toggle MTP connection on and off.

Cant turn on usb debugging after system update

Cant turn on usb debugging after system update even when its plugged into the pc it wont turn on.. i can still transfer files from phone to pc and pc to phone im not sure whats going on here. Theres no bug reports either and you cant verify apps over usb..
haro25 said:
Cant turn on usb debugging after system update even when its plugged into the pc it wont turn on.. i can still transfer files from phone to pc and pc to phone im not sure whats going on here. Theres no bug reports either and you cant verify apps over usb..
Click to expand...
Click to collapse
Do a factory reset ?
That didnt work it hasnt worked since day of the system update and that was on a fresh install of the rom before this one.. i think thats just how the system update is...
https://youtu.be/fqFvuZoFwF4
I made this video showing settings and dev settings in the boost mobile j7 after system update... kinda give people a better look at whats going on. I posted it to the public on Facebook so hopefully it gets out to the right people..
Heres a screen recorder that works without root..
https://play.google.com/store/apps/details?id=com.hecorat.screenrecorder.free
What Is USB Debugging Mode On Android? [MakeUseOf Explains]
Written by Joel Lee
January 11, 2013
Ads by Google
usb debuggingIf you use an Android phone and you’ve searched forums for solutions to problems, you’ve probably heard the term “USB Debugging” every once in a while. You may even have seen it while looking through your phone’s settings. It sounds like a high-tech option, but it really isn’t; it’s quite simple and useful.
One beauty of Android is that it has a lot of built-in features, many of which are advanced. If you want to supercharge your phone with mods and whatnot, you can; if you want to use it just as it was out of the box, you can ignore the advanced stuff. USB Debugging is a feature that all users can benefit from, though, so you should know what it does and when to use it.
What Is USB Debugging Mode?
USB Debugging Mode is a mode that can be enabled in Android after connecting the device directly to a computer with a USB cable. The primary function of this mode is to facilitate a connection between an Android device and a computer with Android SDK (software development kit). As the name might suggest, Android SDK is a software suite that’s designed to aid in the development of Android apps.
Ever wondered how a programmer creates apps on the Android? They definitely don’t code them straight on the phone device! That would be nightmarish at best. Instead, they utilize the environment of the Android SDK to code apps on a computer, use USB Debugging Mode to transfer those apps to a device for testing.
usb debugging
But, again, here’s the takeaway: USB Debugging Mode establishes a direct connection between an Android device and a computer and readies it for deeper-level actions. That’s the important part.
In some versions of Android, the USB Debugging Mode feature may be called Developer Mode. With such a name, it can be easy (and reasonable) to think that you’ll never need to deal with this aspect of Android if you never plan on developing anything. That’s not exactly true.
Why Is USB Debugging Mode Important?
USB Debugging grants you a level of access to your device. This level of access is important when you need system-level clearance, such as when coding a new app. However, there are a few non-development-related benefits from this new level of access that can give you much more freedom of control over your device.
For example, with Android SDK, you gain direct access to your phone through your computer and that allows you to do things you normally couldn’t, like snag instant screenshots of your device or run terminal commands with ADB. These terminal commands can help you restore a bricked phone–a useful tool for any adventurous Android owner. Without it, you’d have to get a replacement phone.
android usb debugging
USB Debugging is also necessary if you ever want to root your Android device. Before an app like One-Click Root can dig into your system and deliver the exploit that roots the device, USB Debugging is necessary to allow that function in the first place.
Yes, the original intention for USB Debugging Mode was only meant for developers who needed to copy data between their computers and Android devices, to install apps on the phone without notifications, and to read log data off the phone. But even if you aren’t a developer, you’ll probably run into a few apps that require USB Debugging Mode to function properly, so this mode does affect you and you should know about it.
Start searching dialer codes for Samsung devices and do be careful on what you do in those service menus.
-sent from this device using this app.
Just tried that and cant get any codes to work in the dialer or in the apps.. and one says im missing su so i dont know im about to just flash back to the older firmware Security is nice and all but damn they killed it.
I found the problem it was samsung knox if you activate it or use my knox app it disables your dev settings so i ripped knox out of my phone now i have usb debugging..

Can you automate ADB debugging to toggle on/off on a schedule? (eg. every [email protected] 4am)

The amazon fire devices are a little weird. I currently have them integrated with home assistant through ADB. The problem I am running into is that if the ADB connection is lost from my computer to the firetv, then either the ADB debugging needs to be toggled in developer options, or I can restart the firetv itself. If the ADB connection is lost then some of my automations and controls do not work on home assistant.
Couple things:
I am willing to root the device
If I cannot toggle adb debugging, I could just reboot the device. I have considered using a smart plug to do this, but I would rather let the fire handle it.
Would tasker or termux be an option? I've considered moving ADB from the computer server to termux with https://github.com/MasterDevX/Termux-ADB, but I am not sure that would be more reliable.
Basically I want to toggle ADB debugging or a reboot on a set schedule (eg. every night @ 4am).
Hi Moosefist
Parhaps this might help you toggling the ADB based on a schedule:
App: Automate playstore link
The app Automate let you create a schema flow where you can specify what your device should do. For example, turn off bluetooth when connected to wifi network XYZ if time is greater than 10pm.
I think even that it doesn't require root, but I am not sure since mine it rooted anyway...

Can I use adb without USB debugging?

I got a rare and old bug for Android 6/7 phones on an old phone that I use to backup important stuff (since I never turn wifi on) and it has a lot of important data
The bug is something related to the setup wizard
What happens is
-Developer options won't work (says not available for this user)
-Recent and home buttons don't respond
-Notification bar won't show notifications (only sound) and won't get fully pulled
-Google play store won't download/update any app
-cant enable vr mode
There have been 3 fixes until now
1- launch setupwizard through activity launcher apps
2- using termux apps (needs root)
3- using adb (need USB debugging from devs options which are disabled by the bug)
My phone's setup wizard doesnt launch from the activity launcher (crashes)
And it isn't rooted
So the only remaining way is the adb option
I know it needs USB debugging enabled
But can I get it to work somehow without it? Or enable usb debugging outside settings?
You can run ADB in Wireless Mode. means no USB-cable connection is required.
If you never turn wi-fi on, how would Google Play ever download or update anything?
What has ADB to do with downloads from Google Play Store?

Categories

Resources