• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[RECOVERY][UNOFFICIAL] TWRP HH for Nexus 5 (hammerhead) [DISCONTINUED]

Search This thread

accidental_zenith

New member
Apr 18, 2021
1
1
Thank you for making the hammerhead port and this recovery available, z3DD3r.

Unfortunately, I haven't been able to get OTA working. I originally installed LOS18.1 at the end of January using whatever HH.R was available then (.8 I think?); I have upgraded it to HH.R.9, HH.R.10 and just now to HH.R.13... but even with all those steps, the OTA update process still failed with the annoying error regarding @/cache/recovery/block.map.

Manual LOS updates work fine but I'd love to figure out how to fix this permanently.
 
  • Like
Reactions: jollfye

embhorn

Senior Member
Apr 28, 2012
93
9
After running the tool it still does not seem to have modified the partition sizes:

EDIT:
I was executing from adb shell, not following the instructions and running from TWRP terminal.

Thanks for the awesome tool!
 

sup-s

Member
Nov 30, 2016
5
0
Hi need some help please,

i followed the instruction fully, after reverting back to the normal Twrp, went t0 wipe >> Advanced >> selected system then hit resize partition. i wanted to confirm what the new sizes were but strangely system partion is showing 0MB. I did a reboot think that might help but it didn't.
when trying to repair the system partion i get the following error:
/sbin/e2fsck -fp process ended with ERROR: 16 unable to repair system

when i try to format the partition, i get the following error:
mkexfatfs process ended with error: 1 Unable to wipe System
Error changing file system

I've tried to load up TWRP HH.R version but it simply hangs on the teamwin splash screen

Is my phone screwed?
 
Last edited:

z3DD3r

Senior Member
Feb 9, 2016
250
1,381
Minsk
Google Nexus 5
OnePlus 9R
Hi need some help please,

i followed the instruction fully, after reverting back to the normal Twrp, went t0 wipe >> Advanced >> selected system then hit resize partition. i wanted to confirm what the new sizes were but strangely system partion is showing 0MB. I did a reboot think that might help but it didn't.
when trying to repair the system partion i get the following error:
/sbin/e2fsck -fp process ended with ERROR: 16 unable to repair system

when i try to format the partition, i get the following error:
mkexfatfs process ended with error: 1 Unable to wipe System
Error changing file system

I've tried to load up TWRP HH.R version but it simply hangs on the teamwin splash screen

Is my phone screwed?
I don't know which instruction u used, because in TWRP HH instructions there are no lines about normal TWRP and resizing via TWRP menu. Anyway your layout is broken and /system partition is missed. TWRP HH hangs because it tries to mount /system at launch and prepare required files for encryption. U can restore your partitions layout with parted tool which is already included in TWRP HH but u should work via abd shell (adb works even if TWRP HH hangs on the splash screen). There is an instruction somewhere on the forum about how to modify/restore partitions via parted tool.
 

sup-s

Member
Nov 30, 2016
5
0
I don't know which instruction u used, because in TWRP HH instructions there are no lines about normal TWRP and resizing via TWRP menu. Anyway your layout is broken and /system partition is missed. TWRP HH hangs because it tries to mount /system at launch and prepare required files for encryption. U can restore your partitions layout with parted tool which is already included in TWRP HH but u should work via abd shell (adb works even if TWRP HH hangs on the splash screen). There is an instruction somewhere on the forum about how to modify/restore partitions via parted tool.
Thanks for your response,

I've just checked, issuing the 'ADB devices' command whilst on the TWRP splash screen comes back with 'list of devices' and then blank. it seems as though the phone is not detected when running HH, but when running the vanilla TWRP i can see that the device is detected.
is there a way to get parted running when the vanilla TWRP is running?
 

z3DD3r

Senior Member
Feb 9, 2016
250
1,381
Minsk
Google Nexus 5
OnePlus 9R
Thanks for your response,

I've just checked, issuing the 'ADB devices' command whilst on the TWRP splash screen comes back with 'list of devices' and then blank. it seems as though the phone is not detected when running HH, but when running the vanilla TWRP i can see that the device is detected.
is there a way to get parted running when the vanilla TWRP is running?
You can download it here:

Then push it to sbin viad adb (example below):
adb push parted /sbin/

Then launch adb shell:
adb shell

Then change permissions for parted:
chmod 0777 /sbin/parted

Then you can use parted in shell while you are in recovery and work with your partitions. But be very careful. With parted you can remove/broke partitions which can’t be restored. I’m not responsible for your actions! Do it on your own risk!
 

sup-s

Member
Nov 30, 2016
5
0
You can download it here:

Then push it to sbin viad adb (example below):
adb push parted /sbin/

Then launch adb shell:
adb shell

Then change permissions for parted:
chmod 0777 /sbin/parted

Then you can use parted in shell while you are in recovery and work with your partitions. But be very careful. With parted you can remove/broke partitions which can’t be restored. I’m not responsible for your actions! Do it on your own risk!
This is awesome, z3dd3r,
I don't suppose you have a link for instructions on how to restore the partitions do you?😬

Thank you again.
 
Apr 5, 2018
8
0
Thanks for this great tool!

Just to share my experience if it can help someone- I successfully re-partitioned the phone with this twrp, but after rebooting I couldn't boot back into this twrp even after reflashing. Therefore I flashed the regular twrp for Nexus 5, that one worked well and I could proceed.
Although before I never had problem with sideloading in twrp, this time it gave me the error (adb: error: connect failed: closed). To solve it I exited sideloading and push the OS without running the sideload in twrp and to my surprise the lineage zip was pushed to the phone...
 

sup-s

Member
Nov 30, 2016
5
0
You can download it here:

Then push it to sbin viad adb (example below):
adb push parted /sbin/

Then launch adb shell:
adb shell

Then change permissions for parted:
chmod 0777 /sbin/parted

Then you can use parted in shell while you are in recovery and work with your partitions. But be very careful. With parted you can remove/broke partitions which can’t be restored. I’m not responsible for your actions! Do it on your own risk!
Thank you so much for this - I actually managed to revive the phone. I has both latest version on linage, and gapps.

this what I did.

1) Loaded up TWRP (non HH version).
2) sided loaded parted using the instructions provided z3DD3r (above).
3) made sure my file system matched the initial format detailed by surfrock66 in this post https://forum.xda-developers.com/t/...-partition-space-for-rom-stock-gapps.3509880/
I had a number of partisions missing, so I had to recreate the - i had to do some calculation to make sure the partions matched.
4) I continued to follow surfrock66 instruction to increase the system partition.

All bit scary but it worked a treat.
 

imlk__

New member
Mar 11, 2018
4
0
Just a notice for someone like me:

DO NOT RUN hh_repart IN adb shell !!!!
It will fail, keeping the partition is not changed. I guess is that it is a problem with $PATH.
You should only run it in twrp terminal!!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Just a notice for someone like me:

    DO NOT RUN hh_repart IN adb shell !!!!
    It will fail, keeping the partition is not changed. I guess is that it is a problem with $PATH.
    You should only run it in twrp terminal!!!
    That's exactly what instruction in the second post says :)
  • 34
    TWRP HH for Nexus 5

    About:
    TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our IRC channel or on forums like xda-developers.

    Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.

    A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM

    Disclaimer:
    Code:
    #include <std_disclaimer.h>
    
    /*
    * Your warranty is now void.
    *
    * We are 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 this RECOVERY
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you.
    *
    */

    You can find the source code for TWRP on GitHub. If you would like to contribute to TWRP, please visit Gerrit Code Review.

    Features:
    HH.S version with stock partitions map. S means stock.
    HH.R version with repartition support. R means repartition.
    Working decryption on custom roms. Tested on LOS 16.0 and LOS 17.1 but should work on all Androids since Nougat.
    exFAT and NTFS support (read and write) for USB OTG

    Requirements:
    You need to have an unlocked bootloader to install and use TWRP!

    Known bugs:
    Everything looks good so far

    Downloads:
    https://sourceforge.net/projects/hammerhead-twrp/files/beta/

    Credits:
    TeamWin
    @Clamor
    @steadfasterX
    And all the contributors out there in the community

    Contributors:
    @z3DD3r

    Source Code:
    Device tree: https://github.com/z3DD3r/twrp_android_device_lge_hammerhead

    Version Information:
    Satus:
    Stable
    TWRP version: 3.5.2
    HH Project versions: HH.S.14 and HH.R.14

    Created 2020-02-08
    Last Updated 2021-09-13
    24
    Repartition (HH.R versions)

    ALWAYS DO THE BACKUPS!!!
    No one is responsible for your actions!
    Repartition may potentially brick your device, although risk is reduced to minimum.

    Features:
    Increases /system partition to ~1444Mb
    Decreases /cache partition to ~255Mb
    Doesn't provide /vendor partition
    Doesn't touch /data partition

    Requirements:
    Not modified partitions by any other solutions

    How to increase /system partition and change partitions map:
    - Flash the HH.R version of TWRP and launch it
    - Open terminal (TWRP -> Advanced -> Terminal)
    - Type hh_repart -m
    - Wait until your phone reboots
    - Install your rom

    How to revert back to stock /system size and stock partitions map:
    - Launch HH.R version of TWRP
    - Open terminal (TWRP -> Advanced -> Terminal)
    - Type hh_repart -r
    - Wait until your phone reboots
    - Flash official TWRP or HH.S version of TWRP! Don't ignore this step!

    How to dump partitions map:
    - Launch HH.R version of TWRP
    - Open terminal (TWRP -> Advanced -> Terminal)
    - Type hh_repart -d
    - Wait until process finishes
    - Look at /sdcard/partitions.log file
    16
    New versions are up (HH.S.6 and HH.R.6)

    Merged latest changes from TWRP team
    Dropped prebuilt kernel of favor of building kernel from source code

    PS: I've stopped hammerhead support. So this is the last version of TWRP HH from my side...
    12
    New versions are up (HH.S.9 and HH.R.9)

    This version is based on TWRP 3.5.0_9 and includes all latest changes from official TWRP.
    Changes from my side:
    1. Completely removed "Install TWRP App" menu items
    2. Fixed OTA installation (Tested on LOS 18.1)
    11
    New versions are up (HH.S.4 and HH.R.4)

    Fixed mounting issues of the system partition
    Fixed device overheating while in recovery

    I highly suggest everyone update to this version!