Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,384 Members 42,962 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Szaby59
Old
(Last edited by Szaby59; 14th September 2012 at 08:13 PM.)
#1  
Szaby59's Avatar
Senior Member - OP
Thanks Meter 285
Posts: 403
Join Date: Aug 2010
Arrow [ROOT] [i8160] [Ace2] Advanced rooting procedure WITHOUT increasing the Flash counter

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:	6626
Size:	67.0 KB
ID:	1319314  
Attached Files
File Type: zip Odin3 v1.83.zip - [Click for QR Code] (198.5 KB, 4615 views)
File Type: zip root_package.zip - [Click for QR Code] (1.14 MB, 6877 views)
File Type: zip ext4utils.zip - [Click for QR Code] (135.9 KB, 4479 views)
The Following 38 Users Say Thank You to Szaby59 For This Useful Post: [ Click to Expand ]
 
Szaby59
Old
(Last edited by Szaby59; 15th September 2012 at 10:21 AM.)
#2  
Szaby59's Avatar
Senior Member - OP
Thanks Meter 285
Posts: 403
Join Date: Aug 2010
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 )
The Following 7 Users Say Thank You to Szaby59 For This Useful Post: [ Click to Expand ]
 
szczepan2
Old
#3  
Junior Member
Thanks Meter 0
Posts: 10
Join Date: Jun 2010
mount: must specify filesystem (this is error)
My OS - Linux Mint 13 with MATE, run natively.
 
Szaby59
Old
#4  
Szaby59's Avatar
Senior Member - OP
Thanks Meter 285
Posts: 403
Join Date: Aug 2010
I don't know what's the problem, the filesystem should be ext4, but in Ubuntu mounted without any errors.
 
hary232
Old
#5  
Member
Thanks Meter 11
Posts: 94
Join Date: Dec 2010
any chance to reset counter? mine just rooted yesterday. damn
 
gidano
Old
#6  
Member
Thanks Meter 24
Posts: 90
Join Date: Aug 2007
Location: Ajka

 
DONATE TO ME
Thank you! It would be a good solution can be used under Windows ...

GT-I8160-ról küldve
Használjuk magyarul az Androidot!
SymPDA Android
 
arroyo
Old
(Last edited by arroyo; 12th September 2012 at 02:50 PM.)
#7  
arroyo's Avatar
Senior Member
Thanks Meter 331
Posts: 372
Join Date: Mar 2009
Location: Bydgoszcz
@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.
 
Szaby59
Old
(Last edited by Szaby59; 12th September 2012 at 03:00 PM.)
#8  
Szaby59's Avatar
Senior Member - OP
Thanks Meter 285
Posts: 403
Join Date: Aug 2010
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.
 
szczepan2
Old
#9  
Junior Member
Thanks Meter 0
Posts: 10
Join Date: Jun 2010
By the way... There is no way to download the ROM from THIS site... Loading, loading, and... loading...
 
Szaby59
Old
#10  
Szaby59's Avatar
Senior Member - OP
Thanks Meter 285
Posts: 403
Join Date: Aug 2010
Quote:
Originally Posted by szczepan2 View Post
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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes