FORUMS
Remove All Ads from XDA

[DISCUSSION][SOLVED] ROOTING G2 Vision T-mobile

1,088 posts
Thanks Meter: 13
 
By tubaking182, Senior Member on 28th September 2010, 06:15 PM
Thread Closed Email Thread
8th October 2010, 12:56 AM |#721  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by damnoregonian

kernel module.
it'd be near impossible to write directly to anything regarding the card, however, modules global symbols (including functions) are in the kernel's symbol table, so you can call functions defined in the mmc module from within your module.

Cool. From what you said, it looks like the symbol is exported... so if we were able to send this value to the CSD... .

I think it might be worth a short. Will see if I can do this over the weekend. It has been a LONG time since I wrote a kernel driver. I don't remember much at all... very rusty.
 
 
8th October 2010, 01:01 AM |#722  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by damnoregonian

already tried echoing. csd sys node is ro.

Pretty much what I expected. Another thing to think about though. If we are able to disable this (and it turns out that THIS is what we want to disable), isn't there the other problem of the image being restored while the phone is running?

Presumably this might not be a problem if the write-protect area is turned off... but I wonder how that operation would be affected.
8th October 2010, 01:04 AM |#723  
Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by vi5in

Pretty much what I expected. Another thing to think about though. If we are able to disable this (and it turns out that THIS is what we want to disable), isn't there the other problem of the image being restored while the phone is running?

Presumably this might not be a problem if the write-protect area is turned off... but I wonder how that operation would be affected.

Assuming you turn off the correct write protection, you should be able to flash a new recovery image and have it stick. Someone please correct me if I'm wrong.
8th October 2010, 01:05 AM |#724  
Junior Member
Thanks Meter: 0
 
More
Has anyone tried this?

Code:
fastboot oem mmc_send_csd d00f00320f5903fffffffde0124040c8
Maybe...lol?
8th October 2010, 01:09 AM |#725  
Senior Member
Flag Seattle
Thanks Meter: 13
 
Donate to Me
More
Quote:
Originally Posted by vi5in

Pretty much what I expected. Another thing to think about though. If we are able to disable this (and it turns out that THIS is what we want to disable), isn't there the other problem of the image being restored while the phone is running?

Presumably this might not be a problem if the write-protect area is turned off... but I wonder how that operation would be affected.

that's the scary part.
the real problem, is what if you turn it off, blocks start actually being committed, and you end up with a totally effed filesystem because half the writes were already discarded...
i'd want to have a recovery image to flash or a working hboot flashable base image in case things went wrong.

though in reality, the phone has enough memory to store quite a few writes before it starts flushing, so you might be just fine when you finally do a real sync, and yaffs is very hard to break, it has very few (none maybe?) disk structures that aren't simply inodes.
8th October 2010, 01:09 AM |#726  
bentglasstube's Avatar
Junior Member
Flag Phoenix, AZ
Thanks Meter: 8
 
More
Quote:
Originally Posted by slayerdork

Has any tried this?

maybe fastboot oem mmc_send_csd d00f00320f5903fffffffde0124040c8

Code:
INFO[ERR] Command error !!!
OKAY [  0.011s]
finished. total time: 0.011s
8th October 2010, 01:14 AM |#727  
Junior Member
Thanks Meter: 0
 
More
I did a little searching for mmc_send_csd, this is what I found, so, maybe it needs the correct parameters?

Code:
274 int mmc_send_csd(struct mmc_card *card, u32 *csd)
275 {
276         int ret, i;
277 
278         if (!mmc_host_is_spi(card->host))
279                 return mmc_send_cxd_native(card->host, card->rca << 16,
280                                 csd, MMC_SEND_CSD);
281 
282         ret = mmc_send_cxd_data(card, card->host, MMC_SEND_CSD, csd, 16);
283         if (ret)
284                 return ret;
285 
286         for (i = 0;i < 4;i++)
287                 csd[i] = be32_to_cpu(csd[i]);
288 
289         return 0;
290 }
8th October 2010, 01:17 AM |#728  
Junior Member
Thanks Meter: 0
 
More
Guys, it was my bad earlier.

The correct value is:

d00f00320f5903fffffffde0124040c8

I edited my post, but not before it was quoted.

Please do verify the value. Bits 36:32 should be 00000b and bit 31 should also be 0b.
8th October 2010, 01:20 AM |#729  
Senior Member
Flag Seattle
Thanks Meter: 13
 
Donate to Me
More
i recommend everyone refrain from playing with the send_wp_info fastboot command. it has a bracket [CMD31?]....

i found a proposed addendum to the mmc standard defining CMD31 (currently reserved) as a way to permanently write protect a group.

CMD31 Ac [31:0] data address R1b SET_PERM_WRITE_PROT If the card has write protection features, this command sets the permanent write protection bit of the addressed group. The properties of the write protection are coded in the card specific data (WP_GRP_SIZE)

makes my stomach sink thinking of some of the stupid tests i did with it....
8th October 2010, 01:30 AM |#730  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by damnoregonian

i recommend everyone refrain from playing with the send_wp_info fastboot command. it has a bracket [CMD31?]....

i found a proposed addendum to the mmc standard defining CMD31 (currently reserved) as a way to permanently write protect a group.

CMD31 Ac [31:0] data address R1b SET_PERM_WRITE_PROT If the card has write protection features, this command sets the permanent write protection bit of the addressed group. The properties of the write protection are coded in the card specific data (WP_GRP_SIZE)

makes my stomach sink thinking of some of the stupid tests i did with it....

I didn't get the gist of your comment though -- why is it recommended not to use it?

I don't think you could have done any real damage; looks like that node is RO like you said!
8th October 2010, 01:33 AM |#731  
Senior Member
Flag Seattle
Thanks Meter: 13
 
Donate to Me
More
Quote:
Originally Posted by vi5in

I didn't get the gist of your comment though -- why is it recommended not to use it?

I don't think you could have done any real damage; looks like that node is RO like you said!

no, not in linux.
emmc_set_wp_info (i think it was called that) is a fastboot command issued at the bootloader (that myself and a few other people were playing with)
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes