Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 second delay after hitting the home button #64

Open
cgf1 opened this issue Jan 19, 2020 · 11 comments
Open

5 second delay after hitting the home button #64

cgf1 opened this issue Jan 19, 2020 · 11 comments

Comments

@cgf1
Copy link

cgf1 commented Jan 19, 2020

After the latest update for Fire OS on my HD 10 2017, there is a five second delay when hitting the home button. LIkely it's due to this android feature:

https://stackoverflow.com/questions/5600084/starting-an-activity-from-a-service-after-home-button-pressed-without-the-5-seco

The code already uses one of the methods mentioned. Converting it to use the alarm method mentioned doesn't work any better.

@Zeviral
Copy link

Zeviral commented Jan 22, 2020

I am having the same problem. Not sure what to do.

@cgf1
Copy link
Author

cgf1 commented Jan 22, 2020

I ended up just rooting the device, enabling an alternate launcher, and disabling firelauncher as well as any OTA updates.

This rooting method worked for me: https://forum.xda-developers.com/hd8-hd10/general/hd-10-2017-offline-rooting-t3734860

From extensive googling it does seem like maybe there is a way to work around this by hooking the home key in a different way but it might not be completely reliable.

@jsclary
Copy link

jsclary commented Feb 27, 2020

For me, the following works without rooting from a PC with adb installed:

adb shell pm disable-user --user 0 com.amazon.firelauncher

It disables the user account for firelauncher which prevents it from running entirely. I do the same for the appstore (com.amazon.venezia) which makes google play store links work.

There are no side effects that I've noticed but it will probably get re-enabled on the next OTA update and you'll have to run the command again. If necessary, you can re-enable it with:

adb shell pm enable --user 0 com.amazon.firelauncher

I've been trying to figure out a way to do it from within termux on the same device (mostly so I can use the appstore from time to time) but only the shell user seems to have rights to do that and I haven't figured out how to enable network debugging. I have done it successfully in termux on a separate kindle fire connected to the target one with an USB OTG cable but that won't help many people.

Disabling battery optimization for both LauncherHijack and your chosen launcher helps a bit, too. It makes it a bit less likely to get killed. You'll need ActivityLauncher or somethinig to launch the alternate version of Settings->Battery with the extra menu in the top right corner that's missing from Amazon's version.

@kitzhu54
Copy link

For me, the following works without rooting from a PC with adb installed:

adb shell pm disable-user --user 0 com.amazon.firelauncher

It disables the user account for firelauncher which prevents it from running entirely. I do the same for the appstore (com.amazon.venezia) which makes google play store links work.

There are no side effects that I've noticed but it will probably get re-enabled on the next OTA update and you'll have to run the command again. If necessary, you can re-enable it with:

adb shell pm enable --user 0 com.amazon.firelauncher

I've been trying to figure out a way to do it from within termux on the same device (mostly so I can use the appstore from time to time) but only the shell user seems to have rights to do that and I haven't figured out how to enable network debugging. I have done it successfully in termux on a separate kindle fire connected to the target one with an USB OTG cable but that won't help many people.

Disabling battery optimization for both LauncherHijack and your chosen launcher helps a bit, too. It makes it a bit less likely to get killed. You'll need ActivityLauncher or somethinig to launch the alternate version of Settings->Battery with the extra menu in the top right corner that's missing from Amazon's version.

Is there a tutorial on using adb that I can look up? The launcherhijack apk I'm using keeps getting blocked from FireOS. Thanks in advance!

@weipah
Copy link

weipah commented Apr 21, 2020

Is there a tutorial on using adb that I can look up? The launcherhijack apk I'm using keeps getting blocked from FireOS. Thanks in advance!

adb is a command line tool that comes with the Android SDK or Android Studio for example. You can find a lot documentation online. But for this specific problem the command given is acurate. It works on my Fire HD 8 without root.

Amaz0n blocking the LauncherHijack apk can be worked around only by building it yourself with another name or using an app cloner.

@dragonfly1033
Copy link

when running the adb command I get an error:
"Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=xxxxx, uid=xxxx, package uid=xxxxx"
any ideas as to why?

@jsclary
Copy link

jsclary commented May 26, 2020

when running the adb command I get an error:
"Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=xxxxx, uid=xxxx, package uid=xxxxx"
any ideas as to why?

If you are using "disable-user" (not just "disable") and included the "--user 0" flag, something I frequently forget, it should work unless the permission has been disabled in the firmware. It still works with the latest update on my 2018 Fire HD 8 but I can't guarantee it'll work on any other model or firmware revision.

@dragonfly1033
Copy link

Yh I typed it out word for word.
And sorry I didnt mention before, my device is the Amazon Fire HD 8 on the latest 5.3.7 update although i have a 2017 model which may be the problem.
Thank you for the quick reply anyway.

@ghost
Copy link

ghost commented Dec 22, 2021

When I tried to disable fire launcher in fire toolbox it said in the console: Cannot Disable Protected Package.

How do I fix that? (My kindle is the HD 10 2021)

@CategoryQ
Copy link

CategoryQ commented Dec 28, 2021

I am also unable to do this - I have a Fire 8 HD (2020/10th gen model). The output from ADB is below.

Security exception: Cannot disable a protected package: com.amazon.firelauncher

java.lang.SecurityException: Cannot disable a protected package: com.amazon.firelauncher
	at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:21080)
	at com.android.server.pm.PackageManagerService.setApplicationEnabledSetting(PackageManagerService.java:20991)
	at com.android.server.pm.PackageManagerShellCommand.runSetEnabledSetting(PackageManagerShellCommand.java:1610)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:201)
	at android.os.ShellCommand.exec(ShellCommand.java:103)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21634)
	at android.os.Binder.shellCommand(Binder.java:634)
	at android.os.Binder.onTransact(Binder.java:532)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2796)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3963)
	at android.os.Binder.execTransact(Binder.java:731)

LauncherHijack still "works", albeit after recompiling with a different name, and the 5 second delay in loading the home screen (Nova Launcher in my case, if that makes any difference).

Still, the 5 second delay is worth it to avoid the default mess of a home screen!

@Tazzzilo
Copy link

Tazzzilo commented Jan 1, 2022

I can confirm the delay and the "Permission Denial: attempt to change component state from" on Fire HD 8 with latest Fire OS 5.6.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants