• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD] Disable writeProtection on Sense (STOCK) 5.0.2

Search This thread
C

CaptainTiiti

Guest
Disable HTC's write Protection for HTC Desire 816 Lollipop Stock 5.0.2
LOLLIPOP Only ! For KitKat visit xXminiWHOOPERxX's thread.

If you guys feel your Desire 816 is a little boring cause you gained no S-OFF and your System is still write Protected, then here ya go.
This Flashable ZIP will disable the write Protection.​

Notes:
I've noticed that install_recovery.sh doesnt work on Desire 816 5.0.2 Kernel.
This ZIP will install the Universal init.D App which enables init.d Support.
The ZIP also include SELinux Mode Change, so it sets SELinux to Permissive (needed for Example for Viper4Android)

How To:
Recomended!
Rooted Desire 816 running Stock 5.0.2 Sense 6 with SuperSU v2.46! (Latest Stable i think)

1.Install ZIP via Recovery
2.Reboot and run Universal Initd App
3.Give root Access for App & Tick the Switch from OFF to ON.
4.Reboot again...Done.

Credits:
Flar2 for Kernel
and all others i've forgot,
sorry i cant remember all names :D
Thats your fault then cause mostly everbody here got a weird name ;D



XDA:DevDB Information
LollipopSense6 WP/SELinux/INITD, Tool/Utility for the HTC Desire 816

Contributors
CaptainTiiti

Version Information
Status: Testing

Created 2015-04-24
Last Updated 2015-04-24
 

Attachments

  • CT-D816-WPDSELBB.zip
    2.7 MB · Views: 7,707
Last edited:

CrazyJ36

Senior Member
Apr 28, 2013
94
30
Zephyrhills
Thanks.
init.d is what was troubling me with stock lollipop. I had spent most of the day after updating attempting to install the resources needed to get Viper4Android working. I can't do without Viper. Busybox on Rails from google play did give me busybox though that alone didn't fix Viper. This seems like it would do it as it includes SELinux changer.
I couldn't get SeLinux mode changer on Google Play but it luckily it's listed in XDA DevDB downloads. I will be testing this zip in A while.
Also just in case people are having trouble with writing to externel storage locations (SD, USB) in lollipop, the KitKat SD fix app by NextApp worked (in CyanogenMod at least) when writing to usb failed in two file explorer apps.
As A side question, has anyone touched the two HTC WP files that appear on the root of ext_sd after update?
 
Last edited:
C

CaptainTiiti

Guest
Thanks.
init.d is what was troubling me with stock lollipop. I had spent most of the day after updating attempting to install the resources needed to get Viper4Android working. I can't do without Viper. Busybox on Rails from google play did give me busybox though that alone didn't fix Viper. This seems like it would do it as it includes SELinux changer.
I couldn't get SeLinux mode changer on Google Play but it luckily it's listed in XDA DevDB downloads. I will be testing this zip in A while.
Also just in case people are having trouble with writing to externel storage locations (SD, USB) in lollipop, the KitKat SD fix app by NextApp worked when writing to usb failed in two file explorer apps.
As A side question, has anyone touched the two HTC WP files that appear on the root of ext_sd after update?

Thats right :)
init.d Support is not given through install_recovery.sh and for me the easyiest way was just an init.d appwhere you canhandle every script.
Viper4Android... seems to work only on Permissive SELinux mode else your music gonna stop/crash and i know how essential it is for most thats why i added the SELinux script.
In Developer options you also have to disable NUPlayer for V4A to run, i didnt made any changes on that as i thought thats your option.
Anyway glad you like it, youre always welcome.
 

gumbyx84

Senior Member
Oct 7, 2013
412
78
OnePlus 6T
Nokia 7.1
... Also just in case people are having trouble with writing to externel storage locations (SD, USB) in lollipop, the KitKat SD fix app by NextApp worked when writing to usb failed in two file explorer apps.

SDFix hasn't worked very well for me. It either fails or doesn't give full read/write to all apps. After flashing this mod, running SDFix or editing /system/etc/permissions/platform.xml should re-enable full SD write permissions right? Losing the ability to do this is one of the few things I regret about upgrading.
 
Last edited:
C

CaptainTiiti

Guest
SDFix hasn't worked very well for me. It either fails or doesn't give full read/write to all apps. After flashing this mod, running SDFix or editing /system/etc/permissions/platform.xml should re-enable full SD write permissions right? Losing the ability to do this is one of the few things I regret about upgrading.

Sry didnt thought about it when i created the ZIP.
I add this now for next update.
Stay Frosty.
 

gumbyx84

Senior Member
Oct 7, 2013
412
78
OnePlus 6T
Nokia 7.1
Sry didnt thought about it when i created the ZIP.
I add this now for next update.
Stay Frosty.

Thanks for responding. I'll patiently await the update. Two quick question: Will we still need to run SDFix for write protection be unlocked for the sdcard or are you adding that to the zip? If your adding it, will SDFix work properly with this mod flashed as it is now?

Sent from my HTC Desire 816 using XDA Free mobile app
 
C

CaptainTiiti

Guest
Thanks for responding. I'll patiently await the update. Two quick question: Will we still need to run SDFix for write protection be unlocked for the sdcard or are you adding that to the zip? If your adding it, will SDFix work properly with this mod flashed as it is now?

Sent from my HTC Desire 816 using XDA Free mobile app

I make a flashable zip like the first one just install and reboot nothing more to do, but im still at work i do when i have time.
 

saikat1198

