Remove All Ads from XDA

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

443 posts
Thanks Meter: 297
By Szaby59, Senior Member on 11th September 2012, 08:57 PM
Post Reply Email Thread

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!

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

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

First of all download your original rom from:

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.
( and also extract here)
3, Open a terminal window, and enter:

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

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

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

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!

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

For SU binary:
sudo chown root:root /mnt/system/bin/su
sudo chmod 06755 /mnt/system/bin/su
For SuperUser app:
sudo chmod 644 /mnt/system/app/superuser.apk
7, Unmount the image:
sudo umount /mnt/system
or if it's not working:
sudo umount system.img
8, Now create md5 hashes:
md5sum -t system.img>>system.img
mv system.img system.img.md5
if you get "permission denied" first:
sudo chown username:username system.img
9, Create falshable tar and md5 hashes for odin package:
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.
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.

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:	8721
Size:	67.0 KB
ID:	1319314  
Attached Files
File Type: zip Odin3 - [Click for QR Code] (198.5 KB, 6891 views)
File Type: zip - [Click for QR Code] (1.14 MB, 11647 views)
File Type: zip - [Click for QR Code] (135.9 KB, 7390 views)
The Following 38 Users Say Thank You to Szaby59 For This Useful Post: [ View ] Gift Szaby59 Ad-Free
11th September 2012, 08:58 PM |#2  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 297
(Only modified system and csc - if Superuser not included download manually from Play store or install from sdcard)

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


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: [ View ] Gift Szaby59 Ad-Free
12th September 2012, 06:55 AM |#3  
Junior Member
Thanks Meter: 0
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: 297
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  
Senior Member
Thanks Meter: 12
any chance to reset counter? mine just rooted yesterday. damn
12th September 2012, 01:00 PM |#6  
Senior Member
Flag Ajka
Thanks Meter: 28
Donate to Me
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: 388

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.
12th September 2012, 03:57 PM |#8  
Szaby59's Avatar
OP Senior Member
Thanks Meter: 297
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.
12th September 2012, 06:37 PM |#9  
Junior Member
Thanks Meter: 0
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: 297
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.
12th September 2012, 09:30 PM |#11  
arroyo's Avatar
Senior Member
Flag Bydgoszcz
Thanks Meter: 388
Do I need to create CSC file again if I want to flash back to stock-non rooted firmware? Or should I use stock PDA file only, without CSC?
Can you write down a simple "Going back to stock ROM procedure without touching Flash Counter". Many noobs (including me) would be grateful for complete solution.
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes