FORUMS
Remove All Ads from XDA
OnePlus 6 On Sale

[ROOT][GUIDE][2018] Enable Leanback Laucher, Recommendations, Castreceiver, Assistant

251 posts
Thanks Meter: 106
 
By rainman74, Senior Member on 28th April 2018, 04:48 PM
Post Reply Email Thread



The following steps installs the newest Leanback Launcher with Recommendations, Castreceiver, Daydream and activates the Google Voice Search with Google Assistant so that it also can be used in a current Kodi 18 Nightly Build on a Fire TV. The Amazon settings are still accessible except for access to the Amazon Store, Alexa, Wisperplay and Amazon AppManager. These will be substituted by Google Play Store, Google Assistant, Google Cast and Google AppManager.

This is the most comprehensive and up-to-date transformation of a Fire TV into an Android TV device with almost all Google functionalities usable.

Amazon TV Launcher and Amazon Alexa voice search are completely replaced by Leanback Launcher and Google Voice Search. Xposed edge, XInstaller and HDXPosed must also be installed and activated in XposedInstaller. Before installing it is recommended to make a backup of the system and data partition via TWRP if you have connected an external sdcard. Many thanks to @SimLynks for some tips from his PlayFire modification and to @peleg for his wonderful [project] aftv2atv.

This manual is only possible with a rooted device! Please do not use restricted profiles from Google for this modification, as errors may occur.
  • Tested on a rooted Fire TV 4k box
  • Firmware 5.2.6.2

Prerequisites: Install Xposed and Modules
XposedInstaller-3.1.5.apk (install Xposed v89+)
HDXPosed-1.3.apk
Xposed-Edge-Pro-4.4.1.apk
XInstaller-5.0.apk

Prerequisites: Configure XInstaller
Code:
Launch the Xposed Installer 
- Make sure that Xposed v89+ is installed, if not update first
- Then click on the three lines in the top left corner of the screen 
- Click on Modules 
- Click the check box to activate XInstaller (use Mouse Toogle for Fire TV)

Restart the Fire TV 

Launch the Xposed Installer again 
- Click on Modules again
- Click on XInstaller

In XInstaller click on XInstaller first 
- Check Expert mode
- Press the back arrow 

In the Installations page, in the "Enable" section, check the boxes for:
- Downgrading apps
- Installing unknown apps
- Then scroll down to the "Disable" section and check the boxes for:
- Checking signatures
- Checking signatures (F-Droid)
- Forward locking
- Verifying apps
- Checking SDK version
- Checking duplicated permissions
- Press the back arrow 

In the Misc page, in the "Enable" section, check the box for:
- Debugging apps
- Then scroll down to the "Disable" section and check the boxes for:
- Checking permissions
- Verifying JAR
- Verifying signatures
- Checking Lucky Patcher
- Auto updating Google Play

Exit the program

Main instructions:
Copy all files in the appendix to C:\adb\

1. Disabling unnecessary and blocking Amazon junk
Code:
adb shell su -c pm disable com.amazon.acos.providers.UnifiedSettingsProvider
adb shell su -c pm disable com.amazon.advertisingidsettings
adb shell su -c pm disable com.amazon.ags.app
adb shell su -c pm disable com.amazon.application.compatibility.enforcer
adb shell su -c pm disable com.amazon.application.compatibility.enforcer.sdk.library
adb shell su -c pm disable com.amazon.avod
adb shell su -c pm disable com.amazon.bueller.music
adb shell su -c pm disable com.amazon.bueller.notification
adb shell su -c pm disable com.amazon.bueller.photos
adb shell su -c pm disable com.amazon.communication.discovery
adb shell su -c pm disable com.amazon.device.sale.service
adb shell su -c pm disable com.amazon.device.software.ota
adb shell su -c pm disable com.amazon.device.software.ota.override
adb shell su -c pm disable com.amazon.device.sync
adb shell su -c pm disable com.amazon.device.sync.sdk.internal
adb shell su -c pm disable com.amazon.imp
adb shell su -c pm disable com.amazon.kindle.cms
adb shell su -c pm disable com.amazon.kor.demo
adb shell su -c pm disable com.amazon.logan
adb shell su -c pm disable com.amazon.ods.kindleconnect
adb shell su -c pm disable com.amazon.recess
adb shell su -c pm disable com.amazon.tahoe
adb shell su -c pm disable com.amazon.tcomm.client
adb shell su -c pm disable com.amazon.tv.csapp
adb shell su -c pm disable com.amazon.tv.launcher
adb shell su -c pm disable com.amazon.tv.launcher/.ui.HomeActivity_vNext
adb shell su -c pm disable com.amazon.tv.legal.notices
adb shell su -c pm disable com.amazon.tv.nimh
adb shell su -c pm disable com.amazon.tv.settings/com.amazon.tv.settings.tv.AppDisableService