Member
May 24, 2012
30
2
that worked but not fully (I didn't have to restart apps like adway & TB backup folder didn't say folder not writable, but I couldn't delete gapps like books etc, , then I flashed your zip again and finnaly w/p is disbled , THANK YOU SOO MUCH, (the only thing not working now is foldermount) anyways THANX FOR THE ZIP ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Can you make a step by step guide for the script manager plz ?

    Sure, I'll take a shot at it. But I'm not sure how useful this will be for the script editor, since I basically decided not to meddle with the Android init scripts at all, and just used an app to load the kernel module at each boot.

    (Before you try all the steps below, I just want to point out this thread: http://forum.xda-developers.com/desire-816/general/help-mm-root-disable-write-protection-t3334921 I just found it, and it might be the single, flashable zip you are looking for... If somebody else wants to try it.)

    If this is relevant at all, I did this on the DWG variant of the phone, CID HTC__038.

    1. Flash the latest TWRP bootloader. I used 3.0.3-0, available here: https://dl.twrp.me/a5.

    2. Reboot phone into TWRP bootloader. Flash the latest SuperSU. I used 2.65, the latest stable version: https://download.chainfire.eu/921/SuperSU/UPDATE-SuperSU-v2.65-20151226141550.zip

    3. Reboot the phone and (optional) confirm that you have have root working, e.g. with the app "Root Checker".

    4. Now you need to disable write protection. Download the zip mentioned in my last post, i.e. "m8-mmgpe-wp_mod.zip" from http://forum.xda-developers.com/htc-one-m8/general/root-root-marshmallow-gpe-supersu-t3242210. There is one file that you want inside that zip archive, which is called "wp_mod.ko". It is in the following sub-directory in the zip archive: system/lib/modules/wp_mod.ko.

    5. Transfer this wp_mod.ko file to your phone to any directory you want. I'll assume you transfer it to "/storage/emulated/0/", but really you could put it anywhere.

    6. Fire up a terminal on your phone. I use the terminal included in the app "Rom Toolbox Pro", but you could use any terminal app available on the Play store. A popular choice is "Terminal Emulator for Android".

    7. Now you need to enter a bunch of commands in the terminal on your phone. Hit the return key after each command. Start with "su" to gain root privileges. The supersu App will ask you to grant root permissions to the terminal app, go ahead and grant them.

    8. Now enter the command "insmod /storage/emulate/0/wp_mod.ko" (or replace the second part with the path to the wp_mod.ko file where you transferred it to your phone, in step 5.)

    9. Verify that the file has been loaded: use the command "lsmod", and check that there is a line which starts with "wp_mod" in the output. (There will be other lines, you can ignore those. If this works, congratulations, you have disabled write-protection... ...until the next reboot.

    10. Now you want to disable the write-protection automatically at each boot. For this, install the app "Script Manager - SManager" from the play store. Open the app.

    11. In SManager, you want to create a new script. You can store it anywhere on your phone. Use the icon with three vertical dots in the upper right corner and choose the option "New Script". You are prompted for a filename or URL, enter "wp_mod.sh". If you are then prompted with an "Open With" dialog, choose SM Editor.

    12. You will see a text file which you can edit. The first line in the file is "#!/system/bin/sh". Do not change this. On a NEW line below this, write the same command as you used in step 8. So following our example, our file would look like

    Code:
    #!/system/bin/sh
    insmod /storage/emulate/0/wp_mod.ko

    Save the file. (Three dots in upper right -> save). Close it (X at the very upper right)

    13. Now you are back SManager. Scroll down and search for the script you just created, called "wp_mod.sh". Press on this file once. In the window that opens, there are a few buttons (Run, Exit, Edit, Save). Below this are Icons that can be activated or de-activated. You want to activate the one with the "Su" label (second from the left) and the one with the "Boot" label (third from the left). Then press the Save Button.

    14. All done. If you want to make sure everything is working, reboot, start up your terminal again, and check that when you use the "insmod" command, one of the lines it spits out starts with "wp_mod". Or, more obviously, just try any operation you could only do with write-protection disabled.

    Wow, lots of rambling for just a few operations. This is the first time I give out such detailed explanations for this kind of process. Hope it will be clear and helpful. If not, my apologies.

    ---------- Post added at 04:03 PM ---------- Previous post was at 03:58 PM ----------

    How do you to do that : "I loaded it manually for the first time using the command "insmod /path/to/wp_mod.ko"

    I used that command in a Terminal app on my phone. See steps 6-8 in the long explanation in my last post.
    1
    I installed this mod - very easy! Thanks for making it!!

    Does not completely work. It says init.d support and yet, TB can't access drives in writing mode. Any solution to avoid this ?

    This doesn't completely work for me. I can uninstall apps but I can't make backups. Titanium says they backed up but after a reboot it shows the backups don't have any app data

    Sent from my HTC Desire 816 using XDA Free mobile app

    I was having similar trouble with Titanium Backup. I could create a backup after I changed a setting in TB's Preferences > Backup Folder Location > Storage Provider (changed to "DocumentProvider Storage"). I thought "great, all set". But after a reboot the app cannot be restored and it turns out the actual backup was zero bytes. Anyway, I installed this (http://play.google.com/store/apps/details?id=nextapp.sdfix&hl=en), rebooted, and now I'm using the original backup folder location preference ("Filesystem storage - Media") and it's all good.

    I tested by backing up an app, uninstalling it, rebooting, and reinstalling it after reboot and it was fine.

    Hope this helps...
    1
    wow thanks a lot for that ..
    i tried your method first and it worked :) .. then i headed to the thread you posted .. and that script worked flawlessly :)
    here are the files i used if anyone needed them