yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Nobby1960:
Dumb question: After I have flashed the old TWRP recovery 2.8.x.x incl. stock kernel via Odin, how do I come to the latest TWRP 3.1 without to flash a ROM (I want to see the new recovery after reboot)?
[Galaxy S II Android Development] bujjo53:
You need to Flash kernel-lanchon- IsoRec.zip first then flash twrp 3.1.zip
[Galaxy S II Android Development] Acid0057:
Depends what rom nobby is using.

What rom are you using? Any of the last CM ROMs have isorec built in lineage os has it built in too.
[Galaxy S II Android Development] MigoMujahid:
Read his post again, he flashed a TWRP kernel recovery, he changed the kernel, that's it.

[MENTION=8073321]bujjo53[/MENTION], the iso-recovery is still there but there is no kernel with iso-rec support, he must flash lanchon's kernel to get the iso-rec support and then he will boot recovery and find TWRP 3 again without the need to flash it.
[Galaxy S II Android Development] Nobby1960:
Thank you, guys :)

After flashing the lanchon kernel and the zipped TWRP 3 from [MENTION=6560258]the.gangster[/MENTION] all is perfect.
[Galaxy S II Android Development] Acid0057:
Totally right my bad. Thanks for the correction.
[Galaxy S II Android Development] culpritzky:
succesfuly flash the TWRP recoery

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna

http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is

encouraged.

If you appreciate this software and you would like to support future

development please consider donating:

http://www.glassechidna.com.au/donate/

Initialising connection...

Detecting device...

Claiming interface...

Setting up interface...

Beginning session...

Some devices may take up to 2 minutes to respond.

Please be patient!

Session begun.

Downloading device's PIT file...

PIT file download successful.

Uploading RECOVERY

0%

14%

28%

42%

56%

70%

84%

98%

100%

RECOVERY upload successful

Ending session...

Rebooting device...

Releasing device interface...

but when i boot it on.. it still OEM recovery and not the TWRP...

---------- Post added at 10:45 AM ---------- Previous post was at 10:37 AM ----------

i installed the TWRP recovery

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna

http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is

encouraged.

If you appreciate this software and you would like to support future

development please consider donating:

http://www.glassechidna.com.au/donate/

Initialising connection...

Detecting device...

Claiming interface...

Setting up interface...

Initialising protocol...

Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.

Please be patient!

Session begun.

Downloading device's PIT file...

PIT file download successful.

Uploading RECOVERY

0%

14%

28%

42%

56%

71%

85%

99%

100%

RECOVERY upload successful

Ending session...

Rebooting device...

Releasing device interface...

but when i booted to recovery it still the OEM recovery and not the TWRP.. where did i do wrong ?

please help/...
[Galaxy S II Android Development] Acid0057:
What kernel/rom are you using? TWRP needs a kernel that supports isorec.
[Galaxy S II Android Development] culpritzky:
well im using STOCK kernel,

again i flash it with PhilZ-cwm6-XWLSD-OXX-4.22.tar

then install this kernel recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab)

now can i install the latest TWRP using Heimdal?
[Galaxy S II Android Development] Acid0057:
Actually after flashing the lanchon and arnab kernel try to reboot to recovery and see if TWRP is active. If it is then install the newest TWRP image directly in TWRP. Reboot to recovery again and see if it's updated.
[Galaxy S II Android Development] culpritzky:
this is what i did again this morning.,,

install CWM

into CWM i flash the ISOCREC LANCHON by ARNAB, reboot to recovery and still im at the CWM..

flash the TWRP using Heimdall but still im stock at CWM recovery...

i'm losing hope here guys...

---------- Post added at 02:27 AM ---------- Previous post was at 02:18 AM ----------

i would like to know how did you flash the old TWRP on you s2 via ODIN,

im trying to flash the new version of twrp via odin but it gives me error...
[Galaxy S II Android Development] the.gangster:
[MENTION=6498394]culpritzky[/MENTION]

your question has been answered already 1000 times to other users here.

Why don't you simply read the instructions in the OP?????

In there follow the link to understand IsoRec. There you'll finally find kernels. The thing you downloaded (recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab)) is a recovery. But you must have installed that already successfully several times already. First using heimahl, then using zips.

So now go and get a kernel that is able to make use of the recovery. And you'll be fine.
[Galaxy S II Android Development] Acid0057:
[MENTION=6498394]culpritzky[/MENTION] gangster is right. I've successfully installed TWRP on three s2 gt-i9100 phones with this method.

Thanks [MENTION=6560258]the.gangster[/MENTION] for the assist!
[Galaxy S II Android Development] culpritzky:
well I just INSTALLED the TWRP... via this guide

https://xdaforums.com/galaxy-s2/hel...-galaxy-s2-i9100-t3538601/page20#post72677804

now im STUCK at

PATCHING SYSTEM IMAGE UNCONDITIONALLY...
[Galaxy S II Android Development] Acid0057:
[MENTION=6498394]culpritzky[/MENTION] you just wanted TWRP right? Why didn't you follow the guide at the start of this post? You're following a repartition, flash kernel and new custom rom post.
[Galaxy S II Android Development] culpritzky:
Sorry for the late reps guys...

already flash the TWRP and INSTALL NEWEST build of LOS.. 7.1

thnks for the help guys...
[Galaxy S II Android Development] Acid0057:
Glad you're in business! You'll love LOS.
[Galaxy S II Android Development] DevisG79:
Has someone been succesful in updating TWRP to 3.1.1-0?
[Galaxy S II Android Development] Nobby1960:
No - my Samsung Galaxy S2 GT-I9100 mounts no internal SD card (eMMC) with it. I get a lot of red error messages: E: Invalid block device 'emmc', E: Invalid block device 'ext4' etc. etc.
[Galaxy S II Android Development] DevisG79:
I would not recommend what I have done because you will end up in stock LineageOS recovery:cyclops:. Now I am back to 3.1.0-0 and clean flashed latest nightly. Happy:D
[Galaxy S II Android Development] jt12345:
I've just tried twrp-3.1.1-0-i9100 on my i9100 (which is running lineage 20170621 with emulated storage) and while it installed correctly and easily, when I rebooted into the new recovery, it couldn't recognise any of the partitions on the flash chip. As a result, I couldn't flash *anything* from inside recovery. Thankfully, I hadn't yet wiped "system", so I just rebooted back into the rom and ran "adb root" and "adb push twrp-3.1.0-0-i9100.img /dev/block/mmcblk0p6" to get back to a working twrp.

Has anyone else had similar problems?
[Galaxy S II Android Development] DevisG79:
That was the same for me. Sometimes the recovery could recognise the partitions and sometimes not. When flashing a zip there comes always a error message. I was happy that I could boot into system and then I installed a kernel with odin and updated TWRP to 3.1.0-0. I don`t have emulated storage.
[Galaxy S II Android Development] arnab:
My mom passed away on 29th. It will take a bit time for me to get fully back here again. But i'l be back soon.
[Galaxy S II Android Development] Nobby1960:
Dear arnab,

I am very sorry about that. My sincere condolences.
[Galaxy S II Android Development] rubentkato77:
Very sorry my friend, much love and the best vibes for your family.

Take care.
[Galaxy S II Android Development] DevisG79:
I'm really sorry about your mother. That's very terrible. I wish you also my sincere condolences.

Take your time. We can wait. This is not so important here. All the best.
[Galaxy S II Android Development] jt12345:
I'm sorry, my friend. From someone who has been through what you're going through, it does slowly become less painful. Big hugs to you from all of us here.
[Galaxy S II Android Development] ems3132:
:crying: I'm really sorry for your loss.Heartfelt condolences.
[Galaxy S II Android Development] Drhedphuk:
I am so sorry to hear of your huge loss arnab. My sincere condolences to you and your family my friend.
[Galaxy S II Android Development] Troubadour666:
its always sad to hear that !

on my side , and i'm sure i'm not alone, i'm afraid of that moment when it will 'sadly knock' at my door :(

All the best, take time and come back when you want.
[Galaxy S II Android Development] laptopu:
[MENTION=414800]arnab[/MENTION] really sorry to hear this my thoughts are with you.
[Galaxy S II Android Development] MARCOSOFT:
My sincere condolences.
[Galaxy S II Android Development] toy_story:
[MENTION=414800]arnab[/MENTION]

It is always painful to lose relatives, especially such as mom.

But life goes on, do not stop yourself.

My sincere condolences.
[Galaxy S II Android Development] iaul:
Sincere condoleance
[Galaxy S II Android Development] davidvanwijk:
condolences

My sincere condolences. Take your time!

---------- Post added at 06:33 PM ---------- Previous post was at 06:30 PM ----------

No, flashing without any problem. But: no partitions visible. TWRP does not see OS anymore (!)

Luckily I was able to flash 3.1.0-0 back ...
[Galaxy S II Android Development] S-ti-V:
Hi guys!

Tell me please, why in my device with the release of 3.1-twrp recovery does not see the partitions?

file /etc/fstab - empty, but /etc/recovery.fstab have all record about partitions
[Galaxy S II Android Development] the.gangster:
It is not that complicated.

Simply use TWRP 3.1.0-0.

The 3.1.1-0 that can be downloaded from twrp.me misses some tools and also the TWRP.fstab, so simply stick to 3.1.0-0 for now.
[Galaxy S II Android Development] L9 S.:
Error.

During the "Download PIT" process, appears an error: "

● Initialising connection...

● Detecting device...

● Claiming interface...

ERROR: Claiming interface failed!

What I do? (Sorry for my english. I'm Brazilian.).
[Galaxy S II Android Development] S-ti-V:
thank for quick answer
[Galaxy S II Android Development] aledag123:
i've tryed to install the twrp on my s2 with odin, but it gives me an error, so i'm unable to proceed. what can I do?
[Galaxy S II Android Development] Nobby1960:
For Odin use you need a special TWRP build with an integrated kernel on the S2. To download this one, click here.
[Galaxy S II Android Development] monane12:
Poblem switching back

Hi,

just flashed the faulty 3.1.1-0 and now there is no storage (internal or sd-card) available. How can I switch back to 3.1.0-0 - any hints? :(

Thanks in advance.

Regards

Oli
[Galaxy S II Android Development] DevisG79:
See post 724
[Galaxy S II Android Development] monane12:
Hi Devis,

I have tried this stock_kernel_twrp_1120-signed-for_Odin, but after successfully flashed this kernel my i9100 doesn`t boot anymore. I am only able to boot into TWRP 2..8.7.0 and there is no possibility to flash the old twrp-3.1.0-0-i9100.img.

Regards

Oli

---------- Post added at 01:21 PM ---------- Previous post was at 01:16 PM ----------

O.k. now I have found the "flash image" button. :)

What to choose next - Boot or Recovery?
[Galaxy S II Android Development] DevisG79:
Recovery

Did you read OP? You must have isorec Kernel. Otherwise you won't have TWRP after you have flashed your ROM that its Kernel must be isorec compatible
[Galaxy S II Android Development] Nobby1960:
Choose recovery. Then flash your ROM - after this boot in the recovery. Now you see TWRP 3.1.0-0 and you can flash GApps etc.
[Galaxy S II Android Development] monane12:
No chance to switch back to 3.1.0-0...get stuck on 2.8.7.0 and no booting OS. Otherwise I flashed LineageOS an Gapps new and after reboot I am on TWRP 3.1.1-0 again. :confused:

---------- Post added at 02:19 PM ---------- Previous post was at 01:48 PM ----------

Thanky Noby, that worked!
[Galaxy S II Android Development] Kurt Krummbein:
Get rid of brocken TWRP-3.1.1-0

If your OS is rooted, there's an easier way (just did it myself):

copy the twrp-3.1.0-0-i9100.img via adb to the phones storage (paths may vary, search a nice place ;)).

the in an adb-root-shell do:

dd if=/storage/0CD9-1C16/TWRP/twrp-3.1.0-0-i9100.img of=/dev/block/mmcblk0p6

"if" is the path where you stored the image, "of" is the device-file of the recovery-partition for ISOREC.

then reboot recovery ... and you should be there.

If not ... take a look to the Unbrick-HowTo section :).

Gtz

Kurt
[Galaxy S II Android Development] the.gangster:
Hi Kurt (and everyone who accidently flashed the buggy IsoRec-build)

Even if that way is correct, it is imho not an easy way at all.

After so many complicated suggestions I would like to bring back the focus on it again.

The easy way (if you are using adb anyway) is to push it directly to the recovery partition:

adb root
adb push twrp-X.X.X-X-i9100.img /dev/block/mmcblk0p6
[Galaxy S II Android Development] Nobby1960:
Wow, works simple and quick - thanks :)
[Galaxy S II Android Development] Kurt Krummbein:
Well, didn't dare to test that. But given, that for a Linux/Unix System even the block-special-files are 'just files', you're right :).

Cool solution :).

Gtz

Kurt
[Galaxy S II Android Development] the.gangster:
Good news!

As they didn't react on the bug-report on their github, yet, I tried (and was able) to reach one of the team-win members who removed the buggy 3.1.1-0-build from their official download locations now (a couple of hours ago). (Thank you for doing that!)

This should limit the number of new users, running into problems and ending up here, reporting they cannot flash anything with it.

And just for those who are searching a version: flash the 3.1.0-0 build which runs fine. Downloadable as IMG from official locations (or as flashable zip from my signature).
[Galaxy S II Android Development] osm0sis:
I'd like to add support to my Android Image Kitchen for the Samsung "headerless" image format present in the S, S2, Tab, Note, etc. devices but I'm struggling to find a proper toolset to handle these. [MENTION=4141005]Lanchon[/MENTION] [MENTION=414800]arnab[/MENTION], you guys have done a lot of work on the Galaxy S2 family, have you developed some or can you point me to the best tools to support unpacking/repacking them all correctly?

I've hunted through the TWRP device repos, and come up with only references, and have also found https://github.com/aapo/galaxys2_kernel_repack but it looks like a mess of ASM and other, and I was hoping for C over Python/shell since my intent is to cross-compile for Linux, the NDK and Windows via Cygwin. If anyone else has some leads on this, please also chime in. :)
[Galaxy S II Android Development] Lanchon:
hi os!!

at some point i was working on recovery-based unpack/pack (of the kernel proper, not the ramfs) to have the TRIM commands reinstated by patching the kernel binary image, because at CM they wouldn't even consider my arguments and data showing that TRIM was safe (and even necessary) if implemented correctly. so it was 2 years after i started researching and fixing TRIM for that platform, and i was really growing tired of making kernels for 4 devices every couple of weeks, and was already in the middle of implementing this patching solution... when the CM maintainer suddenly merged my patches! so i abandoned that and let it rot.

at the time i looked for something that could work in recovery but couldn't find it, so i was baking my own.

i remember the kernel image was an executable with a self extractor at the head followed by the compressed data. (compression was a sluggish gzip i think, an i wanted to repack the kernels on lzop to increase boot speed by a few seconds. the lzop self extractor was available for the linux kernel on arm somewhere.) compressed data was the kernel and the ramdisk, and i don't remember how they were structured.

and that's all! sorry! :(

and thanks!
[Galaxy S II Android Development] osm0sis:
Hey hey! :)

Thanks for the reply. I imagine hidden somewhere in the build tree there must be the current tools for at least building the final boot.img but I just can't seem to find it. :confused:

[MENTION=414800]arnab[/MENTION]'s built those TWRP images recently so hopefully he can point me in the right direction! :fingers-crossed:
[Galaxy S II Android Development] Lanchon:
no, arnab and thus twrp.me build isorec images, which are kernel-less ramdisks in a 'format' i proposed:

https://xdaforums.com/galaxy-s2/orig-development/isorec-isolated-recovery-galaxy-s2-t3291176

yes, you can build the kernel easily, but i don't think kernel unpack tools are there too though.

build the kernel with: mka bootimage

the relevant build file is: build/core/generate_extra_images.mk

the actual code that builds images is in: kernel/samsung/smdk4412/usr

the structure is, there are 3 ramdrives all in .cpio format:

- the regular android boot ramdrive

- the recovery ramdrive

- the outer "chooser" ramdrive

the outer ramdrive is the one that the kernel actually boots. it contains code and the other two ramdrives as nested files. its job is to choose what to boot (android vs recovery), unpack the selected nested image, and transfer control to it.

note: the isorec mod introduces a fourth ramdrive stored in a separate partition (the isolated recovery partition) and changes the way the outer ramdrive works. in isorec, the outer ramdrive can additionally choose to decompress, unpack and boot a ramdrive stored in the isolated recovery partition.
[Galaxy S II Android Development] jandroidian:
Hey everyone.

Thanks for the dedicated and impressive efforts in this thread. I believe I've read the whole thread so please don't shoot me down with that. Nevertheless I might still make an error. Thing is, I suspect I'm out of luck as I'd like to install a custom recovery image, like TWRP, on a very degraded (using the word generally, not in the technical term like a 'degraded RAID array') SII install that I'd like to get back to health.

I've rooted the device but from what I read here the only way to install TWRP, which I've used on other handsets and seems required to 'zip install' all sorts of goodies, is to wipe the whole phone and start again, due to the need for isorec and/or a special/custom kernel. Have I got that right? Is there any way to install a non-stock recovery image to a rooted SII running stock 4.1.2 without wiping all existing data (SMS history, that sort of thing, amongst other stuff) ?
[Galaxy S II Android Development] Kurt Krummbein:
Well, TWRP needs ISOREC to work, ISOREC needs a Kernel with ISOREC support to work, but the available kernels don't need a custom rom to work ( they don't need a running rom at all, otherwise it wouldn't be possible to flash a new custom rom without flashing stock before ;) ).

But as far as i know, stock is not working with the ISOREC-kernels, so you need to install a custom rom and for that you have to make a factory reset.

But before flashing the new rom, you can try to make a nandroid-backup of your data.

Gtz

Kurt
[Galaxy S II Android Development] jandroidian:
[MENTION=243362]kurt[/MENTION]

Thanks for your clarification!

I'd forgotten about nandroid since reading it mentioned within XDA many times during a previous round of phone mangeling.

So this may go off topic, but also be the quickest and best place to get an answer. The phone I'm trying to revive is missing the Google Play (and presumably servers etc) store app. I've no idea how it got removed but can I install nandroid without the Play Store? I'm aware of sideloading but all the reading I've done here has me thinking everything gets 'unofficially' installed via zip within a recovery img! LOL Think I just realised the answer to my own question ... I need to copy some .apk files to the handset to install any 'paramedic' apps I'll need, don't I?

Can gapps be installed via .apk and sideloading?
[Galaxy S II Android Development] prima_sas:
Install twrp with heimdall

I was trying to install TWRP on S2 for first time.

I've followed procedure described in op, with some improvisation with zadig, and finally successfully installed the twrp and device got reboot.

Then I switch off the phone again, and go to recovery mode with Volume UP+Home+Power buttons, but it came up with android recovery not twrp :confused:

Did I miss something here?
[Galaxy S II Android Development] toy_story:
Do so, maybe help.

https://xdaforums.com/showpost.php?p=73559662&postcount=2
[Galaxy S II Android Development] prima_sas:
View attachment 4256259

Thanks a lot, I can install the TWRP.

After odin execution got yellow triangle but still able to enter recovery.

But when I'm trying to flash custom rom, it's stuck as in the picture.

Any idea how to solve this?

edit: never mind, it's ok now. solved with this way: https://xdaforums.com/galaxy-s2/help/guide-tutorial-samsung-galaxy-s2-i9100-t3538601
[Galaxy S II Android Development] frankonia:
Probably your Pitfile is too small. You have to resize it with a special tool. See my sign!

Edit:

I saw, you already solved the problem.
[Galaxy S II Android Development] Wolfgang Bures:
Help for a noob needed

H Guys,

I am completely new to this and followed the instructions to the letter, but the current TWRP just won't install. The Heimdall-Flash foes well, but after a reboot I still have a old interim-recovery. Odin won't even flash the tar. If I rename the file in the tar to zImage. (as seen in other recoveries that I found) it will flash, but I can't boot it. :-/

I'm trying this on Galaxy S2...

EDIT: Currently I'm stuck on TWRP v2.8.4.0 I got through a kk-kernel-04-02-WRP, but his won't flash the current LINEAGE4.1 (which is what I am actually trying to do)

Any help?
[Galaxy S II Android Development] Wolfgang Bures:
I could solve this issue above and now I'm on TWRRP 3 and even flashed the new LINEAGE4.1! :)
[Galaxy S II Android Development] lexus46:
Merry Christmas to everybody!
[Galaxy S II Android Development] lexus46:
Can somebody tell me which is the latest TWRP version for the S2 and where can I download it from? Thanks in advance.
[Galaxy S II Android Development] guest4711:
See https://eu.dl.twrp.me/i9100/ The newest official one is 3.1.0.0
[Galaxy S II Android Development] toy_story:
TWRP-3.1.0-0

Hi, the official site - https://dl.twrp.me/i9100/

or with the installation in TWRP - TWRP-3.1.0-0-recovery-the.gangster-IsoRec-i9100.zip - https://xdaforums.com/attachment.php?attachmentid=4347179&d=1512000827
[Galaxy S II Android Development] lexus46:
Thx. Do you know why my settings in TWRP gone all the time? I have to set it again and again.

Another question: I own a Galaxy S5 mini and for that TWRP 3 has option to back up the Efs partition too. I wonder why for the S2 this option doesn't exist?
[Galaxy S II Android Development] ripee:
I'm working on version 3.2.1 but it can only flash small files right now, ie. nothing bigger than gapps packages, not even rom zips. The reason your settings are lost each tme you reboot is because your twrp cannot access internal storage, where it saves its settings file.

My 3.2.1 at least saves its settings properly, but backing up EFS is unnecessary and was only included in the S5 Mini's twrp either because the code may have been copied and pasted from other partitions in the fstab file without much thought, as there's no practical reason to back up EFS.
[Galaxy S II Android Development] Saftpresse99:
Hi,

i had twrp-3.0.2-1 on my s2 (LOS 14.1) and i try update to version 3.1.0.0. So i booted to recovery and installed the img file from the offical site: https://eu.dl.twrp.me/i9100/. But now, i have only the default android recovery. Twrp is gone, but the system boots without problems. My question is: Whats the easiest way to get twrp back?

Thank you!
[Galaxy S II Android Development] toy_story:
Hi, if there is a root right to you this application will help.
[Galaxy S II Android Development] Saftpresse99:
Thank you. Now twrp is back again.