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)
Answer
Here installer for easy installation or widget only for manual installation
Prerequisites:
- You must be rooted
- You must be able to write to
/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.
Easy Instruction (Recommended)
- Nico have written an easy-to-use installer to automate installation to
/system/app/
; download it here and run the installer app. - Add the widget to your home screen like regular widget.
Manual installation
If the easy instruction doesn't work, try the manual installation:
- Download ADBWidget.apk and save it to your computer
Copy ADBWidget.apk to /system/app
Method 1 -- Using Android Debug Bridge (ADB)
- Remount
/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)- Remount
/system/app
to read-only
- Remount
Method 2 -- Using Recovery's update.zip (have not been tested yet)
- Method 3 -- Using Root Explorer (have not been tested yet)
Add ADBWidget to your home screen
Upgrade Instruction
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
Remounting /system/ as read-write
- Open "Terminal Emulator" or "adb shell"
- Get root permission, type
su
- Get the device name, type
mount | grep /system
You should see something similar to:
/dev/
on /system type rfs (ro,codepage=utf8,vfat,fcache(blks)=128,xattr,check=no) Take note of the
, and type:mount -o remount,rw /dev/
/system
Remounting /system/ as read-only
- Step 1, 2, 3, 4 same as above
- type:
mount -o remount,ro /dev/
/system
- Sometimes the widget froze and do not responds to clicks. If this happens, removing and re-adding the Widget usually will fix the problem.
Don't complain about the ugly default icon and widget button, but if you can send me a better icon/widget image, I'd be happy to add it.Now we have an icon, thanks to @Jay.- Do not trust strangers that asks you to install an application to /system/app
- Tested on Samsung Spica i5700 SpicagenMod Froyo.
No comments:
Post a Comment