Enable Write to System

CastleBravo

Senior Member
Dec 29, 2011
103
50
0
Los Angeles
After the unfortunate recent events regarding kernel development, I would like to help get development back on track for this great device. I'm not a kernel dev, so I can't make use of this myself, but I thought it would be useful to anyone else looking to release their own custom kernel.

After a few hours of searching through the kernel source, I found the config file which controls write protection of the system partition.

The flag is contained in \arch\arm\configs\apq8064_defconfig at line 2933, as seen in the screenshot below.

Code:
CONFIG_MMC_MUST_PREVENT_WP_VIOLATION=y
I haven't had time to test it, but either changing it to "n" or removing the line completely (most of the code relating to it is built with #ifdef statements, so it would render the relevant code inoperable) should allow writing to /system while booted. As I haven't had time to test it, please be careful when using it (usual disclaimer: i'm not responsible if your phone explodes, kills your grandma, creates a portal to the underworld, etc.).

Thanks to all who participated in the effort to S-OFF the HTC G2/Desire Z (the first phone to use this write protection). Their great documentation made it possible to find this.
 

Jarocks

Senior Member
Jan 31, 2011
178
45
0
After the unfortunate recent events regarding kernel development, I would like to help get development back on track for this great device. I'm not a kernel dev, so I can't make use of this myself, but I thought it would be useful to anyone else looking to release their own custom kernel.

After a few hours of searching through the kernel source, I found the config file which controls write protection of the system partition.

The flag is contained in \arch\arm\configs\apq8064_defconfig at line 2933, as seen in the screenshot below.

Code:
CONFIG_MMC_MUST_PREVENT_WP_VIOLATION=y
I haven't had time to test it, but either changing it to "n" or removing the line completely (most of the code relating to it is built with #ifdef statements, so it would render the relevant code inoperable) should allow writing to /system while booted. As I haven't had time to test it, please be careful when using it (usual disclaimer: i'm not responsible if your phone explodes, kills your grandma, creates a portal to the underworld, etc.).

Thanks to all who participated in the effort to S-OFF the HTC G2/Desire Z (the first phone to use this write protection). Their great documentation made it possible to find this.
I think a lot of us died on the inside when we saw that. Thanks for a good push in the right direction, god knows this forum needs it now.
 

PhantomApollyon

Senior Member
Jul 11, 2007
598
111
0
After the unfortunate recent events regarding kernel development, I would like to help get development back on track for this great device. I'm not a kernel dev, so I can't make use of this myself, but I thought it would be useful to anyone else looking to release their own custom kernel.

After a few hours of searching through the kernel source, I found the config file which controls write protection of the system partition.

The flag is contained in \arch\arm\configs\apq8064_defconfig at line 2933, as seen in the screenshot below.

Code:
CONFIG_MMC_MUST_PREVENT_WP_VIOLATION=y
I haven't had time to test it, but either changing it to "n" or removing the line completely (most of the code relating to it is built with #ifdef statements, so it would render the relevant code inoperable) should allow writing to /system while booted. As I haven't had time to test it, please be careful when using it (usual disclaimer: i'm not responsible if your phone explodes, kills your grandma, creates a portal to the underworld, etc.).

Thanks to all who participated in the effort to S-OFF the HTC G2/Desire Z (the first phone to use this write protection). Their great documentation made it possible to find this.

Thanks so much for passing this along!!
 

CastleBravo

Senior Member
Dec 29, 2011
103
50
0
Los Angeles
So this is basically the same thing as S-Off?
It's similar but not quite the same. Without s-off we still can't use an engineering bootloader, change radios, or downgrade bootloaders and radios, among other things. This disables the hardware write protection while booted, and allows us to do things like use adfree to write the hosts file without having to flash it in recovery.
 

CastleBravo

Senior Member
Dec 29, 2011
103
50
0
Los Angeles
I still have his kernel sources :)

Sent from my SGH-I747 using Tapatalk 2
Unfortunately, he requested that his works not be used, and I intend to honor that. However, much of the source of his kernel came from other devs such as show-p and faux. This means that most of the governors, sweep2wake, and other components are freely available for anyone to use. I'm not a kernel dev, but I'm going to try to do what I can to keep things moving.
 
  • Like
Reactions: orangechoochoo

orangechoochoo

Senior Member
Nov 30, 2012
2,204
734
0
Beating up dumbbells
Unfortunately, he requested that his works not be used, and I intend to honor that. However, much of the source of his kernel came from other devs such as show-p and faux. This means that most of the governors, sweep2wake, and other components are freely available for anyone to use. I'm not a kernel dev, but I'm going to try to do what I can to keep things moving.
Thanks for taking up the torch, I can't wait to see what you come up with.