Repartitioning problems

esuhl

Member
Jul 18, 2016
12
0
0
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: https://www.youtube.com/watch?v=-wDsvNmKlxE
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!
 
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.
 
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 :-)
 
Last edited:
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?
 
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. :-)
 
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.
 
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! :-)
 
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.
 
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.
 
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!
 
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.
 
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.
 
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)
 
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
 

Trending Posts

Forum statistics

Threads
954,115
Messages
6,960,628
Members
3,162,924
Latest member
und3ad