yashsingh1/xdaforums huggingface dataset:
[ZenFone 2 Q&A, Help & Troubleshooting] TheAndroidDeveloper:
I have twrp recovery so can I adb sideload from there . And in adb sideload should I only flash the firmware file or other files such as ( recovery .IMG , droidboot.IMG) . please let me know . If you could please provide me link your help would be much appreciated. I want to fix my display as soon as possible . Sorry for disturbing you but I need help.
[ZenFone 2 Q&A, Help & Troubleshooting] vickysame:
download adb latest version from here

http://xdaforums.com/showthread.php?p=48915118#post48915118

then flash ur firmware file using it. m sure if u have intalled twrp, u knw how to flash by adb.

click on thanks meter under my name will help.
[ZenFone 2 Q&A, Help & Troubleshooting] TheAndroidDeveloper:
So finally only firmware file is needed to be flashed using adb. Will I get the stock recovery back? Or the recovery img should be flashed separately?

I have not bricked my device but can I follow this link to go back to stock os :-

http://http://www.android.gs/how-to-unbrick-asus-zenfone-2-and-go-back-to-stock-android-os/
[ZenFone 2 Q&A, Help & Troubleshooting] ImjuzCY:
You should flash stock recovery first before you sideload the stock rom. For example, if you're now on 165, you have to flash recovery of 165. After that you have the recovery version same as the system version, you can either flash 165 rom or later. If you choose to update by flashing 168 then the stock recovery will be updated to 168 too.
[ZenFone 2 Q&A, Help & Troubleshooting] shubhamsinghcool4:
LOCKED bootloader have black booting screen with asus logo while UNLOCKED bootloader have white screen.
[ZenFone 2 Q&A, Help & Troubleshooting] t0per666:
need help too im on stock rom now and updated to latest .174 using stock recovery also but my bootloader is still unlocked (white splash black text) need togo to service center cos i have problem in my screen(white vertical lines half of my screen) cant go to service center cos i still have unlocked bootloader help pls thanks
[ZenFone 2 Q&A, Help & Troubleshooting] darkmage1991:
http://www.asus-zenfone.com/2015/12/how-to-re-lock-bootloader-asus-zenfone-2.html

thats the closest thing to relocking we can do right now. its not truly relocked but as long as you didnt use the official asus unlocker they will not know.
[ZenFone 2 Q&A, Help & Troubleshooting] Leftrand:
Wait for OP uploading the file,he said can relock bootloader no fancy step required HERE
[ZenFone 2 Q&A, Help & Troubleshooting] t0per666:
i hope so willing to wait
[ZenFone 2 Q&A, Help & Troubleshooting] davepmer:
Dont hold your breath, if you look back near the start of this thread near page 3 or 4 , we tried this method to relock the boot loader and it failed then. Also, I had disassembled the official bootloader unlock app. The app reports the phones serial number back to asus. So for those that used the official app to unlock, asus knows your device is / was unlocked and it wont matter if we could relock it. Asus has already flagged you serial number as void.

On the bright side, for those that used the unofficial way to unlock. The only real test to see if the bootloader is locked or not is to try to flash a non asus recovery / system to the device. If try and it fails the device is locked and valid for warranty. If you try that and it flashes, you could easily destroy the device and now you have to fix / replace it because you damaged it.

I believe this is why ASUS was so quick to release an official unlock method. They wanted a record of what had been unlocked and they would not get it the way that had been found to unlock the bootloader.
[ZenFone 2 Q&A, Help & Troubleshooting] burakzeytinci:
that's a baaad news for me. i used official bootlader and now i figure out my sim problem is all about factory problem(i mean not because of me or sim card). I'll take my chance and try to relock it and give my phone to guarantee services but i dont think they fix it for free.
[ZenFone 2 Q&A, Help & Troubleshooting] darkmage1991:
yea your s.o.l the factory unlock warned you that your warranty was void before starting. unless your in a country that has laws stating hardware failure must still be covered.
[ZenFone 2 Q&A, Help & Troubleshooting] wolfiecaster:
back to original?

so you mean, we have to go back to original fw, and if succsess the warranty will be valid again? fast reply pleasee:crying:
[ZenFone 2 Q&A, Help & Troubleshooting] davepmer:
There is a way, but not a very safe way to relock the bootloader. I have done it twice now. The first was a complete accident. The danger is that through most of the procedure the Zenfone 2 will have no display. Just a black screen. The Zenfone 2 does obey adb commands and fastboot commands and once you reinstall the complete original image display comes back up. With a locked bootloader.
[ZenFone 2 Q&A, Help & Troubleshooting] Val3r10:
Could you please say more about this accident ? The exact step sequence

