PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Android > Android Samsung Devices > Legacy Samsung Android Devices > Samsung Moment
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #51 (permalink)  
Old 11-25-2009, 10:37 AM
zefie's Avatar
N00b
Offline
Pocket PC: HTC Touch Pro 2 (RhodiumW)
Carrier: Sprint
Location: Arkansas, USA
 
Join Date: Jul 2008
Posts: 36
Reputation: 70
zefie is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via AIM to zefie Send a message via MSN to zefie
Exclamation Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

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 sh > /media/bin/su
14) chmod 4755 /media/bin/su
15) cat playlogo > playlogo_real

Run the below commands WITH THE QUOTES
16)
Code:
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) chmod 0755 /media/bin/remount

18)
Code:
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) chmod 0755 /system/bin/playlogo
20) ln -s /media/bin/su /system/bin/su
21) 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.

Last edited by zefie; 11-27-2009 at 03:27 AM.
Reply With Quote
  #52 (permalink)  
Old 11-25-2009, 03:46 PM
njbianco's Avatar
Lurker
Offline
Pocket PC: HTC Evo & Blackberry Tour 9630
Carrier: sprint
 
Join Date: Nov 2009
Posts: 13
Reputation: 0
njbianco is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

how can i tell if i got the root to work
Reply With Quote
  #53 (permalink)  
Old 11-25-2009, 04:36 PM
zefie's Avatar
N00b
Offline
Pocket PC: HTC Touch Pro 2 (RhodiumW)
Carrier: Sprint
Location: Arkansas, USA
 
Join Date: Jul 2008
Posts: 36
Reputation: 70
zefie is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via AIM to zefie Send a message via MSN to zefie
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by njbianco View Post
how can i tell if i got the root to work
adb shell in from booted os and type su
Reply With Quote
  #54 (permalink)  
Old 11-25-2009, 06:25 PM
njbianco's Avatar
Lurker
Offline
Pocket PC: HTC Evo & Blackberry Tour 9630
Carrier: sprint
 
Join Date: Nov 2009
Posts: 13
Reputation: 0
njbianco is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

The sprint logo doesn't play when the phone starts up anymore is it supposed to do that if not is it passable for me to get it back and if so how.
Reply With Quote
  #55 (permalink)  
Old 11-25-2009, 07:03 PM
pg2k3's Avatar
PPCGeeks Regular
Offline
Pocket PC: Samsung for the "Moment"
Carrier: Sprint
Location: Fresno, CA
 
Join Date: Oct 2007
Posts: 244
Reputation: 65
pg2k3 is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by njbianco View Post
The sprint logo doesn't play when the phone starts up anymore is it supposed to do that if not is it passable for me to get it back and if so how.
You have to rename "playlogo_real" back to "playlogo". Hope that helps you.
__________________
Antwan
Reply With Quote
  #56 (permalink)  
Old 11-25-2009, 07:22 PM
njbianco's Avatar
Lurker
Offline
Pocket PC: HTC Evo & Blackberry Tour 9630
Carrier: sprint
 
Join Date: Nov 2009
Posts: 13
Reputation: 0
njbianco is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by pg2k3 View Post
You have to rename "playlogo_real" back to "playlogo". Hope that helps you.
I beleve i have, still a no go :-/

Last edited by njbianco; 11-25-2009 at 07:26 PM.
Reply With Quote
  #57 (permalink)  
Old 11-25-2009, 07:32 PM
zefie's Avatar
N00b
Offline
Pocket PC: HTC Touch Pro 2 (RhodiumW)
Carrier: Sprint
Location: Arkansas, USA
 
Join Date: Jul 2008
Posts: 36
Reputation: 70
zefie is becoming a great contributor
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Send a message via AIM to zefie Send a message via MSN to zefie
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by njbianco View Post
I beleve i have, still a no go :-/
some have reported that they get a logo but no root, others say no logo, i think it is just a misunderstanding of direction
Reply With Quote
  #58 (permalink)  
Old 11-26-2009, 01:41 PM
njbianco's Avatar
Lurker
Offline
Pocket PC: HTC Evo & Blackberry Tour 9630
Carrier: sprint
 
Join Date: Nov 2009
Posts: 13
Reputation: 0
njbianco is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by zefie View Post
some have reported that they get a logo but no root, others say no logo, i think it is just a misunderstanding of direction
I just want to figure out how to get it back ive sat there in adb shell for hours doing everything i can think of trying to get it back.
Reply With Quote
  #59 (permalink)  
Old 11-27-2009, 01:59 AM
nipsy's Avatar
Lurker
Offline
Pocket PC: Samsung Moment
Carrier: Sprint
 
Join Date: Nov 2009
Posts: 4
Reputation: 10
nipsy is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by zefie View Post
9) mkdir /media
10) mkdir /media/bin
11) 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]
12) cd /system/bin
13) ./btld_testmode
I think there are some issues with all of this here. First, steps 12 and 13 probably need to happen around step 8.5. And they can be consolidated into just:

Code:
/system/bin/btld_testmode
Also, steps 10 and 11 need to be swapped.

Quote:
Originally Posted by zefie View Post
Run the below commands WITH THE QUOTES
17)
Code:
echo "#!/media/bin/su
    case $1 in
        ro )
                        /system/bin/mount -o remount,ro,codepage=utf8,vfat,fcach
e\(blks\)=128,xattr,check=no /dev/stl5 /system;;
        rw )
                        /system/bin/mount -o remount,rw,codepage=utf8,vfat,fcach
e\(blks\)=128,xattr,check=no /dev/stl5 /system;;
        * )
            echo "Usage: $0 ro|rw";;
    esac$" > /media/bin/remount
1 chmod 0755 /media/bin/remount
Two issues here. First, your remount commands can be simplified as:

Code:
/system/bin/mount -o remount,ro /dev/stl5 /system;;
and:

Code:
/system/bin/mount -o remount,rw /dev/stl5 /system;;
respectively. All the other mount options are kept by default so no need to specify them again.

Also, the trailing $ after esac is not necessary any may cause the script to not run at all. I'm not sure why that's there but your other script has the same problem below.

Quote:
Originally Posted by zefie View Post
19)
Code:
echo "#!/system/bin/sh
/system/bin/mkdir /media
/system/bin/mount -t ext3 /dev/block/mmcblk0p2 /media
/media/bin/remount rw
/system/bin/chmod 0755 /system/bin/playlogo_real
/media/bin/remount ro
/system/bin/playlogo_real$ cat /media/bin/remount" > /system/bin/playlogo
20) chmod 0755 /system/bin/playlogo
For this, there is the "$ cat /media/bin/remount" at the end which probably all needs to be taken out. I'm not sure what it's suppose to be doing, if anything.

Also, you might want to throw a:

Code:
/system/bin/chmod 1777 /media
someplace in all of that before the "/system/bin/playlogo_real" at the end so that /media will be world writable by other users than root in day to day use of the phone. This is assuming that the ext3 partition is of significant size for normal use rather than just a few megabytes to pull off everything you're accomplishing just in this post.

Quote:
Originally Posted by zefie View Post
21) ln -s /media/bin/su /system/bin/su
And finally, this last one makes me really nervous. I think we should probably leave the normal commands in /system/bin mostly unmolested. It's not a huge deal to pull up Better Terminal Emulator and type /media/bin/su to become root instead of using /system/bin/su in the PATH. And it also means that if /media disappears for some reason in the future, this base system command is still there in some form or fashion, even if it's mostly useless.

Otherwise, I concur.
Reply With Quote
  #60 (permalink)  
Old 11-27-2009, 02:01 AM
nipsy's Avatar
Lurker
Offline
Pocket PC: Samsung Moment
Carrier: Sprint
 
Join Date: Nov 2009
Posts: 4
Reputation: 10
nipsy is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: HOW TO ROOT A SAMSUNG MOMENT Thread (help me find out)

Quote:
Originally Posted by njbianco View Post
I just want to figure out how to get it back ive sat there in adb shell for hours doing everything i can think of trying to get it back.
Let me know if you've lost the original somehow. I can send you a copy of mine.
Reply With Quote
Reply

  PPCGeeks > Android > Android Samsung Devices > Legacy Samsung Android Devices > Samsung Moment


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 06:58 PM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com