[Galaxy Tab 3 Q&A, Help & Troubleshooting] grizzlyfute:
Rooting SM-T113

Hello everybody

I struggled to root my Samsung Galaxy Tab 3 Lite

(SM-T113). So I decided to shared my experience and writing this tuto.

Of course, this is "a non standart" device, and elements for rooting

SM-T110 or SM-T210 didn't work. Android version of this device is 4.4.4

Methodology and tries :

I have proccured myself the Samsung official firmware (here). This image

allow me to get back during beetwen the experimentations. I tried several

experimentation and restore the device after each fail.

Installing with Odin the Clockworkmod (CWM) for SM-T110 , for SM-T210, and

SM-T211. (Has preconnised here) Each time, when loading the CWM, I got a little

(1 ascii character) exclamation mark at the top-left of the screen. The device

didn't boot on recovery

Installing with Odin the (TWRP) for SM-T110. Same symptom

Installing philz_touch : against the message with only the red exclamation

mark.

I conclude of checked of some signature before executing recovery.

Using Kingo root application : software try to root during 20 minutes and

finaly fail.

Using Towel root application : The device isn't reconized

Conclusion: Security breach for rooting have been fixed in this version of android

I have downloaded UPDATE-SuperSU-v2.46 for android. The idea is to push this

application by the standart android update way. (native recovery).

Sending the zip archive 'as is' => failure to check the whole archive

Re-sign the archive with the autosign tools => failure to check footer of archive

Rewriting the update-script (see here) and (here) and auto-sign the archive

: failure to check footer

I am procured myself some pre-rooted image. Odin fail to import them. (and I

have no succed to use heimdall for linux on my debian)

I have try to improve the official samsung Image by adding root manually , using

simg2img and make_ext4fs. Odin fail at the same point

It's remaining me two way : Or I try to generated a correct update file, or I

try to understood why odin fail to import prerrooted system and my custom

image. I choosed the second option.

The offical update is splited by several blocks, each block having is own

header. A master header provide global information about the image (number of

blocks, size, ...). I have putting some spies in simg2img and

observate the headers of official update and of my custom uptate. Result is

surprising : It is missing 4 bytes by headers. in custom update. According to

samsung orginal update, missing values seem to be constant. I suppose it's a 'magic

number', checked by the device to be sure the 'good' update is applied. So I

modifed this headers in make_ext4fs for adding the missing constants. My custom update is now

accepted by my devices, and I got root (!) :D

I will now describe how to generate and import this update.

DISCLMAIMER

I or Xda-developers are not responsable of any damage one your device, in particular if you bricked it

You waranty will probably void

Rooting device may lead to some dysfonctionnement, or may open some security breach. You are the only responsable.

1. What do you need :

Your device, and a cable to connect it to your PC

A Windows distribution, with Odin (www (dot) samsungodindownload (dot) com/) and the samsung drivers (www (dot) samsung (dot) com/us/support/owners/product/SM-T110NYKAXAR#")

A Linux distribution, with the appropriate compilation package (build-essential), and with git.

A way to transfers big files beetwen your Linux and your Windows.

The Official samsung update (best-tech-reviews (dot) com/update-sm-t113-t113xxu0aoa4-android-4-4-4-2152 or rapidgator (dot) net/file/7140bfdc421eea86eda5a5cbca00216e)

The UPDATE-SuperSU-v2.46 in zip format (download (dot) chainfire (dot) eu/696/SuperSU/UPDATE-SuperSU-v2.46.zip?retrieve_file=1") (or root program for your android)

Method assume you never installed root on your device

2. Generate the update

Uncompress the Samsung official image.

unzip image_official.zip
tar -xf image.tar.md5

Uncompress and make_ext4fs and simg2img (here)

cd ..
git clone https:// github.com/YuLaw/ext4-utils.git
cd ext4_utils

Download and applied the patch (see attachment)

patch -p1 < ../patch_ext4_utils.diff

Build ext4_utils

make

Extract the image

cd ..
unzip DBT-T113XXU0AOA4-20150121104149.zip
tar -xf T113XXU0AOA4_T113OXA0AOA4_HOME.tar.md5
ext4_utils/simg2img system.img system.img.raw

Mount the image

mkdir mount_point
sudo mount -o loop,rw system.img.raw mount_point

unzip the UPDATE-SuperSU-v2.46

mkdir UPDATE-SuperSU-v2.46
mv UPDATE-SuperSU-v2.46.zip UPDATE-SuperSU-v2.46/
cd UPDATE-SuperSU-v2.46/
unzip UPDATE-SuperSU-v2.46.zip
cd ..

Now, copy common file and armv7 one the mount_point. If you use an other

device, replace the armv7 repository by the appropriate repository according

to your device processor. You can refer to the

UPDATE-SuperSU-v2.46/com/google/android/update-binary to find them.

sudo cp UPDATE-SuperSU-v2.46/armv7/{su,supolicy} mount_point/xbin
sudo cp UPDATE-SuperSU-v2.46/armv7/su mount_point/xbin/daemonsu/
sudo cp UPDATE-SuperSU-v2.46/armv7/libsupol.so mount_point/lib
sudo mkdir mount_point/etc/init.d
sudo cp UPDATE-SuperSU-v2.46/common/99SuperSUDaemon mount_point/etc/init.d
sudo cp UPDATE-SuperSU-v2.46/common/Superuser.apk mount_point/app
sudo mv mount_point_app/etc/install-recovery.sh mount_point/etc/install-recovery.bak
sudo cp UPDATE-SuperSU-v2.46/common/install-recovery.sh mount_point/etc
sudo chmod 0755 mount_point/xbin/daemonsu
sudo chmod 06755 mount_point/xbin/su
sudo chmod 0755 mount_point/xbin/supolicy
sudo chmod 0644 mount_point/lib/libsupol.so
sudo chmod 0755 mount_point/etc/install-recovery.sh
sudo chmod 0744 mount_point/etc/init.d/99SuperSUDaemon
sudo chmod 0644 mount_point/app/Superuser.apk

We will regenerate the file system. Do not umount them. If patch on

ext4_utils is not applied, you shall applied it now.

mkdir output
sudo ext4_utils/make_ext4fs -s -a system -l 1500M output/system.img mount_point
cd output
tar -cf system.img system.img.tar
md5sum -t system.img.tar >> system.img.tar
mv system.img.tar system.img.tar.md5

You can now transfert this file to your windows operating system.

3. Android prepartion

You must ensure your device is allowed to install apk from untrusted source. See

in option/application or in developper menu option

Connect the android to you pc.

Boot your android device into downloading mode. On SM-T113 Samsung galaxy Tab3 lite,

press power, volume down and pad when booting.

Run odin, ensure Repartion is NOT checked, and select the AP (PDA) button. (The

only checked case is autoreboot and F.Reset time) Load the previously generated

file and click start.

Your android device may now reboot and install the root application.

Congratulation, you have now rooted your device. You can clean up the downloaded files.

4. One of these step fail, what I can do to come back. :crying:

You may import with odin the official samsung firmware or proceed to a factory return from the recovery.

5. May I eat my devices if I can't root it ? :confused:

Samsung user manual say to not do it.