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

[TWRP][any G4][BL LOCKED] TWRP-in-FIsH for all LOCKED G4 devices

Search This thread

steadfasterX

Recognized Developer
Nov 13, 2013
5,791
15,094
127.0.0.1
TWRP on locked devices is impossible right?
Oh no wait there are hacks up to KK which work but I couldn't find anything for LL (sorry if I missed something) and so nothing for the G4

Here is where the FIsH steps in ;)

attachment.php

FIsH: [F]luffy ncredible teadfasterX [H]ijack



FIsH is different from Safestrap or other hijacks because it should be understood as a kind of framework for any boot image you want to boot.
FIsH will not harm the Android boot chain!
It is NOT multirom
It is NOT efidroid
It is NOT Safestrap
It is NOT twrp.
.... but FIsH can boot any of the above. U got it? FIsH is the hack to boot whatever you want.

Will FIsH void your warranty? Not more or less then rooting your device.
Will FIsH unlock your bootloader? No read again.
Is there a risk with FIsH? For example could it soft-brick my device? Well.. absolutely! Safe is the death only. There are always risks especially for untested devices. I do all I can to keep this risk as low as possible and I provided a way to get out of bootloops but again you will get no guarantees here and elsewhere.

.. and it is more then just a hack for the G4 (any model) it is a hack for ALL devices of ANY vendor! wtf? yes.
Sure you have to met the pre-requirements and there has to be done some things to get it ported but those are straight forward.
Go to IRC channel #androidfish if u can't wait but I will publish a public porting guide when it is ready.

Are there plans to make more out of it for the G4? Absolutely. I'm currently working on an "efidroid in FIsH" version which will let you flash & boot (hopefully) any custom ROM u like.

ALL DETAILS ABOUT HOW FIsH WORKS HAVE BEEN RELEASED IN ANOTHER THREAD (check my signature).

So going back to topic. This is:

TWRP in FIsH for the LG G4 (any model) - Bootloader LOCKED

Do you have a bootloader unlocked device?
If the answer is YES: you don't need it

Do you have a bootloader locked device and want TWRP?
If the answer to BOTH is YES. you need it. you can't install TWRP on a locked device.. up to now. FIsH allows you to do so.

If your question is: Can this ENABLE root for my device?
NO! you actually NEED root to activate TWRP for your device with this method.

Important: Here are the pre-requirements you have to met!
If you can't get them:
Close this page and FORGET it (until the day you may met those reqs)!

Requirements!

  • root by SuperSU >=v2.76 (greater or equal v2.76) (atm this means you have to downgrade/install LL. It also means that you have to upgrade your SuperSU to this version by e.g. FlashFire if you have a lower version installed!)
  • you have to be able to disable SELinux in your booted Android (which should be the case when you have a full rooted device)

Those above are hard facts so it may never work with MM. That also means if MM can get fully rooted by SuperSU and you can use "setenforce 0" the method should work there as well!

Before you think about downgrading to LL read about ANTI-ROLLBACK protection some LG devices and MM versions may have!
Anti-Rollback means you CAN NOT downgrade - it would brick your device.
I will NOT provide downgrading guides there are plenty of them so search and read.

If you can not meet ALL of the above 2 requirements lay down and cry. For the others: calm down and read on!

You can test requirement 2 (disable SELinux) by:
adb shell
su
setenforce 0
getenforce

-> you should see "Permissive" as a result. If you see "Enforcing" or error messages you may doing something wrong or it just do not work for you.

Limitations!

Keep in mind what I said above: FIsH does NOT unlock your bootloader.
That means with TWRPinFIsH you can NOT:
  • Install a custom ROM like CM/Lineage (this will modify boot = soft brick. for this u need "efidroid in FIsH" - coming soon)
  • Install a custom Kernel (this will modify boot = soft brick)
  • Install a custom recovery (this will modify recovery = may soft brick)
  • In short: nothing which modifies boot or recovery partitions.
You can of course flash everything which is modifying /system /data only (e.g. xposed,...)
That means you could install even a custom ROM which works with the stock kernel so with unmodified boot image. Let's say the creator of imperium or genisys provide a release without the containing boot image. You could flash it..

State / Roadmap
  1. FULL takeover/hijack of boot -> DONE (the modifications required are not voiding the Android boot signing chain!)
  2. replace RAM disk -> DONE
  3. boot own RAM disk (TWRP!) -> DONE (atm TWRP 2.8.7-0) <-- TWRP-in-FIsH v1.0 private BETA
  4. Upgrade bundled TWRP to latest version -> DONE (TWRP 3.1.0-0) <-- TWRP-in-FIsH v1.0 final release

Download

READ THE REQUIREMENTS above before proceeding!
Then UNDERSTAND the requirements before proceeding! <-- omg this is crucial important!!!! Ensure that you really do not skip this step!

READ THE LIMITATIONS above before proceeding!
Then UNDERSTAND the limitations before proceeding! <-- omg this is crucial important!!!! Ensure that you really do not skip this step!

... and NEVER ask for ETA's! ;)

if you can say:
Yes! I have read and totally understood the limitations AND the requirements!
then proceed. Otherwise read again until you got it.
Keep in mind that this is a HACK. It may soft-brick your device. you have been warned!
The concept is the same for all models but again no guarantees here for anything.
There is ALWAYS a risk and you should better backup what you do not want to loose before starting downloading this.

Go to the DOWNLOADS tab in this thread.

TWRP-in-FIsH is now integrated into my TWRP build server and so whenever a new change happens in TWRP you will get the same automatically on next build. This way it is much easier to release new TWRP versions made for FIsH.
From now on you will find nightlies (untested automatic builds) here:




Installation (Linux)

You can just install any newer version over an old one.

  1. boot Android and connect USB cable
  2. download the newest version to your PC and open a terminal in that directory
  3. tar xzf TWRPinFIsH*.tgz (tar xzf TWRP-in-FIsH*.tgz since v2.0)
  4. cd openFIsH (cd android_FIsH since v2.0)
  5. ./install.sh
  6. check the output of that script. you should not see any errors there (hopefully)

