FORUMS
Remove All Ads from XDA

Root MANY ANDROID! [Upd: 20.07.2014] - Updated: New Z2 Root by CubeandCube

2,006 posts
Thanks Meter: 5,919
 
By Bin4ry, Recognized Developer on 14th September 2012, 01:46 PM
Post Reply Email Thread
24th September 2012, 06:28 PM |#531  
husbender's Avatar
Member
Thanks Meter: 1
 
More
Thumbs up huawei mediapad 7
it just works perfect on first attempt on huawei mediapad7 !!!!!!!!!!!!!!!!!!!!!!!!!! so fuXXXXX nice
 
 
24th September 2012, 06:29 PM |#532  
wkpark's Avatar
Senior Member
Flag Seoul
Thanks Meter: 1,365
 
Donate to Me
More
The RunMe.bat failed frequently.

so Ive searched the adb backup format and found the following link

http://nelenkov.blogspot.kr/2012/06/...d-backups.html

It says the adb backup is a almost normal tarball.
and Ive found the following method.

Code:
$ dd if=fakebackup.ab bs=1 skip=24 | openssl zlib -d >fakebackup.tar
extract it using
gzuncompress() like as in PHP.

this is the stored order of the fakebackup.ab
Code:
$ tar tvf fakebackup.tar
-rw-rw-rw- user/user      2093 2012-08-02 03:21 apps/com.android.settings/_manifest
drwxr-xr-x user/user         0 2012-07-12 16:55 apps/com.android.settings/r/
drwxrwxrwx user/user         0 2012-08-02 22:23 apps/com.android.settings/r/a/
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file44
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file50
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file71
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file72
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file25
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file49
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file61
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file34
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file05
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file78
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file33
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file39
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file70
...
and I just have made a new shell script named rooting.sh and its wrapper rooting.bat for win32 only for the Normal mode.
Click image for larger version

Name:	adb_restore_rooting.png
Views:	3318
Size:	61.9 KB
ID:	1351339
adb_restore_rooting-v1.0.zip
adb_restore_rooting-v1.1.zip
adb_restore_rooting-v1.2.zip
adb_restore_rooting-v1.6.zip

Summary
  • wait for the Backup agent runing by check the magic file "file44"
  • check /data/local.prop correctly
  • does not iterate forever.
  • does not install busybox
  • both win32 and Linux supported by same script. (the win32 port of busybox is used made by pclouds https://github.com/pclouds/busybox-w32 )

Changes
* update rooting.sh script
* fakebackup-sorted.ab added for experiment (files are sorted using the pax and some shell script)
* remove needless symlink tries.
* support "adb root" case (ro.debuggable=1)
Please see also
http://forum.xda-developers.com/show...&postcount=540
The Following 23 Users Say Thank You to wkpark For This Useful Post: [ View ] Gift wkpark Ad-Free
24th September 2012, 08:58 PM |#533  
Bin4ry's Avatar
OP Recognized Developer
Flag Schwelm (NRW)
Thanks Meter: 5,919
 
Donate to Me
More
Quote:
Originally Posted by wkpark

The RunMe.bat failed frequently.

so Ive searched the adb backup format and found the following link

http://nelenkov.blogspot.kr/2012/06/...d-backups.html

It says the adb backup is a almost normal tarball and one can extract it using
gzuncompress() like as in PHP.

this is the stored order of the fakebackup.ab

Code:
$ tar tvf fakebackup.tar
-rw-rw-rw- user/user      2093 2012-08-02 03:21 apps/com.android.settings/_manifest
drwxr-xr-x user/user         0 2012-07-12 16:55 apps/com.android.settings/r/
drwxrwxrwx user/user         0 2012-08-02 22:23 apps/com.android.settings/r/a/
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file44
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file50
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file71
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file72
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file25
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file49
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file61
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file34
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file05
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file78
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file33
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file39
-rw-r--r-- user/user    524288 2012-08-02 22:22 apps/com.android.settings/r/a/file70
...
and I just have made a new shell script named rooting.sh and its wrapper rooting.bat for win32 only for the Normal mode.
Attachment 1351339
Attachment 1351341

Summary
  • wait for the Backup agent runing by check the magic file "file44"
  • check /data/local.prop correctly
  • does not iterate forever.
  • does not install busybox
  • both win32 and Linux supported by same script. (the win32 port of busybox is used made by pclouds https://github.com/pclouds/busybox-w32)

Hi, thanks for your input. But file44 is no more magic than file99
Also your script doesnt do much more than mine i think or does it something i overlooked ?

Regards
The Following User Says Thank You to Bin4ry For This Useful Post: [ View ]
24th September 2012, 09:00 PM |#534  
Bin4ry's Avatar
OP Recognized Developer
Flag Schwelm (NRW)
Thanks Meter: 5,919
 
Donate to Me
More
Quote:
Originally Posted by ironxp

Hi Bin4ry;
I have a Tablet Chagall / Pegatron / Siragon 4N (the same model as the Fujitsu)

I tell them that I tried several rooting script:
Cube Root for ICS 4.0.3 , Cube Root for ICS 4.0.3 v2 , DROID 3 easy root script v7, Root_with_Restore_by_Bin4ry_v8, Google Nexus 7 ToolKit, NRT_v1.5.3., superclick, El UnlockRoot and three do not remember ...

And no I worked ...today ... was half annoyed, and I happened to search again Bin4ry script and found this:

"Root_with_Restore_by_Bin4ry_v10" and try with this script by several methods ... but nothing ...

Then I found this old script bin4ry original, But it did not work (script "Root ICS 4.1.A.0.562")

What I did was change a few lines ... why were here on xda forum, Here the modified
************************************************** *****************
@echo This is an adapted idea from the methods of
@echo Dan Rosenberg (vulnfactory.org)
@echo -Script by Bin4ry-
echo off
cd data
echo Please plug the device in ADB-Mode
adb wait-for-device
echo Rename /data/local/tmp to be able to create symlink
adb shell mv /data/local/tmp /data/local/tmp.old
echo Trying to create /data symlink
adb shell ln -s /data /data/local/tmp
adb reboot
echo Waiting for device to reboot
adb wait-for-device
adb shell rm /data/local.prop > nul
echo Trying to write value in tablet to prop-file
adb shell "echo \"filero.secure=0\" > /data/local.prop"
adb shell "echo \"ro.debuggable=1\" > /data/local.prop"
adb shell "echo \"persist.service.adb.enable=1\" > /data/local.prop"

echo Rebooting
adb reboot
echo Waiting for device to reboot again
adb wait-for-device
echo Try to remount /system
adb remount
echo Pushing su and Superuser.apk
adb push su /system/bin/su
adb shell chmod 06755 /system/bin/su
adb push Superuser.apk /system/app/Superuser.apk
adb shell chmod 644 /system/app/Superuser.apk
echo Cleanup of the Stuff created while running
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.old /data/local/tmp
adb reboot
cd ..
pause
echo Reboot and done Have fun!
************************************************** *****************

Note that the only thing not to run this script to copy the application was Superuser.apk and of course change the privileges ...
Install the "superuser" from the market ... and remove the line copy the superuser, and run the whole script.

It was no root ...
I returned to run the scritp of bin4ry, V10 ... and did you root the tablet seems. (standard option)

And it worked ... after several attempts ... worked perfect ... Bin4ry, as I prepared to send your paypal respective

Check and reset the tablet, and was even root ..., delete all tablet for recovery to start once again ... and continued to root ...

But, try to certify and document the process for publishing ... and V10 bin4ry script, we apply "unroot" Big mistake ...

Now I could not repeat the process, and I could not do root again ...but I notice that in the folder / system, I find the SU ...

If someone wants to try, because only must be sure that you can restart the tablet completely ... so that applications may have the lost ...

---------- Post added at 10:29 AM ---------- Previous post was at 10:19 AM ----------

I can not confirm at what point in both trials (trial and error), I could copy the SU in the folder / system / bin, but I think that's the point to run your script ...

What is certain is that after using the "unroot" the script, and running it again, the tablet is left in an infinite boot ... no beginning, and must be recovered with Recovery ... (Power button + Vol Up)

Even after several attempts using the script and changing command "adb", stop giving this ruling, but when doing the first reboot with the script, skips and ends the process without completing ...

************************************************** ****************************
Please look at your device and click RESTORE!
If all is successful i will tell you, if not this shell will run forever.
Running ...
Successful, reboot your device going to!
Waiting for device to show up again ....
Going to copy files to it's place
mount: permission denied (are you root?)
You can close all open command-prompts now!
After reboot all is done! Have fun!
************************************************** ****************************

See if someone has better luck ...

Because if it worked at one time, and someone else reported that it worked well for this tablet, but also document the process ...

Excuse my English, but is translated by google ...

Hi thanks first.

Can you run v11 again? If it once worked it should work now too

Regards
The Following User Says Thank You to Bin4ry For This Useful Post: [ View ]
24th September 2012, 09:20 PM |#535  
skyandsand's Avatar
Member
Flag Vienna
Thanks Meter: 2
 
More
Thumbs up
Thank you for this tool, Bin4ry. Donated you a beer, man.

Greetings from Austria,

Lukas
The Following User Says Thank You to skyandsand For This Useful Post: [ View ] Gift skyandsand Ad-Free
24th September 2012, 10:02 PM |#536  
Junior Member
Thanks Meter: 0
 
More
Excellent piece of work. many thanks
24th September 2012, 11:18 PM |#537  
Junior Member
Thanks Meter: 3
 
More
The first time you use the V10, and it worked ... not exactly ... But it worked.

V10 will apply from the "unroot" and from there I could not do root again ...

Try today with the V11, in Normal mode, and restarted once but does not root ... also try the special way asked me on two occasions: Restore my data, and then restarts twice ... nor does root ...

I can be doing wrong?
25th September 2012, 12:07 AM |#538  
Member
Thanks Meter: 25
 
More
I have tried version 2 - 11, no joy.

Specs
PC Win7 64 - already updated adb drivers many, many attempts ago.
Tablet Sony Tablet S 4.0.31a 32GB WIFI only

I reset to factory defaults each time, including formating USB storage.
Choose English (US) on startup.
Connect to my wireless
Go to Settings, Security, enable Unknown Sources
Go to Devoper, enable USB Debugging

Run Market once, Accept license.
Let Play Store install, run it once, accept license.

(I have also tried the VPNfaker and Zipsigner on prior attempts over the weekend as well)

Any idea's/suggestions? Here is what I get below.

================================================== ====================
= This script will root your Android phone with adb restore function =
= Script by Bin4ry (thanks to Goroh_kun and tkymgr for the idea) =
= Idea for Tablet S from Fi01_IS01 =
= (20.09.2012) v11 =
================================================== ====================

Device type:
1) Normal
2) Special (for example: Sony Tablet S, Medion Lifetab)

