Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

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

$
0
0
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:
Code:

sudo cp su /mnt/system/bin/su
sudo cp superuser.apk /mnt/system/app

6, Now we have to adjust the permissions:
Code:

for su binary
sudo chown root:root /mnt/system/bin/su
sudo chmod 06755 /mnt/system/bin/su

for superuser:
Code:

sudo chown root:root /mnt/system/app/superuser.apk
sudo chmod 0644 /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.
Superuser.apk is optional to include in system, you can download later from market.
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:	N/A
Size:	67.0 KB
ID:	1319314  
Attached Files
File Type: zip Odin3 v1.83.zip - [Click for QR Code] (198.5 KB)
File Type: zip root_package.zip - [Click for QR Code] (1.14 MB)
File Type: zip ext4utils.zip - [Click for QR Code] (135.9 KB)

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>