NO ROOT REQUIRED: Use widgets in your preferred launcher

Search This 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 "$@"

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 :)
fAPiqw3l.png
 
Last edited:

simpsons403

New member
Jul 17, 2017
1
0
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!
 
Last edited:
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:
Code:
shell@giza $
 
  • Like
Reactions: ecs1984

r3bell

New member
Jul 19, 2017
2
0
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.
 
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.
 
  • Like
Reactions: ecs1984

r3bell

New member
Jul 19, 2017
2
0
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 :silly:
 

bikebimmonds

New member
Jul 20, 2017
1
0
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!
 
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
 

Ritter3435

Member
Jul 21, 2017
8
0
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?
 
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?

adb shell sh /sdcard/appwidget

Then the next one or two commands to bind the function to whatever launcher you use.
 
So I'm getting the syntax wrong I think
I'm literally typing:
Code:
adb shell appwidget grantbind --package com.teslacoilsw.launcher --user 0

Tried the other one too but just going back to settings when placing a widget

Now that I think about it, when I found this and got it to work, I had 1) not been registered to Amazon 2) I had already uninstalled Fire Launcher. Fire Launcher is ordered to immediately kill the appwidget functionality. I pasted below the instructions. However if you go to terminal emulator and navigate to internal storage, with appwidget.sh still there you can see the instructions. If you try to run the commands through emulator, you will get errors and yes they will be real errors :p Widget script and function can only be activated via ADB.

Code:
shell@giza:/sdcard $ sh appwidget.sh
usage: adb shell appwidget [subcommand] [options]

usage: adb shell appwidget grantbind --package <PACKAGE>  [--user <USER_ID> | current]
  <PACKAGE> an Android package name.
  <USER_ID> The user id under which the package is installed.
  Example:
  # Grant the "foo.bar.baz" package to bind app widgets for the current user.
  adb shell grantbind --package foo.bar.baz --user current

usage: adb shell appwidget revokebind --package <PACKAGE> [--user <USER_ID> | current]
  <PACKAGE> an Android package name.
  <USER_ID> The user id under which the package is installed.
  Example:
  # Revoke the permisison to bind app widgets from the "foo.bar.baz" package.
  adb shell revokebind --package foo.bar.baz --user current
 
Last edited:

Ritter3435

Member
Jul 21, 2017
8
0
With widgets working for Nova Launcher, I've been running into some other problems. Apps like Overlays, Popup Widgets 3, and others will most often not let me use the app as intended. These apps always ask you to choose an app from your widgets list, but will kick you back to the settings screen. I've tried changing settings/permissions of these apps with every trick I know (not many), and still can't figure it out.

To clarify, my widgets do work on Nova Launcher, but apps that further interact with widgets always end up with me in the settings app.

Anyone have any ideas? Does this happen to anyone else?
 
With widgets working for Nova Launcher, I've been running into some other problems. Apps like Overlays, Popup Widgets 3, and others will most often not let me use the app as intended. These apps always ask you to choose an app from your widgets list, but will kick you back to the settings screen. I've tried changing settings/permissions of these apps with every trick I know (not many), and still can't figure it out.

To clarify, my widgets do work on Nova Launcher, but apps that further interact with widgets always end up with me in the settings app.

Anyone have any ideas? Does this happen to anyone else?

I'm pretty sure you can only have one app bind widgets at a time. However I'm unsure how to unbind the current app. I'll have to look up instructions if there are any. Otherwise the other option is to reinstall Nova.
 

Ritter3435

Member
Jul 21, 2017
8
0
I'm pretty sure you can only have one app bind widgets at a time. However I'm unsure how to unbind the current app. I'll have to look up instructions if there are any. Otherwise the other option is to reinstall Nova.

I wasn't aware that was how it all worked.

Would it be possible to make a new appwidget.sh or something similar that could be used to bind a new app? I'm assuming if there was a working root for 5.4 this wouldn't be an issue as I don't see this being a problem for other people who have used apps like Popup Widgets and Nova Launcher. If I was to start all over again on a fresh wipe, unless I could have multiple apps bind widgets it wouldn't be possible to make what I want work. Either I would bind Nova Launcher and have Nova Launcher with the capability to use widgets, or I would bind whatever new app, but without the capability of even loading widgets with Nova Launcher since Nova Launcher was never bound (binded?).

This is all pretty new to me as I've never owned an Android device before July 11, so I might be confusing myself at this point. My original goal was to play around with apps like Popup Widgets while using Nova Launcher on my currently unrootable Fire HD 8 (2017).
 
I wasn't aware that was how it all worked.

Would it be possible to make a new appwidget.sh or something similar that could be used to bind a new app? I'm assuming if there was a working root for 5.4 this wouldn't be an issue as I don't see this being a problem for other people who have used apps like Popup Widgets and Nova Launcher. If I was to start all over again on a fresh wipe, unless I could have multiple apps bind widgets it wouldn't be possible to make what I want work. Either I would bind Nova Launcher and have Nova Launcher with the capability to use widgets, or I would bind whatever new app, but without the capability of even loading widgets with Nova Launcher since Nova Launcher was never bound (binded?).

This is all pretty new to me as I've never owned an Android device before July 11, so I might be confusing myself at this point. My original goal was to play around with apps like Popup Widgets while using Nova Launcher on my currently unrootable Fire HD 8 (2017).

Unfortunately, for now at least, that's not an option. The script I found is inside the /system partition so to get the system to recognize it, that's where it would need to be placed. I tried to look for the link, with no success, that had said only one app was technically allowed to be binded, on non-root devices. I could be wrong and will admit it if I am. Though if I recall, it's an Amazon restriction. If I find it I'll post it.

To revoke:
Code:
adb shell 
appwidget revokebind --package <PACKAGE> [--user <USER_ID> | current]
 

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    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 "$@"

    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 :)
    fAPiqw3l.png
    2
    Not really sure why you need to copy file from device to pc, save it without edits then copy it back to the device...
    Here is what worked for me
    Short version:

    copy file appwidget from \system\bin to \storage\emulated\0
    run this from adb terminal:
    Code:
    adb shell appwidget grantbind --package com.mi.launcher --user 0

    add widgets to screen.

    (replace com.mi.launcher with the name of your launcher. com.nova.launcher or whatever)



    Long version
    -connect kindle to pc using microusb cable
    -install ghost commander. start it. select left panel of it (click on left part of the half line, that goes across the top of the screen)
    -using ghost commander navigate to apps folder. (click on the arrow on the top right part of the screen, select home, then select Applications from the items.)
    -note the name of your launcher, and the package name . For "Mi Launcher", package name is com.mi.launcher.
    -navigate to \system\bin folder using left side of the panel (arrow on top, home, "local storage")
    -use .. at the top left to get to \ location. (also known as root)
    -navigate to \system\bin
    -click on the right panel (half line accross the top of the screen)
    -navigate to "local storage" on the right panel (click on the right panel, arrow, home, "local storage")
    -click on the left panel, click on the right part of the filename of the file "appwidget", to select it
    -click on the copy text at the bottom of the screen, top copy file appwidget to "local storage"


    on pc, in the command line type:
    Code:
    adb shell appwidget grantbind --package com.mi.launcher --user 0

    replace com.mi.launcher with the name of your launcher. com.nova.launcher or whatever.
    2
    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.
    2
    EDIT: THIS ACTUALLY WORKS PERFECTLY

    So I'm getting the syntax wrong I think
    I'm literally typing:
    Code:
    adb shell appwidget grantbind --package com.teslacoilsw.launcher --user 0

    Tried the other one too but just going back to settings when placing a widget
    2
    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?

    adb shell sh /sdcard/appwidget

    Then the next one or two commands to bind the function to whatever launcher you use.