Can you suggest me a widget for toggling usb debugging mode for Android? Or could you code it and upload to market, please?
(I need it because of HTC Desire and HD's init process consuming 100% cpu bug. When toggled, it resets to 0)
Can you suggest me a widget for toggling usb debugging mode for Android? Or could you code it and upload to market, please?
(I need it because of HTC Desire and HD's init process consuming 100% cpu bug. When toggled, it resets to 0)
Here installer for easy installation or widget only for manual installation
/system/app/
folder. USB Debugging is a "Secure" setting, so this widget must be installed as a system apps. It will not work if you install to the standard install location even in rooted device./system/app/
; download it here and run the installer app.If the easy instruction doesn't work, try the manual installation:
Copy ADBWidget.apk to /system/app
Method 1 -- Using Android Debug Bridge (ADB)
/system/app
to read-write (see Additional Instructions section below)adb push ADBWidget-x.x.apk /system/app/ADBWidget.apk
(replace x.x with the appropriate version number)/system/app
to read-onlyMethod 2 -- Using Recovery's update.zip (have not been tested yet)
Add ADBWidget to your home screen
If you're upgrading from a previous version, you do not need to do all of the above again. You can simply install an update on regular application directory by using regular installation methods (e.g. opening the apk from a file explorer). As long as there is a previous version of the widget in the /system/app
directory with the same signing key (i.e. my key, if you used the apk download above), Android will give the updated version in /data/app
the same permission.
Click on the widget to toggle USB debugging. Blue USB icon means that USB debugging is inactive, red USB icon means that USB debugging is enabled.
Since the widget is installed to /system/app, you cannot remove it using standard application uninstaller. So, simply delete the .apk from /system/app.
su
remount /system as read write
rm /system/app/ADBWidget.apk
remount /system as read only
su
mount | grep /system
You should see something similar to:
/dev/<device-name> on /system type rfs (ro,codepage=utf8,vfat,fcache(blks)=128,xattr,check=no)
Take note of the <device-name>
, and type: mount -o remount,rw /dev/<device-name> /system
mount -o remount,ro /dev/<device-name> /system
I look your source code and try to add this option to my application (Widgetsoid) but it's not work for me. I have
02-22 11:26:07.260: WARN/Settings(3652): Setting adb_enabled has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value. 02-22 11:26:07.260: WARN/Settings(3652): Setting adb_enabled has moved from android.provider.Settings.System to android.provider.Settings.Secure, value is unchanged.
What I have doing wrong ?
Thanks for helping me. Regards Jim
– Feb 22 '11 at 14:33Settings.System.ADB_ENABLED
, change it to Settings.Secure.ADB_ENABLED
. Also, you must install your program into /system/app/
; root permission alone won't allow you to change Settings.Secure.*
settings (or more precisely, with root alone, you can change the system's sqlite database to whatever values you want, but Android won't notice this underhanded change to its settings database and won't start adbd unless you reboot the system (which kinda misses the point of having a convenient widget)).
– Lie Ryan
Feb 22 '11 at 14:33
Should add a note that once the .apk is pasted in the folder, you do not have to click and "Install"
Great answer and great tool. +1
– Vian Esterhuizen Mar 15 '12 at 18:15There are some apps which do this. But all of them need to be made system app. I didn't want to do this. So I made a widget myself which works just like any other widget. You can get it from here:
If you have 2.1 or above you can use the drop down notification area to quickly disable debug mode. Sadly that is all I got, turning it on will have to be done manually. I searched and was unable to find a widget.