The OnePlus 6 is officially on sale! Buy now →
FORUMS
Remove All Ads from XDA
OnePlus 6 On Sale

[Guide/tutorial] Samsung Galaxy S2 i9100 Any version to Android 7.1/LineageOS14.1

270 posts
Thanks Meter: 213
 
By djibe89, Senior Member on 15th January 2017, 03:32 PM
Post Reply Email Thread
[Guide] Samsung Galaxy S2 i9100 Android 7.1 Nougat/Lineage OS 14.1
[Guide/tutorial] Samsung Galaxy S2 i9100 Any version to Android 7.1 without PC

This detailed step-by-step guide helps you transform your Samsung Galaxy S2 i-9100/i-9100P to a powerful one with Android 7.1 Nougat.
Verify your phone is i9100 or i9100P before going further : when you Power on phone, it is written Galaxy SII i9100.

CHANGELOG OF TUTORIAL
v7. Added Google Play certification (use instructions with my v5 pack below)
v6. Switched to Dorimanx kernel, swteaks, enhenced tutorial thx to feedback, introduced md5 signatures, Stweaks included
v5. Overclock and optimize
v4. Simpler repit, 2 profiles for repit included
v3.5. More custom partitions, kernel for Android N 1.3
v3. Moved to Lineage OS 14.1, Skyline custom kernel, TWRP 3.1 by the.gangster
v2. Added latest repit, added walkthrough for possible errors
v1. Initial release


1 ) DOWNLOAD ---------------------
- djibe Galaxy S2 i9100 pack (53 Mo) v5 : http://bit.ly/GalaxyS2djibepackv5
(contains Philz Touch recovery + kernel Lanchon IsoRec CM13 + Dorimanx Kernel 13b5 + the.gangster IsoRec TWRP 3.1.0-0 recovery + lanchon repit djibe edit standard or prefered + Su for LOS 14.1 + STweaks + Samsung drivers).
Unzip files, copy all zips (except drivers) to microSD.

### DorimanX Kernel IS ONLY FOR LOS 14.1 ! No other ROM. You have been warned

- ROM : Official Lineage OS 14.1 for GalaxyS2 i9100 : https://download.lineageos.org/i9100
LOS 14.1 supports OverTheAir updates (Easily update phone from Settings menu).

Or RESURRECTION REMIX N 5.8.2 (May be heavy for S2) : https://forum.xda-developers.com/gal...remix-t3507366
Or ViperOS : https://forum.xda-developers.com/gal...peros-t3640000
Or AICP : https://forum.xda-developers.com/gal...icial-t3483422
Or XenonHD : https://forum.xda-developers.com/gal...icial-t3538333
Or AOKP : https://forum.xda-developers.com/gal...p-rom-t3606915
Or CarbonROM : https://forum.xda-developers.com/gal...r-5-1-t3614789

- GoogleApps, OpenGApps ARM 7.1 micro (micro or nano versions ONLY please) : http://opengapps.org/

- a microSD card. Copy ROM, deviceid apk, Dorimanx kernel and Gapps AND THEIR RESPECTIVE md5 files from my pack on microSD card and insert it in phone.
- Charge phone to 100 %

WARNING. It will not work if your phone is encrypted. Uncrypt it before starting this tutorial.
WARNING. This tutorial works without a PC. So it will work if (like me) you get "Unknown USB device error" message when plugging phone in Windows.
WARNING. Warranty is now void.
WARNING. Read carefully the sentences starting with ###.

### Later in this tutorial, if you get error : "Failed to mount */data* (No such device)", just reformat Data partition to Ext4 (Using lanchon-repit's script or TWRP recovery).

2 ) BACKUP DATA -------------------
Install Samsung drivers (you unzipped earlier).
Then plug phone to PC in File transfer mode.
Collect all .jpg or .mp4

Use an app like Backupyourmobile to backup texts, contacts, etc.
Check that backup is located on microSD card.
Then copy the backup on your PC.


3 ) FLASH RECOVERY, KERNEL AND RE-PARTITION----------------
We gonna repartition phone to reduce an unused preload partition of 512 Mo (stored Samsung updates that no more exist).
We gonna increase system partition to 1 GB so Android 7.1 and Gapps have enough space.
We gonna increase data partition so you can have all the apps you like.
ALL YOUR DATA WILL BE LOST.

Shut down phone.
Power it back on in recovery mode : Use Volume+ + Home + Power buttons and release them when you see Galaxy S2 logo.
Then wait till the recovery launches.
### If you already have a custom recovery, go to the mark -!-!- below.

Using default recovery, use volume buttons to navigate and power to confirm,
install zip -> choose Philz_touch_6.48*.zip and install it.
When its done, shut down phone, restart in recovery mode. You are now in the Philz touch recovery.

### If it fails, you need to install CWM recovery using Odin software and SGS2 in Download mode.
### Use a good tutorial for Odin and SGS2 i9100 recovery flashing.
### Download CWM for Odin : https://www.androidfilehost.com/?fid=95916177934516900
### Once finished, continue operations below as if you had Philz recovery.

In Philz touch recovery (or your recovery -!-!-) : go to Wipe -> format /cache and format /system partitions.
Then back to install zip -> Flash kernel-lanchon*.zip (FLASH IT OR TWRP RECOVERY WON'T LAUNCH AND PHONE WILL BE BRICKED),
then flash recovery recovery-the.gangster-IsoRec-TWRP-3.1.0-0-i9100.zip.

Reboot phone to recovery again, it is now TWRP 3.1.0-0 Recovery !!!
Swipe to unlock filesystem.
Check never show this screen during boot again and swipe again.

In TWRP, go to Backup -> select Boot, System, Data,
Tap select Storage and select External storage,
then Swipe to Backup.
Backup is located on your microSD in the TWRP folder.

### WARNING : Don't flash repit files if you don't have a TWRP recovery

### 2 MAIN CONFIGS TO REPARTITION :
- For standard config, just use the djibe-standard-repit*.zip included in my archive, you'll have :
1GB system, 6GB data (for apps), max internal storage (photos, temp files) and minimal preload (useless partition used for OTA offical updates).

- My PREFERED version is djibe-prefered-repit*.zip :
1GB system, 2GB Internal storage (limited size for photos and files because who takes photos with SGS2 ?), max data (about 11,5 GB for apps), minimal preload (useless partition).

- For more custom partitions, ask us in a post what partition sizes you want.

### Let the lanchon*.zip filename AS IS because the filename gives the instructions for the repit script. Lanchon is smart !
### If lanchon-standard OR prefered-djibe repit flash fails, just replace all the +f2fs comments by +ext4 in the zip filename (edit filename in Windows).

Go back to TWRP Home screen,
Plug phone to charger.
Tap go to Install, select lanchon-VERSIONYOUWANT-djibe-repit*.zip from your microSD (if file not seen, tap Select storage -> External-storage),
then Swipe to flash. There is an error, files have been copied to /tmp folder. It is normal !

Go back to Install -> Select Storage -> Internal Storage, OK.
Now tap on : (Up A Level),
scroll down and enter the "tmp" folder,
### If you use another PIT file to repartition (not mine -djibe-version), plug phone to Power source or you could hard brick your device.
tap on lanchon-VERSIONYOUWANT-djibe*.zip and Swipe to flash.
Let it process for 2 minutes.


4 ) Wipe partitions
INFO : F2FS is the fastest filesystem for read and write partitions on flash memories. Compared to EXT4, gain is from 15 to 280 %.
No need to format the /System partition because it is Read only and Ext4 is still faster.
Format has been done with repit. No need to manually format anymore.

Go to Wipe -> Advanced wipe,
select Dalvik, Cache, System, Data, Internal Storage then Swipe to Wipe, go back to TWRP Home.

### If you had to rename your PIT file to EXT4, you still have to format in F2FS. Go to Wipe -> Advanced Wipe,
### Select cache -> Repair or change filesystem -> change filesystem -> F2FS,
### Do it again for Data partition.


5) INSTALL ROM, GAPPS, ROOT and KERNEL
Still under TWRP Home screen -> go to Install zip and set Storage to External-Storage.
We need to install files 1 by 1.

### If you are installing Resurrection Remix ROM, process differs a bit :
### Flash ROM, then reboot system and let Android first boot.
### Then reboot to recovery and flash GApps. Reboot. DO NOT FLASH DORIMANX KERNEL !

Select lineage-14.1-*.zip and Swipe to flash,
Then select addonsu-*.zip (this is the Root) and Swipe to flash,
### You get this error : Updater process ended with signal: 4, Error installing zip file '/sdcard/Download/addonsu*.zip', don't care, root is correctly installed.

then open_gapps-arm-7.1*.zip, and Swipe to flash,

then kerneldorimanx*.zip, check Zip signature verification and Swipe to flash.
### Flashing the custom kernel is optionnal and limited to Lineage OS ROM
### If you are using ResurrectionRemix, don't flash any custom kernel at all !

Then wipe cache/dalvik,
then reboot system.

Wait for 15 minutes while Android starts for the first time.

### If you are stuck in a bootloop, redownload Dorimanx kernel and copy it again on SDcard to flash again.


6 ) ROOT ACCESS
Once in Android, open the Settings menu, select "About Phone".
Go to Settings -> About -> Hit 7 times on the build number, go back,
Go to the Developer options menu, root access -> activate ADB+apps
and Lower activate Local Terminal.


7) CALIBRATE BATTERY
In Google Play Store, download App Battery Calibration (from IMobS Ltd).
Launch the App.
Confirm root acces.
Plug tab and wait till charge hits 100%, then hit BATTERY CALIBRATION and unplug it.


8) You can use Backupyourmobile to restore data,
you can use GPS Status & Toolbox app to enhance GPS fix.


9) Faster LOS 14.1 and overclock
Go to Settings -> Developer options.
In drawing section, set all animation options to off.

Now, on Google Play Store, download STweaks app : https://play.google.com/store/apps/d...al.stweaks.app
OR use STweaks included in my pack.
Grant root access.
Advices come from these benchmarks : http://androidmodguide.blogspot.fr/p/io-schedulers.html and https://wiki.linaro.org/Platform/And...teOptimization

In CPU, move down to MAX OC FREQUENCY, set 14000000 Hz.
No need to tweak other settings, Dorimanx already did !
You can activate Backlight notifications with Stweaks.


10 ) OBTAIN GOOGLE MOBILE SERVICES (GMS) CERTIFICATION
Google now restricts Google Play and Google apps access to certificated devices. Since you have a custom ROM, you are banned.
We now need to subscribe for the Google Play Certification.

Download the DeviceID app from the Play Store : https://play.google.com/store/apps/d...deviceid&hl=fr
### If you don't have access to the Play Store, in Android, go to Settings -> Security and activate the Unknow sources
### Now download DeviceID from here : https://www.apkmirror.com/apk/evozi/...load/download/

Install it, launch it.
Tap on the Google Service Framework (GSF) line, then tap on the COPY button.

In your Android webbrowser, go to : https://www.google.com/android/uncertified/
Connect to Google using your Google/Android account.
In the input field of the page, paste the 16 digits code.
Click on the Save button, a success message confirms your device is Certified.

Do I need to re-certify it ?
"Your device’s GSF ID is reset every time your device is factory reset (or when you wipe the GSF app itself) since it is stored in your data partition, so you must re-register your GSF ID every time you perform either of these actions."
More info here : https://lineageos.org/Google-Play-Certification/

That's it.


Enjoy,
djibe

THANKS --------------
Teams of : TWRP, Lineage OS, the.gangster, Lanchon, Resurrection remix, Philz, Skyline, MigoMujahid

DEBUG -----------------
To help other users that used other repit files and getting this error :
WARNING. If you get ERROR: 1
Fatal: file system errors in partition #11 'sdcard' (UMS) could not be fixed,
Write to me.
The Following 83 Users Say Thank You to djibe89 For This Useful Post: [ View ] Gift djibe89 Ad-Free
 
 
16th January 2017, 03:36 AM |#2  
octaviojss's Avatar
Member
Thanks Meter: 8
 
More
Hi, i tried that, the repit file i isntalled was the one that has your name. The whole process went ok, except for the install. please check the image for more info.
Attached Thumbnails
Click image for larger version

Name:	DSC_0081.jpg
Views:	3086
Size:	254.4 KB
ID:	4004986  
The Following 3 Users Say Thank You to octaviojss For This Useful Post: [ View ] Gift octaviojss Ad-Free
16th January 2017, 11:51 AM |#3  
octaviojss's Avatar
Member
Thanks Meter: 8
 
More
I formated cache and data partition back to ext4 and everything went fine. Now I have ressurection remix 7.1 ROM.
The Following User Says Thank You to octaviojss For This Useful Post: [ View ] Gift octaviojss Ad-Free
16th January 2017, 12:09 PM |#4  
OP Senior Member
Thanks Meter: 213
 
More
hi octaviojss:
- Why did you flash my PIT, cause you got the WARNING. If you got "ERROR: 1 Fatal: file system errors in partition #11 'sdcard' (UMS) could not be fixed error" ?
- What happens if you go back to Wipe -> Advanced Wipe
And reformat every partition (F2FS for cache and data and ext4 for system and internal storage) ?

Keep in touch
The Following User Says Thank You to djibe89 For This Useful Post: [ View ] Gift djibe89 Ad-Free
16th January 2017, 12:38 PM |#5  
octaviojss's Avatar
Member
Thanks Meter: 8
 
More
Why did you have your PIT file there in first place, if it wasnt needed? I installed it because it was more recent. Anyway, as said, when i reformated the cache and data partitions back to ext4 file format i was able to install the rom smoothly and flawlessly.
16th January 2017, 12:42 PM |#6  
OP Senior Member
Thanks Meter: 213
 
More
Glad you did it !
For the PIT file it doesn't change much, but the original lanchon PIT moves data during partition resize, mine erases data.
Enjoy
The Following User Says Thank You to djibe89 For This Useful Post: [ View ] Gift djibe89 Ad-Free
19th January 2017, 05:21 PM |#7  
Junior Member
Thanks Meter: 0
 
More
I get an error "E: error in /tmp/sideload/package.zip" Please help me fix this
19th January 2017, 10:08 PM |#8  
OP Senior Member
Thanks Meter: 213
 
More
Quote:
Originally Posted by Aly Rezz

I get an error "E: error in /tmp/sideload/package.zip" Please help me fix this

Hi Aly, at which step are you ?
Did you try reflashing the PITs from the SDcard and moving back to Internal stroage main folder ?
Did you authorize TWRP to mount system partition ?
The Following User Says Thank You to djibe89 For This Useful Post: [ View ] Gift djibe89 Ad-Free
20th January 2017, 04:00 PM |#9  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by djibe89

Hi Aly, at which step are you ?
Did you try reflashing the PITs from the SDcard and moving back to Internal stroage main folder ?
Did you authorize TWRP to mount system partition ?

I wiped my phone and flashed the Philz Touch Recovery Zip. I got this error while flashing it...
20th January 2017, 06:37 PM |#10  
OP Senior Member
Thanks Meter: 213
 
More
Quote:
Originally Posted by Aly Rezz

I wiped my phone and flashed the Philz Touch Recovery Zip. I got this error while flashing it...

So you've wiped everything under stock recovery ? It needs to be done later once Philz touch is working !
So, we'll try flashing recovery in Download Mode (Home + Power + Volume-), use Odin to flash Philz Touch recovery in .tar format (in AP/PDA section of Odin).

1 - Download Philz Touch recovery in .tar format :
https://mega.nz/#F!oZ1QDDbC!Ko20UNhowwIlXLVFjJsyKw (it doesn't load for me right now)
+ Odin 3.07 (my pack for i9300) : http://bit.ly/2hqiWsP

2 - From my tutorial here, execute the 3rd chapter with Odin :
https://forum.xda-developers.com/gal...i9300-t3491788
(do not flash TWRP inside my i9300 Archive)

3 - Once flash of Philz touch recovery is done, reboot to recovery and continue further steps.
The Following User Says Thank You to djibe89 For This Useful Post: [ View ] Gift djibe89 Ad-Free
21st January 2017, 12:24 PM |#11  
Senior Member
Thanks Meter: 13
 
More
good to have a full tutorial
Post Reply Subscribe to Thread

Tags
i9100, i9100p, isorec, repit, tutorial

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes