[RECOVERY][STOCK][LOCKED] Safestrap v4.0.1

Search This thread

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
Code:
[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
 

Attachments

  • IMG_20150703_175901.jpg
    IMG_20150703_175901.jpg
    257.4 KB · Views: 13,183

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
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:

Code:
[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]
 

Attachments

  • IMG_20150704_143338.jpg
    IMG_20150704_143338.jpg
    253.5 KB · Views: 4,746
  • IMG_20150704_143415.jpg
    IMG_20150704_143415.jpg
    263.4 KB · Views: 4,695
Last edited:

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
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.
 

Attachments

  • IMG_20150704_175439.jpg
    IMG_20150704_175439.jpg
    254.8 KB · Views: 2,787
  • Screenshot_2015-07-04-08-13-37.png
    Screenshot_2015-07-04-08-13-37.png
    69.2 KB · Views: 2,832
Last edited:

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
Great work will this also work on the US 4.6.1 software version 461013820.bin. thanks
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.

Sent from my Nexus 6 using Tapatalk
 
Last edited:

v6ser

Senior Member
Jan 16, 2012
175
221
Rome before, Brasilia now
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"

@ggow
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.
 

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
@ggow
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.

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 :)
 

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
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.
 
  • Like
Reactions: dhack21 and Duchman

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
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.
 
Last edited:

wjamie30

Member
Jan 8, 2015
43
8
- 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.

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.
 

m4nik10

New member
Jul 6, 2015
4
2
fantastic work
can cm11 be downloaded yet as most my android apps wont work with fire os
 

ggow

Recognized Developer
Feb 28, 2014
4,110
10,976
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.

fantastic work
can cm11 be downloaded yet as most my android apps wont work with fire os

- 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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 41
    Code:
    [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
    9
    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.
    7
    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:

    Code:
    [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]
    6
    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.
    4
    Reserved

    ---