adb shell su -c mount -o remount,rw /system
adb shell su -c rm -r /system/priv-app/com.amazon.vizzini
adb shell su -c rm -r /system/priv-app/WhisperplayCore
adb shell su -c rm -r /system/priv-app/WhisperplayInstall
adb shell su -c mount -o remount,ro /system
(Notice: Amazon Alexa and Wisperplay will be completely deleted to make room on the system partition.)

2. Customize build.prop
mod-build.prop.sh
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\mod-build.prop.sh /sdcard/
adb shell su -c sh /sdcard/mod-build.prop.sh
adb shell su -c rm /sdcard/mod-build.prop.sh

adb shell su -c mount -o remount,ro /system
3. Adjust permissions for voice recognition
tv_core_hardware.xml
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\tv_core_hardware.xml /sdcard/
adb shell su -c cp /sdcard/tv_core_hardware.xml /system/etc/permissions/tv_core_hardware.xml
adb shell su -c chmod 644 /system/etc/permissions/tv_core_hardware.xml
adb shell su -c chown root:root /system/etc/permissions/tv_core_hardware.xml
adb shell su -c rm /sdcard/tv_core_hardware.xml

adb shell su -c mount -o remount,ro /system
4. Install Open Google apps for Android TV

Download the matching zip file and copy it to the sdcard (I use current open_gapps-arm64-5.1-tvstock-20180512).

Open GApps for ARM (Fire TV sticks)
Open GApps for ARM64 (Fire TV boxes)

Insert this code to new "gapps-config.txt" and copy it to the same directory as the GApps on the sdcard.
Code:
forceclean
skipswypelibs
skipvendorlibs
GoogleAssistant

+extsharedstock
+keyboardstock
+provision
+packageinstallerstock
+webviewstock
+notouchauthdelegate

Include

gappspico
backdrop
#castreceiver
configupdater
googlebackuptransport
googlecontactsync
gsfcore
leanbacklauncher
overscan
secondscreenauthbridge
secondscreensetup
tvcustomization
tvetc
tvframework
tvgmscore
tvkeyboardgoogle
tvvending
tvvoiceinput
tvwallpaper
tvwidget
Then install the GApps zip via TWRP and restart the device. Please don't sign up for Google Play Store yet!

5. Allow Google registration (NoTouchAuthDelegate)
(Notice: The two bold lines are only needed if you have never installed NoTouchAuthDelegate.apk before.)
Tv-NoTouchGsf.apk
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\Tv-NoTouchGsf.apk /sdcard/
adb shell su -c mkdir /system/app/NoTouchAuthDelegate/
adb shell su -c chmod 755 /system/app/NoTouchAuthDelegate/
adb shell su -c rm /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c cp /sdcard/Tv-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c rm /sdcard/Tv-NoTouchGsf.apk

adb shell su -c mount -o remount,ro /system
6. Install Google app to enable voice recognition (com.google.android.katniss)
Now restart the device and then sign in to Google Play Store.

Then search for and install the "Google" app on the Play Store. It'll take a while (I use current Google 2.2.0.138699360).
(Notice: At this point the search in the Play Store should already work with the search button on the remote!)

7. Adjust the Xposed edge key configuration for the search button of the Fire TV remote
Activate the "Keys" in the Xposed edge and add the new KEYCODE_SEARCH key (simply press the search key on the Fire Remote for recognition).

Use "Single Click" with the activity "com.google.android.katniss\.search.SearchActivity " and leave "Long press" empty. This is the standard function, you first have to click and release the microphone, wait until the input is ready ("Speak Now" appears), and then press and hold the microphone and speak, then release.
More useful key assignments for the Leanback Launcher see attached photos:
Click image for larger version

Name:	xposededge_keys_1.png
Views:	326
Size:	39.1 KB
ID:	4488212Click image for larger version

Name:	xposededge_keys_2.png
Views:	320
Size:	65.7 KB
ID:	4488213Click image for larger version

Name:	xposededge_keys_3.png
Views:	298
Size:	61.1 KB
ID:	4488214Click image for larger version

Name:	xposededge_keys_4.png
Views:	278
Size:	64.6 KB
ID:	4488215

Alternatively you can easily put my configuration for keys in file /data/data/com.jozein.xedgepro/prefs/prefs (disable temporary Xposed edge in Xposed Installer for it).
prefs
Code:
4 90001D0
6 8 0 140000 0 0 0 0 0 0
7 0 0 0 0 0 0 0 43 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 F000F 0 0 0 0
A 4 FFD01716 FFFFA000 FF0A7E07 FF0288D1
1 3 0 30 com.google.android.leanbacklauncher com.google.android.leanbacklauncher.MainActivity
1 3 1 47
1 3 2 28
1 4 0 0
1 52 0 0
1 52 2 52 0
1 54 0 30 com.google.android.katniss com.google.android.katniss.search.SearchActivity
3 0 0 6 1
3 0 1 2D
3 0 2 2C
8 0 1
9 0 3F 0
8. Install Android TV Settings modified for Fire TV
Once you have installed the aftv2atv Fire TV settings (better than the modified settings apk from PlayFire), you can choose which apps the Google Assistant is allowed to search for hits.
(Notice: The two bold lines are only needed if you have never installed TvSettings.apk before.)
TvSettings-2.1.1.apk
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\TvSettings-2.1.1.apk /sdcard/
adb shell su -c mkdir /system/priv-app/TvSettings
adb shell su -c chmod 755 /system/priv-app/TvSettings
adb shell su -c rm /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c cp /sdcard/TvSettings-2.1.1.apk /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chmod 644 /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chown root:root /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c rm /sdcard/TvSettings-2.1.1.apk

adb shell su -c mount -o remount,ro /system
9. Finish
Reboot for the last time.

That's all and now you will boot directly in Leanback Launcher and start the voice search by pressing the search button in Leanback Launcher and Kodi.
Google Assistant also now finds hits in Kodi (movies, tv shows and music, if Kodi already is running), along with other sources such as YouTube, Spotify, etc. (directly install these apps from Google Play Store)

10. Optional: Access Amazon settings
If you still need to access the Amazon settings, you can install my modified conFIREator Settings app additionally (More details click here):

Because of the XInstaller, other basic Amazon activities can be called up (which are normally only possible with the Amazon TV Launcher) and I included them in my current version of conFIREator, e.g. screen and sound settings, sdcard menu, Fire TV info, etc.
This allows you to access all Amazon settings even if Amazon Launcher is disabled.


11. Optional: Disabling much more unnecessary and blocking Amazon junk
Code:
adb shell su -c pm disable com.amazon.acos.providers.UnifiedSettingsProvider
adb shell su -c pm disable com.amazon.advertisingidsettings
adb shell su -c pm disable com.amazon.ags.app
adb shell su -c pm disable com.amazon.application.compatibility.enforcer
adb shell su -c pm disable com.amazon.application.compatibility.enforcer.sdk.library
adb shell su -c pm disable com.amazon.avod
adb shell su -c pm disable com.amazon.bueller.music
adb shell su -c pm disable com.amazon.bueller.notification
adb shell su -c pm disable com.amazon.bueller.photos
adb shell su -c pm disable com.amazon.communication.discovery
adb shell su -c pm disable com.amazon.device.crashmanager
adb shell su -c pm disable com.amazon.device.logmanager
adb shell su -c pm disable com.amazon.device.lowstoragemanager
adb shell su -c pm disable com.amazon.device.sale.service
adb shell su -c pm disable com.amazon.device.software.ota
adb shell su -c pm disable com.amazon.device.software.ota.override
adb shell su -c pm disable com.amazon.device.sync
adb shell su -c pm disable com.amazon.device.sync.sdk.internal
adb shell su -c pm disable com.amazon.imp
adb shell su -c pm disable com.amazon.kindle.cms
adb shell su -c pm disable com.amazon.kindle.devicecontrols
adb shell su -c pm disable com.amazon.kor.demo
adb shell su -c pm disable com.amazon.kso.blackbird
adb shell su -c pm disable com.amazon.logan
adb shell su -c pm disable com.amazon.ods.kindleconnect
adb shell su -c pm disable com.amazon.recess
adb shell su -c pm disable com.amazon.storm.lightning.services
adb shell su -c pm disable com.amazon.storm.lightning.tutorial
adb shell su -c pm disable com.amazon.tahoe
adb shell su -c pm disable com.amazon.tcomm.client
adb shell su -c pm disable com.amazon.tmm.tutorial
adb shell su -c pm disable com.amazon.tv.csapp
adb shell su -c pm disable com.amazon.tv.launcher
adb shell su -c pm disable com.amazon.tv.launcher/.ui.HomeActivity_vNext
adb shell su -c pm disable com.amazon.tv.legal.notices
adb shell su -c pm disable com.amazon.tv.livetv
adb shell su -c pm disable com.amazon.tv.nimh
adb shell su -c pm disable com.amazon.tv.oobe
adb shell su -c pm disable com.amazon.tv.settings/.hud.HomeLongPressReceiver
adb shell su -c pm disable com.amazon.tv.settings/com.amazon.tv.settings.tv.AppDisableService
adb shell su -c pm disable com.amazon.venezia
adb shell su -c pm disable com.amazon.vizzini
adb shell su -c pm disable com.amazon.wcast.sink
adb shell su -c pm disable com.amazon.whisperlink.core.android
adb shell su -c pm disable com.amazon.whisperplay.contracts
adb shell su -c pm disable com.amazon.whisperplay.service.install
adb shell su -c pm disable com.ivona.orchestrator
adb shell su -c pm disable com.ivona.tts.oem
12. Optional: Make much more room on the system partition - Please only execute if you have no more space on system!
Code:
adb shell su -c mount -o remount,rw /system