x) Unroot

Make a choice: 2

Special mode:
1) Root
2) Rollback
Make a choice: 1

Tablet S mode enabled!

418 KB/s (314540 bytes in 0.733s)
pkg: /sdcard/tmp/Term.apk
Success
1313 KB/s (1867568 bytes in 1.388s)
1439 KB/s (91980 bytes in 0.062s)
1299 KB/s (996704 bytes in 0.748s)
1279 KB/s (469980 bytes in 0.358s)
mkdevsh
onload.sh
onload2.sh
packages.xml.sed
remount.sh
VpnFaker.apk
_su
rm failed for /data/data/com.android.settings/a/*, No such file or directory
Please look at your device and click "Restore my data"

1st RESTORE OK, hit ENTER to continue.
Press any key to continue . . .
rm failed for /data/data/com.android.settings/a, Permission denied
Please look at your device and click "Restore my data"

Achieved! hit ENTER to continue.

Press any key to continue . . .
cp: can't open '/data/system/entropy.dat': Permission denied
cp: can't open '/data/system/batterystats.bin': Permission denied
cp: can't open '/data/system/users/userlist.xml': Permission denied
cp: can't open '/data/system/users/0.xml': Permission denied
cp: can't open '/data/system/accounts.db': Permission denied
cp: can't open '/data/system/accounts.db-journal': Permission denied
cp: can't open '/data/system/called_pre_boots.dat': Permission denied
cp: can't open '/data/system/wallpaper_info.xml': Permission denied
cp: can't open '/data/system/appwidgets.xml': Permission denied
cp: can't open '/data/system/netpolicy.xml': Permission denied
Need to reboot now!
Waiting for device to come up again....
Unlock your device, a Terminal will show now, type this 2 lines, after each line
press ENTER
/data/local/tmp/onload.sh
/data/local/tmp/onload2.sh
after this is done press a key here in this shell to continue!
If the shell on your device does not show please re-start the process!
Starting: Intent { cmp=com.android.vpndialogs/.Term }
Error type 3
Error: Activity class {com.android.vpndialogs/com.android.vpndialogs.Term} does
not exist.
Press any key to continue . . .
1 KB/s (1241 bytes in 1.000s)
/data/local/tmp/script1.sh[1]: /dev/sh: not found
/data/local/tmp/script1.sh[2]: /dev/sh: not found
/data/local/tmp/script1.sh[3]: /dev/sh: not found
/data/local/tmp/script1.sh[4]: /dev/sh: not found
/data/local/tmp/script1.sh[5]: /dev/sh: not found
/data/local/tmp/script1.sh[6]: /dev/sh: not found
/data/local/tmp/script1.sh[7]: /dev/sh: not found
/data/local/tmp/script1.sh[8]: /dev/sh: not found
/data/local/tmp/script1.sh[9]: /dev/sh: not found
/data/local/tmp/script1.sh[10]: /dev/sh: not found
/data/local/tmp/script1.sh[11]: /dev/sh: not found
/data/local/tmp/script1.sh[12]: /dev/sh: not found
/data/local/tmp/script1.sh[13]: /dev/sh: not found
/data/local/tmp/script1.sh[14]: /dev/sh: not found
/data/local/tmp/script1.sh[15]: /dev/sh: not found
/data/local/tmp/script1.sh[16]: /dev/sh: not found
/data/local/tmp/script1.sh[17]: /dev/sh: not found
/data/local/tmp/script1.sh[18]: /dev/sh: not found
/data/local/tmp/script1.sh[19]: /dev/sh: not found
Almost complete! Reboot and cleanup.
Waiting for device to come up again....
/system/bin/sh: su: not found
/system/bin/sh: su: not found
/system/bin/sh: su: not found
You can close all open command-prompts now!
After reboot all is done! Have fun!
Bin4ry
Press any key to continue . . .
The Following User Says Thank You to mikeblahblah For This Useful Post: [ View ] Gift mikeblahblah Ad-Free
25th September 2012, 12:56 AM |#539  
Member
Thanks Meter: 29
 
More
Thanks for this!

If I find time I will try to port the newest script to *nix. Now I first need to boot Windows to check if the V11 works with my Fujitsu Stylistic M532 Tablet.

Regards...
25th September 2012, 03:12 AM |#540  
wkpark's Avatar
Senior Member
Flag Seoul
Thanks Meter: 1,365
 
Donate to Me
More
Quote:
Originally Posted by Bin4ry

Hi, thanks for your input. But file44 is no more magic than file99
Also your script doesnt do much more than mine i think or does it something i overlooked ?

Regards

Yes. same functional script. but your RunMe.bat almost always fails.
Please see carefully my uploaded rooting.sh script.
  • waiting until the Backup agent running (check the first stored magic "file44")
  • retry symlink more frequently. (from file00 to file99)
    - the RunMe.bat try to symlink only the file99 but this method totally broken. the symlink of the file99 file simply finished and the /data/local.prop not created.
    - this is partially true. symlinking to file99 is only work when /data/data/com.android.settings/a dir is NOT exists or the file99 file exists.
  • additionally you can test the last stored file "file58" to check the Backup app finished or not
25th September 2012, 03:28 AM |#541  
Junior Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by wkpark

Yes. same functional script. but your RunMe.bat almost always fails.
Please see carefully my uploaded rooting.sh script.

  • waiting until the Backup agent running (check the first stored magic "file44")
  • retry symlink more frequently. (from file00 to file99)
    - the RunMe.bat try to symlink only the file99 but this method totally broken. the symlink of the file99 file simply finished and the /data/local.prop not created.
  • additionally you can test the last stored file "file58" to check the Backup app finished or not

Using this script, this is the result:

Pushing busybox ...
1306 KB / s (1085140 bytes in 0.811s)
*[*] Remove old fake files ...
rm failed for / data / data / com.android.settings / a / *, No such file or directory
*[*] Restore backup fake ...
*[*] Please look at your device and select RESTORE button!

*[*] Waiting ...

*[*] Running ...
*[*] Check / data / local.prop
failed to copy '/ data / local.prop' to '. / local.prop': Permission denied
* FAIL ***** *****
* Please retry again
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.


It should work better??

---------- Post added at 09:58 PM ---------- Previous post was at 09:54 PM ----------

Quote:
Originally Posted by x5c0d3

Thanks for this!

If I find time I will try to port the newest script to *nix. Now I first need to boot Windows to check if the V11 works with my Fujitsu Stylistic M532 Tablet.

Regards...


Should work ... I work myself with a tablet Síragon N4.

After you apply the "unroot", and I could not make it work again ... You will then let us know your ...
The Following User Says Thank You to ironxp For This Useful Post: [ View ] Gift ironxp Ad-Free
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes