Samsung Moment
Find Your Forum
  
Welcome, Guest. Please login or register.
Did you miss your activation email?

News: Do you like Samsung Moment?
Advanced search
Scratch-Proof your Samsung Moment        Best Price on Sprint Phones      Screen Protection Latest Ringtone for your mobile
Pages: [1] 2 3 4
Print
Topic: Root Access (Finally Achieved!)  (Read 49307 times)
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« on: November 24, 2009, 01:48:52 PM »

load into and use  Shell in
then run the following
cd /system/bin
cat btld_testmode > ../btld_testmode (this backs up the file)
cat sh >> btld_testmode (we append it first, don't know why, but we cant just overwrite it at first)
cat sh > btld_testmode (overwrite it)

Now, it lost is setuid. but that is fine, the factorytest.rc will restore it. so reboot the phone, reloading .

cd /system/bin
./btld_testmode
Now you are in a root shell, you know what to do
cat sh > su
chmod 4755 su
exit
./su

Now we will put btld_testmode back.

cat ../btld_testmode > btld_testmode
chmod 6777 btld_testmode

Currently the su looses it's setuid on reboot, so it is not permanent.
Still working on that.

Edit: it seems all permissions get reset, then are set up by the init script.
Sadly, we can't overwrite the init script because changes in / do not persist.
All we can use this  for is flashing, unless we find another way to persist our setuid...
But hey, at least we have a root shell! It is a start Smiley

More here, including a trick to guarantee test mode will activate:
http://midnightchannel.net/blog/255-how-to-root-the-samsung-moment.html

Important Update:
hokansoc warns:
Quote
Just wanting to warn everyone... TRY THIS AT YOUR OWN RISK.

All it takes is skipping one step to brick your phone. Specifically this step

"Now we will put btld_testmode back.

cat ../btld_testmode > btld_testmode
chmod 6777 btld_testmode"


Now personally, mine is still sh, and I have had no problems, however, Decepticrock notes:

Quote
I'm not sure what btld_testmode is for but I didn't have a problem skipping that step.  Still curious what that program is for.

Nevermind, this appears to be bluetooth related.


Now, I don't use Bluetooth on my phone, so perhaps an important step before rooting is to disable bluetooth?
« Last Edit: November 25, 2009, 12:53:10 AM by zefie » Logged
yourm0m1
Administrator
Moment Monster
*****

Cookies: 10
Posts: 1348


View Profile
« Reply #1 on: November 24, 2009, 02:23:20 PM »

SWEET, mad props !!
« Last Edit: November 24, 2009, 02:27:05 PM by yourm0m1 » Logged

I do not take credit for any information I post unless otherwise stated. I also offer no guarantee or warranty on that information provided.
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #2 on: November 24, 2009, 02:28:37 PM »

yeah, I can't get it to persist though. It seems Samsung's RFS erases permissions on reboot, and the init.rc sets them up again everytime you boot.

But we can't edit the init.rc because its on /, and the change won't persist.

But perhaps this can be used to figure out a workaround, or just write a custom rom with the modified init.rc. I don't know, but at least we have root Smiley
Logged
yourm0m1
Administrator
Moment Monster
*****

Cookies: 10
Posts: 1348


View Profile
« Reply #3 on: November 24, 2009, 02:32:33 PM »

i have no clue on rooting maybe ill start learning today, but the stock rom has been dumped so is it possible to rewrite that init.rc and reflash? idk ill start learning now i guess
Logged

I do not take credit for any information I post unless otherwise stated. I also offer no guarantee or warranty on that information provided.
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #4 on: November 24, 2009, 02:34:18 PM »

i have no clue on rooting maybe ill start learning today, but the stock rom has been dumped so is it possible to rewrite that init.rc and reflash? idk ill start learning now i guess

Can I get a copy of the stock rom? or are you refering to my dabbling in the other thread with the bml Tongue

either way, the problem with the Moment is Samsung is using their propritary RFS instead of the yaffs2 the android hackers are used to...
Logged
yourm0m1
Administrator
Moment Monster
*****

Cookies: 10
Posts: 1348


View Profile
« Reply #5 on: November 24, 2009, 02:39:19 PM »

http://alldroid.org/viewtopic.php?f=215&t=447
Logged

I do not take credit for any information I post unless otherwise stated. I also offer no guarantee or warranty on that information provided.
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #6 on: November 24, 2009, 03:03:16 PM »

Done! I made a wrapper around the playlogo script, which plays teh carrier logo:


first, while root still in testmode:
cd /system/bin
mv playlogo playlogo_real

Then create this file locally, and name it playlogo:

Code:
#!/system/bin/sh
/system/bin/mount -o remount,rw,codepage=utf8,vfat,fcache\(blks\)=128,xattr,check=no /dev/stl5 /system
/system/bin/chmod 4755 /system/bin/su
/system/bin/chmod 0755 /system/bin/playlogo_real
/system/bin/mount -o remount,ro,codepage=utf8,vfat,fcache\(blks\)=128,xattr,check=no /dev/stl5 /system
/system/bin/playlogo_real

push it to /system
back in the shell:
chmod 755 /system/playlogo
mv /system/playlogo /system/bin/playlogo

reboot

now it will restore your su root access when the boot logo plays.
cheap hack for now Smiley
Logged
clockcycle
Newbie
*

Cookies: 0
Posts: 2


View Profile
« Reply #7 on: November 24, 2009, 03:37:18 PM »

kudos zefie
Logged
zefie
Pro Member
****

Cookies: 29
Posts: 458


View Profile
« Reply #8 on: November 24, 2009, 04:03:07 PM »

still it is in beta. i'm trying to use drocap and somehow it is reverting the setuid again.
so hopefully someone more experienced can use the little exploit i did accomplish to make a custom rom that will keep root and work with apps Smiley
Logged
hokansoc
Global Moderator
Moment Monster
*****

Cookies: 21
Posts: 890


hokansoc@googlewave.com


View Profile WWW
« Reply #9 on: November 24, 2009, 07:26:53 PM »

Just wanting to warn everyone... TRY THIS AT YOUR OWN RISK.

All it takes is skipping one step to brick your phone. Specifically this step

"Now we will put btld_testmode back.

cat ../btld_testmode > btld_testmode
chmod 6777 btld_testmode"


OOPS!   luckily my phone was already semi-bricked. So possibly it's only when your phone is already bootlooping that it bricks it when you forget that step. At any rate.. Be careful. you may kill your phone.
Logged
bspec
Newbie
*

Cookies: 0
Posts: 30



View Profile
« Reply #10 on: November 24, 2009, 07:29:39 PM »

Sorry, I'm very new to this, but I am an IT auditor so I probably know just enough to get in trouble. While root, couldn't you just create a new user (your own account) and then change its UID to 0? Wouldn't that would give you all root privileges without having to mess with the root account?

-Andy
Logged
yourm0m1
Administrator
Moment Monster
*****

Cookies: 10
Posts: 1348


View Profile
« Reply #11 on: November 24, 2009, 08:02:40 PM »

Just wanting to warn everyone... TRY THIS AT YOUR OWN RISK.

All it takes is skipping one step to brick your phone. Specifically this step

"Now we will put btld_testmode back.

cat ../btld_testmode > btld_testmode
chmod 6777 btld_testmode"

hey zefie if you could put something at the begining of your topic.....
Logged

I do not take credit for any information I post unless otherwise stated. I also offer no guarantee or warranty on that information provided.
Decepticrock
Newbie
*

Cookies: 0
Posts: 41



View Profile
« Reply #12 on: November 24, 2009, 09:03:48 PM »

I'm not sure what btld_testmode is for but I didn't have a problem skipping that step.  Still curious what that program is for.

Nevermind, this appears to be bluetooth related.
« Last Edit: November 24, 2009, 11:00:54 PM by Decepticrock » Logged
bspec
Newbie
*

Cookies: 0
Posts: 30



View Profile
« Reply #13 on: November 24, 2009, 10:18:32 PM »

so... Android has no "adduser" and no "vi"

the wrapper setting to keep root with playlogo does not seem to work for me. thoughts?
Logged
maxdamage2122
Newbie
*

Cookies: 0
Posts: 14


View Profile
« Reply #14 on: November 24, 2009, 10:23:20 PM »

didnt work for me either. i spoke with zefie about it already and to make a long story short more work needs to be done in order to save permissions
Logged
Pages: [1] 2 3 4
Print
Jump to:  

Got a new phone? Find the forum here


Related Topics
Subject Started by Replies Views Last post
Samsung Moment Access Codes
Android Developers
Bernal 5 4596 Last post November 14, 2009, 01:39:25 AM
by ruskiyab
Root Achieved !!!
Rooting
tlgem 5 1593 Last post November 26, 2009, 01:02:18 AM
by vorlando90
WPA Enterprise wifi access?
Rooting
dersh 0 1275 Last post January 21, 2010, 05:29:22 PM
by dersh
Finally!!
Introduce Yourself
luisrodz 6 562 Last post April 22, 2010, 01:06:16 PM
by luisrodz
Case/Cover With Access To Slideout Keyboard
Samsung Moment Accessories
go2wax 6 1434 Last post June 17, 2010, 12:22:56 PM
by luisrodz




Galaxy S3 | Galaxy Note | Galaxy Nexus | Kindle Fire | Atrix 4G | Motorola Xoom | Windows Phone 7
Nokia Lumia | Top Hosts | Samsung Galaxy Tab | Samsung Galaxy S2 | Samsung Galaxy S | Samsung Wave
HTC Evo 3D | HTC Evo 4G | HTC Incredible | HTC Incredible 2 | HTC Incredible S | HTC Thunderbolt
Motorola Droid Razr
| HTC Desire | HTC Desire HD | HTC Desire Z | HTC Desire S | HTC Wildfire
Motorola Droid | Galaxy Indulge | Nokia N8 | Droid Charge | Droid X | Droid X2 | Droid 2| Droid 3 | Fascinate
HTC Sensation | HTC Flyer | LG Revolution | Asus Transformer | Xperia Play | iPhone 4 | Nexus S | Droid Bionic
HTC One | HTC Wildfire S | HTC Droid Eris


This is an Un-Official fan based Website. The views expressed on this website are solely those of the proprietor, or contributors to the site, and do not necessarily reflect the views or opinions of the parties it covers, and is not affiliated with, endorsed or sponsored by parties involved.
If you have a problem with any of the content posted on this website, please contact "sales@verticalscope.com"
Term of Use | Privacy Policy | BlackRain 2006 by, Crip



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Sitemap