[ROM] [unlocked] [tank] LineageOS 12.1

Search This thread

diegocr

Senior Member
Dec 8, 2011
543
819
http%3A%2F%2Fi.picasion.com%2Fpic89%2F7652ffeccaa6bbdcda57289d991b093d.gif
DISCLAIMER:
We are not responsible for any damage, bootloop, bricked or broken devices and Relationships.
Need an unlocked tank with amonet patched recovery
https://forum.xda-developers.com/fire-tv/development/unlock-fire-tv-stick-2nd-gen-tank-t3907002
This is an LineageOS 12.1 build for Amazon TV Stick (aka TANK).

DON'T UPDATE MAGISK WITH THE APP. THIS WILL BRICK THE DEVICE AND YOU WILL NEED TO UNLOCK IT AGAIN!

Issues:
  • Netflix won't play 5.1 audio videos on some TVs.
  • Can't pair bluetooth speakers.
  • On latest versions of Prime Video text is not show on some buttons.
  • Permissive kernel

Installation:
Connect device to pc with a USB cable, don't use tcp adb
  • Reboot tank to recovery
  • Adb push rom to /sdcard/
  • Wipe dalvik cache, cache, data and system if you come from stock or another rom.
    adb shell
    twrp wipe data
    twrp wipe cache
    twrp wipe dalvik
    twrp wipe system (if it gives error, try adding "/" /system)
  • Flash Rom:
    twrp install /sdcard/lineage-12.1-xxxxxxxx-UNOFFICIAL-tank.zip
  • Reboot and pair remote, if fails reboot and try again, complete setup wizard.
  • Reboot to recovery and install magisk, microG .........
  • Enjoy

Quote:
On first boot it will ask you for pair the TV Remote. For do that, press the home button 10 secs or more.
If don't pair on first start reboot and pair again

Quote:
Since this ROM is optimized for TV Stick, this ROM uses LeanBack Launcher, LeanBack IME and TVSettings intsead of CM Launcher, AOSP Keyboard and CMSettings.

Thanks:
  • @k4y0z for the bootloader unlock and recovery
  • @MSe1969 for the lineageos-12.1 sources
  • @ggow for the mt8127-common tree
  • LineageOS team

Source Code:

Download:
Please don't mirror!

XDA:DevDB Information
[ROM] [unlocked] [tank] LineageOS 12.1, ROM for the Amazon Fire TV

Contributors
diegocr, Rortiz2
ROM OS Version: 5.1.x Lollipop
ROM Kernel: Linux 3.10.x
Based On: LineageOS

Version Information
Status: Testing

Created 2019-08-26
Last Updated 2020-04-23
 

Attachments

  • home1.jpg
    home1.jpg
    98.3 KB · Views: 8,851
  • home2.jpg
    home2.jpg
    121.8 KB · Views: 8,815
  • about.jpg
    about.jpg
    43 KB · Views: 8,733
Last edited:

diegocr

Senior Member
Dec 8, 2011
543
819
Changelog:

20200927
Update keylayouts (thanks 0815hoffi)
Revert useFixedVolume

20200806
Update kernel to fos 5.2.7.3
Add AppDrawer
Remove CMFileManager
Update keylayouts
Add Android TV remote wifi support (tvstock gapps may broken it)
Use amazon tank fingerprint
Repo sync

20200514
Update kernel and vendor to fos 5.2.7.2
Add microG support
Repo sync

20200422 REMOVED
Updated Security Patches to April 2020
Synced with the LineageOS Source Code
Added missing keylayouts
Removed browser shortcut in LeanBack

2020221
Add some keylayouts

20191225
Disable volume buttons

20191220
Use libMtkOmx libs from austin

20191215
Update kernel and vendor to 5.2.7.2
Enable adb on boot
Build btremoted

20191211
Update LeanbackLauncher and LeanbackIme
Disable adb on boot (now need to enable on developer settings)
Overlay, Update remote pairing instructions
TvSettings, patch to autopair on fistboot settings

20191210
Remove dolby sound service (not working)
system.prop: Enable USB OTG (Thanks Petoriano)
LOS updates

20191029
Enable ozwpan kernel module

20191014
Build kernel from source
Use Sharp an_np40 fingerprint

20190911
Fixed secure video playback. Thanks @julianwi

20190901
Rebuild device tree
Add some blobs

20190828
Fix privacy guard issue, thanks @ggow
Add Overscan app
Disable Trebuchet
Hide notification bar (set only on on firstboot)

20190827
Set screen timeout to 15 min on firstboot
Change setup pairing bluetooth device screen text (english only)
Small notification bar (1px)
Don't build TeleService
 
Last edited:
Mar 24, 2019
31
13
Wow everything works with gapps tv stock, etc, needs added amazon game controller

I've tested this build a couple hours ago with gapps tv stock installed within twrp along with xposed and I got to say it works 100% with no lag or anything! I tested the Amazon Game Controller and it won't come up on bluetooth. Otherwise, everything in this tested build works as expected, most of the settings works unless you don't have gapps installed then it won't work properly. Thank you for releasing this and I'll get back to you in the future as time goes on!!!
 

tamojit_ray

Senior Member
The Leanback launcher setting works but some part of the setting wont open.

Hotstar dont play video in full screen.
PdY4MPl.jpg


Amazon prime android tv version dont work. App opens and works but will not play any video. Haven't tested the mobile version yet.

Will test more and give updates

And thanks to everyone for this awesome rom. Atlast i can use my fire stick.
 
Last edited:
  • Like
Reactions: diegocr

O_oaa

Member
Dec 11, 2017
31
38
Very awesome! Thank you so much for putting me out of my misery of trying to de-bloat the latest FireOS image and rid myself of the Amazon junk. In my setup I removed Leanback and set Kodi to start on boot. Tried several different configurations to get deinterlacing and 1080p/i playback to work, but running into choppiness issues. There's other mods I'm hoping to do like getting Xposed Edge working, but this this a great start. After that, I'd like to get the default remote configuration app working so I can modify the remote's functions, but that's down the road.

Again, thank you an everyone before you getting this to work!
 
Last edited:
  • Like
Reactions: diegocr

diegocr

Senior Member
Dec 8, 2011
543
819
The Leanback launcher setting works but some part of the setting wont open.

Hotstar dont play video in full screen.
https://imgur.com/PdY4MPl

Amazon prime android tv version dont work. App opens and works but will not play any video. Haven't tested the mobile version yet.

Will test more and give updates

And thanks to everyone for this awesome rom. Atlast i can use my fire stick.

With amazon prime video have a problem with omx codecs or drm
On non tv apps remote control don't works well

Code:
D/AMZ-Playready25(  164): outputLevelsCallback: callbackType = 4 
D/AMZ-Playready25(  164): [DRM_GetVideoProtectionModeWithGUID,166]:DRM_GetVideoProtectionModeWithGUID fail!dr:80004005
D/AMZ-Playready25(  164): [DRM_GetVideoProtectionModeInBindCB,193]:DRM_GetVideoProtectionModeInBindCB fail!dr:80004005
D/AMZ-Playready25(  164): AmznVideoProtectModes :4 checked dr:80004005
D/Playready25(  164): [PR25][API] Drm_Reader_Bind out, dr = 0x00000000
D/AMZ-Playready25(  164): bindAndCommitLicense,619: Didn't get valid GUID from playenabler!4
I/RubyNative( 2219): AdaptiveStreaming::parseVideoFragment() - Switching to video quality level [5] - 640 x 272
I/RubyNative( 2219): AdaptiveStreaming::parseVideoFragment( /data/temp//fragment_video_11.bin, size: 99080, state: 2, index: 3, pts: 15.015000s, duration: 5.005000s, quality: 5 )
D/AMZ-MtkVideoSecureAL(  164): -[ MtkVdecH265InitSec #582 ]
D/AMZ-MtkOmxVdec(  164): [0xb5b04000] VAL_CHIP_NAME_MT8127
D/AMZ-MtkOmxVdec(  164): [0xb5b04000] InitHW HEVC OK (512)(208)(512)(256)(1)(1)
W/RubyNative( 2219): ScopedThreadName::ScopedThreadName( core::DataSourceFileRingBuffer ) - unable to store thread name
D/Playready25(  164): [DRM_GS_GetGUID]131. dr:8004c024
D/Playready25(  164): [DRM_GS_GetGUID,151]:DRM_GS_GetGUID fail!,dr:8004c024
D/Playready25(  164): [DRM_GetGUIDWithKID,991]:DRM_GetGUIDWithKID fail!,dr:8004c024
D/AMZ-Playready25(  164): [DRM_GetVideoProtectionModeFromCustomData,234]:DRM_GetVideoProtectionMode fail!
D/AMZ-Playready25(  164): bindAndCommitLicense,627: DRM_GetVideoProtectionModeFromCustomData failed: 0x8004c024
D/AMZ-MtkOmxVdec(  164): [0xb5b04000] # Got general command (OMX_CommandPortDisable)
D/Playready25(  164): Drm_Reader_Decrypt check  Drm_IsSecureStopOn 1
D/Playready25(  164): [optimize]_Oem_File_Open(118):####to open file name:/data/securestop/tee_state_tmp.dat mode:(null) f_dwCreationDisposition 2 
D/Playready25(  164): [optimize]>>>############# _Oem_File_Open(138) f_dwAccessMode&OEM_GENERIC_WRITE:[40000000]
D/Playready25(  164): [optimize]  _Oem_File_Open  media
D/Playready25(  164): [optimize]  _Oem_File_Open  uid 1013 gid 1005
D/Playready25(  164): [optimize]_Oem_File_Open(209):####to open file name:/data/securestop/tee_state_tmp.dat mode:w+b
D/Playready25(  164): [optimize]_Oem_File_Open(213):b6ef8d9c  strerror(errno) Invalid argument
 

Rortiz2

Senior Member
I've tested this build a couple hours ago with gapps tv stock installed within twrp along with xposed and I got to say it works 100% with no lag or anything! I tested the Amazon Game Controller and it won't come up on bluetooth. Otherwise, everything in this tested build works as expected, most of the settings works unless you don't have gapps installed then it won't work properly. Thank you for releasing this and I'll get back to you in the future as time goes on!!!

G-APPS Are working for you? I installed them and stucked in this screen..
83a7429225e0b2c75ad38a497b563e8b.gif

(Sorry for the quality)
 
Last edited:
  • Like
Reactions: tamojit_ray

tamojit_ray

Senior Member
Try set to 0 or install app like insomnia
Do u mean to change the 900000 to 0. like this
adb shell
settings --user 0 put system screen_off_timeout 0

Some bugs in new build.
1. Some parts of status bar still show in all apps. Have a look at the images.
Zoom the images where i have marked to get good view
i8xE1ad.jpg

IY2XKLq.jpg


2. Privacy Guard pop up keeps popping
mhOdKMn.jpg
 
Last edited:
  • Like
Reactions: Rortiz2

diegocr

Senior Member
Dec 8, 2011
543
819
Can test this?

adb shell settings put global policy_control immersive.status=*

https://forum.xda-developers.com/g5/how-to/guide-hide-status-bar-nav-bar-adb-t3654807

It worked for me. I guess u have downloaded the tvstock open gapps version.
CR98Uk4.png


---------- Post added at 07:47 PM ---------- Previous post was at 07:26 PM ----------


Do u mean to change the 900000 to 0. like this
adb shell
settings --user 0 put system screen_off_timeout 0

Some bugs in new build.
1. Some parts of status bar still show in all apps. Have a look at the images.
Zoom the images where i have marked to get good view
i8xE1ad.jpg

IY2XKLq.jpg


2. Privacy Guard pop up keeps popping
mhOdKMn.jpg
 

Rortiz2

Senior Member
Worked. And how to access notification in leanback launcher?

But what about privacy guard pop up. Its annoying

Privacy guard issue is very known in LOS 12.1 based ROMS (In lineage12.1 for austin/ford happens the same).
@ggow I remember that you commited something that fixed that. Do you remember that commit:
Quote:
25 March 2018
- Fix privacy guard issue
Regards!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    http%3A%2F%2Fi.picasion.com%2Fpic89%2F7652ffeccaa6bbdcda57289d991b093d.gif
    DISCLAIMER:
    We are not responsible for any damage, bootloop, bricked or broken devices and Relationships.
    Need an unlocked tank with amonet patched recovery
    https://forum.xda-developers.com/fire-tv/development/unlock-fire-tv-stick-2nd-gen-tank-t3907002
    This is an LineageOS 12.1 build for Amazon TV Stick (aka TANK).

    DON'T UPDATE MAGISK WITH THE APP. THIS WILL BRICK THE DEVICE AND YOU WILL NEED TO UNLOCK IT AGAIN!

    Issues:
    • Netflix won't play 5.1 audio videos on some TVs.
    • Can't pair bluetooth speakers.
    • On latest versions of Prime Video text is not show on some buttons.
    • Permissive kernel

    Installation:
    Connect device to pc with a USB cable, don't use tcp adb
    • Reboot tank to recovery
    • Adb push rom to /sdcard/
    • Wipe dalvik cache, cache, data and system if you come from stock or another rom.
      adb shell
      twrp wipe data
      twrp wipe cache
      twrp wipe dalvik
      twrp wipe system (if it gives error, try adding "/" /system)
    • Flash Rom:
      twrp install /sdcard/lineage-12.1-xxxxxxxx-UNOFFICIAL-tank.zip
    • Reboot and pair remote, if fails reboot and try again, complete setup wizard.
    • Reboot to recovery and install magisk, microG .........
    • Enjoy

    Quote:
    On first boot it will ask you for pair the TV Remote. For do that, press the home button 10 secs or more.
    If don't pair on first start reboot and pair again

    Quote:
    Since this ROM is optimized for TV Stick, this ROM uses LeanBack Launcher, LeanBack IME and TVSettings intsead of CM Launcher, AOSP Keyboard and CMSettings.

    Thanks:
    • @k4y0z for the bootloader unlock and recovery
    • @MSe1969 for the lineageos-12.1 sources
    • @ggow for the mt8127-common tree
    • LineageOS team

    Source Code:

    Download:
    Please don't mirror!

    XDA:DevDB Information
    [ROM] [unlocked] [tank] LineageOS 12.1, ROM for the Amazon Fire TV

    Contributors
    diegocr, Rortiz2
    ROM OS Version: 5.1.x Lollipop
    ROM Kernel: Linux 3.10.x
    Based On: LineageOS

    Version Information
    Status: Testing

    Created 2019-08-26
    Last Updated 2020-04-23
    14
    Changelog:

    20200927
    Update keylayouts (thanks 0815hoffi)
    Revert useFixedVolume

    20200806
    Update kernel to fos 5.2.7.3
    Add AppDrawer
    Remove CMFileManager
    Update keylayouts
    Add Android TV remote wifi support (tvstock gapps may broken it)
    Use amazon tank fingerprint
    Repo sync

    20200514
    Update kernel and vendor to fos 5.2.7.2
    Add microG support
    Repo sync

    20200422 REMOVED
    Updated Security Patches to April 2020
    Synced with the LineageOS Source Code
    Added missing keylayouts
    Removed browser shortcut in LeanBack

    2020221
    Add some keylayouts

    20191225
    Disable volume buttons

    20191220
    Use libMtkOmx libs from austin

    20191215
    Update kernel and vendor to 5.2.7.2
    Enable adb on boot
    Build btremoted

    20191211
    Update LeanbackLauncher and LeanbackIme
    Disable adb on boot (now need to enable on developer settings)
    Overlay, Update remote pairing instructions
    TvSettings, patch to autopair on fistboot settings

    20191210
    Remove dolby sound service (not working)
    system.prop: Enable USB OTG (Thanks Petoriano)
    LOS updates

    20191029
    Enable ozwpan kernel module

    20191014
    Build kernel from source
    Use Sharp an_np40 fingerprint

    20190911
    Fixed secure video playback. Thanks @julianwi

    20190901
    Rebuild device tree
    Add some blobs

    20190828
    Fix privacy guard issue, thanks @ggow
    Add Overscan app
    Disable Trebuchet
    Hide notification bar (set only on on firstboot)

    20190827
    Set screen timeout to 15 min on firstboot
    Change setup pairing bluetooth device screen text (english only)
    Small notification bar (1px)
    Don't build TeleService
    9
    How to get DRM Playback working

    I analyzed the binaries in the stock rom and found the missing patch to get secure video playback working. libstagefright needs to set an special gralloc usage flag. For the devs, here is the source patch for frameworks/av:
    Code:
    diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
    index cdeb161f7..130dc18c4 100644
    --- a/media/libstagefright/ACodec.cpp
    +++ b/media/libstagefright/ACodec.cpp
    @@ -784,6 +784,12 @@ status_t ACodec::configureOutputBuffersFromNativeWindow(
             usage |= GRALLOC_USAGE_PROTECTED;
         }
     
    +#define GRALLOC_USAGE_SECURE 0x01000000;
    +    if (mFlags & kFlagIsSecure) {
    +        usage |= GRALLOC_USAGE_SECURE;
    +        ALOGW("ACODEC: use GRALLOC_USAGE_SECURE\n");
    +    }
    +
         // Make sure to check whether either Stagefright or the video decoder
         // requested protected buffers.
         if (usage & GRALLOC_USAGE_PROTECTED) {
    I will attache a patched libstagefright version to the post. Copy it over /system/lib/libstagefright.so and it should work. I tested it with the official prime video app.
    7
    New Build is UP

    DATED 14-05-2020
    • DRM Fixed!
    • Added MicroG support (tested and works).
    • Updated kernel and vendor to latest fire os.
    Download link in OP.
    Enjoy:)
    7
    So I looked at it a little more. This OS is a nuisance! Apps I install do not show up on the launcher and no matter what I do, no Google anything! I have LineageOS on both of my Fire Tablets and it is nothing like this.

    I'm going to do some more tinkering and see what I can find.

    Please fix this as I'm probably going to go back to the old FireOS for the Fire Stick 2. I can try to flash GApps to that and somehow get it to work.

    Sorry? I think it goes without saying that. If someone read the first post there would be no such doubts. THIS ROM IS ADAPTED FOR ANDROID TV AND IS A BETA.
    If you don't like it, don't install it.
    It is very angry that we have worked hard on this ROM so that you come now and insult it. This doesn't make sense