adb shell su -c rm -r /system/priv-app/WhisperplayCore
adb shell su -c rm -r /system/priv-app/WhisperplayInstall
adb shell su -c rm -r /system/priv-app/com.amazon.amazonvideo.livingroom
adb shell su -c rm -r /system/priv-app/com.amazon.avod
adb shell su -c rm -r /system/priv-app/com.amazon.bueller.music
adb shell su -c rm -r /system/priv-app/com.amazon.bueller.photos
adb shell su -c rm -r /system/priv-app/com.amazon.shoptv.client
adb shell su -c rm -r /system/priv-app/com.amazon.tahoe
adb shell su -c rm -r /system/priv-app/com.amazon.tv.csapp
adb shell su -c rm -r /system/priv-app/com.amazon.tv.livetv
adb shell su -c rm -r /system/priv-app/com.amazon.vizzini

adb shell su -c mount -o remount,ro /system

Known issues / FAQ

I need a mouse emulator
As a mouse emulator I can recommend this app: Mouse Toogle for Fire TV. Double click on the play/pause button on the remote to get a mouse arrow.
If you use the build.prop mod for "Nexus Player" of section Hardcore mode use this variant: Mouse Toggle [ROOT] for Android TV

Google Voice Search and Prime Video doesn't work on my box 1
It seems that Google Voice Search and possibly also some DRM components (Prime Video/Netflix) do not work when the bootloader is unlocked on a Fire TV 1 box. You then get the error "Can't reach Google at the moment".

I see no recommendations
The recommendations will not appear until you install apps that give the launcher recommendations, e.g. YouTube, Spotify, Kodi, etc..

I see no settings, info and network buttons
As soon as you have installed the TvSettings correctly, the icons for settings, info and network (if LAN) or the WLAN name will also be added below.

The voice icon in the upper left corner is not working
The voice icon will not work until you have installed the Google app.

Voice search in the Play Store
To enable the voice search button in the Play Store, you have to install Open GApps with "tvvoiceinput".

I get an error while installing TvSettings
The error at adb shell su -c rm /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk is normal if you have never installed such an APK before! I just wanted to rule out all eventualities, so the paragraph includes more than on a case-by-case basis.

It is only important that these 3 go through without errors and you reboot afterwards:
adb shell su -c cp /sdcard/Tv-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk

Castreceiver
Although the GApps Castreceiver is displayed and found correctly, no device could connect. Looks like Google has something here against unlicensed Castreceivers!
As a workaround, do not install Castreceiver of GApps but CastReceiver-1.1.2.apk. Then you can use Google Cast directly from your Chrome Browser.

An alternative to CastReceiver is the use of AirScreen v1.6.0 (not a newer version).

Sideloaded Apps
Every sideloaded app with Leanback Launcher support is displayed. But if the Leanback Launcher support is missing in the app, you can create an icon and a shortcut to such apps in the Leanback Launcher with an additional tool.

Google Play Store:
TV App Repo 1.1.3

But the open community version is recommended:
TV App Repo 1.1.4

Home-Button-Receicer
Fire OS regularly tries to overwrite the assignment of the home button when held down, even if an alternative key is configured via Xposed edge. This can be fixed by deactivating the HomeLongPressReceiver.
See also chapter 11: adb shell su -c pm disable com.amazon.tv.settings/.hud.HomeLongPressReceiver

Restrictions in the TvSettings
The apps overview must always be called twice so that the installed apps are displayed. After that you have full control (info, stop, uninstall).
The menu item "Google Cast" cannot be used because I commented out the castreceiver in the gapps-config.txt.
All other settings can be used without restrictions!

How to start apps with voice
Start the Google app with the voice button and say e.g. "Open Kodi"


Apps I use directly from the Google Play Store of Open GApps or per sideload
Can be installed directly from the store
  • Google app for Android TV (Android TV) 2.2.0.138699360
  • Google Play Filme & Serien (Android TV) 4.4.43.4
  • Google Play Spiele (Android TV) 5.8.53
  • Zattoo - TV Streaming (Android TV) 2.1.0
  • YouTube for Android TV (Android TV) 2.02.14
  • Spotify Music - for Android TV (Android TV) 1.8.0
  • pFolio - Google Fotos (Universal app) 2.10.2
  • Total Commander - file manager (Universal app) 2.80

Not available in the store, therefore you have to sideload(Notice: Optionally, you could further modify the build.props and fake a NVIDIA Shield device, but it is not worth it, because you can also install the shield version of Prime Video via sideload. Second: BusyBox is only available as pro-version which would be automatically updated, and then displays advertisements. Therefore I modified the last version without advertisements, so that no more updates can take place.)


I use the following stream APIs - Except first one, they are all provided by AirScreen
  • Spotify app on iPhone & Android -> Spotify Connect (here Google Cast does not work because Fire TVs are not licensed for "Chromecast Audio")
  • Facebook app on Android (video streaming) -> Google Cast (incl. audio)
  • Facebook app on iPhone/iPad (video streaming) -> AirPlay (incl. audio)
  • Facebook app on Chrome-Desktop-Browser (video streaming) -> Google Cast (incl. audio)
  • Chrome-Desktop-Browser screen mirroring -> Google Cast (incl. audio)
  • iPhone/iPad screen mirroring -> AirPlay (incl. audio)
  • Android screen mirroring -> Miracast or on newer devices also Google Cast (both incl. audio)
(Notice: Spotify Connect is provided separately by the Spotify Android TV app. YouTube cannot be casted because Chromecast Audio is not licensed on Fire TV.)


Several Fire TV devices in use?
If you have several Fire TV devices in use, you do not have to run the guide again on each additional device.
In this case, just make a backup via TWRP on the modified device to a sdcard and then manually copy all files to the folder with the serial number of the other device.

For example you have two devices:
Serial number of Fire TV 1: G070GV0754520001
Serial number of Fire TV 2: G070GV0754520002

You make a backup on Fire TV 1 and copy all files from the folder /storage/sdcard1/TWRP/BACKUPS/G070GV0754520001 to the folder /storage/sdcard1/TWRP/BACKUPS/G070GV0754520002.
Quote:

data.ext4.win000
data.ext4.win000.md5
data.ext4.win001
data.ext4.win001.md5
data.info
system.ext4.win
system.ext4.win.md5
system.info

Then you put the sdcard in Fire TV 2 and restore the backup.

Finally, you only need to change the Android id, bluetooth mac address and device name of Fire TV 2, because these were cloned from Fire TV 1:
Code:
adb shell settings get secure android_id
adb shell settings put secure android_id 1111111111111111

adb shell settings get secure bluetooth_address
adb shell settings put secure bluetooth_address '11:11:11:11:11:11'

adb shell settings get global device_name
adb shell settings put global device_name 'NAME'
(Notice: You can specify any 16-digit hex number, such as the 111111111111111111 as Android id, any mac address, such as the 11:11:11:11:11:11 and any NAME above. Each device needs its own parameters, otherwise e.g. the differentiation of the devices for streaming does not work!)

To also change bluetooth name, you have to use this app: Set-BT-Name-1.1.apk.

Attention: On the cloned devices you have to pair the remote control again, because the id do not match anymore. Simply press the home button on the remote for more than 10 seconds and the Fire TV repairs with the remote.


Hardcore mode
If you want Spotify to display the real device name, the GApps Castreceiver must be installed in addition and the device must be converted to a "Nexus Player" via build.prop (mod-build.prop_nexus.sh). To install the internal Castreceiver, simply remove the # in the line #castreceiver in the gapps-config.txt. The internal Castreceiver is only used for publishing the device name in the network and has no effect on a casting app such as AirScreen.
Click image for larger version

Name:	spotify.jpg
Views:	36
Size:	40.7 KB
ID:	4508387


Want to controll your Fire TV per app?
I tried the official Android Remote TV of the GApps (tvremote), but unfortunately this does not work.

But DroidMote works excellently:
DroidMote server app -> install on your Fire TV and start server
DroidMote client app -> install on your Phone or Tablet


Want better speech support?
Install the Google Text-To-Speech-Engine and select it in the TvSettings/Accessibility/Text-to-Speech instead of PicoTTS.
Google-Text-To-Speech-Engine-3.14.12.apk

To check it out: Start the Google app with the voice button and say (in your native language):
  • How old is Donald Trump?
  • Where was Donald Trump born?
  • What does colloquial mean?
  • What time is it in Munich?
  • Show me videos of the Olympiaturm in Munich? (you need YouTube app installed)
  • Do I need an umbrella today?
  • What’s the weather like?
  • What’s the weather in Munich this weekend?
  • Did the Bavarians win today?
  • When is the next Bavarians game?
  • What movies are playing today?

Change hostname?
Code:
adb shell su -c mount -o remount,rw /system

! grep -q "net.hostname" /system/build.prop && echo "net.hostname=YOUR-HOSTNAME" >> /system/build.prop ;

adb shell su -c mount -o remount,ro /system

Remove registered Google account so you can login with a new one?
First remove your account files:
Code:
adb shell su -c mount -o remount,rw /system

adb shell su -c rm /data/system/users/0/accounts.db
adb shell su -c rm /data/system/users/0/accounts.db-journal
adb shell su -c rm /data/system/users/0/photo.png
adb shell su -c rm /data/system/sync/accounts.xml
adb shell su -c rm /data/system/sync/pending.xml
adb shell su -c rm /data/system/sync/stats.bin
adb shell su -c rm /data/system/sync/status.bin

adb shell su -c mount -o remount,ro /system
Then reboot your device and start Google Play Store to start login process.


.
Attached Thumbnails
Click image for larger version

Name:	042818174244.jpg
Views:	496
Size:	38.9 KB
ID:	4488194   Click image for larger version

Name:	042818174303.jpg
Views:	452
Size:	38.5 KB
ID:	4488195   Click image for larger version

Name:	042818174308.jpg
Views:	488
Size:	225.2 KB
ID:	4488196   Click image for larger version

Name:	042818174416.jpg
Views:	488
Size:	63.0 KB
ID:	4488197   Click image for larger version

Name:	042818174423.png
Views:	510
Size:	114.8 KB
ID:	4488198   Click image for larger version

Name:	042818174447.png
Views:	480
Size:	59.9 KB
ID:	4488200   Click image for larger version

Name:	042818174607.png
Views:	454
Size:	64.1 KB
ID:	4488201   Click image for larger version

Name:	050118170911.jpg
Views:	642
Size:	209.6 KB
ID:	4490611   Click image for larger version

Name:	050918192048.jpg
Views:	382
Size:	225.6 KB
ID:	4496904  
The Following 3 Users Say Thank You to rainman74 For This Useful Post: [ View ] Gift rainman74 Ad-Free
 
 
28th April 2018, 09:18 PM |#2  
Senior Member
Flag Sunderland
Thanks Meter: 144
 
More
Will be trying this tomorrow, thankyou
29th April 2018, 01:18 AM |#3  
Senior Member
Thanks Meter: 14
 
More
Awesome a new project for tomorrow. Thanks for all your hard work.
29th April 2018, 04:03 PM |#4  
Senior Member
Flag Sunderland
Thanks Meter: 144
 
More
Quote:
Originally Posted by rainman74




The following steps installs the newest Leanback Launcher with Recommendations, Chromecast integrated, Daydream and activates the Google Voice Search with Google Assistant so that it also can be used in a current Kodi 18 Nightly Build on a Fire TV.

This is the most comprehensive and up-to-date transformation of a Fire TV into an Android TV device with almost all Google functionalities usable.

Amazon TV Launcher and Amazon Alexa voice search are completely replaced by Leanback Launcher and Google Voice Search. Xposed edge, XInstaller and HDXPosed must also be installed and activated. Before installing it is recommended to make a backup of the system and data partition via TWRP if you have connected an external sdcard. Many thanks to @SimLynks for some tips from his PlayFire modification and to @peleg for his wonderful [project] aftv2atv.

This manual is only possible with a rooted device!
  • Tested on a rooted Fire TV 4k box
  • Firmware 5.2.6.2

Instructions:
Unpack all zip files and copy all apk in the appendix to C:\adb\

1. Disabling unnecessary and blocking Amazon junk
Code:
adb shell su -c pm disable amazon.jackson19
adb shell su -c pm disable com.amazon.acos.providers.UnifiedSettingsProvider
adb shell su -c pm disable com.amazon.advertisingidsettings
adb shell su -c pm disable com.amazon.ags.app
adb shell su -c pm disable com.amazon.application.compatibility.enforcer
adb shell su -c pm disable com.amazon.application.compatibility.enforcer.sdk.library
adb shell su -c pm disable com.amazon.avod
adb shell su -c pm disable com.amazon.bueller.music
adb shell su -c pm disable com.amazon.bueller.notification
adb shell su -c pm disable com.amazon.bueller.photos
adb shell su -c pm disable com.amazon.client.metrics
adb shell su -c pm disable com.amazon.client.metrics.api
adb shell su -c pm disable com.amazon.communication.discovery
adb shell su -c pm disable com.amazon.device.sale.service
adb shell su -c pm disable com.amazon.device.software.ota
adb shell su -c pm disable com.amazon.device.software.ota.override
adb shell su -c pm disable com.amazon.device.sync
adb shell su -c pm disable com.amazon.device.sync.sdk.internal
adb shell su -c pm disable com.amazon.imp
adb shell su -c pm disable com.amazon.kindle.cms
adb shell su -c pm disable com.amazon.kor.demo
adb shell su -c pm disable com.amazon.logan
adb shell su -c pm disable com.amazon.metrics.api
adb shell su -c pm disable com.amazon.ods.kindleconnect
adb shell su -c pm disable com.amazon.recess
adb shell su -c pm disable com.amazon.tahoe
adb shell su -c pm disable com.amazon.tcomm.client
adb shell su -c pm disable com.amazon.tv.csapp
adb shell su -c pm disable com.amazon.tv.launcher
adb shell su -c pm disable com.amazon.tv.launcher/.ui.HomeActivity_vNext
adb shell su -c pm disable com.amazon.tv.legal.notices
adb shell su -c pm disable com.amazon.tv.nimh
adb shell su -c pm disable com.amazon.tv.settings/com.amazon.tv.settings.tv.AppDisableService

adb shell su -c mount -o remount,rw /system
adb shell su -c rm -r /system/priv-app/com.amazon.vizzini
adb shell su -c rm -r /system/priv-app/WhisperplayCore
adb shell su -c rm -r /system/priv-app/WhisperplayInstall
adb shell su -c mount -o remount,ro /system
(Notice: Amazon Alexa and Wisperplay will be completely deleted to make room on the system partition for Chromecast Integrated.)

2. Customize build.prop
Attachment 4481935
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\mod-build.prop.sh /sdcard/
adb shell su -c sh /sdcard/mod-build.prop.sh
adb shell su -c rm /sdcard/mod-build.prop.sh

adb shell su -c mount -o remount,ro /system
3. Adjust permissions for voice recognition
Attachment 4481936
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\tv_core_hardware.xml /sdcard/
adb shell su -c cp /sdcard/tv_core_hardware.xml /system/etc/permissions/tv_core_hardware.xml
adb shell su -c chmod 644 /system/etc/permissions/tv_core_hardware.xml
adb shell su -c chown root:root /system/etc/permissions/tv_core_hardware.xml
adb shell su -c rm /sdcard/tv_core_hardware.xml

adb shell su -c mount -o remount,ro /system
4. Install Open Google apps for Android TV

Download the matching zip file and copy it to the sdcard (I use version open_gapps-arm64-5.1-tvstock-20180423).

Open GApps for ARM (Fire TV sticks)
Open GApps for ARM64 (Fire TV boxes)

Insert this code to new "gapps-config.txt" and copy it to the same directory as the GApps on the sdcard.
Code:
forceclean
skipswypelibs
skipvendorlibs
GoogleAssistant

+extsharedstock
+keyboardstock
+provision
+packageinstallerstock
+webviewstock
+notouchauthdelegate

Include

gappspico
backdrop
#castreceiver
configupdater
googlebackuptransport
googlecontactsync
gsfcore
leanbacklauncher
overscan
secondscreenauthbridge
secondscreensetup
tvcustomization
tvetc
tvframework
tvgmscore
tvkeyboardgoogle
tvvending
tvwallpaper
tvwidget
Then install the GApps zip via TWRP and restart the device. Please don't sign up for Google Play Store yet!

5. Allow Google registration (NoTouchAuthDelegate)
Attachment 4481943
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\Tv-NoTouchGsf.apk /sdcard/
adb shell su -c chmod 755 /system/app/NoTouchAuthDelegate/
adb shell su -c rm /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c cp /sdcard/Tv-NoTouchGsf.apk /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c chmod 644 /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c chown root:root /system/app/NoTouchAuthDelegate/NoTouchAuthDelegate.apk
adb shell su -c rm /sdcard/Tv-NoTouchGsf.apk

adb shell su -c mount -o remount,ro /system
6. Install Google app to enable voice recognition (com.google.android.katniss)
Now restart the device and then sign in to Google Play Store.

Then search for and install the "Google" app on the Play Store. It'll take a while (I use current Google 2.2.0.138699360).
(Notice: The search in the Play Store does not work with the search button on the remote!)

7. Adjust the Xposed edge key configuration for the search button of the Fire TV remote
Activate the "Keys" in the Xposed edge and add the new KEYCODE_SEARCH key (simply press the search key on the Fire Remote for recognition).

Use "Single Click" with the activity "com.google.android.katniss\.search.SearchActivity " and leave "Long press" empty. This is the standard function, you first have to click and release the microphone, wait until the input is ready ("Speak Now" appears), and then press and hold the microphone and speak, then release.
More useful key assignments for the Leanback Launcher see attached photos:
Attachment 4488212Attachment 4488213Attachment 4488214Attachment 4488215

8. Install Android TV Settings modified for Fire TV
Once you have installed the aftv2atv Fire TV settings (better than the modified settings apk from PlayFire), you can choose which apps the Google Assistant is allowed to search for hits.
Attachment 4488216
Code:
adb shell su -c mount -o remount,rw /system

adb push C:\adb\TvSettings-2.1.1.apk /sdcard/
adb shell su -c cp /sdcard/TvSettings-2.1.1.apk /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chmod 644 /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c chown root:root /system/priv-app/TvSettings/TvSettings.apk
adb shell su -c rm /sdcard/TvSettings-2.1.1.apk

adb shell su -c mount -o remount,ro /system
9. Finish
Reboot for the last time.

That's all and now you will boot directly in Leanback Launcher and start the voice search by pressing the search button in Leanback Launcher and Kodi.
Google Assistant also now finds hits in Kodi (movies, tv shows and music, if Kodi already is running), along with other sources such as YouTube, Spotify, etc. (directly install these apps from Google Play Store)

10. Optional: Access Amazon settings
If you still need to access the Amazon settings, you can install my modified conFIREator Settings app additionally (More details click here):
Attachment 4488238

Known issues
Although the cast receivers are displayed and found correctly, no device could connect. Looks like Google has something here against unlicensed cast receivers.

.

After step 5 your guide says install the google app, when i log into google and search for the app it wont let me install it ? i get error code 0
29th April 2018, 05:07 PM |#5  
rainman74's Avatar
OP Senior Member
Flag Munich
Thanks Meter: 106
 
More
Quote:
Originally Posted by sconnyuk

After step 5 your guide says install the google app, when i log into google and search for the app it wont let me install it ? i get error code 0

Did you already have an older version installed? Then simply uninstall them before.
29th April 2018, 05:15 PM |#6  
Senior Member
Flag Sunderland
Thanks Meter: 144
 
More
Quote:
Originally Posted by rainman74

Did you already have an older version installed? Then simply uninstall them before.

brand new install of latest fire tv2 rom. clean slate and following your guide.

---------- Post added at 05:12 PM ---------- Previous post was at 05:11 PM ----------

ive just tried again, im up to instaaling gapps and waiting on optomising

---------- Post added at 05:14 PM ---------- Previous post was at 05:12 PM ----------

Quote:
Originally Posted by rainman74

Did you already have an older version installed? Then simply uninstall them before.

no, ive just formatted and installed latest rom (fire tv2) and folowing as a clean slate.

---------- Post added at 05:15 PM ---------- Previous post was at 05:14 PM ----------

Quote:
Originally Posted by rainman74

Did you already have an older version installed? Then simply uninstall them before.

can you tell me what i need to do after step 5 ? it says install google app but it isnt included in your guide ? thanks
29th April 2018, 05:36 PM |#7  
rainman74's Avatar
OP Senior Member
Flag Munich
Thanks Meter: 106
 
More
Quote:
Originally Posted by sconnyuk

can you tell me what i need to do after step 5 ? it says install google app but it isnt included in your guide ? thanks

then sideload Google App 2.2.0
29th April 2018, 05:38 PM |#8  
Senior Member
Flag Sunderland
Thanks Meter: 144
 
More
Quote:
Originally Posted by rainman74

then sideload Google App 2.2.0

its asking for decription key ?
29th April 2018, 05:49 PM |#9  
rainman74's Avatar
OP Senior Member
Flag Munich
Thanks Meter: 106
 
More
Quote:
Originally Posted by sconnyuk

its asking for decription key ?

Link with key
29th April 2018, 05:54 PM |#10  
Senior Member
Flag Sunderland
Thanks Meter: 144
 
More
Quote:
Originally Posted by rainman74

Link with key

Thanks for all the help but after i install that and go sign into google store, search google and try install i get error code 0 again, no matter what i try install i get trhe same error code, any idea ?
29th April 2018, 06:21 PM |#11  
rainman74's Avatar
OP Senior Member
Flag Munich
Thanks Meter: 106
 
More
Quote:
Originally Posted by sconnyuk

Thanks for all the help but after i install that and go sign into google store, search google and try install i get error code 0 again, no matter what i try install i get trhe same error code, any idea ?

Code:
adb shell
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ‘;’
find /data/media/ -type f -exec chmod 664 {} ‘;’4)
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