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

[RECOVERY][OFFICIAL] TWRP 3.5.2_9-0 [I9100]

Search This thread

ripee

Recognized Developer / Recognized Contributor
teamwin-recovery-project-twrp-logo.jpg


Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

Code:
* [B][U]Your warranty is now void.[/U][/B]
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or your getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.

This phone does not have a separate recovery partition, only a virtual recovery partition in the boot (kernel) partition. After flashing an IsoRec kernel and recovery, you will then be able to flash all non-IsoRec kernels and recoveries (such as this official TWRP) without any problems (see instructions below).
More information about IsoRec can be found in the [MOD] IsoRec: Isolated Recovery for the Galaxy S2 Family thread, courtesy of Lanchon.



FREQUENTLY ASKED QUESTIONS

(Please read them BEFORE posting anything in the thread!)
Q: Whenever I try flashing any ROM, I get a Fail to map file error.
A: This error appears whenever you try to flash a rom zip file without first flashing the boot.img file from the rom zip file before attempting to flash the rom itself (see instructions below).

Q: How do I flash anything if TWRP displays an error that it cannot mount any partition?
A: This error appears after re-PITing your phone's internal storage but without re-formatting the partitions:
1. In the main menu, tap "Wipe" then "Advanced Wipe".
2. Perform the following steps for each of these partitions individually one by one: System, Internal Storage, Data:
a) Tap "Repair or Change File System".
b) Tap "ext4".
c) Move the slider to the right to format.
3. Follow the flashing instructions below.

Heimdall
- Glass Echidna

Bootloader and modem
- I9100UHMSA_I9100XXMS2.tar

TWRP for Samsung Galaxy S II (International)



How to flash the latest official TWRP when coming from stock or another custom recovery
1. Flash an IsoRec recovery and kernel, which can be found here.
2. Extract the boot.img file (kernel) from the zip file of the ROM you wish to flash.
3. Copy both the boot.img file and the latest official TWRP onto your phone or SD card.
3. Boot into the IsoRec TWRP, regardless of which version it is.
4. In the main menu, tap on "Install" then "Install Image".
5. Flash the boot.img file by selecting the "Boot" radio button.
6. Flash the latest official TWRP by selecting the "Recovery" radio button.
7. Reboot into Recovery. You should now be on the latest official TWRP.
8. Proceed with flashing the ROM and GApps package, either clean or dirty.


You will ONLY need to follow the above steps when flashing the official TWRP when you are coming from stock or another custom recovery!

Changelog
- See post #2.

Bugs
- You tell me!

Credits
- arnab, Lanchon, the.gangster, rINanDO, and every other open source developer and user who contributes directly or indirectly to the TWRP community in the development of and in providing feedback for the i9100.

Sources
- arnab
- Lanchon
- rINanDO
- i9100 repository
- TWRP repository

XDA:DevDB Information
TWRP 3.5.2_9-0, ROM for the Samsung Galaxy S II

Contributors
ripee
ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.0.x

Version Information
Status:
Stable
Current Stable Version: 3.5.2_9-0
Stable Release Date: 2021-04-06

Created 2018-01-25
Last Updated 2021-04-15
 
Last edited:

al5911

Senior Member
Jul 27, 2011
340
34
Tried to install latest RR 20171229 and got failed to map file "sdcard0/RR-II-v5.8.5-20171229-I9100-Final.zip". And I have 2 internal storage showing in this twrp. Any explanation?
 

ripee

Recognized Developer / Recognized Contributor
Tried to install latest RR 20171229 and got failed to map file "sdcard0/RR-II-v5.8.5-20171229-I9100-Final.zip". And I have 2 internal storage showing in this twrp. Any explanation?

I may have overlooked a few permissions entries related to the partitions. Are both of those 2 internal storages labelled as sdcard0 or sdcard1 by any chance? Did you try flashing RR from an SD card or internal memory?

I will run another build in the next couple of hours and let you know when it's available.

In the meantime, on an unrelated matter, please consider flashing the latest bootloader and modem in my BL_CP folder. I know, both the BL and CP are relatively old even for this old phone, but I mixed and matched the most recent ones and put them in a single .tar file.

Edit: Updated files are up. I'd also suggest you re-flash the latest IsoRec-TWRP then this updated 3.2.1-0 version.
 
Last edited:
  • Like
Reactions: al5911

al5911

Senior Member
Jul 27, 2011
340
34
Nand write failed when trying to update bootloader and modem - I9100UHMSA_I9100XXMS2.tar with odin. I put the tar file in CP. Even tried putting the file in AP...sorry I'm just the end user here :p
 

ripee

Recognized Developer / Recognized Contributor
Nand write failed when trying to update bootloader and modem - I9100UHMSA_I9100XXMS2.tar with odin. I put the tar file in CP. Even tried putting the file in AP...sorry I'm just the end user here :p

It's my mistake to have linked the latest version of Odin in the OP :silly: The S2 is an old enough device that only older versions such as 3.07 are able to successfully flash anything. I've updated the link in the OP.
 
  • Like
Reactions: al5911

ripee

Recognized Developer / Recognized Contributor
@ripee, I tried installing on the two methods explained, but it did not work. Would you like to create the zip image for installation or tar with zImage?

I added the flashable zip to the OP. If this doesn't help, I'll try building with zImage.

Edit: Actually, I think I know the cause ;) I just have to build the kernel with CONFIG_RD_LZMA=y, as described here.

I'll let you know when the new build is available, I'll upload an img, tar, and zip.
 
Last edited:
  • Like
Reactions: Skyline

linusdan

Senior Member
Mar 18, 2017
453
1,081
Salvador, BA
artededan.com
I added the flashable zip to the OP. If this doesn't help, I'll try building with zImage.

Edit: Actually, I think I know the cause ;) I just have to build the kernel with CONFIG_RD_LZMA=y, as described here.

I'll let you know when the new build is available, I'll upload an img, tar, and zip.

I got install with the zip, however, when trying to install the ROM, this error appeared.
It also happened with ROMS nougat.
 

Attachments

  • Screenshot_1999-12-31-19-19-26.png
    Screenshot_1999-12-31-19-19-26.png
    35.8 KB · Views: 916

linusdan

Senior Member
Mar 18, 2017
453
1,081
Salvador, BA
artededan.com
Ok, so it's unrelated to boot or recovery compression. Has to be the partition mapping. I'll figure it out eventually.

I think I discovered the possible cause:
The memory of my cell phone is divided with the gangster pit (1.5GB system + 6GB data + 512mb preload). Comparing this version with 3.1.0-0, I realized that with version 3.2.1-0 the other partition is treated as internal and may be causing problems when installing some custom ROM (it was to be treated as an external emulated card and identified such as sdcard0) :)
 
  • Like
Reactions: ripee

ripee

Recognized Developer / Recognized Contributor
I think I discovered the possible cause:
The memory of my cell phone is divided with the gangster pit (1.5GB system + 6GB data + 512mb preload). Comparing this version with 3.1.0-0, I realized that with version 3.2.1-0 the other partition is treated as internal and may be causing problems when installing some custom ROM (it was to be treated as an external emulated card and identified such as sdcard0) :)

Perhaps this is related to the problem?

Edit: I added the following line from the above commit to my system.prop:

Code:
ro.vold.primary_physical=1

All partitions are accounted for the same in my recovery.fstab and fstab.qcom files as in old TWRP device trees.

New build is under the link in the OP!
 
Last edited:

linusdan

Senior Member
Mar 18, 2017
453
1,081
Salvador, BA
artededan.com
Perhaps this is related to the problem?

Edit: I added the following line from the above commit to my system.prop:

Code:
ro.vold.primary_physical=1

All partitions are accounted for the same in my recovery.fstab and fstab.qcom files as in old TWRP device trees.

New build is under the link in the OP!

ZIP and tar installations do not work.
The print error has disappeared! I installed Lineage 15.1 and it worked. I'll use it for a few days to test.
Now what confuses me is the naming of the sdcard0 partition that I saw on your github in the fstab file. When selecting in TWRP, the person is in doubt about which partition to choose. My suggestion is to rename as is as Non-Emulated Storage, format as EXT4 and add preload support, as in the link:
https://github.com/rINanDO/android_device_samsung_i9100_emu_twrp/blob/cm-14.1/ramdisk/twrp.fstab
I use these link settings to support TWRP in Slim7 builds and it behaves very well :)
LineageOS also already uses this setting by default.
 
Last edited:

ripee

Recognized Developer / Recognized Contributor
Perhaps this is related to the problem?

Edit: I added the following line from the above commit to my system.prop:



ZIP and tar installations do not work.
The print error has disappeared! I installed Lineage 15.1 and it worked. I'll use it for a few days to test.
Now what confuses me is the naming of the sdcard0 partition that I saw on your github in the fstab file. When selecting in TWRP, the person is in doubt about which partition to choose. My suggestion is to rename as is as Non-Emulated Storage, format as EXT4 and add preload support, as in the link:
https://github.com/rINanDO/android_device_samsung_i9100_emu_twrp/blob/cm-14.1/ramdisk/twrp.fstab
I use these link settings to support TWRP in Slim7 builds and it behaves very well :)
LineageOS also already uses this setting by default.

Ok, I will make this change and let you know when it's ready. You need Odin 3.07 and use the PDA button to flash TWRP. You can also use the PDA button for the bootloader and modem.
 

linusdan

Senior Member
Mar 18, 2017
453
1,081
Salvador, BA
artededan.com
Ok, I will make this change and let you know when it's ready. You need Odin 3.07 and use the PDA button to flash TWRP. You can also use the PDA button for the bootloader and modem.
I did this with that version. Did not work.

I made those changes in my recovery.fstab and uploaded new images. You can try them now.
I'll test ;)
I'm going to use it for a few days and I'll tell you how the build behaved :good:
 
  • Like
Reactions: ripee

ripee

Recognized Developer / Recognized Contributor
I did this with that version. Did not work.


I'll test ;)
I'm going to use it for a few days and I'll tell you how the build behaved :good:

About flashing with Odin, have you tried a more recent version of it? Normally older phones require older Odin, and 3.07 has always worked for me for older TWRPs.

Does the zip image I posted work from within an older TWRP, or an IsoRec TWRP?

What about flashing the IMG file from within an IsoRec TWRP?

Have any of the old official TWRP tar or img files flashed successfully with Odin or within recovery?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    teamwin-recovery-project-twrp-logo.jpg


    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Code:
    * [B][U]Your warranty is now void.[/U][/B]
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or your getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.

    This phone does not have a separate recovery partition, only a virtual recovery partition in the boot (kernel) partition. After flashing an IsoRec kernel and recovery, you will then be able to flash all non-IsoRec kernels and recoveries (such as this official TWRP) without any problems (see instructions below).
    More information about IsoRec can be found in the [MOD] IsoRec: Isolated Recovery for the Galaxy S2 Family thread, courtesy of Lanchon.



    FREQUENTLY ASKED QUESTIONS

    (Please read them BEFORE posting anything in the thread!)
    Q: Whenever I try flashing any ROM, I get a Fail to map file error.
    A: This error appears whenever you try to flash a rom zip file without first flashing the boot.img file from the rom zip file before attempting to flash the rom itself (see instructions below).

    Q: How do I flash anything if TWRP displays an error that it cannot mount any partition?
    A: This error appears after re-PITing your phone's internal storage but without re-formatting the partitions:
    1. In the main menu, tap "Wipe" then "Advanced Wipe".
    2. Perform the following steps for each of these partitions individually one by one: System, Internal Storage, Data:
    a) Tap "Repair or Change File System".
    b) Tap "ext4".
    c) Move the slider to the right to format.
    3. Follow the flashing instructions below.

    Heimdall
    - Glass Echidna

    Bootloader and modem
    - I9100UHMSA_I9100XXMS2.tar

    TWRP for Samsung Galaxy S II (International)



    How to flash the latest official TWRP when coming from stock or another custom recovery
    1. Flash an IsoRec recovery and kernel, which can be found here.
    2. Extract the boot.img file (kernel) from the zip file of the ROM you wish to flash.
    3. Copy both the boot.img file and the latest official TWRP onto your phone or SD card.
    3. Boot into the IsoRec TWRP, regardless of which version it is.
    4. In the main menu, tap on "Install" then "Install Image".
    5. Flash the boot.img file by selecting the "Boot" radio button.
    6. Flash the latest official TWRP by selecting the "Recovery" radio button.
    7. Reboot into Recovery. You should now be on the latest official TWRP.
    8. Proceed with flashing the ROM and GApps package, either clean or dirty.


    You will ONLY need to follow the above steps when flashing the official TWRP when you are coming from stock or another custom recovery!

    Changelog
    - See post #2.

    Bugs
    - You tell me!

    Credits
    - arnab, Lanchon, the.gangster, rINanDO, and every other open source developer and user who contributes directly or indirectly to the TWRP community in the development of and in providing feedback for the i9100.

    Sources
    - arnab
    - Lanchon
    - rINanDO
    - i9100 repository
    - TWRP repository

    XDA:DevDB Information
    TWRP 3.5.2_9-0, ROM for the Samsung Galaxy S II

    Contributors
    ripee
    ROM OS Version: 7.x Nougat
    ROM Kernel: Linux 3.0.x

    Version Information
    Status:
    Stable
    Current Stable Version: 3.5.2_9-0
    Stable Release Date: 2021-04-06

    Created 2018-01-25
    Last Updated 2021-04-15
    12
    Progress update

    I managed to get it to flash and boot. If you wipe all partitions except External storage and USB-OTG, you will see both Internal and External storage in their proper partition sizes.

    But I'm still working on "Failed to map file".

    Edit: after wiping all partitions except external storage and usb-otg, twrp's settings finally persist after rebooting back into recovery.

    Edit 2: it seems that Open GApps flash normally, but neither official nor unofficial LineageOS 14.1 does :p back to it...
    11
    I haven't given up on getting official TWRP on the S2!

    In fact, I'll have access to an S2 starting next week because it's my aunt's backup phone.
    7
    The problem may lie in re-PITting

    I've taken another look at my logs and I'm going to go back to square one, re-flash stock, then flash TWRP again, but this time without re-pitting my system partition. Lineage should be small enough to flash, so we'll see if the maximum allowable file size that twrp interprets that can be flashed is determined by re-PITting or if twrp determines what can fit some other way.
    6
    I re-built my device tree again, this time adapting from rINanDO's cm-14.1-emu branch. The SD card and the TWRP folder in internal storage mount fine, allowing for flashing from both internal and external storage, which TWRP refers to as "Micro SD card".