Installation (Android / no PC)

Requirements:
  1. TWRP-in-FIsH v4.2 or higher!
  2. BusyBox pre-installed (e.g.: with this app )

You can just install any newer version over an old one.

Thanks to @ReeS86 starting from v4.2 on TWRP-in-FIsH has an enhanced installer which can run without any PC - directly on your Android device!

It would be nice if you could give him a thx click (here) for his contribution :) !
  1. Bring TWRP-in-FIsH to your Android device
    Example-1 with any PC (windows, linux, ...): adb push TWRP-in-FIsH.tgz /sdcard (replace TWRP-in-FIsH.tgz this with the real file name)
    Example-2 within an Android Terminal:
    cd /sdcard
    wget http://full-URL-to-file
    (replace full-URL-to-file with the real direct download link)
    Example-3 with just a browser: well just download it.. ;) but remember where it gets saved!
  2. extract it
    Example from within Android Terminal:
    cd /sdcard (or the folder where you have downloaded TWRP-in-FIsH)
    tar xzf TWRP-in-FIsH.tgz (replace TWRP-in-FIsH.tgz this with the real file name)
  3. run the installer (but do it correctly)
    Example from within Android Terminal:
    su
    cd /sdcard/android_FIsH
    sh ./install.sh
    (using sh is absolutely important otherwise it will fail)
  4. done


Installation (Windows)

If none of the above methods is working for you: use FWUL


First run (no PC required)

This FIsH gets installed PERMANENTLY! That means:
You can boot up TWRP the same way as described here again without re-installing.
If you re-install your STOCK image you have to re-install TWRPinFIsH as well.

  1. reboot Android
  2. you should now see: LED goes from blue to GREEN
  3. NOW directly when u see this GREEN LED press VOLUME DOWN and do NOT release
  4. wait until the device vibrates and the LED changed to RED. Then release the Volume Down button.
  5. Wait until FIsH completed and TWRP should be shown --> This means FIsH has done it's job well!
  6. This is a good time to do a full backup isn't it ? ;) Manually mount the SYSTEM partition as it gets not auto mounted atm and do a full backup
  7. reboot from here (safely ignore the msg "no OS installed" and reboot anyways) and you should see Android booting (hopefully ... if not see bottom)

Daily Usage (no PC required)

  1. reboot Android
  2. you should now see: LED goes from blue to GREEN
  3. NOW directly when u see this GREEN LED press VOLUME DOWN and do NOT release
  4. wait until the device vibrates and the LED changed to RED. Then release the Volume Down button.
  5. Wait until FIsH completed and TWRP should be shown --> This means FIsH is doing it's job still very well :)
  6. AGAIN: keep your mind up! You HAVE to ensure that whatever you do and whatever you flash -> NEVER TOUCH BOOT/RECOVERY! If you flash a ZIP ensure first that it do not modify them! Otherwise you WILL softbrick. You have been warned (several times now)

FIsH helpers

If you just want to reboot directly from within Android check out these:



Trouble / Bootloop fix
if you encounter a bootloop (should never happen but who knows) you have 3 choices at least:
  1. Option 1a: (TWRP-Bootloop) Within TWRP open Advanced -> File Manager -> Goto: /system/su.d and click "select" button -> Delete
    Option 1b: (TWRP-Bootloop) From your PC: adb shell rm -rf /system/su.d/
    Important: Catch the fish log (see next topic)
  2. Option 2 (this works also for a bootloop without twrp): boot into download mode and use LGLaf to get a shell
    then:
    setenforce 0 <-- if that doesn't work you may have to do a FULL restore to stock
    mount -oremount,rw /system
    rm -rf /system/su.d/

    reboot. You are out of the bootloop.
    Important: Catch the fish log (see next topic)
  3. Option 3: Last resort: Reflash STOCK. sorry.. there is always a risk..

Catch the FIsH logs
  • reboot back to Android and catch the fish log (IMPORTANT!):
  • adb shell "su -c cat /cache/fish/fish.log"
  • adb shell "su -c cat /cache/fish/fish.log.old"
  • Upload it to https://paste.omnirom.org and paste the link in the IRC channel (see next topic)

Support / IRC Channel
IRC means Internet Relay Chat and you will get best support there only.
Choose how to get in:

Known issues (may never get fixed)

Due to the fact that TWRPinFIsH is a brutal hijack of the booting process several things may not work as expected.
This will normally not harm anything but you have to know about.

System IMAGE backup:
Using this new option is a bulletproof method to backup and restore in TWRP-in-FIsH because you have to keep in mind that FIsH is a giant and brutal hack and even when a usual backup & restore is proven to work fine I would recommend to use both backup methods - if you can.
HINT: This method requires an ext4 or exfat partition on your external SD card otherwise image backups will fail due to the file size.
@sdembiske reports success using the internal storage as target for the backup but if you do this keep in mind that you have to move that backup to your PC manually to ensure you have it by hand for the worst case.


ZIP / ROM flashing:
omg really you wanna hear that again? OK: DON'T TOUCH BOOT / RECOVERY. And you be safe.
When you try to install a ROM it will modify at least BOOT. That means soft-brick!
When you try to install a custom Kernel.. omg really? It will definitively SOFT-BRICK! Maybe you should read the limitations again?? :p
When you try to install a ZIP like xposed, supersu, Vipermod and others ensure that those are not modifying BOOT or RECOVERY partitions. For those mentioned it would be very unlikely but who knows.
When you find a stock based ROM which is not modifying boot you can flash it. But ensure that it does not modify anything on boot!!! You could ask the devs of imperium etc if they can provide such a zip..

SYSTEM partition (since v2.0: may be not a restriction on your device model!):
when you boot into TWRPinFIsH you may see an error message regarding the fact that /system cannot be mounted.
you can mount /system manually without a problem - BUT - it will work only if you do NOT select "mount system read-only". It has to be unchecked to work.
after you have mounted /system manually and you want to take a backup you may see "0 bytes". Just press refresh and the size will be updated. If not: Do you have mounted it correctly (see above).

FIRMWARE partition (since v2.0: may be not a restriction on your device model!):
cannot be mounted - even not manually. You have to live with it.

Double Tap to wakeup (in TWRP):
You may heave seen/heard that this works in the official / usual TWRP for the G4 for unlocked devices. Unfortunately this cannot work in TWRP-in-FIsH due to the nature of this hijack. You have to live with it.

Installing more than 1 ZIP at a time (may be not a restriction on your device model!):
It is not possible to install more than 1 ZIP at the same time. TWRP gives you the option to install multiple ZIP files but the problem is you have to re-mount /system after each ZIP flashing. This is due to a problem with mounting /system readonly and most ZIPs will exactly try to do this when they finished their work - leaving you with an unmounted /system.
This will be not the case for every ZIP combination - so it is possible that you can flash some ZIPs at the same time while others not.
atm I believe you have to live with it.



Credits (without them - no TWRP-in-FIsH!!!)
If you feel that someone / you is missing on this list lemme know!


XDA:DevDB Information
TWRP-in-FIsH_LGG4, Tool/Utility for the LG G4

Contributors
steadfasterX, Aaahh, TheMadScientist420, KeiranFTW, cray_Doze, dssmex, TeamWin, ChainFire, the_naxhoo, SimoxTav, Rees86, uio88, sdembiske, jasonlindholm, ... and all new other contributors who gave me feedback for this!
Source Code: https://github.com/Carbon-Fusion/android_FIsH


Version Information
Status: Stable
Current Stable Version: 4.2
Stable Release Date: 2017-06-21
Current Beta Version: 5.0
Beta Release Date: 2017-12-19

Created 2017-03-14
Last Updated 2017-12-19
 

Attachments

  • android_FIsH_107x230.png
    android_FIsH_107x230.png
    26.9 KB · Views: 12,982

steadfasterX

Recognized Developer
Nov 13, 2013
5,791
15,094
127.0.0.1
List of confirmed devices (as of 2017-06-04)

If you own a device missing on this list - let me know and I will add it here.

  • F500L Korean variant - locked (Thanks @Syntist)
  • H810 - locked (Thanks @shane87)
  • H812 - locked (Thanks @ReeS86)
  • H815 International - unlocked (Thanks @steadfasterX yea its mine and i have no locked device to test with ;) That's why i needed ur help. but i test with PURE stock and without touching the boot chain so its similar to locked devices.)
  • H815 EUR - locked (Thanks @uio88)
  • H815P - locked (Thanks @KnightOdin)
  • H815T - locked (Thanks @the_naxhoo)
  • H815L - locked (Thanks @foxyfoxyblah)
  • H818P - locked (Thanks @SimoxTav, @alitavas)
  • LS991 Sprint - locked (Thanks @TheMadScientist420)
  • VS986 - locked (Thanks @g_ding84)

List of confirmed flashing experiences (as of 2017-05-19)

If you tested a ZIP missing or unknown on this list - let me know and I will add/update it here. Write the exact version tested would be helpful as well.


  • Xposed - confirmed to work (tested: Xposed version 87 (SDK 21). THANKS for your report @g_ding84, @the_naxhoo, @KnightOdin, @shane87)
  • Viper4Android - confirmed to work (tested: Viper4Android 5.4 stock zip with Dolby Atmos. THANKS for your report @g_ding84 , @the_naxhoo, @SimoxTav)
  • SuperSU - confirmed to work (tested: v2.79. Thanks for reporting @g_ding84)
  • A.R.I.S.E - confirmed to work (tested: v.2.94 -> Am3d Eq, Viper4arise, Viper4Android Xhifi, Esira. Thanks for your report @alitavas
  • Android O emoji package - confirmed to work (thanks for your report @alitavas)
  • Editing system/build.prop - confirmed to work --> read carefully HOW (thanks for the howto & report @sdembiske )
  • Xtreme music 9.2 - confirmed to work (thanks for your report @jason_l367)
  • ANY OTHER ZIP - unknown ----> Please report back if you have flashed one missing here :)
 
Last edited:

steadfasterX

Recognized Developer
Nov 13, 2013
5,791
15,094
127.0.0.1
Releases

TWRP-in-FIsH v5 (5.0)
Released: 2017-12-19
Download: Go to the Downloads tab
Changelog for FIsH: previously used version <---> this version
Changelog for TWRP-in-FIsH device tree: previously used version <---> this version
Changelog for:
- TWRP v3.2.0-0
- TWRP v3.2.1-0

Summary changelog (read the above FULL changelogs for details!):
  • new TWRP version
  • all important fixes from the main TWRP releases like corrected time and EFS backup, added Bootloader backups etc.
  • Many enhancements and fixes in FIsH, e.g. enhanced and fixes issues in the installer and qseecomd (device encryption) added to the brand new exclude service option
  • Everything is better now ;)


Old releases:


TWRP-in-FIsH v4 (4.2)
Released: 2017-06-21
Download: Go to the Downloads tab
Changelog for FIsH: previously used version <---> this version
Changelog for TWRP-in-FIsH device tree: previously used version <---> this version
Changelog for TWRP: v3.1.1-0

Summary changelog (read the above FULL changelogs for details!):
  • Installer is now able to detect and run from within Android* (read the NOTES in the OP - topic "Installation (Android / no PC)"!)
  • Added the option to backup /system as an IMAGE* (read the following HINT!)
    Using this new option is a bulletproof method to backup and restore in TWRP-in-FIsH because you have to keep in mind that FIsH is a giant and brutal hack and even when a usual backup & restore is proven to work fine I would recommend to use both backup methods - if you can.
    HINT: This method requires an ext4 or exfat partition on your external SD card otherwise image backups will fail due to the file size.
    @sdembiske reports success using the internal storage as target for the backup but keep in mind that if you do this you have to move that backup to your PC manually to ensure you have it by hand for the worst case.
  • Everything is better now ;)
    (.... TWRP updated, many FIsH improvements, added an option to backup /system as image,... read ALL the above changelogs!)

TWRP-in-FIsH-v3_LGG4_LL
Released: 2017-04-16
Download: here
Changelog: on github
Summary:
  • Big speed improvements
  • adding model detection as property (ro.product.detection -> should be "success")
  • fixing unify detection
  • adding all known devices to unification
    - these both above will fix issues where your device was not detected correctly in TWRP and fails to install a ZIP which requires this!
  • Installer:
    ./install.sh --check will give you the option to check if TWRP-in-FIsH works for your or not - without changing anything on your device.

TWRP-in-FIsH-v2.0_LGG4_LL
(as far as im able to remember.. i have changed so many things inside..)
Released: 2017-03-24
Changelog: on github
Summary:
  • TWRP-in-FIsH now has a meaningful package name (TWRP-in-FIsH-v2.0-BETA1_LGG4_LL.tgz) which reflects all required information
  • The installer is checking for the SDK level now instead of the Android release version! This means ANY Lollipop version will work without modifications of the installer
  • new: completely overworked WIDE parts of FIsH
    In order to be more easy portable all variables users may need to adjust are moved to FIsH.porting
    while FIsH.me contains global variables for FIsH a user/dev normally would NOT change.
  • The log has been enriched with some more useful information
  • The stopping of android services is now more aggressive
  • Apropos aggressive: now we use fuser to kill ALL processes before trying to unmount a disk (excluding init and ourself)
  • Another porting stuff was added: we extract the FISHFOOD but WITHOUT a possibly existing file </init>. When you prepare your own ramdisk it may or may not contain a file /init but we do not want to overwrite the current running /init by just cpio yet.
    The reason is: it makes a difference in the Linux world to use cp or mv or cpio > to overwrite!
    The short version: using mv is the best choice here. So we extract first without /init (if there is one) and then extract /init ONLY but to a different directory. Afterwards we use mv to overwrite the current /init with either an extracted /init or your own init name configured by the new FOODBIN variable.
    Unfortunately this has not that positive effect I hoped but I leave it there because it is the way it should be done nevertheless.
  • Now FIsH also:
    - checks the exec bit before it tries to start it! Im still thinking of adding a reboot if not.. but this could cause bootloops.. on the other hand doing nothing will leave the device in a unusuable state.. well it should more or less never happen though but.. :p
    - save the current SELinux mode
    - trying to restore the saved SELinux mode when something goes wrong (at the end this will make no sense but it doesnt hurt)
    - umounts when a mount point is mounted ONLY
  • Besides that FIsH now comes with callmeFIsH - a caller script which gets executed at very first.
    The only task callmeFIsH has is to prepare the whole FIsH to get started out of /system and then starting FIsH from /res. After this it immediately exists to not keep open tasks on /system.
  • Also new are some parts of the installer e.g. starting adb server first and then wait for a connected device before continue the installation.
  • The installer is keeping track of an older FIsH install and removes the previous one before as well
  • The installer also now giving a hint that you may have to change to PTP mode on your G4 to get detected
  • For completeness: Same TWRP version inside so nothing changed here..
  • During these changes I have renamed the package folder from openFIsH to android_FIsH. Please keep this in mind when you extract the FIsH ;)
    So after you extract the BETA package you have to do
    "cd android_FIsH"
    instead.

TWRPinFIsH_v1.0
Released: 2017-03-18
Changelog:
  • first public release



.
 
Last edited:

TheMadScientist

Recognized Contributor
As current. To further op. When released remeber bl is still locked do not modify recovery and or boot partitions. Will throw secure boot errors done tried and found out. Was able to restore orig boot and recovery images.
On ls991.
So lets get our flash on. I wanna see some good clean flashing and no hits below the bootloader
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,791
15,094
127.0.0.1
As current. To further op. When released remeber bl is still locked do not modify recovery and or boot partitions. Will throw secure boot errors done tried and found out. Was able to restore orig boot and recovery images.
On ls991.
So lets get our flash on. I wanna see some good clean flashing and no hits below the bootloader
Well .. Correct. For me it is totally clear but this will be not for the average user maybe.. I will add it to the OP. Thx ;)

Sent from my LG-H815 using XDA Labs
 

Jkmoran

Senior Member
May 29, 2011
103
36
Pasto, Nariño
Thanks for all your effort with this development. So, i understand that we can boot into TWRP and we can backup and restore our system, right? But we can also flash roms, mods or kernels without unlock BL?

Again, thanks for your time on this project, this are really big news for our device!
 

TheMadScientist

Recognized Contributor
Thanks for all your effort with this development. So, i understand that we can boot into TWRP and we can backup and restore our system, right? But we can also flash roms, mods or kernels without unlock BL?

Again, thanks for your time on this project, this are really big news for our device!

2 posts up.

---------- Post added at 07:12 PM ---------- Previous post was at 07:10 PM ----------

Thanks for all your effort with this development. So, i understand that we can boot into TWRP and we can backup and restore our system, right? But we can also flash roms, mods or kernels without unlock BL?

Again, thanks for your time on this project, this are really big news for our device!

Yes and no. I flashed viper 4 android. But because of signed bl. Any recovery or modified boot image will not work just yet. Still a wip.
 
  • Like
Reactions: Jkmoran

TheMadScientist

Recognized Contributor
2 posts up.

---------- Post added at 07:12 PM ---------- Previous post was at 07:10 PM ----------



Yes and no. I flashed viper 4 android. But because of signed bl. Any recovery or modified boot image will not work just yet. Still a wip.
Hey i just want to say thanks for acknowledging thqt i helped you more than what happens in the sprint thread. I have a post 2400 views where i tore my g4 down 3 days after purchase to show a thermal paste mod. 2400 views and 1 thanks. Id thank u properly but unfort ive hit my 8 thanks a day limit

---------- Post added at 07:25 PM ---------- Previous post was at 07:22 PM ----------

Reserved. I hope to install this in my H815p soon...

It will come in due time. The third release was sent out in one day. Progress is moving rite along my friend.
Some of us have been waiting since day one. I have about 15 months. Or nov 15 we are all anxious for offic release. And please make sure to give the man his cr3dit where due. Took time out of his day to do a team view session to test on mine at like 5 am this mornin. Some of the greatest minds have not been able to do this. And now look. Lol all the nay sayers

---------- Post added at 07:30 PM ---------- Previous post was at 07:25 PM ----------

Reserved. I hope to install this in my H815p soon...

sorry i didnt actually answer ure ?
this should work on all g4s and possibly many other lgs and or devices
 
  • Like
Reactions: onotor

TheMadScientist

Recognized Contributor
I have only one question. Will this TWRP be able to modify boot partition as well? Isn't that the whole point of the locked bootloader? If it will be able to modify any partition, it is a big, big win for us.

Lol op and about 4 or 5 posts up. Same ? Just asked.
Either was locked bl or not this is a majpr victory for the g4. They said it couldnt be done and
 

TheMadScientist

Recognized Contributor
Hopefully You could port this also to G Flex 2?

he has stated should work on any android device running loli as long as u meet the prequisites
root and kernal set to permissive if he doesnt some one probly could adapt it from here no prob once its offic released

---------- Post added at 06:36 AM ---------- Previous post was at 06:04 AM ----------

dont know how much feed back uve been gettin but figured id chime in again
so after all night playing lol still sick as a dog cant sleep about 4 hours on 2 days feel high and drunk lol
ive do have to mount system everytime i load twrp to backup restore or flash but i flashed viper flashed xposed again just to check it out
bricked about 10 times and have restored perfectly everytime.
bricks my own fault trying and testing most def incompatible mods and fixes but so far through every brick recovery is holding strong and steady havnt installed the beta 3 yet
should i is much changed from there?
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,791
15,094
127.0.0.1
he has stated should work on any android device running loli as long as u meet the prequisites
root and kernal set to permissive if he doesnt some one probly could adapt it from here no prob once its offic released

---------- Post added at 06:36 AM ---------- Previous post was at 06:04 AM ----------

dont know how much feed back uve been gettin but figured id chime in again
so after all night playing lol still sick as a dog cant sleep about 4 hours on 2 days feel high and drunk lol
ive do have to mount system everytime i load twrp to backup restore or flash but i flashed viper flashed xposed again just to check it out
bricked about 10 times and have restored perfectly everytime.
bricks my own fault trying and testing most def incompatible mods and fixes but so far through every brick recovery is holding strong and steady havnt installed the beta 3 yet
should i is much changed from there?

Thanks for ur ongoing support here. please always go to IRC if possible:

PC (HexChat and Pidgin are only 2 of them! This list is not complete!)
Android (Yaaic, AndChat, HoloIRC, AndroIRC are only a few of them! This list is not complete!)
Web (KiwiIRC-Web,http://webchat.freenode.net/?channels=androidfish)

Whenever you have to choose a channel it is: #androidfish
When you be asked for a server network choose: freenode


.
 

steadfasterX

Recognized Developer
Nov 13, 2013
5,791
15,094
127.0.0.1
Just wanted to let you know the current device list.
If you own a device missing in this list send me a PM with subject FIsH !
Please do not write me if your device is shown here already!

List of confirmed devices (as of 2017-03-15)
  • H815 International - unlocked (Thanks @steadfasterX yea its mine and i have no locked device to test with ;) That's why i needed ur help. but i test without touching the boot chain so its similar to locked devices.)
  • LS991 Sprint - locked (Thanks @TheMadScientist420)
  • H815T - locked (Thanks @the_naxhoo)
  • H818P - locked (Thanks @SimoxTav)
  • H812 - locked (Thanks @ReeS86)
 

ergo911

Senior Member
Feb 5, 2009
210
99
Just wanted to let you know the current device list.
If you own a device missing in this list send me a PM with subject FIsH !
Please do not write me if your device is shown here already!

List of confirmed devices (as of 2017-03-15)
  • H815 International - unlocked (Thanks @steadfasterX yea its mine and i have no locked device to test with ;) That's why i needed ur help. but i test without touching the boot chain so its similar to locked devices.)
  • LS991 Sprint - locked (Thanks @TheMadScientist420)
  • H815T - locked (Thanks @the_naxhoo)
  • H818P - locked (Thanks @SimoxTav)
  • H812 - locked (Thanks @ReeS86)

Nice work :) Waiting my Flex 2 LGH955 to arrive from warranty, I hope this can be ported to "LG Damed" locked flex 2 also :)
 

herbesi01

Senior Member
Oct 9, 2011
264
41
With efidroid in FIsH, will we able to install any custom rom such as android 7.0 based roms?

Limitations!

Keep in mind what I said above: FIsH does NOT unlock your bootloader.
That means with TWRPinFIsH you can NOT:
Install a custom ROM like CM/Lineage (this will modify boot = soft brick. for this u need "efidroid in FIsH" - coming soon)
Install a custom Kernel (this will modify boot = soft brick)
Install a custom recovery (this will modify recovery = may soft brick)
In short: nothing which modifies boot or recovery partitions.
You can of course flash everything which is modifying /system /data only (e.g. xposed,...)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 72
    TWRP on locked devices is impossible right?
    Oh no wait there are hacks up to KK which work but I couldn't find anything for LL (sorry if I missed something) and so nothing for the G4

    Here is where the FIsH steps in ;)

    attachment.php

    FIsH: [F]luffy ncredible teadfasterX [H]ijack



    FIsH is different from Safestrap or other hijacks because it should be understood as a kind of framework for any boot image you want to boot.
    FIsH will not harm the Android boot chain!
    It is NOT multirom
    It is NOT efidroid
    It is NOT Safestrap
    It is NOT twrp.
    .... but FIsH can boot any of the above. U got it? FIsH is the hack to boot whatever you want.

    Will FIsH void your warranty? Not more or less then rooting your device.
    Will FIsH unlock your bootloader? No read again.
    Is there a risk with FIsH? For example could it soft-brick my device? Well.. absolutely! Safe is the death only. There are always risks especially for untested devices. I do all I can to keep this risk as low as possible and I provided a way to get out of bootloops but again you will get no guarantees here and elsewhere.

    .. and it is more then just a hack for the G4 (any model) it is a hack for ALL devices of ANY vendor! wtf? yes.
    Sure you have to met the pre-requirements and there has to be done some things to get it ported but those are straight forward.
    Go to IRC channel #androidfish if u can't wait but I will publish a public porting guide when it is ready.

    Are there plans to make more out of it for the G4? Absolutely. I'm currently working on an "efidroid in FIsH" version which will let you flash & boot (hopefully) any custom ROM u like.

    ALL DETAILS ABOUT HOW FIsH WORKS HAVE BEEN RELEASED IN ANOTHER THREAD (check my signature).

    So going back to topic. This is:

    TWRP in FIsH for the LG G4 (any model) - Bootloader LOCKED

    Do you have a bootloader unlocked device?
    If the answer is YES: you don't need it

    Do you have a bootloader locked device and want TWRP?
    If the answer to BOTH is YES. you need it. you can't install TWRP on a locked device.. up to now. FIsH allows you to do so.

    If your question is: Can this ENABLE root for my device?
    NO! you actually NEED root to activate TWRP for your device with this method.

    Important: Here are the pre-requirements you have to met!
    If you can't get them:
    Close this page and FORGET it (until the day you may met those reqs)!

    Requirements!

    • root by SuperSU >=v2.76 (greater or equal v2.76) (atm this means you have to downgrade/install LL. It also means that you have to upgrade your SuperSU to this version by e.g. FlashFire if you have a lower version installed!)
    • you have to be able to disable SELinux in your booted Android (which should be the case when you have a full rooted device)

    Those above are hard facts so it may never work with MM. That also means if MM can get fully rooted by SuperSU and you can use "setenforce 0" the method should work there as well!

    Before you think about downgrading to LL read about ANTI-ROLLBACK protection some LG devices and MM versions may have!
    Anti-Rollback means you CAN NOT downgrade - it would brick your device.
    I will NOT provide downgrading guides there are plenty of them so search and read.

    If you can not meet ALL of the above 2 requirements lay down and cry. For the others: calm down and read on!

    You can test requirement 2 (disable SELinux) by:
    adb shell
    su
    setenforce 0
    getenforce

    -> you should see "Permissive" as a result. If you see "Enforcing" or error messages you may doing something wrong or it just do not work for you.

    Limitations!

    Keep in mind what I said above: FIsH does NOT unlock your bootloader.
    That means with TWRPinFIsH you can NOT:
    • Install a custom ROM like CM/Lineage (this will modify boot = soft brick. for this u need "efidroid in FIsH" - coming soon)
    • Install a custom Kernel (this will modify boot = soft brick)
    • Install a custom recovery (this will modify recovery = may soft brick)
    • In short: nothing which modifies boot or recovery partitions.
    You can of course flash everything which is modifying /system /data only (e.g. xposed,...)
    That means you could install even a custom ROM which works with the stock kernel so with unmodified boot image. Let's say the creator of imperium or genisys provide a release without the containing boot image. You could flash it..

    State / Roadmap
    1. FULL takeover/hijack of boot -> DONE (the modifications required are not voiding the Android boot signing chain!)
    2. replace RAM disk -> DONE
    3. boot own RAM disk (TWRP!) -> DONE (atm TWRP 2.8.7-0) <-- TWRP-in-FIsH v1.0 private BETA
    4. Upgrade bundled TWRP to latest version -> DONE (TWRP 3.1.0-0) <-- TWRP-in-FIsH v1.0 final release

    Download

    READ THE REQUIREMENTS above before proceeding!
    Then UNDERSTAND the requirements before proceeding! <-- omg this is crucial important!!!! Ensure that you really do not skip this step!

    READ THE LIMITATIONS above before proceeding!
    Then UNDERSTAND the limitations before proceeding! <-- omg this is crucial important!!!! Ensure that you really do not skip this step!

    ... and NEVER ask for ETA's! ;)

    if you can say:
    Yes! I have read and totally understood the limitations AND the requirements!
    then proceed. Otherwise read again until you got it.
    Keep in mind that this is a HACK. It may soft-brick your device. you have been warned!
    The concept is the same for all models but again no guarantees here for anything.
    There is ALWAYS a risk and you should better backup what you do not want to loose before starting downloading this.

    Go to the DOWNLOADS tab in this thread.

    TWRP-in-FIsH is now integrated into my TWRP build server and so whenever a new change happens in TWRP you will get the same automatically on next build. This way it is much easier to release new TWRP versions made for FIsH.
    From now on you will find nightlies (untested automatic builds) here:




    Installation (Linux)

    You can just install any newer version over an old one.

    1. boot Android and connect USB cable
    2. download the newest version to your PC and open a terminal in that directory
    3. tar xzf TWRPinFIsH*.tgz (tar xzf TWRP-in-FIsH*.tgz since v2.0)
    4. cd openFIsH (cd android_FIsH since v2.0)
    5. ./install.sh
    6. check the output of that script. you should not see any errors there (hopefully)

    Installation (Android / no PC)

    Requirements:
    1. TWRP-in-FIsH v4.2 or higher!
    2. BusyBox pre-installed (e.g.: with this app )

    You can just install any newer version over an old one.

    Thanks to @ReeS86 starting from v4.2 on TWRP-in-FIsH has an enhanced installer which can run without any PC - directly on your Android device!

    It would be nice if you could give him a thx click (here) for his contribution :) !
    1. Bring TWRP-in-FIsH to your Android device
      Example-1 with any PC (windows, linux, ...): adb push TWRP-in-FIsH.tgz /sdcard (replace TWRP-in-FIsH.tgz this with the real file name)
      Example-2 within an Android Terminal:
      cd /sdcard
      wget http://full-URL-to-file
      (replace full-URL-to-file with the real direct download link)
      Example-3 with just a browser: well just download it.. ;) but remember where it gets saved!
    2. extract it
      Example from within Android Terminal:
      cd /sdcard (or the folder where you have downloaded TWRP-in-FIsH)
      tar xzf TWRP-in-FIsH.tgz (replace TWRP-in-FIsH.tgz this with the real file name)
    3. run the installer (but do it correctly)
      Example from within Android Terminal:
      su
      cd /sdcard/android_FIsH
      sh ./install.sh
      (using sh is absolutely important otherwise it will fail)
    4. done


    Installation (Windows)

    If none of the above methods is working for you: use FWUL


    First run (no PC required)

    This FIsH gets installed PERMANENTLY! That means:
    You can boot up TWRP the same way as described here again without re-installing.
    If you re-install your STOCK image you have to re-install TWRPinFIsH as well.

    1. reboot Android
    2. you should now see: LED goes from blue to GREEN
    3. NOW directly when u see this GREEN LED press VOLUME DOWN and do NOT release
    4. wait until the device vibrates and the LED changed to RED. Then release the Volume Down button.
    5. Wait until FIsH completed and TWRP should be shown --> This means FIsH has done it's job well!
    6. This is a good time to do a full backup isn't it ? ;) Manually mount the SYSTEM partition as it gets not auto mounted atm and do a full backup
    7. reboot from here (safely ignore the msg "no OS installed" and reboot anyways) and you should see Android booting (hopefully ... if not see bottom)

    Daily Usage (no PC required)

    1. reboot Android
    2. you should now see: LED goes from blue to GREEN
    3. NOW directly when u see this GREEN LED press VOLUME DOWN and do NOT release
    4. wait until the device vibrates and the LED changed to RED. Then release the Volume Down button.
    5. Wait until FIsH completed and TWRP should be shown --> This means FIsH is doing it's job still very well :)
    6. AGAIN: keep your mind up! You HAVE to ensure that whatever you do and whatever you flash -> NEVER TOUCH BOOT/RECOVERY! If you flash a ZIP ensure first that it do not modify them! Otherwise you WILL softbrick. You have been warned (several times now)

    FIsH helpers

    If you just want to reboot directly from within Android check out these:



    Trouble / Bootloop fix
    if you encounter a bootloop (should never happen but who knows) you have 3 choices at least:
    1. Option 1a: (TWRP-Bootloop) Within TWRP open Advanced -> File Manager -> Goto: /system/su.d and click "select" button -> Delete
      Option 1b: (TWRP-Bootloop) From your PC: adb shell rm -rf /system/su.d/
      Important: Catch the fish log (see next topic)
    2. Option 2 (this works also for a bootloop without twrp): boot into download mode and use LGLaf to get a shell
      then:
      setenforce 0 <-- if that doesn't work you may have to do a FULL restore to stock
      mount -oremount,rw /system
      rm -rf /system/su.d/

      reboot. You are out of the bootloop.
      Important: Catch the fish log (see next topic)
    3. Option 3: Last resort: Reflash STOCK. sorry.. there is always a risk..

    Catch the FIsH logs
    • reboot back to Android and catch the fish log (IMPORTANT!):
    • adb shell "su -c cat /cache/fish/fish.log"
    • adb shell "su -c cat /cache/fish/fish.log.old"
    • Upload it to https://paste.omnirom.org and paste the link in the IRC channel (see next topic)

    Support / IRC Channel
    IRC means Internet Relay Chat and you will get best support there only.
    Choose how to get in:

    Known issues (may never get fixed)

    Due to the fact that TWRPinFIsH is a brutal hijack of the booting process several things may not work as expected.
    This will normally not harm anything but you have to know about.

    System IMAGE backup:
    Using this new option is a bulletproof method to backup and restore in TWRP-in-FIsH because you have to keep in mind that FIsH is a giant and brutal hack and even when a usual backup & restore is proven to work fine I would recommend to use both backup methods - if you can.
    HINT: This method requires an ext4 or exfat partition on your external SD card otherwise image backups will fail due to the file size.
    @sdembiske reports success using the internal storage as target for the backup but if you do this keep in mind that you have to move that backup to your PC manually to ensure you have it by hand for the worst case.


    ZIP / ROM flashing:
    omg really you wanna hear that again? OK: DON'T TOUCH BOOT / RECOVERY. And you be safe.
    When you try to install a ROM it will modify at least BOOT. That means soft-brick!
    When you try to install a custom Kernel.. omg really? It will definitively SOFT-BRICK! Maybe you should read the limitations again?? :p
    When you try to install a ZIP like xposed, supersu, Vipermod and others ensure that those are not modifying BOOT or RECOVERY partitions. For those mentioned it would be very unlikely but who knows.
    When you find a stock based ROM which is not modifying boot you can flash it. But ensure that it does not modify anything on boot!!! You could ask the devs of imperium etc if they can provide such a zip..

    SYSTEM partition (since v2.0: may be not a restriction on your device model!):
    when you boot into TWRPinFIsH you may see an error message regarding the fact that /system cannot be mounted.
    you can mount /system manually without a problem - BUT - it will work only if you do NOT select "mount system read-only". It has to be unchecked to work.
    after you have mounted /system manually and you want to take a backup you may see "0 bytes". Just press refresh and the size will be updated. If not: Do you have mounted it correctly (see above).

    FIRMWARE partition (since v2.0: may be not a restriction on your device model!):
    cannot be mounted - even not manually. You have to live with it.

    Double Tap to wakeup (in TWRP):
    You may heave seen/heard that this works in the official / usual TWRP for the G4 for unlocked devices. Unfortunately this cannot work in TWRP-in-FIsH due to the nature of this hijack. You have to live with it.

    Installing more than 1 ZIP at a time (may be not a restriction on your device model!):
    It is not possible to install more than 1 ZIP at the same time. TWRP gives you the option to install multiple ZIP files but the problem is you have to re-mount /system after each ZIP flashing. This is due to a problem with mounting /system readonly and most ZIPs will exactly try to do this when they finished their work - leaving you with an unmounted /system.
    This will be not the case for every ZIP combination - so it is possible that you can flash some ZIPs at the same time while others not.
    atm I believe you have to live with it.



    Credits (without them - no TWRP-in-FIsH!!!)
    If you feel that someone / you is missing on this list lemme know!


    XDA:DevDB Information
    TWRP-in-FIsH_LGG4, Tool/Utility for the LG G4

    Contributors
    steadfasterX, Aaahh, TheMadScientist420, KeiranFTW, cray_Doze, dssmex, TeamWin, ChainFire, the_naxhoo, SimoxTav, Rees86, uio88, sdembiske, jasonlindholm, ... and all new other contributors who gave me feedback for this!
    Source Code: https://github.com/Carbon-Fusion/android_FIsH


    Version Information
    Status: Stable
    Current Stable Version: 4.2
    Stable Release Date: 2017-06-21
    Current Beta Version: 5.0
    Beta Release Date: 2017-12-19

    Created 2017-03-14
    Last Updated 2017-12-19
    22
    I place it here because ppl using TWRP in FIsH are those maybe most interested in the progress and until I have something useful I don't wanna create a dedicated thread for this:

    Current state efidroid:
    - ported for unlocked devices
    - stalled. Secondary ROMs still bootloop, still no testers and so I decided to go on with multirom

    Current state multirom:
    The following are the results of my last testing weeks:
    - option A requires a kexec patched kernel --> means touching your boot image --> means soft brick
    - option B requires not a kexec patched kernel (when you build with MR_NO_KEXEC) but that means when booting a secondary ROM it will replace the current boot partition with the one from your secondary ROM ---> means soft brick

    I also had a talk with a multirom dev and I have tried to find a way around this especially when efidroid is able to handle it differently but there's no solution yet or will ever come. That means either pimp up/modify multirom to work like efidroid on my own or abandon the idea of multirom in FIsH..
    Atm I feel more like the last one because the other option requires a LOT of work which means to rewrite many of the core code and there's a deal breaker: programming in C.
    I can read and modify C but writing is out of my knowledge.

    So I decided to abandon multirom in FIsH.


    Current state of FIsH plate:
    FIsH plate (the name was coming in my mind right now) is something BigCountry907 has created with my FIsH for his HTC device and the idea is to boot your device from the sdcard (plate) to bring several things up: full root access and so the ability to change whatever you like. E.g TWRP in FIsH. directly from the sdcard.

    You remember? FIsH can be installed on a rooted device ONLY!

    That's still true but with this you can boot TWRP even on a not rooted MM / N by using the FIsH plate..

    The whole process makes use of a qualcomm feature which let you do this.
    - the whole process is incredible complicated to get it working!!!
    - the whole process is very sensitive and you have to find the right combination of needed partitons to make it work
    - the whole process is a complete try & error
    - if I mean IF I get this working I could patch the bootloader partition on that sdcard partition without touching the REAL bootloader to test without bricking...
    - I work together with bigcountry907 to get it working but we live in complete diff timezones which makes it not easier :p


    Complete OT:

    Current state Bootloader investigation:
    - I was able to extract the LG certificates (and something which I can't say what exactly it is.. But they are marked as rsa key files) out of the bootloader
    - due to the amazing g4 technical unlock discussion thread where many ppl have already discussed some of the ideas I had in my mind I was able to understand the main verification process
    - fact is you need either the private key from LG or you need to find an insecure implementation within the device bootloader or aboot
    - fact is that the unlock file which you will get for those devices which can be unlocked is hashed/encrypted so can't be read and there are very high chances that it contains your imei and device id
    - fact is that the aboot of h815 and h818 and I believe for all other models are using the same certificates to validate the unlock
    - fact is if someone is able to find a hack based on a code finding or tricking the unlock verify it should work for any G4 model
    - fact is without testing (with high chances of hard bricking) there will be no way to find a unlock solution
    - afaiu each device will generate several device specific magic values (at least with your device id and imei) and compare them with the magic generated from the unlock file. If you could generate those magic values on your device you still have to sign it to have it accepted.. Which is not possible without the priv key.
    - the other options require to modify device partitions which is near impossible because of the trusted boot chain. Means you can't just flash a patched bootloader and that's it. It will soft or hard brick your device because the verification will fail
    - there's still a chance to find something over seen by others but that is a very tough job
    - before you get too excited about what I do/have done here: I don't know if I will find something and I even don't know if I will proceed investigating!!! It's just i want to understand how things work - eg. the unlock process




    .

    Sent from my LG-H815 using XDA Labs
    22
    so...

    next build is on the way. I feel it is a RC release and hope it works as it should.
    Changes:
    • Complete overworked FIsH to be as easy portable as possible. I included the first porting instructions as well for the upcoming porting guide.
    • There are also many optimizations within the FIsH itself which should ensure that everything works as it should.
    • upgraded busybox to it's latest version
    • and last but not least I was able to compile a TWRP version compatible with LL and so with this FIsH. That means TWRP 3.1 !
    • build a new kernel which includes a kernel patch I need later for efidroid but thats another story ;)

    The testers are informed and I hope that all goes well so I can release it public soon.

    stay tuned
    sfX
    21
    Announcement: v3-beta5 = v3 final release

    TWRP-in-FIsH-v3_LGG4_LL
    Released: 2017-04-16
    Download: here
    Changelog: on github
    Summary:
    • Big speed improvements
    • adding model detection as property (ro.product.detection -> should be "success")
    • fixing unify detection
    • adding all known devices to unification
      - these both above will fix issues where your device was not detected correctly in TWRP and fails to install a ZIP which requires this!
    • Installer:
      ./install.sh --check will give you the option to check if TWRP-in-FIsH works for your or not - without changing anything on your device.
    20
    View attachment 4077263

    Maybe it's a new problem!!!

    Sent from my LG G4

    lol.. they do not know FIsH yet ;)

    btw (even this is OFF-TOPIC):
    I have my first efidroid test build done.. (which is the first step for efidroid-in-FIsH)
    it boots up with fastboot (yea right this will NOT work with a locked device yet) and it displays the current OS + a manually added one in /data/ :D (see attached screen)
    so the only thing to do is merging that stuff to official and doin efidroid-in-FIsH..
    again: boot gets not modified when using efidroid-in-FIsH and again this is all not ready to use and again it SHOULD work but i can say for sure when its ready only (but i really have a good feeling that it will..)


    .