[HOW TO] Root the Moment

Discuss:
-android development
-accessories
-general questions specific to this device

[HOW TO] Root the Moment

Postby deltron » Tue Dec 08, 2009 12:17 pm

GUIDE BY ZEFIE OVER AT MIDNIGHT CHANNEL

How to root the Samsung Moment

Basic Tutorial:


I'm not good with tutorials. Hopefully eventually we can make this more streamlined. I will post this post which tells you how to get root and what you need, hopefully someone can make it easier to understand.

Instructions are plain text. My comments will be in [brackets]

Tools:
Samsung Moment
android sdk
patience
understanding of linux and adb.



1) Partition your SD Card to have first partition msdosfs and second ext3 [msdosfs works, vfat does not. if your Card is sdc, msdosfs needs to be sdc1, any other partition numbers you can change by modifying this tutoral, but this tut assumes your ext3 is sdc2]



2) Boot in Test Mode with Call+Center+Power [Easier if you hold call+center, then press power immediately before plugging in usb cable, within half second]

3) adb shell in
4) cd /system/bin
5) cat btld_testmode > ../btld_testmode [backup this file, which isn't even used I don't think. but it is setuid root]
6) cat sh >> btld_testmode [append first, we can't overwrite at first for some reason]
7) cat sh > btld_testmode [now we can overwrite]
8) Reboot back into test mode [unplug usb and remove battery, this process will restore setuid to our modifed file]
9) /system/bin/btld_testmode
10) mkdir /media
11) mkdir /media/bin
12) mount -t ext3 /dev/block/mmcblk0p2 /media [change the # after p to your partition id, if you made ext3 partition 3 (sdc3), then this is mmcblk0p3]
13) cat /system/bin/sh > /media/bin/su
14) chmod 4755 /media/bin/su
15) cat playlogo > playlogo_real



Run the below commands WITH THE QUOTES

16)



Code: Select all
echo "#!/media/bin/su
    case $1 in
        ro )
                        /system/bin/mount -o remount,ro /dev/stl5 /system;;
        rw )
                        /system/bin/mount -o remount,rw /dev/stl5 /system;;
        * )
            echo "Usage: $0 ro|rw";;
    esac" > /media/bin/remount






17)
Code: Select all
chmod 0755 /media/bin/remount


18)

Code: Select all
echo "#!/system/bin/sh
/system/bin/mkdir /media
/system/bin/mount -t ext3 /dev/block/mmcblk0p2 /media
/system/bin/chmod 1777 /media
/media/bin/remount rw
/system/bin/chmod 0755 /system/bin/playlogo_real
/media/bin/remount ro
/system/bin/playlogo_real" > /system/bin/playlogo




19)
Code: Select all
chmod 0755 /system/bin/playlogo

20)
Code: Select all
ln -s /media/bin/su /system/bin/su

21)
Code: Select all
ln -s /media/bin/remount /system/bin/remount




Done.
This new method retains root over reboot, but you will be disappointed to know that most apps will not work.

For example:



Root Explorer cannot remount, due to it expecting yaffs2, and this being rfs.
Wifi Tether will not work due to Netfilter not compiled into kernel
My tests with screenshot applications result in a black image.

YMMV Let me know how it works for you. But root is there. After a reboot into main os, adb shell in and run su, you will get root prompt.



I haven't tried this yet, as I don't have the guts to try it yet.
deltron
N00b
N00b
 
Posts: 3
Joined: Tue Dec 08, 2009 12:15 pm

Re: [HOW TO] Root the Moment

Postby Appbull » Mon Jan 11, 2010 1:30 am

Oh man been looking for this since forever to root my coworkers phone. thanks
Appbull
Appbull.com Admin
Appbull.com Admin
 
Posts: 4
Joined: Fri Jan 08, 2010 6:51 pm

Re: [HOW TO] Root the Moment

Postby Appbull » Mon Jan 11, 2010 8:19 pm

nope didnt workout for me lol.
Appbull
Appbull.com Admin
Appbull.com Admin
 
Posts: 4
Joined: Fri Jan 08, 2010 6:51 pm


Return to Moment

Who is online

Users browsing this forum: No registered users and 1 guest