yashsingh1/xdaforums huggingface dataset:
[Fire Q&A, Help & Troubleshooting] Vlasp:
Google Now Launcher won't work, as it also needs to be hardcoded to the Home Button. If you use this app, it emulates the home button with a notification. Try that.
[Fire Q&A, Help & Troubleshooting] googlegot:
Unfortunately, that app does not seem to generate the notification for the launcher I've selected as default. It only generates a notification that opens the home manager app.
[Fire Q&A, Help & Troubleshooting] gbosh:
I was able to set app a tasker profile that launches Nova Launcher whenever FireLauncher is launched and it works.

I press the home button and it takes me to fire launcher and about 3 seconds later to Nova launcher.
[Fire Q&A, Help & Troubleshooting] pixelk:
sorry wrong channel. Any moderator can delete this post, thanks.
[Fire Q&A, Help & Troubleshooting] Vlasp:
That is genius! Does Tasker have a setting "Go Home" (Or something like that), so Google Now Launcher's fans can use that?
[Fire Q&A, Help & Troubleshooting] topcaser:
Maybe you want to share the tasker's profile and task with us?
[Fire Q&A, Help & Troubleshooting] gbosh:
I'm using two profiles.

one is application context Fire Launchrer which executes a task to open Nova Launcher

The other profile is done using the %WIN variable,but that's language specific,you'll habe to find out what Fire Launcher's "Start page's Windows is called.

You can find that out by creating a task that does Flash %WIN and execute it when Fire Launcher is Launcher.

Then I made a profile based on the %WIN variable,if it equals the value you got from the other task.

I can make a little tuturial oft it tomorow,so you have a better und er standing of what I'm trying to say
[Fire Q&A, Help & Troubleshooting] Vlasp:
Ok, that would be helpful.
[Fire Q&A, Help & Troubleshooting] blinky88:
Keep up the good work! Thanks!
[Fire Q&A, Help & Troubleshooting] theophile2:
It looks like this is an Android issue that's been with us for a while:

https://code.google.com/p/android/issues/detail?id=4536

The trick seems to be running as a service.
[Fire Q&A, Help & Troubleshooting] zavorrax:
You are doing a great job.

The guys on Fire TV don't suffer the 5sec lag?Have you tried contacting the developer or writing on the original thread?
[Fire Q&A, Help & Troubleshooting] theophile2:
I got close. Connect the Fire to the computer via USB and then do:

adb tcpip 5555

After that, go into the Android terminal and do:

adb connect localhost

It will say "connected to localhost:5555." Then do:

adb devices

It will show:

emulator-5554 unauthorized
localhost:5555 offline

Apparently, the "offline" issue has to do with RSA keys, per this thread:

https://code.google.com/p/android/issues/detail?id=48126

I don't have time at the moment to continue poking around with it, but it looks like that thread contains the answer.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
Interesting... I was doing the same thing. Are you on FireOS 5.0 or 5.0.1? Looks like I need to do a wipe and reinstall because I've probably messed mine up.
[Fire Q&A, Help & Troubleshooting] theophile2:
I'm on 5.0.1. I noticed that the command to adb to listen on tcp port 5555 does not persist on reboot. There's a shell script in that thread I posted above that's supposed to set everything up automatically, and I've seen init.d scripts for the same purpose. I haven't checked whether FireOS uses init.d, or even if it does, whether we can insert a custom one without root.

If the procedure in post #12 in that thread works without root, then it's just a matter of figuring out how to automate it.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
I just did a device reset, skipped setup, then enabled USB debugging.

Mine always wants to start on 5038 even if you specify tcpip 5555. It also (almost) always immediately returns, "error: device not found".

shell@ford:/ $ adb tcpip 5555
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|shell@ford:/ $ adb connect localhost:5555
unable to connect to :5555
shell@ford:/ $ adb connect localhost:5038
connected to localhost:5038
shell@ford:/ $ adb devices
List of devices attached

shell@ford:/ $ adb kill-server
shell@ford:/ $ adb tcpip 5555
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|shell@ford:/ $ adb kill-server
shell@ford:/ $ adb start-server
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
shell@ford:/ $ adb connect localhost:5038
connected to localhost:5038
shell@ford:/ $ adb devices
List of devices attached

shell@ford:/ $ getprop | grep adb
[init.svc.adbd]: [running]
[persist.sys.usb.config]: [mtp,adb]
[ro.adb.secure]: [1]
[ro.usb.pid.adb]: [0220]
[ro.usb.pid.msc.adb]: [0226]
[ro.usb.pid.mtp.adb]: [0222]
[ro.usb.pid.ptp.adb]: [0224]
[sys.usb.config]: [mtp,adb]
[sys.usb.state]: [mtp,adb]
shell@ford:/ $ setprop service.adb.tcp.port 5555
shell@ford:/ $ getprop service.adb.tcp.port
5555
shell@ford:/ $ adb kill-server
shell@ford:/ $ adb tcpip 5555
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|shell@ford:/ $

My adb on the device absolutely refuses to display any devices.

Edit: I finally tried doing "Revoke USB debugging authorizations" in developer options and finally got this:

shell@ford:/ $ adb tcpip 5555
error: device not found
1|shell@ford:/ $ adb devices
List of devices attached

shell@ford:/ $ adb kill-server
1|shell@ford:/ $ adb tcpip 5555
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device unauthorized. Please check the confirmation dialog on your device.
1|shell@ford:/ $ adb devices
List of devices attached
emulator-5554	unauthorized

shell@ford:/ $

Now we're cooking... :)
[Fire Q&A, Help & Troubleshooting] theophile2:
You have to do 'adb tcpip 5555' from the computer side, i.e. not from the android shell.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
Just got it to work on the device. :) Now I just have to get emulator authorized.
[Fire Q&A, Help & Troubleshooting] theophile2:
I was wondering about whether "emulator" or "localhost" is the device we're trying to get. I was able to get device-side adb access to "emulator" and got Fire Starter to work using only adb-monitoring mode, and successfully got it to launch my chosen single-tap and double-tap actions, but there was still a 3-5 second lag. I figured the trick would be to get device-side adb access to "localhost."
[Fire Q&A, Help & Troubleshooting] jkchr1s:
The goal here is to get ADB access from either source. I don't think the home button detection method needs to be via ADB... what we need is for a shell command to run under ADB to launch an activity.

Inside an ADB shell, you can execute this command (Nova launcher is what's listed here, you can replace it with any activity):

am start -a android.intent.action.MAIN -c android.intent.category.HOME com.teslacoilsw.launcher

If ADB issues the command, it executes successfully and you don't get the delay. If you execute it as a service, you still get the 5 second delay because you're being throttled by ActivityMonitor.

The reason I needed ADB was once the home button press is detected, we need to fire off an adb command:

adb -s [devicename] shell am start -a android.intent.action.MAIN -c android.intent.category.HOME com.teslacoilsw.launcher

It appears that when the command is issued via ADB, it ActivityMonitor acts on it immediately.

---------- Post added at 06:44 PM ---------- Previous post was at 06:39 PM ----------

Download the source to FireStarter and throw this in ForeGroundService.java:

http://pastebin.com/u5BpB5WX

You can play around with the ADB options there and see what it gives you.

---------- Post added at 07:20 PM ---------- Previous post was at 06:44 PM ----------

Success!

https://www.youtube.com/watch?v=0bNa1o_YDcs

I was trying to video and press with the other hand without seeing, but it's working every home press. There's a very short delay.

:good: :o :D

How it works:

You have to launch the activity with a shell command to bypass the 5 second restriction:

am start -a android.intent.action.MAIN -c android.intent.category.HOME com.teslacoilsw.launcher

However, this won't execute from the ForeGroundService because the user doesn't have permission. But if in ForeGroundService's OnHomeButtonClickedListener you spawn this:

mProcess = Runtime.getRuntime().exec(new String[]{"adb", "shell", "am", "start", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.HOME", "com.teslacoilsw.launcher"});

It spawns almost instantly! You just have to have adb run the command for you. Such a hack! haha but it's great.

To get ADB to authenticate the emulator, you have to do this from Android terminal (I'm working on getting FireStarter to do this too):

adb kill-server

HOME=/mnt/sdcard/Documents adb start-server

adb kill-server

HOME=/mnt/sdcard/Documents adb start-server

The first start of adb with the HOME set before it creates the .android directory with read/write. This allows it to create the adbkey.pub file r/w.

The second time adb is started, you get the Android new ADB device approval dialog. Once you hit accept, you can then connect to the adb emulator.

I sent a message to the FireStarter dev to see if I can get this all automated and working well, then maybe merge up. Hopefully he's okay with that!
[Fire Q&A, Help & Troubleshooting] jkchr1s:
Working Home Detection

Update: If the adb emulator device is not available on the device itself, this app is broken. Working on a solution!

FireStarter is now intercepting the Home event on the Fire tablet with FireOS 5.0.1! :D It will launch FireStarter or your favorite launcher instead of the stock Amazon launcher with only a brief delay.

Before installing:

If you have not enabled ADB: Pull down from the top of the screen, select Settings. Go to Device Options and tap Serial Number several times to enable Developer Options

Go in to Developer Options

If Enable ADB is turned on, turn it off, wait 5 seconds, then turn it back on.

Select Revoke USB debugging authorizations and click Ok.

Turn Enable ADB off again, wait 5 seconds, then turn it back on.

Install release APK found here: https://github.com/jkchr1s/FireStarter/releases/tag/v3.3

Note: Once you launch FireStarter the first time, it will pop up a dialog after a few seconds asking for authorization. Check the box to always allow and hit OK.

If the home detection isn't working, go to FireStarter, Settings, uncheck Enable background observation, fallback to non-adb observation, and home button detection via ADB. Go back in to developer options and disable ADB, wait 5 sec, re-enable, then go back in FireStarter and check Enable background observation, then check Home-Detection via ADB.

Once installed, launch FireStarter and set the actions you want for single and double home press. In FireStarter just go to Settings, then set the Home Button Single Click Application and/or the Home Button Double Click Action to pick your favorite launcher. (Unfortunately the hack I had to write will not work with non-launcher activities, the activity must have the category android.intent.category.HOME to work.)

Note 2: If you make any other ADB connections (Android Studio, Eclipse, adb commands, etc) the home detection will likely fall back to the slower detection method. If the adb server is unavailable to the emulator device on the device itself, your launcher will not start. If this happens, restart ADB and follow the troubleshooting directions mentioned above.

Source code is available in my fork here:

https://github.com/jkchr1s/FireStarter

Known Issues:

Widgets still crash. I assume this is because we still aren't truly changing the launcher and will need root to fix this.

There still seems to be a bug with adb not presenting itself as an emulator under certain circumstances. I rebooted and lost connection to adb. I'll look in to this and hopefully release a patch tomorrow.

Huge thanks goes out to XDA user sphinx02! He is the original author of FireStarter, and has been extremely friendly and helpful. Drop by his thread at http://xdaforums.com/fire-tv/themes-apps/app-root-home-launcher-replacement-app-t3118135 and send him a Thanks!

Enjoy guys!
[Fire Q&A, Help & Troubleshooting] csolanol:
Hi, first thank you for your awesome work on this.

I am unable to make it work. I have followed all your steps 100 times and adb always fails to connect. The dialog asking for adb autorization doesn't pop up for me. Tried rebooting the device with all settings off and adb too several times but no luck.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
Yeah, it's looking like getting ADB to present itself on the device as an emulator is like playing the lottery. I'm looking in to this, and for another more reliable method to execute.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
I just can't reliably get "adb devices" to show "emulator-5554" (or any other emulator) on the device itself. If you get the emulator device to show up, the APK provided above works wonderfully. Once you reboot though, emulator disappears and you're back at square one.

If anyone knows how to solve for any of these:

1) Steps taken to reliably get "adb-devices" to display emulator on the device. We need to be able to connect to adb running on the device FROM the device itself. I have been using Terminal Emulator for Android and running adb-devices to see if it shows up. You can get the app here:

Play Store: https://play.google.com/store/apps/details?id=jackpal.androidterm

Github APK link: https://jackpal.github.io/Android-Terminal-Emulator/

It seems like the luck of the draw on reboots whether or not you can play with adb long enough to get the emulator on the device to show up. Does anyone know what is triggering the device to enable the emulator? Possibly a race condition at boot that sometimes lets it start?

2) The reason I need adb is to run "adb shell ..." so that the shell command executes as the user "shell". This is the only way I have found to bypass the throttling of ActivityManager when pressing home.

3) If anyone has any creative ways to launch an activity outside of the standard Android Java code "startActivity(Intent)", please let me know.
[Fire Q&A, Help & Troubleshooting] theophile2:
I am always able to get adb working device-side by doing the 'adb tcpip 5555' from the computer over USB. Then from the Android terminal, I can use adb on the device itself no problem. Still, Fire Starter doesn't seem to work using the adb detection method. Background observation method works with a delay, but adb detection method doesn't work at all. It doesn't throw any errors, it just doesn't do anything.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
The forked FireStarter APK I posted a few articles up will work if you have the emulator device. You have to uninstall the previous GM version, install the forked version I posted, and home detection will be much faster.

It looks like you have to do a 'adb tcpip 5555' from your computer over USB before the internal ADB stuff starts working. Then if you reboot the device, it will freak out upon boot. You have to go to FireStarter, disable the service, disable adb detection, then 'adb tcpip 5555' from computer, go back in to FireStarter, enable service, and enable detection again.

Sorry everyone, apparently this is like the old iPhone "tethered jailbreak" days where it only works if you kick it off from your computer.
[Fire Q&A, Help & Troubleshooting] theophile2:
That's the version I'm using. I tried uninstalling it, rebooting, doing 'adb tcpip 5555,' confirming I had device-side adb access, and reinstalling the forked apk. It starts up and I don't get adb errors, but it just doesn't launch anything when I press home. If I switch over to background monitor it does after a delay.
[Fire Q&A, Help & Troubleshooting] jkchr1s:
The most recent fork (uploaded late last night, I deleted the old repo and forked again) shouldn't work at all if ADB can't connect (I bypassed the Java intent if you are using a Fire tablet). It is filtering by Device.MODEL and looking for 'KFFOWI'. When you start background service and adb detection, you should see a "restarting adb" toast pop up. If you see that, I don't know why it's not working if you see the emulator listed in adb via terminal.

Is your device model KFFOWI if you do getprop in command line?
[Fire Q&A, Help & Troubleshooting] sd_shadow:
I think you should start your own thread, so you can update op as needed
[Fire Q&A, Help & Troubleshooting] diegocr:
Can any on create an app to replace firelauncher to call home funtion?

http://xdaforums.com/showpost.php?p=63599598&postcount=23
[Fire Q&A, Help & Troubleshooting] jkchr1s:
This should launch the first launcher other than the amazon one that it finds.

Source: https://github.com/jkchr1s/Fire-Launcher-Replacement
[Fire Q&A, Help & Troubleshooting] diegocr:
Uploader new image with permissions to delete com.amazon.firelauncher.apk

Thanks but build te apk but sorry to make waste yor time but don't need extra apk, only on adb delete manually

/system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk

/system/priv-app/com.amazon.firelauncher

Edit: widgets don't work
[Fire Q&A, Help & Troubleshooting] csolanol:
Works for me too. Thx [MENTION=4375260]diegocr[/MENTION]
[Fire Q&A, Help & Troubleshooting] Vlasp:
How do you delete using ADB?
[Fire Q&A, Help & Troubleshooting] jkchr1s:
Working Launcher replacement thanks to [MENTION=4375260]diegocr[/MENTION] and [MENTION=5933283]Awesomeslayerg[/MENTION] ! Here's the steps:

See [MENTION=4375260]diegocr[/MENTION] post at http://xdaforums.com/showpost.php?p=63599598&postcount=23 and download "boot-firelauncher.img"

Enable USB debugging

Install your launcher of choice!

On your computer, run

adb reboot bootloader

Once your tablet reboots in to fastboot, run on your computer (if you are not in the same directory as boot-firelauncher.img, put the full path):

fastboot boot boot-firelauncher.img

Tablet will reboot

Once booted open an adb shell:

adb shell

To back up the existing app, run:

cp /system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk /sdcard/Download/com.amazon.firelauncher.apk

Then nuke it!

rm /system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk

Now, run to restart your device:

reboot

Confirmed working on my tablet with FireOS 5.0.1.

Enjoy! :)
[Fire Q&A, Help & Troubleshooting] Vlasp:
Oh! I was trying to flash instead of booting the boot.img temporarily! Silly me!

Thanks!
[Fire Q&A, Help & Troubleshooting] Awesomeslayerg:
This is good progress guys!! Thank you everyone hes contributing and thank god for chainfire to release this method at the exact moment iwanna root it :)
[Fire Q&A, Help & Troubleshooting] Ownster:
Nice progress on this, got rid of that firelauncher and got Nova launcher it's beautiful.
[Fire Q&A, Help & Troubleshooting] marsel:
Good Job guys. :good: I found one thing playing around that widgets works on google now launcher. :D
[Fire Q&A, Help & Troubleshooting] Jose-MXL:
stuck on boot screen

Hey guys I did everything on the guide, I even made sure I had a backup of the amazon launcher in the download folder before "nuking it", now I'm stuck on the Amazon logo, did I do something wrong? I installed Google Now Launcher (and google search) before doing all of this and made sure it "launched" (I clicked it and it told me I had to clear the other launcher first).

How do I reverse or fix this? Thanks! [MENTION=6289000]jkchr1s[/MENTION] [MENTION=4375260]diegocr[/MENTION]

Damn it, I have been trying stuff around and nothing works, did I just soft bricked this thing?
[Fire Q&A, Help & Troubleshooting] jkchr1s:
If you followed the steps to back up it, try rebooting to the bootloader and do:

fastboot boot boot-firelauncher.img

Once boot or stuck on the amazon logo, try to connect to ADB shell:

adb shell

If this connects, run the following:

cp /sdcard/Download/com.amazon.firelauncher.apk /system/priv-app/com.amazon.firelauncher/com.amazon.firelauncher.apk

Then finally,

reboot

If this doesn't work, download this: http://kindle-fire-updates.s3.amazon..._522053820.bin

and reboot into bootloader, then sideload it to restore the factory image.

Google Now Launcher is weird about starting up, I have it working properly on my rooted tablet. I had to mess around with it quite a bit to get it to work.

I'd suggest installing Nova or something similar, then load Now Launcher.
[Fire Q&A, Help & Troubleshooting] Awesomeslayerg:
Im wondering if theres another way you could probably find to remove the launcher without flashing the boot.img? Maybe get root going straight into the system priv-apps and delteing the folder that contains the apk but of course first have the launcher you want installed?
[Fire Q&A, Help & Troubleshooting] jkchr1s:
He can also try side loading nova or another launcher if adb still works
[Fire Q&A, Help & Troubleshooting] Jose-MXL:
Guys thanks for the quick reply, I am working on it your instructions right now, I'm having trouble to connect to ADB, it won't show on the list and the device driver is installed and working (it did before)... [MENTION=6289000]jkchr1s[/MENTION] [MENTION=5933283]Awesomeslayerg[/MENTION]

---------- Post added at 04:02 AM ---------- Previous post was at 03:54 AM ----------

Oh my god, it doesn't show on the adb devices list... what now....? [MENTION=6289000]jkchr1s[/MENTION] [MENTION=5933283]Awesomeslayerg[/MENTION]

Oh damn, it is a ghost device, it showed blank but it actually sideloaded... getting this thing out of the soft brick now...

---------- Post added at 04:59 AM ---------- Previous post was at 04:02 AM ----------

Alright it worked now, thanks guys [MENTION=6289000]jkchr1s[/MENTION] [MENTION=5933283]Awesomeslayerg[/MENTION]

Let's make a disclaimer for noobs (like me) who doesn't know about this, someone might actually try to install Google Launcher and get the same idiotic situation I got...
[Fire Q&A, Help & Troubleshooting] sd_shadow:
I'm using now launcher, without issue, but I would suggest having a 2nd launchers installed just in case.
[Fire Q&A, Help & Troubleshooting] GoughGhan:
Anyone try Apex or Nova and get widgets working? Google Now seems to be the only one allowing them. But still awesome that we can have a different one.
[Fire Q&A, Help & Troubleshooting] csolanol:
Widgets on Nova launcher will work if you move nova to system. To easily move nova as a system app just use /system/app mover from F-Droid:

https://f-droid.org/repository/browse/?fdfilter=add&fdid=de.j4velin.systemappmover
[Fire Q&A, Help & Troubleshooting] blinky88:
Thank you so much. It works great.
[Fire Q&A, Help & Troubleshooting] Darkside1984:
It doesn't work for me. Any way to make Playstore the main store app?
[Fire Q&A, Help & Troubleshooting] csolanol:
What isn't working for you?. Widgets or just the app installation?. If you can't get it download here: https://f-droid.org/repo/de.j4velin.systemappmover_161.apk
[Fire Q&A, Help & Troubleshooting] Darkside1984:
I've made Nova Launcher a system app but widgets still doesn't work.
[Fire Q&A, Help & Troubleshooting] ldeveraux:
Widgets just work natively with Nova. Are you sure you're not still using the Amazon launcher?
[Fire Q&A, Help & Troubleshooting] GoughGhan:
Thanks much, decided to try it on Apex as well and works perfectly.
[Fire Q&A, Help & Troubleshooting] RW2112:
Thanks for the info, now got widgets working! :o
[Fire Q&A, Help & Troubleshooting] carlobianchi89:
HELP!!!

Hey,

I have a problem.

I installed google now launcher and followed your instructions.

However my kindle is not rebooting anymore now. Maybe google now was not correctly installed.

Any solution?

It didn't even boot when I tried to factory reset it!
[Fire Q&A, Help & Troubleshooting] sd_shadow:
http://xdaforums.com/showthread.php?t=3238740

[HOWTO] How to restore firmware on your device + Amazon Firmware
[Fire Q&A, Help & Troubleshooting] abductedllama:
I used this guide and got Nova running successfully. The only thing is fastboot required sudo or su to work. Using Manjaro if that matters.
[Fire Q&A, Help & Troubleshooting] Infinite1212:
Does it work with 5.1.1?