It also happened to my ZE551ML (LP firmware), but can't manage to replay such accident to relock the bootloader

Many thanks
[ZenFone 2 Q&A, Help & Troubleshooting] davepmer:
OK, here is how I accidentally relocked a zenfone 2. Make sure you have adb enabled and your computer has adb permissions. Make a twrp backup select all partitions to backup. Then restore the backup and restore all partitions. Reboot. You will now have no display at all, not even in bootloader. I could communicate with the phone in adb, send the command adb reboot bootloader. Now use Asus flash tool and flash the phone with a factory image. I erased the memory while I did. Phone then will reboot and has display back. Also has a locked bootloader.

Every time I did this I was unable to flash twrp into the phone, but I could run the bootloader unlock procedure and when the bootloader was unlocked I could flash twrp again.

As I said, this is not for the faint of heart as most of the procedure you are working blind on a phone that appears completely dead yet is working
[ZenFone 2 Q&A, Help & Troubleshooting] reggiexp:
i know old thread but cant i get back to stock? im on grove rom. i was trying to see if a custom ram fixed the **** touchscreen. its a refurbished amazon buy 57€ but the touchscreen is just ****. and i dont know if buyinga 17€ new touchscreen+lcd is worth it like, i might try at amazon but the problem is amazon they mainly dont send a new one. just give your money back and its a good phone i dont really want to send it back. its usuable sometimes :( (not my main phone but still)
[Amazon Fire Phone] ggow:
[COLOR="gray"]
/*
* I am not responsible for bricked devices, dead SD cards, thermonuclear war,
* or you getting fired because the alarm app failed.
* Please do some research if you have any concerns about features included
* in the products you find here before flashing it!
* YOU are choosing to make these modifications.
*/
[/COLOR]

Introduction

- Safestrap provides TWRP like recovery capabilities for locked devices.

- This is based on the original work of Hashcode.

Prerequisites for Installation

- You must be on stock firmware:

update-fire-phone-33.4.6.1_user_461013320.bin OR ...461013820.bin <- Please confirm this before proceeding <-

- You must have root access

Known Issues

- Secondary slots do not work at all. Any attempt to flash a secondary slot will result in you having to re-sideload stock 4.6.1

Compatible ROMS

- CM-11 coming soon

Installation

- If not already rooted, use Kingroot from here to obtain root access.

- Install the app

- Grant root access if needed

- Read user agreement and accept to proceed

- Then click install recovery

- When recovery is installed click reboot to recovery

- You should eventually end up in safestrap recovery.

Download

*** Please do NOT create any mirrors ***

- Safestrap for Amazon Fire Phone (Kodiak)

XDA:DevDB Information

Safestrap KK, Device Specific App for the Amazon Fire Phone

Contributors

ggow

Version Information

Status: Beta

Current Beta Version: 4.0.1

Created 2015-07-04

Last Updated 2016-08-17
[Amazon Fire Phone] ggow:
Reserved

---
[Amazon Fire Phone] ggow:
- Link is now up :)
[Amazon Fire Phone] ggow:
CM-11 progress so far

- Attached is a couple of photos of CM-11 running on Fire phone

Things that are not yet working:

(1) Audio through the speakers

- Music and system sounds through the headphones seems to be working

- This phone uses a TFA9887 audio amplifier chip. Need to figure out a way to enable it. The stock kernel sources don't seem to make any references to it so... must be controlled in userspace.

- In the amazon stock ROM it looks be controlled by two shared libs: libaudio-ExternalSpeakerAmps.so and libaudio-NxpTfa9887.so which are loaded by audio.primary.msm8974.so

- When trying to use the stock audio.primary.msm8974.so I see this in the logs:

[INDENT]D/audio_hw_primary( 496): select_devices: out_snd_device(2: speaker) in_snd_device(0: )
D/hardware_info( 496): hw_info_append_hw_type : device_name = speaker
D/ACDB-LOADER( 496): ACDB -> send_audio_cal, acdb_id = 53, path = 0
E/ExternalSpeakerAmpControl( 496): Failed to open the speaker amp control (0) at address = 0x34. Error = 108
E/ExternalSpeakerAmpControl( 496): Failed to open the speaker amp control (1) at address = 0x35. Error = 108
D/audio_speaker_platform( 496): Loading speaker use case "music"[/INDENT]
[Amazon Fire Phone] simplesimonuk:
oooooo :) going to be keeping a very close eye on this thread now. ;)
[Amazon Fire Phone] ggow:
Update

Progress for today.

- WiFi is working

- Sensors are working

- Baseband seems to be detected correctly - put my sim card in and got a SIM network unlock screen - screenshot attached. I got the phone for nearly next to nothing. But looks like I need it unlocked to use my SIM.

- Bluetooth is working - paired with a keyboard and works good.

- Gapps working

- Front and rear camera not working yet

- Sound, need to figure this out - this is a show stopper at the moment. No Ringing of phone etc

On the amplifier issue did a little digging and other devices like the HTC M7 tend to have a kernel driver which implements an IOCTL interface to userspace but this doesn't seem to the case in the Fire Phone's stock kernel in which I couldn't find any reference to the TFA9887.

I'll have to research a bit more.

I'll do an early preview release at a good point.
[Amazon Fire Phone] laidbackcloud:
Thanks for your hard work.
[Amazon Fire Phone] CadBuRy.VN:
wonderful ! I just bought fire phone
[Amazon Fire Phone] jijixixini:
Thanks for your. Hard.working,I just get my fire phone
[Amazon Fire Phone] v6ser:
Great work! Congrats!
[Amazon Fire Phone] tintin1892:
Great work will this also work on the US 4.6.1 software version 461013820.bin. thanks
[Amazon Fire Phone] ggow:
Should work. If it doesn't, you should be able to boot into the amazon recovery and sideload your stock firmware.

Let me know your results. Once you confirm its working I'll update the OP.
[Amazon Fire Phone] Eiermann78:
Thank you very much, i already installed it and it works fine with the us version 35.4.6.1...461013820, too.
[Amazon Fire Phone] v6ser:
[MENTION=5749760]ggow[/MENTION]

Just making an observation, the external speakers do not depend individually on the stock audio libs (libaudio-ExternalSpeakerAmps.so ; libaudio-NxpTfa9887.so etc..) but might also depend on Dolby frameworks that the stock rom calls.

I want to test it out but i'm having problems with hyper-v atm.
[Amazon Fire Phone] ggow:
Thanks.

I had a brief look at the chain of dependencies. This is all I could find. However I will take a look tomorrow. And let you know what I find :)
[Amazon Fire Phone] ggow:
CM-11 Progress update

- Front and rear cameras are now working.

- Google camera and OpenCamera are perfectly fine

- Stock camera app is displaying the preview image upside down.

- Google camera seems to give significantly better photo quality than the stock camera app.

- I will probably remove stock camera app from the build.
[Amazon Fire Phone] ggow:
Good News

- I have audio on the the speakers... Exactly as I thought- the Tfa9887 is controlled only from the two shared libs I previously mentioned. The fix was to set the correct permissions on /dev/i2c-8 and set a property which indicates audio has been initialized correctly.

- I have a few things to tidy up - like a couple of force closes etc

- Need to do a bit of testing, test video, a couple games etc

- After all of that it should be ready to go.

- I won't have tested make calls, sms and mobile data - so the first release will be a BETA.

EDIT: I should start a [DEV] thread for this so I don't clog up this thread anymore.
[Amazon Fire Phone] Deleted member 6313649:
great work as i have a fire phone been hoping something would come out. i have installed safetrap which is working going to install the stock firmware through safestrap. also my fire phone is unlocked to all networks and maybes be able to test it just a thought.
[Amazon Fire Phone] m4nik10:
fantastic work

can cm11 be downloaded yet as most my android apps wont work with fire os
[Amazon Fire Phone] ggow:
- I will be doing a release today :)

- Netflix and youtube are not working ATM it seems but I can fix that up later.

- Keen to now get it out there to find out if telephony, sms etc is working.
[Amazon Fire Phone] :
ok great well looking forward for the release and again :good: job.
[Amazon Fire Phone] Viperise152:
Do you know if the kernel has OTG or maybe slimport stuff activated?
[Amazon Fire Phone] ggow:
As far as know, Fire Phone does not have Slimport or MHL.

OTG capability is not enabled.
[Amazon Fire Phone] m4nik10:
how do i root 461013320.

thanks
[Amazon Fire Phone] ggow:
-Use the latest kingroot. I used the one from here

- I'll add an instruction to the OP.
[Amazon Fire Phone] sergio687:
[MENTION=5749760]ggow[/MENTION] it's working great so far. Just sometimes the Play Store doesn't download, but I guess it's just Android being silly. I'll be testing it tomorrow to see how it goes. Great work. :D
[Amazon Fire Phone] itsezbb:
How do I download and install your version of cm11? I'm dying for Cyanogenmod on my Fire Phone! Thanks ggow for your hard work!
[Amazon Fire Phone] ggow:
1. Install Safestrap - Follow the instructions in the OP of this thread. Be sure you're on the correct stock firmware version - which is key to getting Safestrap working.

2. Then install the ROM - very similiar to using TWRP.

If you need specific help start a thread in the Q&A.
[Amazon Fire Phone] itsezbb:
Thank you! Actually I found your other thread with everything I needed on it so I'm now up and running. So far, from using your build of Cyanogenmod, everything is working well, except for Youtube, but that doesn't matter. Thank you very much for your efforts in Android development for the Fire Phone!!
[Amazon Fire Phone] KLit75:
Sorry if this has been asked but I didn't see it. I'm getting one unlocked this weekend from amazon. I was informed it'd probably arrive with 4.6.1 Rooting seems straightforward but does this firmware need to be downgraded to run safestrap then install CM11?

I'm sure it'd make more sense if I had the phone in front of me but trying to prep...In another thread I was told to root, safestrap then install CM11 and he was basing that off the assumption Id be on 4.6.1. Just want to verify that is the correct firmware. I know I can root with it but can I just move on to safestrap from there? Don't see a downgrade guide for higher fw versions so I assume that's not possible yet. Thanks

**edit--you were asked a similar question in post #11 and you weren't sure. I don't think the user followed up on whether it worked.
[Amazon Fire Phone] :
No need to downgrade at any time, just forget about it.

4.6.1 is the correct version. If your phone doesn't arrive with 4.6.1, just update it to that version, root and safestrap.

Yes, both the UK and US version of 4.6.1 are confirmed, I had the US version on my device.

When you are on FireOS 4.6.1:

Don't connect to WiFi right away: try to disable "System Updates" (SystemUpdatesDuke.apk), tap on "manage applications" in the settings menu, then change the filter to "all", look for the mentioned app and disable it.

Should be enough, in the past some people disabled Amazon Device Client Platform (DeviceSoftwareOTA.apk) as well, but from my experience "system updates" was enough to keep the OS from checking and downloading updates in the background.

Updates means stuff like: new lock screen scenes, clock, calculator, browser, maps, firefly, notes, Amazon App Store, etc...

No major updates will follow, since you are already on 4.6.1 at this point.

It's simply a method to keep annoying and obsolete updates away from your device while you try to safestrap. Why download ~ 300 MByte when it's all gone a few minutes later. ;)
[Amazon Fire Phone] KLit75:
Great info! Thanks a lot!
[Amazon Fire Phone] underdog_656:
when i tried to restore my system it says failed then i restarted and it is stuck on the amazon logo
[Amazon Fire Phone] ggow:
Did you do factory reset within safestrap after restoring the system partition?
[Amazon Fire Phone] underdog_656:
i dont think so.

at first i installed the cm11 then i wanted to go back to fire os (i used this http://xdaforums.com/fire-phone/development/safestrap-v4-flashable-stock-image-t3150531) then i went back to safestrap menu and i wanted to try to restore the system backup which i backedup before i did everything. Then i rebooted and it is stuck on amazon logo. sry bad english.
[Amazon Fire Phone] ggow:
Try this...

- Follow the instructions in the thread you quoted to get up and running

- reboot into safestrap

- then just restore the data partition

- see if that boots
[Amazon Fire Phone] underdog_656:
well that the problem is that i cant even get to the safetrap it just shows amazon logo.
[Amazon Fire Phone] ggow:
Ah well try to get onto the amazon stock recovery then sideload stock 4.6.1 firmware bin
[Amazon Fire Phone] underdog_656:
i dont understand could you explain in detail
[Amazon Fire Phone] ggow:
Look at the opening post of this thread for an example of how to get into amazon recovery and how to sideload a stock firmware. Use 4.6.1 instead of 3.5.1.

If you still don't know what to do, install team viewer on your PC and I'll try to help you when I'm about. I'm out tonight and most of tomorrow.
[Amazon Fire Phone] underdog_656:
thank you i will have a read
[Amazon Fire Phone] ggow:
Forgot the link

http://xdaforums.com/fire-phone/development/guide-amazon-fire-phone-rooted-3-5-1-t2897707
[Amazon Fire Phone] Sadim007:
Biggest Fire Phone Blunder

I had the same issue where the phone boots into the Amazon logo after that comes a black screen. I guess the only way out of this is if your PC can recognize your phone if so, you are in luck just hold down power button and lower volume key to boot into default recovery then select adb sideload to flash the stock rom if you have it on your PC. If the PC can't recognize it you're kinda stuck (that's where i'm at) I am not a developer/programmer or anything like that but I feel the best way to solve this is to create some sideloadable micro usb bootable drive with stock firmware to give the impression of an SD card but since the fire phone does not recognize MHL or any of that nature it would be difficult to bring it back to life.
[Amazon Fire Phone] ggow:
Try these drivers, when I used windows back in the day these worked brilliantly.
[Amazon Fire Phone] Sadim007:
Sorry can't seem to find a reference to the drivers.... Thanks
[Amazon Fire Phone] ggow:
Here you go, sorry about that...

http://xdaforums.com/showthread.php?t=2588979
[Amazon Fire Phone] Sadim007:
its alright :) ... I used it before too didn't work, maybe because I am on windows 8.1 what happens is, the device shows up but its not recognized as anything just some number with a sign. Thanks anyways :good:
[Amazon Fire Phone] mrapitis:
deleted post, wrong thread
[Amazon Fire Phone] KLit75:
Were we able to pin down the cause of this? Was it because a factory reset wasn't performed after flashing stock?

Because I needed to flash my backup last night and just did a factory reset prior not after restoring. Is there no button combo that can be used to get to recovery?

Or worst case scenario, could a fastboot cable be utilized here?
[Amazon Fire Phone] ggow:
- With the phone powered off

- Hold Volume Up key

- Then Press the power button to turn the phone on still holding the volume up button
[Amazon Fire Phone] Sadim007:
Actually a factory reset was done. A cache wipe was done also. From my observation I feel the OS broke because a system file may have been tampered with of which naturally the factory reset ought to address however a factory reset may mean the device revoking its debugging privileges thus causing the PC not to recognize the device for adb sideloading to take place. It does boot into recovery and it still wipes cache, still factory resets just doesn't come on. That's why I was thinking perhaps if the device can be fooled to believe a bootable usb is part of its memory, a custom recovery could intercept the booting process therefore flashing a new ROM on board. But that's just me wishing on a star :)
[Amazon Fire Phone] KLit75:
Hope there's a fix for you soon. So youre thinking a tampered system file is the cause...that makes more sense. On HTC there's a button combo that brings up bootloader screen which might give more options to resolve this but I've had this phone less than 24 hours and have no clue. I did notice while waiting for my update from amazon that you can manually update this phone from the website. If it works like HTC ruu I THINK all that's required is your boot loader is locked then the ruu just does everything with a few prompts but like I said I'm just learning as I go.

Edit--the manual update method is nothing like RUU.
[Amazon Fire Phone] ggow:
Some points to consider:

- The OS (/system partition) does not impact the ability to sideload a stock rom.

- The functionality for sideloading is completely self contained in the /recovery partition.

- Windows can be very problematic to get this working.

- You might want to download an ubuntu iso, boot it live, install adb and give it a try from there.

- From the recovery screen did you select 'apply update from ADB' ?

- If you select that option then you should see a message in yellow text at the bottom of the screen indicating the device is ready to receive the stock sideload.
[Amazon Fire Phone] Sadim007:
I am with you brother. Try holding down the power button with both volume buttons simultaneously... Learning too. I think [MENTION=5749760]ggow[/MENTION] is doing a great job with the device porting Cyanogen I mean, I see a better Fire Phone with Cynogen with Gapps and Amazon Offerings or even Sailfish OS for that matter since it runs android apps. (Fire Phone running Sailfish anyone....) Its a solid device but Fire OS for phones is not there yet.
[Amazon Fire Phone] KLit75:
Couldn't agree more. I am really liking this device so far and ggow is almost entirely to thank for that! But just to clarify I'm not having issues. I was just spitting possible things to try in hopes it might help out another user with his problem (unable to boot.)

So far my biggest issue is something I've never struggled with before--getting my mac to recognize this device and simply transfer files via usb using MTP protocol. It'll open android file transfer on mac then force close. Mac just got an update a week ago so I'm not sure if it's my computer to blame (probably).

But even that is no biggie. I can get the files there over the network. It'll just take longer (music, about 11 gb)
[Amazon Fire Phone] Sadim007:
Wish I can help with the Mac thingy used to have a mac hoping to get one soon. I wish there was a section for that on Swappa Anyways thanks for sharing your thoughts on how to help people out there. Here's one that may help, its less technical and almost hassle free I do know that if you are still within your warranty Amazon just might replace your phone and add a year of prime (happened to me :)). #primeday here
[Amazon Fire Phone] KLit75:
All resolved. It wasn't a problem with cm11 or my Mac, just a faulty USB cable.
[Amazon Fire Phone] Sadim007:
Cool... Wish mine was as easy