1. esuhl's Avatar
    I'm new to Android, but I know a bit about PCs and Linux. I have a Galaxy S2 that had never been modified or rooted, and all I wanted to do was to try out Cyanogenmod.

    I saw on a forum that someone had followed the instructions on a YouTube video and they worked perfectly. The video explains that it's necessary to increase the size of the /storage partition so that there is enough space for the latest versions of Cyanogenmod and Google apps. But the video starts with a phone already running Cyanogenmod.

    Video:
    Text version: How to Install CM13/Android 6.0.1 Marshmallow ROM on Galaxy S2! [RePartition] | Galaxy S2 Root

    So, I started by (successfully) following the instructions on the Cyanogenmod website here:
    https://wiki.cyanogenmod.org/w/Install_CM_for_i9100

    But when I try to follow the steps in the video to install TWRP, I'm stuck!

    Installing Cyanogenmod replaced my recovery with "Cyanogenmod Recovery", and the guide says you need to start from CWM or TWRP. So I followed the first half of the Cyanogenmod installatiojn guide to install CWM recovery again.

    I then tried to install TWRP. It appeared to be successful, but on rebooting to recovery, CWM starts instead.

    If I try to run the Lanchon-repit zip file (to repartition the built-in storage), I get the following output from CWM:

    Code:
    CWM-based Recovery v6.0.4.5
    
    -- Installing: /storage/sdcard1/media/lanchon-repit-20160406-system=1.0-data=same-sdcard=max-preload=min+wipe-i9100.zip
    Finding update package...
    Opening update package...
    Installing update...
    
    flashize-ext: unable to extract package contents
    
    [ERROR 1]
    
    E:Error in /storage/sdcard1/media/lanchon-repit-20160406-system=1.0-data=same-sdcard=max-preload=min+wipe-i9100.zip
    (Status 1)
    Installation aborted.
    If I'm completely honest, I don't entirely understand what I'm doing. I just want to install Cyanogenmod and Google apps, and (as it sounds like its necessary) to repartition the internal storage first.

    Can anyone help?! What am I doing wrong?! It's driving me crazy!
    11-04-2016 03:58 PM
  2. Golfdriver97's Avatar
    Welcome to the forums. What model number do you have?
    11-04-2016 04:15 PM
  3. esuhl's Avatar
    Thanks.

    I have a Samsung Galaxy SII, model GT-i9100.
    11-04-2016 06:20 PM
  4. Golfdriver97's Avatar
    I think if you reflash the stock ROM, that should bring everything back to normal. Once you do, I would try skipping repartitioning the storage, and flash CM.
    Laura Knotek likes this.
    11-05-2016 08:39 AM
  5. esuhl's Avatar
    I think if you reflash the stock ROM, that should bring everything back to normal. Once you do, I would try skipping repartitioning the storage, and flash CM.
    EDIT: Sorry -- ignore me! I got into download mode at last. I'll try to flash the stock ROM as suggested. Thanks :-)
    11-05-2016 11:13 AM
  6. esuhl's Avatar
    I tried reflashing the stock ROM. I had downloaded two ROM images that seemed suitable:

    • GT-I9100_VOD_1_20131209181510_ayd7npl7nz.zip
    • VOD-I9100XWMS2-20140128180739.zip



    I unzipped/untarred the files and ran the following command using Heimdall:
    Code:
    heimdall flash --SBL1 Sbl.bin --PARAM param.lfs --KERNEL zImage --CACHE cache.img --MODEM modem.bin --FACTORYFS factoryfs.img --HIDDEN hidden.img --verbose --no-reboot
    Everything seemed to complete successfully, but when I reboot the phone, it says, "Enter password to use encrypted device storage".

    I don't understand. I've never encrypted anything on the phone. I tried again with the other ROM file, but exactly the same thing happens.

    Am I doing something wrong?
    11-05-2016 07:24 PM
  7. Golfdriver97's Avatar
    Am I doing something wrong?
    I don't think the images need to be unzipped.
    11-06-2016 07:48 AM
  8. esuhl's Avatar
    Well, after trying to flash the stock ROM and getting the "encrypted device" message, I booted into recovery. Strangely the Cyanogenmod recovery started. A factory reset got rid of the "encrypted device" message, but now the phone boots into Cyanogenmod.

    To make things worse, Trebuchet crashes repeatedly. I read that stopping Trebuchet, deleting its data and cache and rebooting should fix this, but clicking "delete cache" does nothing (it's not greyed out and the button audibly "clicks). There are still 12KB of cache files and the problem persists.

    I don't think the images need to be unzipped.
    Oh... the notes I read on Helmdall suggested that they should be unzipped and untarred so that helmdall.exe can find the files named in the command. Should I be using a different syntax?

    I really appreciate your help, btw. :-)
    11-06-2016 11:57 AM
  9. Golfdriver97's Avatar
    Well, after trying to flash the stock ROM and getting the "encrypted device" message, I booted into recovery. Strangely the Cyanogenmod recovery started. A factory reset got rid of the "encrypted device" message, but now the phone boots into Cyanogenmod.

    To make things worse, Trebuchet crashes repeatedly. I read that stopping Trebuchet, deleting its data and cache and rebooting should fix this, but clicking "delete cache" does nothing (it's not greyed out and the button audibly "clicks). There are still 12KB of cache files and the problem persists.



    Oh... the notes I read on Helmdall suggested that they should be unzipped and untarred so that helmdall.exe can find the files named in the command. Should I be using a different syntax?

    I really appreciate your help, btw. :-)
    Perhaps if you reboot and install a different launcher? You can do that via desktop Play.
    11-06-2016 01:34 PM
  10. esuhl's Avatar
    Perhaps if you reboot and install a different launcher? You can do that via desktop Play.
    Sorry -- I'm really new to all this. What's a "launcher"? Is that what Trebuchet does? And by "desktop Play", do you mean the Google Play app store? Since it crashes repeatedly, I can't use the phone at all to get to Google Play...

    I've been trying to get TWRP installed for days, but the installation appears to complete, but the phone reboots into CWM recovery (which was on the phone previously) instead.

    I tried flashing the unzipped ROM files via CWM's "install zip" option, but both fail with the message "Installation aborted.".

    Am I right in thinking that this phone is set up weirdly, in that the OS and recovery share the same kernel? I think this is what's making it difficult to do what I want. And I don't really understand exactly what flashing the ROMs and recoveries does to the underlying file system and kernel. Does installing a custom recovery screw up the kernel for the main OS?

    There's this quote on the TWRP website:
    NOTE: The i9100 does not support a separately bootable recovery partition. To install and use TWRP, you will need to install a custom kernel or boot image that supports IsoRec.
    What's a "boot image"? Is that just the OS firmware? How do I find and install a suitable "custom kernel or boot image"? Apparently the latest version of TWRP is IsoRec compatible, and I have that.

    Sorry -- so many questions! :-)
    11-06-2016 02:22 PM
  11. Golfdriver97's Avatar
    Sorry -- I'm really new to all this. What's a "launcher"? Is that what Trebuchet does? And by "desktop Play", do you mean the Google Play app store? Since it crashes repeatedly, I can't use the phone at all to get to Google Play...

    I've been trying to get TWRP installed for days, but the installation appears to complete, but the phone reboots into CWM recovery (which was on the phone previously) instead.

    I tried flashing the unzipped ROM files via CWM's "install zip" option, but both fail with the message "Installation aborted.".

    Am I right in thinking that this phone is set up weirdly, in that the OS and recovery share the same kernel? I think this is what's making it difficult to do what I want. And I don't really understand exactly what flashing the ROMs and recoveries does to the underlying file system and kernel. Does installing a custom recovery screw up the kernel for the main OS?

    There's this quote on the TWRP website:


    What's a "boot image"? Is that just the OS firmware? How do I find and install a suitable "custom kernel or boot image"? Apparently the latest version of TWRP is IsoRec compatible, and I have that.

    Sorry -- so many questions! :-)
    I'm going to break my response up a bit here...

    A launcher is like a User interface, and Trebuchet is one. You can push installation of apps if you go to Google Play on a desktop PC, and log in with the same Gmail. You can then install another launcher, like Nova. Once installed, you should be able to click home and have an option for which to use. That should help with the navigation part.
    11-06-2016 03:15 PM
  12. Golfdriver97's Avatar
    Something that may be overlooked is this....you don't need to unzip files for recovery use. So to flash TWRP, leave the file zipped, and let CWM do that. Just install the file.

    As for the device itself, it was a strange set up.
    11-06-2016 03:18 PM
  13. esuhl's Avatar
    OMG! I finally managed to install TWRP!

    I came across this forum thread, where someone said this:
    As I understand, Galaxy devices are special, as they use a single zImage file containing both the kernel and the recovery.
    And there was a link to this post, which linked to a ZIP where someone had merged the stock kernel with TWRP:
    [ROM][I9100][5.1.1][OFFICIAL] CyanogenMod 12.1 Nightly Builds - Post #2286

    Well... it worked, and I have TWRP installed! So I'm one step further, and can play around some more.

    But I don't understand why it worked, and I'm as confused as ever!
    11-06-2016 03:30 PM
  14. Golfdriver97's Avatar
    OMG! I finally managed to install TWRP!

    I came across this forum thread, where someone said this:


    And there was a link to this post, which linked to a ZIP where someone had merged the stock kernel with TWRP:
    [ROM][I9100][5.1.1][OFFICIAL] CyanogenMod 12.1 Nightly Builds - Post #2286

    Well... it worked, and I have TWRP installed! So I'm one step further, and can play around some more.

    But I don't understand why it worked, and I'm as confused as ever!
    Most other Androids aren't like that. When i had my S3 I just needed to install TWRP and I was good to go. But, glad you got everything sorted out.
    11-06-2016 05:58 PM
  15. esuhl's Avatar
    You can push installation of apps if you go to Google Play on a desktop PC, and log in with the same Gmail. You can then install another launcher, like Nova. Once installed, you should be able to click home and have an option for which to use. That should help with the navigation part.
    Oh, wow! I'd never have thought of that -- that's so cool. The power of the "cloud", eh?! :-D I've reinstalled various ROMs over and over again and the Trebuchet problem hasn't come up again.
    11-07-2016 09:41 PM
  16. esuhl's Avatar
    Something that may be overlooked is this....you don't need to unzip files for recovery use. So to flash TWRP, leave the file zipped, and let CWM do that. Just install the file.
    It's been an arduous and incomprehensible journey trying to find the right files/command/programs to use.

    The first recovery image I downloaded was just a "zImage" (kernel?) file that I flashed with Heimdall. It successfully installed CWM.

    But I found all sorts of files for TWRP: .zip, .img, etc. The zips didn't work when installed via CWM. I tried to flash the .img file to the recovery partition (in heimdall-frontend), but it failed. I had to modify a .zip file I downloaded by adding a kernel manually. But I must be doing something wrong, otherwise surely the TWRP wiki page for the i9100 would mention all these i900-related issues...?

    Installing Cyanogenmod and GApps .zips via CWM/TWRP has always been easy and worked every time.

    But what's really driving me crazy now is that I can't reinstall the stock ROM. I've tried three versions now. It's an absolute battle of wits now! I must defeat this device!!!

    Installing the stock ROM zips via TWRP fails with the message, "Error flashing zip '<filename>'.

    I also installed Odin (to see if it could succeed where Heimdall can't), and added the .tar.md5 file to the AP section of Odin. It takes a while to flash, with the output below, but the phone just endlessly reboots afterwards.

    Code:
    <ID:0/003> Added!!
    <ID:0/003> Odin engine v(ID:3.1203)..
    <ID:0/003> File analysis..
    <ID:0/003> SetupConnection..
    <ID:0/003> Initialzation..
    <ID:0/003> Get PIT for mapping..
    <ID:0/003> Firmware update start..
    <ID:0/003> SingleDownload.
    <ID:0/003> boot.bin
    <ID:0/003> cache.img
    <ID:0/003> factoryfs.img
    <ID:0/003> hidden.img
    <ID:0/003> modem.bin
    <ID:0/003> param.lfs
    <ID:0/003> Sbl.bin
    <ID:0/003> zImage
    <ID:0/003> RQT_CLOSE !!
    <ID:0/003> RES OK !!
    <ID:0/003> Removed!!
    <ID:0/003> Remain Port ....  0 
    <OSM> All threads completed. (succeed 1 / failed 0)
    11-07-2016 10:28 PM
  17. Golfdriver97's Avatar
    It's been an arduous and incomprehensible journey trying to find the right files/command/programs to use.
    Have you tried to use Odin to only install the recovery?
    11-08-2016 07:57 AM
  18. esuhl's Avatar
    Have you tried to use Odin to only install the recovery?
    No, I did that with Helmdall. But not to worry -- I finally got Odin to work!!! I must've been using incompatible ROMs (although they sounded like the right ones). Anyway, if anyone else stumbles across this thread, this is the one that worked for me. It's the one for (originally) Vodafone UK phones:
    Download firmware: I9100XWMS2_I9100VODLSF_VOD - SamMobile

    WOOOO!!! Thank you once again! :-D
    Golfdriver97 likes this.
    11-08-2016 11:03 AM
  19. Golfdriver97's Avatar
    No sweat. See you around the forums.
    11-08-2016 01:57 PM

Similar Threads

  1. LG V20 - DAC Problem?
    By mlknez in forum LG V20
    Replies: 174
    Last Post: 02-23-2017, 01:39 PM
  2. Samsung Galaxy Tab S2 touchscreen keyboard problems
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 11-04-2016, 05:12 PM
  3. LG G3 to LG K8 SD card problem
    By Roger Haslock in forum LG G3
    Replies: 0
    Last Post: 11-04-2016, 12:07 PM
  4. usb otg problem on lg g4
    By asher151 in forum LG G4
    Replies: 0
    Last Post: 11-04-2016, 11:07 AM
  5. Alarm problem
    By bobby35ny in forum LG G4
    Replies: 1
    Last Post: 11-03-2016, 05:09 PM
LINK TO POST COPIED TO CLIPBOARD