FORUMS
Remove All Ads from XDA

NO ROOT REQUIRED: Use widgets in your preferred launcher

3,967 posts
Thanks Meter: 1,462
 
Post Reply Email Thread
Enable Widgets:

Reference: /system/bin/appwidget
Code:
# Script to start "appwidget" on the device, which has a very rudimentary shell.
base=/system
export CLASSPATH=$base/framework/appwidget.jar
exec app_process $base/bin com.android.commands.appwidget.AppWidget "[email protected]"
1. Use a file manager like Total Commander and navigate to /system/bin/
2. Locate appwidget and copy it to clipboard.
3. Paste the file to your PC desktop and open it with a text editor. I use Notepad+++. You do NOT need to make any edits.
4. Click file, and save as appwidget.sh and save it as a Unix file type. (If using regular Notepad, save it as the ALL FILES file type)
5. Copy appwidget.sh and paste it into the internal storage of your fire (sdcard).
6: Open ADB and type:
Code:
adb shell appwidget grantbind --package <PACKAGE.name.of.your.launcher> --user <USER_ID>
(USER_ID = 0)

Or, if above doesn't work:
Code:
adb shell appwidget grantbind --package <PACKAGE.name.of.your.launcher> --user current
Now add your favorite widgets through your favorite launcher
The Following 27 Users Say Thank You to DragonFire1024 For This Useful Post: [ View ] Gift DragonFire1024 Ad-Free
 
 
17th July 2017, 04:24 AM |#2  
Junior Member
Thanks Meter: 0
 
More
So the .sh file just needs to be sitting on my desktop when I run that code in ADB? I entered it and then a new line came up letting me enter more code and I assumed that meant it executed successfully. Placing widgets with Nova Launcher still takes me to the Kindle Fire Settings app though. Any ideas?

EDIT: Must have typed something wrong. Working now after retrying everything. Thanks!
17th July 2017, 06:06 AM |#3  
Quote:
Originally Posted by simpsons403

So the .sh file just needs to be sitting on my desktop when I run that code in ADB? I entered it and then a new line came up letting me enter more code and I assumed that meant it executed successfully. Placing widgets with Nova Launcher still takes me to the Kindle Fire Settings app though. Any ideas?

EDIT: Must have typed something wrong. Working now after retrying everything. Thanks!

Yes. The script file appwidget.sh needs to be run through ADB. You won't be able to use a terminal emulator, so far as I know.

Usually if you are successful at running an ADB script/code, a new line will appear with nothing on it like this example:
The Following User Says Thank You to DragonFire1024 For This Useful Post: [ View ] Gift DragonFire1024 Ad-Free
17th July 2017, 07:25 AM |#4  
I edited the steps to show you have to copy the .sh into the internal storage of your fire, then run the script through ADB.
The Following 2 Users Say Thank You to DragonFire1024 For This Useful Post: [ View ] Gift DragonFire1024 Ad-Free
17th July 2017, 12:17 PM |#5  
Also, if you want to switch launchers, you need to run the script again.

Is anyone good at script writing? I would like to see if we cn do something like this for live wallpapers. I have yet to find a 'widget' for them.
The Following User Says Thank You to DragonFire1024 For This Useful Post: [ View ] Gift DragonFire1024 Ad-Free
19th July 2017, 10:22 AM |#6  
Junior Member
Thanks Meter: 0
 
More
Thanks this sounds great . However could you explain the steps for a complete noob.

I get the steps from 1 on wards but what am I supposed to do with the initial code.
19th July 2017, 01:39 PM |#7  
Quote:
Originally Posted by r3bell

Thanks this sounds great . However could you explain the steps for a complete noob.

I get the steps from 1 on wards but what am I supposed to do with the initial code.

All you need to do is paste the .sh to your internal and sdcard and copy and paste the command into terminal Emulator: sh /sdcard/appwidget.sh

That activates the widget functionality. The final two commands are what bind a package to use widgets. In my case, I use Nova launcher so I would bind the functionality to it.
The Following User Says Thank You to DragonFire1024 For This Useful Post: [ View ] Gift DragonFire1024 Ad-Free
19th July 2017, 02:06 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by DragonFire1024

All you need to do is paste the .sh to your internal and sdcard and copy and paste the command into terminal Emulator: sh /sdcard/appwidget.sh

That activates the widget functionality. The final two commands are what bind a package to use widgets. In my case, I use Nova launcher so I would bind the functionality to it.

Thanks got it to work was using the wrong package name
20th July 2017, 10:03 PM |#9  
Junior Member
Thanks Meter: 0
 
More
I get an error that the package can't be opened
"can't open com.teslacoilsw.launcher_53000: No such file or directory"
Do I need to be in the location that the package is installed in or in the /sdcard directory?

Thanks for all the hard work - Replacing fire launcher is awesome!
20th July 2017, 10:50 PM |#10  
Quote:
Originally Posted by bikebimmonds

I get an error that the package can't be opened
"can't open com.teslacoilsw.launcher_53000: No such file or directory"
Do I need to be in the location that the package is installed in or in the /sdcard directory?

Thanks for all the hard work - Replacing fire launcher is awesome!

Nova Launcher package name is: com.teslacoilsw.launcher
The Following 2 Users Say Thank You to DragonFire1024 For This Useful Post: [ View ] Gift DragonFire1024 Ad-Free
21st July 2017, 01:03 AM |#11  
Junior Member
Thanks Meter: 0
 
More
I'm pretty new with Android and all these new tools, but for the sh /sdcard/appwidget.sh command, is it just adb shell and then run the command with appwidget.sh in the root storage folder of my device?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes