Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[ROOT] [i8160] [Ace2] Advanced rooting procedure WITHOUT increasing the Flash counter

OP Szaby59

11th September 2012, 08:57 PM   |  #1  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 287
 
398 posts
Join Date:Joined: Aug 2010
More
SAMSUNG GALAXY ACE 2 i8160/i8160P

This could be complicated if you never used any Linux os, however with this method you can root your phone without increasing the flash counter.
Kernel, recovery, etc. will be the same as in original samsung roms, we will flash a modified (pre-rooted) system.img.

For prerooted system images and csc files see 2nd post!

Requirements:
Linux - Ubuntu 12 recommended (a virtual one will also do the job)
Windows with Odin for flashing
Patience

References:
Ext4Utils
Insipred by: Expert root method which does not increase the flash counter

First of all download your original rom from: http://www.sammobile.com/firmware/?page=3

1, Create a "samsung" directory on your linux filesystem -> "home/username" folder where username is your linux username.
2, Extract the downloaded firmware, then move system.img.md5 and cache.img.md5 to home/username/samsung dir.
(root_package.zip and ext4utils.zip also extract here)
3, Open a terminal window, and enter:

Code:
sudo mkdir /mnt/system
Type the root password and enter.

4, Now set current dir to samsung directory and mount the system image:

Code:
cd /home/username/samsung
mv system.img.md5 system.img.ext4
make
./simg2img system.img.ext4 system.img
sudo mount system.img /mnt/system
if you get error when executiong "make" type:

Code:
sudo apt-get install zlib1g-dev
5, The original system image has been mounted, now extract su binary and superuser.apk to samsung dir then, enter:

I suggest only su binary to include in /system, SuperUser can be installed later!

Code:
sudo cp su /mnt/system/bin/su
6, Now we have to adjust the permissions:

For SU binary:
Code:
sudo chown root:root /mnt/system/bin/su
sudo chmod 06755 /mnt/system/bin/su
For SuperUser app:
Code:
sudo chmod 644 /mnt/system/app/superuser.apk
7, Unmount the image:
Code:
sudo umount /mnt/system
or if it's not working:
Code:
sudo umount system.img
8, Now create md5 hashes:
Code:
md5sum -t system.img>>system.img
mv system.img system.img.md5
if you get "permission denied" first:
Code:
sudo chown username:username system.img
9, Create falshable tar and md5 hashes for odin package:
Code:
tar cf system_rooted.tar system.img.md5
md5sum -t system_rooted.tar>>system_rooted.tar
mv system_rooted.tar system_rooted.tar.md5
As you remember we copied the cache.img.md5 also, that's because we need to flash this as a separated CSC package.

10, Creating CSC package.
Code:
tar cf csc.tar cache.img.md5
md5sum -t csc.tar>>csc.tar
mv csc.tar csc.tar.md5
11, Now open Odin and select system_rooted.tar.md5 as PDA, and csc.tar as csc.
Check: Auto reboot and F. Reset Time.

Enjoy your rooted phone.

NOTES:
After flashing phone will boot in recovery mode to apply csc, then reboots automatically to normal mode.
If you download different rom than already have on the device first flash the unmodified samsung tar as PDA.
Attached Thumbnails
Click image for larger version

Name:	odin.jpg
Views:	7101
Size:	67.0 KB
ID:	1319314  
Attached Files
File Type: zip Odin3 v1.83.zip - [Click for QR Code] (198.5 KB, 5071 views)
File Type: zip root_package.zip - [Click for QR Code] (1.14 MB, 7661 views)
File Type: zip ext4utils.zip - [Click for QR Code] (135.9 KB, 4928 views)
Last edited by Szaby59; 14th September 2012 at 09:13 PM.
The Following 38 Users Say Thank You to Szaby59 For This Useful Post: [ View ]
11th September 2012, 08:58 PM   |  #2  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 287
 
398 posts
Join Date:Joined: Aug 2010
More
PRE-ROOTED ROMs
(Only modified system and csc - if Superuser not included download manually from Play store or install from sdcard)

PDA: XXLD8 | CSC: I8160DBTLD2 -> -> DOWNLOAD <-
Thanks to: powermetza

PDA: XXLD8 | CSC: XXLD3 | Product code: XEO -> Mirror 1 | Mirror 2
Thanks to: mastermid | szczepan2



For i8160P - Galaxy Ace 2 NFC model

PDA: I8160PXXLE6 | CSC: I8160PDBTLE5 -> Mirrors
Thanks to: soraxx

SuperUser FIX for pre-rooted rom (only if you have problems): View

FLASHING INSTRUCTIONS

0, Download odin from 1st post, extract the downloaded (pre-rooted) rom.
1, Open odin and select csc.tar.md5 (or something like that it's a smaller file max. 20 MB) as CSC.
2, Select the other file (possibly system.tar.md5 or pda.tar.md5, it's 500+ MB) as PDA.
3, Check, Auto reboot and F. Reset Time then start.
(of course first switch to download mode and connect the phone )
Last edited by Szaby59; 15th September 2012 at 11:21 AM.
The Following 7 Users Say Thank You to Szaby59 For This Useful Post: [ View ]
12th September 2012, 06:55 AM   |  #3  
Junior Member
Thanks Meter: 0
 
10 posts
Join Date:Joined: Jun 2010
mount: must specify filesystem (this is error)
My OS - Linux Mint 13 with MATE, run natively.
12th September 2012, 08:33 AM   |  #4  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 287
 
398 posts
Join Date:Joined: Aug 2010
More
I don't know what's the problem, the filesystem should be ext4, but in Ubuntu mounted without any errors.
12th September 2012, 12:32 PM   |  #5  
Member
Thanks Meter: 11
 
94 posts
Join Date:Joined: Dec 2010
any chance to reset counter? mine just rooted yesterday. damn
12th September 2012, 01:00 PM   |  #6  
Member
Flag Ajka
Thanks Meter: 24
 
91 posts
Join Date:Joined: Aug 2007
Donate to Me
More
Thank you! It would be a good solution can be used under Windows ...

GT-I8160-ról küldve
12th September 2012, 03:39 PM   |  #7  
arroyo's Avatar
Senior Member
Flag Bydgoszcz
Thanks Meter: 346
 
385 posts
Join Date:Joined: Mar 2009
More
@Szaby59

Three simple questions:

1. Can I use this method to cook pre-rooted ROM (that doesn't increase flash counter), but without samsungs bloatware? In other words: Can I somehow remove any APK that comes from samsung and still have valid warranty?
2. Did you tried this method with flash_counter=0 or did you already voided warranty and then NOT increased flash_counter?
3. Are both values "Custom Binary Download=NO" and "Current Binary: Samsung Official" still intact after this root method?

Anyway... Thank you for this... I was waiting for something like this since I bought I8160.
Last edited by arroyo; 12th September 2012 at 03:50 PM.
12th September 2012, 03:57 PM   |  #8  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 287
 
398 posts
Join Date:Joined: Aug 2010
More
1, I think you can remove apps and modify some other things if you want I didn't test it but 99% it's possible (or you can remove aps later with root explorer from /system/app)
But for warranty purposes (removing root, restoring original apps) reflash the original unmodified samsung tar.

2-3, No, I didn't tried any other methods, the custom binary downloads is 0 (NO) and I have "Samsung Official".
I think the counter only observing kernel flashes, with this method the flash counter will be the same as before the flash.

Also I noticed when you reboot from adb or terminal to download mode it doesn't shows the odin mode... stuffs, only when you use the hardware keys (vol down+home+power). !Maybe! in this way we can flash a modified kernel but it's not 100% and first you need to root the phone somehow to enable "su reboot download" command.
Last edited by Szaby59; 12th September 2012 at 04:00 PM.
12th September 2012, 06:37 PM   |  #9  
Junior Member
Thanks Meter: 0
 
10 posts
Join Date:Joined: Jun 2010
By the way... There is no way to download the ROM from THIS site... Loading, loading, and... loading...
12th September 2012, 07:54 PM   |  #10  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 287
 
398 posts
Join Date:Joined: Aug 2010
More
Quote:
Originally Posted by szczepan2

By the way... There is no way to download the ROM from THIS site... Loading, loading, and... loading...

Login first -> blank screen -> go back and refresh > download firmware.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes