Tablet S 4.0.3 r1a rooted - Sony Tablet S

Thanks Yupandra2012, my Tablet S 4.0.3 r1a finally rooted.
Ref: http://forum.xda-developers.com/showpost.php?p=31408901&postcount=12
The original steps(this link) was written in Japanese, I've just translate it into Eng. But sorry for my bad English.
UPDATE:
A semi automatic script can be found at here.
Files you need:
adb tools
SonyTabletICS-2.zip
Superuser-3.1.3-arm-signed.zip
VpnFaker.apk (Attachment)
For those who are no using the US firmware, the attached VpnFaker.apk may not suitable for your tablet.
Please follow this steps(click me) to resign the VpnFaker.apk. Thanks.
***Pls Execute the command line by line***
Unzip those files into a dir, Open cmd console, cd to that dir
Run the following command and press Restore on your tablet
Code:
adb restore settings.ab
Check the result
Code:
adb shell ls -ld /data/data/com.android.settings/a
[I][COLOR="DarkGreen"]drwxrwxrwx system system a[/COLOR][/I]
And continue, ignore the "rm -r a" permission denied error
Code:
adb shell
cd /data/data/com.android.settings
rm -r a
while : ; do ln -s /data a/file99; done
While the loop is running, open another cmd console and run
Code:
adb restore settings.ab
Once the restore process is completed, you can press CTRL+C on the 1st cmd console to break the loop
Check the /data permission
Code:
adb shell ls -ld /data
[I][COLOR="DarkGreen"]drwxrwxrwx system system data[/COLOR][/I]
Then continue
Code:
adb push busybox /data/local/tmp
adb push rootkit.tar.gz /data/local/tmp
adb push Superuser.apk /data/local/tmp
adb push su /data/local/tmp
adb shell
cd /data/local/tmp
chmod 755 busybox
./busybox tar zxf rootkit.tar.gz
exit
Push the resigned VpnFaker.apk(resign by ZipSigner 2) and update the timestamp
Code:
adb push VpnFaker.apk /data/local/tmp
adb shell
touch -t 1346025600 /data/local/tmp/VpnFaker.apk
exit
Now, replace the VpnDialogs, ignore "cp: can't open 'system/xxxxxxx': Permission denied" while you execute "/data/local/tmp/busybox cp -r system system2"
Code:
adb shell
cd /data
/data/local/tmp/busybox cp -r system system2
[COLOR="DarkGreen"]#Pls ignore "cp: can't open 'system/xxxxxxx': Permission denied"[/COLOR]
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
mv system2 system
mv app app-
mkdir app
mv /data/local/tmp/VpnFaker.apk /data/app
Make sure the datatime is 2012/08/27 00:00
Code:
TZ=0 ls -l /data/app
[I][COLOR="DarkGreen"]-rw-r--r-- shell shell 198580 2012-08-27 00:00 VpnFaker.apk[/COLOR][/I]
Generate the packages.xml
Code:
/data/local/tmp/busybox sed -f /data/local/tmp/packages.xml.sed system-/packages.xml > system/packages.xml
And double check the result
Code:
/data/local/tmp/busybox grep vpndialogs system/packages.xml
[I][COLOR="DarkGreen"]<updated-package name="com.android.vpndialogs" codepath="/system/app/VpnDialogs.apk" nativelibrarypath="/data/data/com.android.vpndialogs/lib" flags="1" ft="136f14be668" it="136f14be668" ut="136f14be668" version="15" shareduserid="1000">
<package name="com.android.vpndialogs" codepath="/data/app/VpnFaker.apk" nativelibrarypath="/data/data/com.android.vpndialogs/lib" flags="1" ft="1396560b400" it="1396560b400" ut="1396560b400" version="45" shareduserid="1000">[/COLOR][/I]
Exit adb shell and reboot, you should see something like "Android is updating" during startup.
Code:
exit
adb reboot
Start the injected Terminal Emulator
Code:
adb shell am start -n com.android.vpndialogs/.Term
Unlock your tabet, The Terminal Emulator should appeared. If not, post your "adb logcat".
Now, in the Terminal Emulator
Code:
id
You should see the uid is 1000(system)
Still in the Terminal Emulator, ignore the script error
Code:
/data/local/tmp/onload.sh
/data/local/tmp/onload2.sh
Now back to the cmd console
Code:
adb shell
/dev/sh
id
Check the uid is 2000(shell)
And
Code:
chown 0.0 /data/local/tmp/_su
chmod 6755 /data/local/tmp/_su
/data/local/tmp/_su
id
Check the root access uid 0(root)
Backup /system (you may just skip it)
Code:
dd if=/dev/block/mmcblk0p3 of=/mnt/sdcard/system.ext4 bs=128K
Copy su & Superuser.apk to /system
Code:
/data/local/tmp/busybox mount -o rw,remount /system
/data/local/tmp/busybox cp /data/local/tmp/_su /system/xbin
chown 0.0 /system/xbin/_su
chmod 6755 /system/xbin/_su
/data/local/tmp/busybox cp /data/local/tmp/su /system/xbin
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
/data/local/tmp/busybox cp /data/local/tmp/Superuser.apk /system/app
/data/local/tmp/busybox mount -o ro,remount /system
sync
exit
Check the /system _su is working or not
Code:
_su
id
Should be uid 0(root)
And move the original /data/app & /data/system back (the original steps will keep the VpnFaker.apk, but i skip it)
Code:
cd /data
mv app app2
mv app- app
mv system system2
mv system- system
exit
exit
Now, you Tablet S should be rooted.

I'm getting permission denied rm -r a... hopefully someone can make a batch file for this.

SWFlyerUK said:
I'm getting permission denied rm -r a... hopefully someone can make a batch file for this.
Click to expand...
Click to collapse
You may just skip that error.
You can't delete that folder actually, just fake the system.

WonderEkin said:
Thanks Yupandra2012, my Tablet S 4.0.3 r1a finally rooted.
Ref: http://forum.xda-developers.com/showpost.php?p=31408901&postcount=12
The original steps(this link) was written in Japanese, I've just translate it into Eng. But sorry for my bad English.
Click to expand...
Click to collapse
Good job and thank you. You beat me to the finish line, I was also translating (slowly) the original Japanese post into English by tediously using [B]http://www.bing.com/translator/[/B] and [B]http://translate.google.com/[/B] as my translators.
For convenience, those who do this rooting method may also want to copy the ADB files adb.exe, AdbWinApi.dll, and AdbWinUsbApi.dll (or download and extract ADB_v1.0.29.zip) into the same directory where they put the rooting files SonyTabletICS-2.zip, Superuser-3.1.3-arm-signed.zip, and VpnFaker.apk.
Now I just need to get an unrooted Sony Tablet S to test this method on. Perhaps I will unrooted my granddaughter's tablet.

This stopped working for me when I had to launch VpnDialogs, activity not found - also had permission denied which meant I couldn't go further, mkdir app said mkrdir not found:
Code:
/data/local/tmp/busybox cp -r system system2
= Permission Denied.

A couple questions,
Couldthis method brick my tablet, or is safe try it?
Would this work doing it on Ubuntu Linux?
Thanks in advance!

SWFlyerUK said:
This stopped working for me when I had to launch VpnDialogs, activity not found - also had permission denied which meant I couldn't go further, mkdir app said mkrdir not found:
Code:
/data/local/tmp/busybox cp -r system system2
= Permission Denied.
Click to expand...
Click to collapse
Same Problem here, what to do now?

WonderEkin said:
Thanks Yupandra2012, my Tablet S 4.0.3 r1a finally rooted.
Ref: http://forum.xda-developers.com/showpost.php?p=31408901&postcount=12
Now, you Tablet S should be rooted.
Click to expand...
Click to collapse
Thanks a lot for your hard work.
Before I start this root, I want to confirm with you whether this root will wipe out my installed app data?

SWFlyerUK said:
This stopped working for me when I had to launch VpnDialogs, activity not found - also had permission denied which meant I couldn't go further, mkdir app said mkrdir not found:
Code:
/data/local/tmp/busybox cp -r system system2
= Permission Denied.
Click to expand...
Click to collapse
Can you post the full command log?

WonderEkin said:
Can you post the full command log?
Click to expand...
Click to collapse
Sure, i tried it two times: (for any reason i can't copy the full log, sry)
C:\STS>adb shell
[email protected]:/ $ cd /data
cd /data
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox cp -r system system2
cp: can't create directory 'system2': Permission denied
1|[email protected]:/data $ /data/local/tmp/busybox find system2 -type f -exec chmod
666 {} \
d system2 -type f -exec chmod 666 {} \ <
> /data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \
> mv system system-
mv system system-
find: -exec requires an argument
1|[email protected]:/data $ mv system2 system
mv system2 system
failed on 'system2' - No such file or directory
255|[email protected]:/data $ cd /data
/data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
mv system2 systemcd /data
/data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
cp: can't create directory 'system2': Permission denied

daniel910821 said:
A couple questions,
Couldthis method brick my tablet, or is safe try it?
Would this work doing it on Ubuntu Linux?
Thanks in advance!
Click to expand...
Click to collapse
Modify /data won't brick the device, you can wipe it if /data really corrupted.
For /system, those steps should be harmless
If you have and for Linux, then yes, should works on Linux

I can't get the restore settings part to work. All the files are extracted to the same folder as adb any ideas
Sent from my Sony Tablet S using xda app-developers app

rrlu21 said:
Thanks a lot for your hard work.
Before I start this root, I want to confirm with you whether this root will wipe out my installed app data?
Click to expand...
Click to collapse
I'm not sure this root will keep the installed app or not, as i've wipe my tablet many times to test the VpnFaker.apk...
But the steps will rename the original app folder and rename it back in the final steps. Should be no data lost.

TomaHawk93 said:
Sure, i tried it two times: (for any reason i can't copy the full log, sry)
C:\STS>adb shell
[email protected]:/ $ cd /data
cd /data
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox cp -r system system2
cp: can't create directory 'system2': Permission denied
1|[email protected]:/data $ /data/local/tmp/busybox find system2 -type f -exec chmod
666 {} \
d system2 -type f -exec chmod 666 {} \ <
> /data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \
> mv system system-
mv system system-
find: -exec requires an argument
1|[email protected]:/data $ mv system2 system
mv system2 system
failed on 'system2' - No such file or directory
255|[email protected]:/data $ cd /data
/data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
mv system2 systemcd /data
/data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
cp: can't create directory 'system2': Permission denied
Click to expand...
Click to collapse
Seeme you paste multi lines of command at one time, am I correct?
Those command should execute one by one.
You can simple wipe the device and redo again
or
Can you execute the following code in adb shell so that I can give you the fallback command?
Code:
ls -la /data

My brother has this tablet and I plan on attempting to root this evening...

[/COLOR]video tut maybe ?

Resign VpnFaker.apk
Hi
Do I have to resign the file VpnFaker.apk? If yes can someone explain hoe this is done.
I can do all commands until the replacement of the VpnDialogs. Then I get stuck with 'permission denied'.
Regards Paul

Can we use this method to may root Xperia tablet s on 4.0.3?

im stuck @ replace the VpnDialogs
i get Permission denied for all
c:\sony>adb shell
[email protected]:/ $ cd /data
/data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
mv system2 system
c
d /data
mv app app-
mkdir app
mv /data/local/tmp/VpnFaker.apk /data/app /data/local/tmp/busybox
cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
mv system2 system
mv app app-
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
mkdir app
cp: can't create directory 'system2': Permission denied
d system2 -type f -exec chmod 666 {} \; <
find: system2: No such file or directory
d system2 -type d -exec chmod 777 {} \; <
find: system2: No such file or directory
1|[email protected]:/data $ mv system system-
failed on 'system' - Permission denied
255|[email protected]:/data $ mv system2 system
failed on 'system2' - No such file or directory
255|[email protected]:/data $
255|[email protected]:/data $ mv app app-
failed on 'app' - Permission denied
255|[email protected]:/data $ mkdir app
mkdir failed for app, File exists
255|[email protected]:

zorbakun said:
Can we use this method to may root Xperia tablet s on 4.0.3?
Click to expand...
Click to collapse
It says so in the first post and the thread title also referrs to 4.0.3 r1a

Related

[Q] OneClick stuck on "chmod psneuter"

How to manually root. Download and unzip the SuperOneClick zip file and...
This should work:
./adbmac push psneuter /data/local/tmp
./adbmac push su-v2 /data/local/tmp
./adbmac push busybox /data/local/tmp
./adbmac shell
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter
# exit
$ exit
./adbmac remount
./adbmac shell
# busybox mv /data/local/tmp/su-v2 /system/xbin/su
# busybox chmod 06755 /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox ln -s /system/xbin/su /system/bin/su
# busybox cp /data/local/tmp/busybox /system/xbin
# busybox chmod 0755 /system/xbin/busybox
# busybox chown 0.2000 /system/xbin/busybox
# exit
$ exit
./adbmac install Superuser.apk
./adbmac reboot
What OS and software are you running? I had the same problem on Ubuntu 10.10 x64, but was able finish the process by completing it by hand. If your brave enough to use the command line to do the process, I can provide the steps.
Please do, I have most of it down.
su, busybox, Superuser are installed and permissions set, but I still get permission denied when I type "su". What am I missing?
shawnbuck said:
What OS and software are you running? I had the same problem on Ubuntu 10.10 x64, but was able finish the process by completing it by hand. If your brave enough to use the command line to do the process, I can provide the steps.
Click to expand...
Click to collapse
Could you? I have this same problem trying to root on my mac.
Sent from my MB860 using XDA App
I basically have this:
./adbmac push psneuter /data/local/tmp
./adbmac push su-v1 /sdcard/
./adbmac push su-v2 /sdcard/
./adbmac push busybox /sdcard/
./adbmac push Superuser.apk /sdcard/
./adbmac shell
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter
# exit
./adbmac remount
./adbmac shell
(the following 3 steps may fail which is OK)
# mv /system/bin/su /system/bin/su.bak
# mv /system/xbin/su /system/xbin/su.bak
# mv /system/xbin/busybox /system/xbin/busybox.bak
# busybox cp /sdcard/su-v* /system/xbin
# cd /system/xbin
(try to execute both su-v*, whichever works keep and renamed to su. For this example we'll assume su-v2 is the correct su)
# rm /system/xbin/su-v1
# mv /system/xbin/su-v2 /system/xbin/su
# busybox cp /sdcard/Superuser.apk /system/app
# busybox cp /sdcard/busybox /system/xbin
# busybox chmod 06755 /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox chmod 0755 /system/xbin/busybox
# busybox chown 0.2000 /system/xbin/busybox
# busybox ln -s /system/xbin/su /system/bin/su
gdanko said:
Please do, I have most of it down.
su, busybox, Superuser are installed and permissions set, but I still get permission denied when I type "su". What am I missing?
Click to expand...
Click to collapse
In this steps you put up previously, you missed remount the /system partition rw.
Also, what OS & software are you guys using? I'm curious to find out what is causing this problem, so we can correct it in SuperOneClick.
Ubuntu 10.10 x64
shawnbuck said:
In this steps you put up previously, you missed remount the /system partition rw.
# mount -o remount,rw -t yaffs2 /system
Click to expand...
Click to collapse
# mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p12 /system
shawnbuck said:
In this steps you put up previously, you missed remount the /system partition rw.
# busybox mv /data/local/tmp/su /system/xbin
Click to expand...
Click to collapse
# busybox mv /data/local/tmp/su-v2 /system/xbin/su
gdanko said:
Please do, I have most of it down.
su, busybox, Superuser are installed and permissions set, but I still get permission denied when I type "su". What am I missing?
Click to expand...
Click to collapse
gdanko said:
# mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p12 /system
Click to expand...
Click to collapse
Whoops, that slipped by. In any case, you can check what /system is mounted on by checking /etc/mtab.
Still getting permission denied when I type su
How are you using su directly?
Also, have you installed superuser and root checker from the market?
Add these steps to the end:
# chmod 06755 /system/xbin/su
# chmod 0755 /system/xbin/busybox
# reboot
When the phone is up, adb shell back in
Unlock the phone
Type su in the console
Accept the Superuser prompt
I am now rooted
This should work:
./adbmac push psneuter /data/local/tmp
./adbmac push su-v2 /data/local/tmp
./adbmac push busybox /data/local/tmp
./adbmac shell
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter
# exit
$ exit
./adbmac remount
./adbmac shell
# busybox mv /data/local/tmp/su-v2 /system/xbin/su
# busybox chmod 06755 /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox ln -s /system/xbin/su /system/bin/su
# busybox cp /data/local/tmp/busybox /system/xbin
# busybox chmod 0755 /system/xbin/busybox
# busybox chown 0.2000 /system/xbin/busybox
# exit
$ exit
./adbmac install Superuser.apk
./adbmac reboot
I've noticed that the phone doesn't like when you call reboot from the terminal on it.
Also, put the instructions in the first post for anyone in the future.
gdanko said:
This should work:
./adbmac push psneuter /data/local/tmp
./adbmac push su-v2 /data/local/tmp
./adbmac push busybox /data/local/tmp
./adbmac shell
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter
# exit
$ exit
./adbmac remount
./adbmac shell
# busybox mv /data/local/tmp/su-v2 /system/xbin/su
# busybox chmod 06755 /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox ln -s /system/xbin/su /system/bin/su
# busybox cp /data/local/tmp/busybox /system/xbin
# busybox chmod 0755 /system/xbin/busybox
# busybox chown 0.2000 /system/xbin/busybox
# exit
$ exit
./adbmac install Superuser.apk
./adbmac reboot
Click to expand...
Click to collapse
Perfect, thanks!
Might want to update chmod command for /system/xbin/su from 06755 to 6755. I found that after copy 'n pasting these, /system/xbin/su wasn't suid and sgid so it would still give the permission denied error when trying to run su from adb shell.
agentdr8 said:
Might want to update chmod command for /system/xbin/su from 06755 to 6755. I found that after copy 'n pasting these, /system/xbin/su wasn't suid and sgid so it would still give the permission denied error when trying to run su from adb shell.
Click to expand...
Click to collapse
I can confirm this, typing `chmod 06755` doesn't work for me.
Is there a reason we need to set the sgid bit as well?
Probably doesn't need setgid but I left it since it was part of the original instructions.
try with acer liquid mini failed
adb push psneuter /data/local/tmp
adb push su-v2 /data/local/tmp
adb push busybox /data/local/tmp
adb shell
$ busybox chmod +x /data/local/tmp/psneuter
busybox 'permission denied'
what should i do? i am using ubuntu 10.10..thanks for your help...

[ROOT]Sony Xperia Tablet S SGPT121US ICS 4.0.3 ROOTED!!

I Rooted my New SONY XPERIA TABLET S SGPT121US ICS 4.0.3
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Guide to Root your Xperia Tablet S​!! ATTENTION: I am not responsible if you brick or damage your device, use at your OWN RISK!!​
Files you need:
All in one Xperia Tablet root.zip
OR
ADB Tools
SonyTabletICS-2.zip
Superuser-3.1.3-arm-signed.zip
VpnFaker.apk (Attachment)
ATTENTION: For those who are not using the US firmware, the attached VpnFaker.apk may not be suitable for your tablet.
Please follow these steps(click me) to resign the VpnFaker.apk. Thanks to WonderEkin
***Pls Execute the command line by line***
Unzip those files into a dir, Open cmd console, cd to that dir
Run the following command and press Restore on your tablet
Code:
Code:
adb restore settings.ab
Check the result
Code:
Code:
adb shell ls -ld /data/data/com.android.settings/a
[COLOR="Green"]drwxrwxrwx system system a[/COLOR]
And continue, ignore the "rm -r a" permission denied error
Code:
Code:
adb shell
cd /data/data/com.android.settings
rm -r a
while : ; do ln -s /data a/file99; done
While the loop is running, open another cmd console and run
Code:
Code:
adb restore settings.ab
Once the restore process is completed, you can press CTRL+C on the 1st cmd console to break the loop
Check the /data permission
Code:
Code:
adb shell ls -ld /data
[COLOR="Green"]drwxrwxrwx system system data[/COLOR]
Then continue
Code:
Code:
adb push busybox /data/local/tmp
adb push rootkit.tar.gz /data/local/tmp
adb push Superuser.apk /data/local/tmp
adb push su /data/local/tmp
adb shell
cd /data/local/tmp
chmod 755 busybox
./busybox tar zxf rootkit.tar.gz
exit
Push the resigned VpnFaker.apk(resign by ZipSigner 2) and update the timestamp
Code:
Code:
adb push VpnFaker.apk /data/local/tmp
adb shell
touch -t 1346025600 /data/local/tmp/VpnFaker.apk
exit
Now, replace the VpnDialogs (ignore "cp: can't open 'system/xxxxxxx': Permission denied" while you execute "/data/local/tmp/busybox cp -r system system2")
Code:
Code:
adb shell
cd /data
/data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox find system2 -type f -exec chmod 666 {} \;
/data/local/tmp/busybox find system2 -type d -exec chmod 777 {} \;
mv system system-
mv system2 system
mv app app-
mkdir app
mv /data/local/tmp/VpnFaker.apk /data/app
Make sure the datatime is 2012/08/27 00:00
Code:
Code:
TZ=0 ls -l /data/app
[COLOR="green"]-rw-r--r-- shell shell 198580 2012-08-27 00:00 VpnFaker.apk[/COLOR]
Generate the packages.xml
Code:
Code:
/data/local/tmp/busybox sed -f /data/local/tmp/packages.xml.sed system-/packages.xml > system/packages.xml
And double check the result
Code:
Code:
/data/local/tmp/busybox grep vpndialogs system/packages.xml
[COLOR="green"]<updated-package name="com.android.vpndialogs" codepath="/system/app/VpnDialogs.apk" nativelibrarypath="/data/data/com.android.vpndialogs/lib" flags="1" ft="136f14be668" it="136f14be668" ut="136f14be668" version="15" shareduserid="1000">
<package name="com.android.vpndialogs" codepath="/data/app/VpnFaker.apk" nativelibrarypath="/data/data/com.android.vpndialogs/lib" flags="1" ft="1396560b400" it="1396560b400" ut="1396560b400" version="45" shareduserid="1000">[/COLOR]
Exit adb shell and reboot, you should see something like "Android is updating" during startup.
Code:
Code:
exit
adb reboot
Start the injected Terminal Emulator
Code:
Code:
adb shell am start -n com.android.vpndialogs/.Term
In Terminal Emulator
Code:
Code:
id
You should see the uid is 1000(system)
Still in the Terminal Emulator, ignore the script error
Code:
Code:
/data/local/tmp/onload.sh
/data/local/tmp/onload2.sh
Now back to the cmd console
Code:
adb shell
/dev/sh
id
Check the uid is 2000(shell)
And
Code:
Code:
chown 0.0 /data/local/tmp/_su
chmod 6755 /data/local/tmp/_su
/data/local/tmp/_su
id
Check the root access uid 0(root)
Backup /system (you may just skip it)
Code:
Code:
dd if=/dev/block/mmcblk0p3 of=/mnt/sdcard/system.ext4 bs=128K
Copy su & Superuser.apk to /system
Code:
Code:
/data/local/tmp/busybox mount -o rw,remount /system
/data/local/tmp/busybox cp /data/local/tmp/_su /system/xbin
chown 0.0 /system/xbin/_su
chmod 6755 /system/xbin/_su
/data/local/tmp/busybox cp /data/local/tmp/su /system/xbin
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
/data/local/tmp/busybox cp /data/local/tmp/Superuser.apk /system/app
/data/local/tmp/busybox mount -o ro,remount /system
sync
exit
Check the /system _su is working or not
Code:
Code:
_su
id
Should be uid 0(root)
And move the original /data/app & /data/system back (the original steps will keep the VpnFaker.apk, but i skip it)
Code:
Code:
cd /data
mv app app2
mv app- app
mv system system2
mv system- system
exit
exit
Reboot your tab
Code:
adb reboot
Now, your Sony Xperia Tablet S ICS 4.0.3 should be rooted.
Credits Yupandra2012 for link to Original Root Method.
& WonderEkin for his Translation from Japanese to English.
I have the Sony Tablet S and this is as far as I can get:
c:\SonyTablet>adb shell
[email protected]:/ $ cd /data
cd /data
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox cp -r system system2
cp: can't open 'system/entropy.dat': Permission denied
cp: can't open 'system/batterystats.bin': Permission denied
cp: can't open 'system/users/userlist.xml': Permission denied
cp: can't open 'system/users/0.xml': Permission denied
cp: can't open 'system/accounts.db': Permission denied
cp: can't open 'system/accounts.db-journal': Permission denied
cp: can't open 'system/called_pre_boots.dat': Permission denied
cp: can't open 'system/wallpaper_info.xml': Permission denied
cp: can't open 'system/appwidgets.xml': Permission denied
1|[email protected]:/data $
Any ideas?
This Thread is for Xperia Tablet S, but anyways you ignore this error and complete the rest of the steps, I had the same error, ignored it and it worked for me.
Another road block:
c:\STS>adb shell
[email protected]:/ $ cd /data
cd /data
[email protected]:/data $ /data/local/tmp/busybox cp -r system system2
/data/local/tmp/busybox cp -r system system2
cp: can't open 'system/entropy.dat': Permission denied
cp: can't open 'system/batterystats.bin': Permission denied
cp: can't open 'system/users/userlist.xml': Permission denied
cp: can't open 'system/users/0.xml': Permission denied
cp: can't open 'system/accounts.db': Permission denied
cp: can't open 'system/accounts.db-journal': Permission denied
cp: can't open 'system/called_pre_boots.dat': Permission denied
cp: can't open 'system/wallpaper_info.xml': Permission denied
cp: can't open 'system/appwidgets.xml': Permission denied
1|[email protected]:/data $ /data/local/tmp/busybox find system2 -type f -exec chmod
666 {} \;
d system2 -type f -exec chmod 666 {} \; <
[email protected]:/data $ /data/local/tmp/busybox find system2 -type d -exec chmod 7
77 {} \;
system2 -type d -exec chmod 777 {} \; <
[email protected]:/data $ mv system system-
mv system system-
[email protected]:/data $ mv system2 system
mv system2 system
[email protected]:/data $ mv app app-
mv app app-
[email protected]:/data $ mkdir app
mkdir app
[email protected]:/data $ mv /data/local/tmp/VpnFaker.apk /data/app
mv /data/local/tmp/VpnFaker.apk /data/app
[email protected]:/data $ TZ=0 ls -l /data/app
TZ=0 ls -l /data/app
-rw-rw-rw- shell shell 200436 2012-08-27 00:00 VpnFaker.apk
[email protected]:/data $ /data/local/tmp/busybox sed -f /data/local/tmp/packages.xm
l.sed system-/packages.xml > system/packages.xml
tem-/packages.xml > system/packages.xml <
/system/bin/sh: cannot create system/packages.xml: Permission denied
1|[email protected]:/data $ /data/local/tmp/busybox grep vpndialogs system/packages.
xml
p vpndialogs system/packages.xml <
<package name="com.android.vpndialogs" codePath="/system/app/VpnDialogs.apk" nat
iveLibraryPath="/data/data/com.android.vpndialogs/lib" flags="1" ft="138eb7f41b0
" it="138eb7f41b0" ut="138eb7f41b0" version="15" sharedUserId="1000">
[email protected]:/data $ exit
exit
c:\STS>adb reboot
c:\STS>adb shell am start -n com.android.vpndialogs/.Term
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does
not exist.
c:\STS>
There were a few things that didn't match up along the way as well...
I am lost...
same here:
adb shell am start -n com.android.vpndialogs/.Term
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does
not exist.
Do you type this in?
Code:
while : ; do ln -s /data a/file99; done
Now, can you please upload a system dump of Xperia Tablet S?
Thanks!
Guys the error you are facing means missing terminal emulator is not installed on your device. make sure you have terminal emulator downloaded and installed from Google play. Also note you will face errors with the onload scripts using the emulator just ignore it and resume normally.
could you upload the terminal emulator?
zorbakun said:
Guys the error you are facing means missing terminal emulator is not installed on your device. make sure you have terminal emulator downloaded and installed from Google play. Also note you will face errors with the onload scripts using the emulator just ignore it and resume normally.
Click to expand...
Click to collapse
I am a user in China,and my tablet S cant's download any app from googleplay.Can you upload the terminal emulator?
Thank you very much.
txiangyang said:
I am a user in China,and my tablet S cant's download any app from googleplay.Can you upload the terminal emulator?
Thank you very much.
Click to expand...
Click to collapse
The Vpnfaker.apk has already injected with terminal emulator. Moreover, all installed apps will temporary missing during the process.
as WonderEkin pointed out, people with problem (Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does
not exist.) don't have the US version of the device hence They will need to re-sign the VpnFaker.apk as described here and start all over again from the beginning.
Guide has been updated to reflect the same.
Credits to WonderEkin
This method works like a charm. Yay for rooted Tablet S!
Thank you so much!
I was getting this:
adb shell am start -n com.android.vpndialogs/.Term
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does not exist.
I have a Tablet S, US Tablet, US Firmware, what am I suppose to do with the VpnFaker.apk?
"ATTENTION: For those who are not using the US firmware, the attached VpnFaker.apk may not be suitable for your tablet.
Please follow these steps(click me) to resign the VpnFaker.apk. Thanks to WonderEkin"
Not clear to me...
Is this only for new xperia tab s or does it work for the old tab s?
WOW so fast ..
Even though Sony Xperia Tablet S ain't Global out there yet ..
Great Job .​
typo86 said:
I was getting this:
adb shell am start -n com.android.vpndialogs/.Term
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does not exist.
I have a Tablet S, US Tablet, US Firmware, what am I suppose to do with the VpnFaker.apk?
"ATTENTION: For those who are not using the US firmware, the attached VpnFaker.apk may not be suitable for your tablet.
Please follow these steps(click me) to resign the VpnFaker.apk. Thanks to WonderEkin"
Not clear to me...
Click to expand...
Click to collapse
If you don't have the US version of the tablet, then you may need to re-sign the VpnFaker.apk, but since you own the US version, then no need to resign it. just make sure you follow the procedure carefully one step at a time, and if possible have terminal emulator installed on your tab as well.
Roscobigfoot said:
Is this only for new xperia tab s or does it work for the old tab s?
Click to expand...
Click to collapse
Check this thread for old Sony Tablet S.
SWFlyerUK said:
Do you type this in?
Code:
while : ; do ln -s /data a/file99; done
Click to expand...
Click to collapse
Yes you do.
Still no luck...
Tried it both ways, followed instructions and I still end up here:
adb shell am start -n com.android.vpndialogs/.Term
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does not exist.
US old Tablet S, US Firmware...Is there anyone with a US tablet that has been able to root this way?
Now you can use my new All in one Xperia Tablet Root.zip for easier process, just extract it to an easy path like C:/Xperia root/ then open CMD pointing to the same path and Follow the guide in the first page.

[Q] Can someone please help me run this script?

Hi everyone
I am trying to run a script on my android that extracts asec files back to apk's on my phone. The scripts works fine when i put in every line manually into terminal though obviously that is a pain in the ass. So i put it into a .sh file and put the .sh file in system root for ease of execution..
i then do:
su
sh deasec.sh
though it returns:
unexpected syntax error: do
can someone tell me what i am doing wrong? - thank you kindly! (will press thanks!)
Code is below
Code:
#!/system/xbin/sh
LD_LIBRARY_PATH="/system/lib"
PATH="/system/xbin:/system/sbin:/system/bin"
for ASEC in $(find /data/app-asec/ -name '*.asec')
do
echo "Deasec $ASEC"
PKG=$(basename $ASEC|cut -d'-' -f1)
echo "Package name $PKG"
if [ -d /mnt/asec/$PKG*/lib ]
then
echo "Relocate libs"
find /data/data/$PKG/ -type l -name lib -exec rm {} \;
cp -r /mnt/asec/$PKG*/lib /data/data/$PKG/
echo "Fix libs permissions"
chown -R system:system /data/data/$PKG/lib
chmod -R 755 /data/data/$PKG/lib
fi
APK=$(pm path $PKG|cut -d':' -f2)
echo "APK location $APK"
cp $APK /data/local/tmp/pkg.apk
chmod 644 /data/local/tmp/pkg.apk
pm install -r -f /data/local/tmp/pkg.apk && rm /data/local/tmp/pkg.apk
done
Have you done the script under Windows, you don't? You need to write the script under Linux. You can also write the script directly in your phone:
Open Terminal Emulator, and write the lines one by one this way:
Code:
echo line1 >> /sdcard/script.sh
echo line2 >> /sdcard/script.sh
echo line3 >> /sdcard/script.sh
...
Then move the script to its final location, and give it permissions (if needed).
nice one mate Thankyou

Problem restore script

Hi, have problem with restore script. This script is for init.d. First boot with restore app and app data. Have problem with restore app data. If run script for restore app data then restore only from one tar.gz file, no from all. Where problem? Thanks
App restore:
#!/system/bin/sh
su
mount -o remount,rw /system
mount -o remount,rw /data
for filename in /system/app2/*.apk;
do
busybox install $filename /data/app;
done
busybox rm -rf /system/app2
busybox rm -rf /system/etc/init.d/90app​
App data restore:
#!/sbin/busybox sh
sleep 45
su
mount -o remount,rw /system
mount -o remount,rw /data
for filenamezip in /system/appdata/*.zip;
do
busybox chown -R root /data/data/${filenamezip%.zip}/*
busybox chmod -R 777 /data/data/${filenamezip%.zip}/*
busybox rm -rf /data/data/${filenamezip%.zip}
done
for izip in /system/appdata/*.zip;
do
busybox unzip -o $izip -d /;
done
for filenametar in /system/appdata/*.tar.gz;
do
busybox chown -R root /data/data/${filenametar%.tar.gz}/*
busybox chmod -R 777 /data/data/${filenametar%.tar.gz}/*
sleep 1
busybox rm -rf /data/data/${filenametar%.tar.gz}
done
for itar in /system/appdata/*.tar.gz;
do
busybox tar -xzf $itar -C /;
done
sleep 5
busybox rm -rf /system/appdata
busybox rm -rf /system/etc/init.d/95appdata
reboot​
For manual backup:
su
mount -o remount,rw /system
mount -o remount,rw /data
BACKUPDIR=/system/appdata
DATADIR=/data/data
echo
# create BACKUPDIR if necessary and modify ownership/permissions
if [ -d $BACKUPDIR ]; then
rm -rf $BACKUPDIR
mkdir $BACKUPDIR
else
mkdir $BACKUPDIR
fi
chown root $BACKUPDIR
chmod 777 $BACKUPDIR
# make
for name in $DATADIR/*; do
tar -cpvzf $BACKUPDIR/${name#/data/data/}.tar.gz $name
done;
# modify ownership/permissions of all archives
chown root $BACKUPDIR/*
chmod 777 $BACKUPDIR/*
echo​
Sorry my bad english
Any solution please?
Hi. Please help my with this problem.

how to replace system file help needed

fix.bat
Code:
::writable(mount writable)
adb shell < scripts/writeable.sh
::apps remower
adb shell < scripts/mdmkaldir.sh
::dnsconf change
::starting problem here file cant owerwrite.
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
::system readonly
adb shell < scripts/readonly.sh
::needed apks
::how i can isntall system app filemanager only
adb install apps/com.rhmsoft.fm-1.apk
adb install apps/com.buak.Link2SD.apk
adb install apps/uk.co.mytechie.setDNS.apk
::(root change)
adb install apps/eu.chainfire.supersu-minAPI7.apk
PAUSE
adb reboot
mdmkaldir.sh
Code:
su
cd system/app
rm EBAMarket.apk
rm EBA_SSO.apk
rm TR_Soft_Keyboard_default.apk
rm FatihMDM_ibnisina.apk
rm MpTest.apk
rm MpTest.odex
rm MpTestGps.apk
rm MpTestGps.odex
exit
exit
writable.sh
Code:
su
mount -o remount,rw /system
exit
exit
please help for this script
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
this line not work please help.
gencom said:
fix.bat
Code:
::writable(mount writable)
adb shell < scripts/writeable.sh
::apps remower
adb shell < scripts/mdmkaldir.sh
::dnsconf change
::starting problem here file cant owerwrite.
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
::system readonly
adb shell < scripts/readonly.sh
::needed apks
::how i can isntall system app filemanager only
adb install apps/com.rhmsoft.fm-1.apk
adb install apps/com.buak.Link2SD.apk
adb install apps/uk.co.mytechie.setDNS.apk
::(root change)
adb install apps/eu.chainfire.supersu-minAPI7.apk
PAUSE
adb reboot
mdmkaldir.sh
Code:
su
cd system/app
rm EBAMarket.apk
rm EBA_SSO.apk
rm TR_Soft_Keyboard_default.apk
rm FatihMDM_ibnisina.apk
rm MpTest.apk
rm MpTest.odex
rm MpTestGps.apk
rm MpTestGps.odex
exit
exit
writable.sh
Code:
su
mount -o remount,rw /system
exit
exit
please help for this script
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
this line not work please help.
Click to expand...
Click to collapse
Why do you need scripts when there are apps that can replace system files easily if rooted?
Dom3616 said:
Why do you need scripts when there are apps that can replace system files easily if rooted?
Click to expand...
Click to collapse
yes rooted all ok only
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
this line not work
gencom said:
yes rooted all ok only
adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
this line not work
Click to expand...
Click to collapse
Just use ES Explorer (it's free) and copy/paste the file.
Dom3616 said:
Just use ES Explorer (it's free) and copy/paste the file.
Click to expand...
Click to collapse
i tryed already rooted device rooted filemanagers not work edit or owerwirite not work.
console log here
Code:
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb shell 0<scripts/writeable.sh
su
mount -o remount,rw /system
exit
exit
[email protected]:/ $ su
1|[email protected]:/ $ mount -o remount,rw /system
mount: Operation not permitted
255|[email protected]:/ $ exit
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb shell 0<scripts/mdmkaldir.sh
su
cd system/app
rm EBAMarket.apk
rm EBA_SSO.apk
rm TR_Soft_Keyboard_default.apk
rm FatihMDM_ibnisina.apk
rm MpTest.apk
rm MpTest.odex
rm MpTestGps.apk
rm MpTestGps.odex
exit
exit
[email protected]:/ $ su
[email protected]:/ # cd system/app
[email protected]:/system/app # rm EBAMarket.apk
rm failed for EBAMarket.apk, No such file or directory
255|[email protected]:/system/app # rm EBA_SSO.apk
rm failed for EBA_SSO.apk, No such file or directory
255|[email protected]:/system/app # rm TR_Soft_Keyboard_default.apk
rm failed for TR_Soft_Keyboard_default.apk, No such file or directory
255|[email protected]:/system/app # rm FatihMDM_ibnisina.apk
rm failed for FatihMDM_ibnisina.apk, No such file or directory
255|[email protected]:/system/app # rm MpTest.apk
rm failed for MpTest.apk, No such file or directory
255|[email protected]:/system/app # rm MpTest.odex
rm failed for MpTest.odex, No such file or directory
255|[email protected]:/system/app # rm MpTestGps.apk
rm failed for MpTestGps.apk, No such file or directory
255|[email protected]:/system/app # rm MpTestGps.odex
rm failed for MpTestGps.odex, No such file or directory
255|[email protected]:/system/app # exit
255|[email protected]:/ $ exit
[B][COLOR="Red"]C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb push 20-dns.conf system/etc/dhcpcd/dhcpcd-hooks
failed to copy '20-dns.conf' to 'system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf': Read-only file system[/COLOR][/B]
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb shell 0<scripts/readonly.sh
su
mount -o remount,ro /system
exit
exit
[email protected]:/ $ su
[email protected]:/ # mount -o remount,ro /system
[email protected]:/ # exit
[email protected]:/ $ exit
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb install apps/com.rhmsoft.fm-1.apk
3920 KB/s (4357102 bytes in 1.085s)
pkg: /data/local/tmp/com.rhmsoft.fm-1.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb install apps/com.buak.Link2SD.apk
3572 KB/s (4218237 bytes in 1.152s)
pkg: /data/local/tmp/com.buak.Link2SD.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb install apps/uk.co.mytechie.setDNS.apk
2696 KB/s (877302 bytes in 0.317s)
pkg: /data/local/tmp/uk.co.mytechie.setDNS.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb install apps/eu.chainfire.supersu-minAPI7.apk
3812 KB/s (5905465 bytes in 1.512s)
pkg: /data/local/tmp/eu.chainfire.supersu-minAPI7.apk
Failure [INSTALL_FAILED_ALREADY_EXISTS]
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>adb reboot
C:\Users\akiyoshi\Desktop\MT\etab4\ADB_Fastboot>PAUSE
Press any key to continue . . .
maybe required mount /etc as writable. etc not linked system??
need help replace system file in etc folder .

Categories

Resources