yashsingh1/xdaforums huggingface dataset:
[One (M8) Original Android Development] m03sizlak:
Just an FYI, this new method of WP disabling is not 100% working, and definitely can result in data corruption. There must be other places in the kernel where a check is done to determine if a write to system should be allowed.

Here are the symptoms I see. I rooted and installed v4.1 of wp_mod (init.rd style) on a Sprint M8. I then used Titanium Backup to backup and then uninstall many system apps. Upon hearing that other people were unable to write apk's to /system/priv-app I attempted to restore an app from there. Titanium Backup hung (I waited 15 minutes then had to Force Kill it). After force stopping it, I checked the directory and the file was not there. I then rebooted, and magically the file was there. I repeated this same test with other apps in /system (not just priv-app) and got the same results, changes were not usually detectable until a reboot.

S-OFF can not come soon enough!
[One (M8) Original Android Development] flar2:
I just renamed some files in /system/app and the changes persisted on reboot. There is nowhere else in the kernel that affects that deals with /system write protection. I have tried everything to try and screw it up and I cannot.

priv_app is something different, not kernel releated. I don't think changes there will survive a reboot even with system write protection disabled in kernel.
[One (M8) Original Android Development] m03sizlak:
I saw the same behavior with some apps in /system/app (not priv-app). Titanium backup was able to back them up and delete them. However, when it tried to restore them (ie, copy them back into /system) it hung. After force killing titanium backup, the files did not appear in the directory, but after rebooting, they did. So this isn't a case of changes not persisting through a reboot, it's a case of changes not appearing until after a reboot. There were also cases when I tried deleting files from /system/app and they continued being listed in the directory until after I rebooted.
[One (M8) Original Android Development] clarkson63:
I have not had any problems adding files to system/apps.

Have you refreshed your file manager after making the changes to be sure you're not seeing a cached view?
[One (M8) Original Android Development] m03sizlak:
Yes. In several cases, I removed /system/app apps using titanium, and they continued to be shown in the app drawer (and were launchable) until after a reboot (then they were gone).

I know others who have seen identical symptoms.
[One (M8) Original Android Development] MassStash:
It's always been if you delete an app from system/xx it'll still launch and show up in app drawer if I recall correctly. I've had no issue removing/adding apps/ to either directories. I renamed app in priv-app with .bak to double check, it persist after reboot. I think you may have missed a step in the process, or you also have some weird ish going on, kind of like what happened/may still be happening to [MENTION=1162986]Captain_Throwback[/MENTION]. He was having issues with it working at all, and went through a whole "restore to stock as much as possible" process. I also removed vtt from priv-app, the app is gone, and not installed anywhere. Also, I'm sure I would go with TiBU as a solution. Perhaps they need to update something? I do know from waht captain pointed out, that TiBU doesn't even have the right calls for HTC products current setups. latest EvoLTE update, this rom, etc, to display the ext_sd storage space info. So maybe TiBU just don't know wtf it's doing. Try manually doing this stuff??

Correction: deleting app from system/app does immediately remove app's exist. Not in app drawer anymore
[One (M8) Original Android Development] m03sizlak:
I was getting inconsistent behaviour. Sometimes it would, sometimes it wouldn't.
[One (M8) Original Android Development] Electronic Punk:
It might still be there until you reboot.
[One (M8) Original Android Development] flar2:
I don't know a lot about android (I'm a Linux guy) but when it comes to apk's , especially system apps, you can't always copy and paste them. For example, is you copy an app to system, it won't be installed, but if you adb push, it will install. If you delete an apk, I think its possible that it could still be cached somewhere if it's still running when you delete it. Not totally sure how it works, but I do know that it's not completely dependent on the kernel.
[One (M8) Original Android Development] Veniceee:
Can i have the stock kernel or i must have an altered one? please and thank you
[One (M8) Original Android Development] clarkson63:
This mod works with stock kernel
[One (M8) Original Android Development] Scott:
Thanks Flar2! As always your work is pure top notch!
[One (M8) Original Android Development] Scott:
My apologies, not sure if this was posted yet but its edited for the Verizon 1.55.506.2 OTA.

No credits to me, all to flar2!
[One (M8) Original Android Development] shrubz:
I can't get this to work on Stock GPE by Graffixnyc. Tried this module and Elemental Kernel, neither give me write access to SD Card, Titanium won't let me backup to SD and Camera won't save to SD using download2SD xposed module.

Sense ROMs (Insertcoin and Maximus) work fine out of the box as do GPE ROMs Skydragon and Sinless.

Any ideas?
[One (M8) Original Android Development] HolyAngel:
Writing to sd card requires editing platform.xml in system/permissions folder.. needs to look like this:

-<permission name="android.permission.WRITE_EXTERNAL_STORAGE">

<group gid="sdcard_r"/>

<group gid="sdcard_rw"/>

<group gid="media_rw"/>

the media_rw one needs added.

This wp_mod.ko is for *system* read/write access not sdcard ;)
[One (M8) Original Android Development] MassStash:
I haven't needed this mod since es file explorer updated their app to work with KK just fyi
[One (M8) Original Android Development] shrubz:
Thanks a lot. This has been driving me nuts!! Have edited the file and now using downloads2sd I can save camera pics to SD.
[One (M8) Original Android Development] BrandonPrice31:
I tried using this so I can use my theme xposed module unicon.

Doesn't seem to be workign on RUU GPE?
[One (M8) Original Android Development] JohnM109R:
is this already implemented in ViperOne 1.6.0 ??
[One (M8) Original Android Development] DeeZZ_NuuZZ:
this module for system and i think also the RW for sdcard etc are in nearly every sense rom
[One (M8) Original Android Development] MassStash:
Do not believe so. But like that quote said, I suggest just using es file Explorer, than your not changing global perms. That would be a little more safer

~m8whl on the Always Solid ViperOneM8 Latest

2.265 Max ¦ 300 Min

ondemand

row
[One (M8) Original Android Development] Ch4m3l30n:
And/Or you could use this handy utility:

Universal Init.d

https://play.google.com/store/apps/details?id=com.androguide.universal.init.d
[One (M8) Original Android Development] epsix:
I'm on stock kernel all i need to do is copy wp_mod.ko to system/lib/module change permission w-r-r and reboot right?
[One (M8) Original Android Development] DeeZZ_NuuZZ:
r-r-w not wrr ..but yes you have to copy this just in there...

Gesendet von meinem HTC One_M8 mit Tapatalk
[One (M8) Original Android Development] klbjr:
Is there anyway I can use this to brick my phone? I'm trying to wipe all partitions but can't because I can't get S-Off.
[One (M8) Original Android Development] SeeMeNoMore:
How can I disable the system write protection on faux kernel? The module doesn't seem to work.

Gesendet von meinem HTC One_M8 mit Tapatalk
[One (M8) Original Android Development] flar2:
The module won't work with faux's kernel, but you shouldn't need it. I'm sure he disabled the write protection in the kernel.

The system partition still has to be mounted r/w

su
mount -o remount,rw /system
[One (M8) Original Android Development] SeeMeNoMore:
okay ehm i tried your command on android terminal app without luck, solid explorer shows me that system is mounted as r/w but when i reboot all the apps i deleted from system folder are back.

tried a system mount app from play store without luck neither...
[One (M8) Original Android Development] flar2:
Then it seems that faux has not disabled write protection after all. He probably just forgot.
[One (M8) Original Android Development] SeeMeNoMore:
okay :D thanks for your help tho, appreciated :)
[One (M8) Original Android Development] shrubz:
Will this work for 4.4.3 GPE?
[One (M8) Original Android Development] chikess:
Is there any mirror? goo.im seems down since days...
[One (M8) Original Android Development] SeeMeNoMore:
Module doesnt work on 4.4.3 for me

Gesendet von meinem HTC One_M8 mit Tapatalk
[One (M8) Original Android Development] skulldreamz:
Nice :) way to think outside the box, I'm sure that beautiful green sticky stuff helped ;)

---------- Post added at 03:55 PM ---------- Previous post was at 03:53 PM ----------

I know I'm kinda late but you gotta mount system > mount -o remount,rw /system
[One (M8) Original Android Development] shrubz:
Works fine for me on 4.4.3 GPE ROM.
[One (M8) Original Android Development] doublehp:
The miror is on maintainance for now. So, the guy on IRC gave me his local backup. I will push it here for 30 days:

http://dl.free.fr/gSha53ljz

(server will delete it after 30d nobody downloads it)

Worked for me on HTC One M8
[One (M8) Original Android Development] chrisnz1947:
HTC M8developer

Try as I might I cannot get this to work on my rooted developer edition of M8.

I have followed the steps outlined in this thread but all I get is 'Failed(file Exist') messages when I run the command from terminal.

Also after each reboot I need to recopy the file info the /modules directory, as the system keeps clearing it out of the directory.

suggestions/assistance would be appreciated has a few of the 'root' apps I have appear to want to create a file or write within the /system structure.

Phone details and software levels.

Model HTC One M8 developer

Android 4.4.2

HTC sense 6.0

Software 1.54.1540.9

HTC SDK API level 6.17

Linux version 3.4.0-gb52e55d
[One (M8) Original Android Development] shrubz:
This is what I did and it worked fine for me:

Download the file in first post wp_mod.ko

Move to Download directory on SD Card

Open terminal emulator on your phone

Type su then press enter

Type insmod /storage/ext_sd/Download/wp_mod.ko then press enter.

then reboot your phone.

I then ran sdfix from Google play to enable write access to SD card.

shrubz
[One (M8) Original Android Development] chrisnz1947:
Thanks for info. Tried this out, after reboot system folder is still showing as r/o (Root explorer). I assume if it had worked ok this would be showing R/W? If I attempt to view any text file in a text editor I get a warning that directory is read only.
[One (M8) Original Android Development] thelieisajoke:
My phone is currently not s-offable and some apps won't work cause they are unable to write to /system.

Will your kernel solve this problem?

Also, what kind of memory will still be inaccessible?
[One (M8) Original Android Development] chrisnz1947:
All but given up on this

I have M8 developer on software level 1.54.1540.9 with android 4.4.2, rooted and with TRWP recovery.

Try as I might I cannot get this mod to work.

I have followed your instructions on page 1, I have followed instructions Posted by member graffixnyc, and instructions from member shrubz.

non have worked. I have returned to a TRWP backup I took before starting this process and repeated these instructions several time, still no luck

I get the message init_module 'system/lib/modules/wp_mod.ko' failed (file exists) when I run insmod from terminal as su.

Any help/assistance would be greatly appreciated as most off the rooted apps I used on my previous htc now give me problems from simple warning messages to sudden reboots.
[One (M8) Original Android Development] doublehp:
If it says "file exists", then the module is already loaded. All you need to do is:

- insmod ...

- mount -o remount,rw /system

To check it:

- touch /system/plop

- reboot

- ls -l /system

then, insmod, remount, rm ...
[One (M8) Original Android Development] chrisnz1947:
Many thanks, now working. My misconception on what I was expecting to see via Root explorer once this was working. Apps that would not work prior to fix (eg Busybox would not install) are now good.
[One (M8) Original Android Development] doublehp:
There are ways to auto-load this module at boot, if you want.

In short, have a glance at this: http://xdaforums.com/showthread.php?p=53558230

There are many other ways. Many apps will run stuff at boot for you. I think Script Manager should do it (not 100% sure). Tasker can (100%).
[One (M8) Original Android Development] erapmicks:
Hey guys, i figured it out. but im trying to do the Sunshine S-Off, and i tried the compatability test and it said it wont work with custom kernel. How do i revert to stock kernel?
[One (M8) Original Android Development] jldr:
This is for the Sense version, not the GPE, correct?
[One (M8) Original Android Development] doublehp:
Don't know what GPE is.
[One (M8) Original Android Development] jldr:
Google Play Edition.

This also doesn't appear to be working for me. Any changes I make in system are still reverting upon reboot. Not sure what I did wrong, followed directions exactly.

The terminal emulator doesn't appear to be installing the mod. I type in the line, and it doesn't say anything back.
[One (M8) Original Android Development] doublehp:
No i don't have GPE. I hosted it because the main miror was on maint that day.

Linux console is not very verbose; if it does not reply you, you can assume things went good. Linux is not windows; Linux won't ask you to reboot to apply every sngle mouse move ...
[One (M8) Original Android Development] jldr:
Well, the mod doesn't appear to have worked. Any bloat I uninstall keeps coming back. I can't figure out where I went wrong.

Solved: Bad download, the one in the mirror worked. Thanks!!
[One (M8) Original Android Development] pchetney:
Srpint HTC One (M8)/831C ?

I can not s-off my Sprint HTC One (M8)/831C. Trying to verify that this will work on this device.

Can anyone tell me if they have done this with no issues?
[One (M8) Original Android Development] Captain_Throwback:
You've tried SunShine?
[One (M8) Original Android Development] pchetney:
No, but I starting to research now. Thanks
[One (M8) Original Android Development] pchetney:
Sunshine worked great, now S-OFF.
[One (M8) Original Android Development] Azarielz:
[MENTION=4684315]flar2[/MENTION]

Sorry for the big fat OT, and probably for the very dumb question that follows, but there's any chance that this module will work with Motorola devices (which have system protected too) maybe with some modifications and a proper recompiling? Can a locked bootloader possibly prevent the module from loading?

This would be very useful for Moto G users with locked bootloader!

Thanks for your time.
[One (M8) Original Android Development] flar2:
I have no idea about motorola devices. It's probably implemented completely differently
[One (M8) Original Android Development] flar2:
wp_mod for Sense 6 Android 4.4.3 2.22.401.4

wp_mod.ko
[One (M8) Original Android Development] Daekin:
I think this is the not working version right?

you gave fixed version to mike1986...or?

is this the proper version?

vermagic=3.4.0-ge224610 SMP preempt
[One (M8) Original Android Development] flar2:
The version above works on the 2.22 base. Not sure if it works for Sprint and Verizon.

The version string doesn't matter. The module loads if the kernel symbol CRC value for module_layout matches the running kernel. In other words, this module can be hexedited to work with other kernels, but you need to change the CRC value for module_layout, not the vermagic.
[One (M8) Original Android Development] Daekin:
thanks for explanation. and what is vermagic string for? only for informational purposes?
[One (M8) Original Android Development] flar2:
If modversions is disabled in the kernel config, then vermagic determines which modules can load. In this case, module loading is controlled by modversions, which does a CRC check for all the kernel symbols referenced in the module.
[One (M8) Original Android Development] dennis_tian:
how to implement it? in other words, how to install it? dont understand the installation instruction given by you

---------- Post added at 07:48 AM ---------- Previous post was at 07:32 AM ----------

it's not free and need to buy it rite?
[One (M8) Original Android Development] dennis_tian:
dear, how can i download the mod? i clicked link

wp_mod.ko (Sense)

, it opened a new page but i cant find any download link?
[One (M8) Original Android Development] flar2:
It's free, of course, and included in pretty much all custom ROMs. It's more meant for ROM chefs, as DIY implementation in the stock ROM is not trivial.

It's a direct link, should work
[One (M8) Original Android Development] flar2:
It seems that Sprint users and GPE ROMs don't have working wp_mod.ko

I need some help because I simply don't have time to update the module for all hardware and software variants.

The module in the OP can be modded to work with all hardware and software variants of the m8. Luckily there is a guide:

http://xdaforums.com/showthread.php?t=1751966

It looks complicated, but it's not hard if you follow the instructions.

I've built the module so only one symbol in the module needs editing: module_layout

Basically all you need to do is dump modversions from a kernel module on the system you want this to work for, find the CRC value for module_layout, then open wp_mod.ko in a hexeditor and change the CRC value for module_layout to match.
[One (M8) Original Android Development] Sn8kbordin:
Which file do I use on T-Mobile rooted One M8:

1. Sense 4.4.3 (2.22 base):

wp_mod.ko

2. Sense 4.4.2:

wp_mod.ko

3. GPE 4.4.2:

wp_mod.ko
[One (M8) Original Android Development] migascalp:
it depends on your rom.Sense 4.4.3, Sense 4.4.2 or GPE 4.4.2.

See Setting->About->Software information
[One (M8) Original Android Development] Sn8kbordin:
My One M8 says "sense 6.0" :eek:
[One (M8) Original Android Development] Captain_Throwback:
Android version?
[One (M8) Original Android Development] Sn8kbordin:
Android 4.4.2

Sense 6.0
[One (M8) Original Android Development] Captain_Throwback:
So do you now know which one to use? ;)
[One (M8) Original Android Development] Sn8kbordin:
Just wanted to double check :good:

Thank you.
[One (M8) Original Android Development] Sn8kbordin:
I only wanted to fix apps' write access to SD card on my T-Mobile HTC One M8. I didn't use this wp_mod. I did it this way http://xdaforums.com/showpost.php?p=54696085&postcount=13
[One (M8) Original Android Development] DeGozaru:
Just to help clarify things, I have tried both the wp_mod.ko and platform.xml 'fixes' and only been successful with enabling write access to the external SD.

I have followed the steps for editing and replacing the wp_mod file but still don't have access to system. Have been testing by attempting to install Busybox. Does not install if attempting to install to /system/xbin. Reboots phone automatically if installing to /system/bin.

International HTC One M8

Android 4.4.2

1.70.61.3

Any help would be greatly appreciated. Desperate to sink my teeth into Xposed again.
[One (M8) Original Android Development] flar2:
Your system partition is corrupt, you need to reinstall, run fsck or restore from backup.
[One (M8) Original Android Development] DeGozaru:
Really? Well, that sucks.

Any chance on a step by step from a fresh stock install to get root, write protection disabled and system writing enabled?
[One (M8) Original Android Development] sscs:
C:\Users\admin\Desktop>adb push wp_mod.ko /sdcard/

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

455 KB/s (35943 bytes in 0.077s)

C:\Users\admin\Desktop>adb shell

~ # su

# insmod /sdcard/wp_mod.ko

insmod /sdcard/wp_mod.ko

insmod: can't insert '/sdcard/wp_mod.ko': invalid module format
[One (M8) Original Android Development] Captain_Throwback:
Why are you trying to insmod from the sd card?
[One (M8) Original Android Development] Anton42:
Hello flar2!

Adapt mod for HTC One (M8) Dual SIM, Android 4.4.2, sense 6.

Thank you!
[One (M8) Original Android Development] Sn8kbordin:
you have to do it in recovery as described here: http://xdaforums.com/showthread.php?t=2702575

ANytime you write to system phone will restart, but it doesn't have that protection in recovery. That also applies to replacing platform.xml with modified platofrm.xml file
[One (M8) Original Android Development] Sn8kbordin:
When using 4.4.3 wp_mod on my rooted S-On T-Mobile 4.4.3 Sense 6.0 One M8 I am having these issues:

1. When I tried editing and saving system/customize/ACC/default.xml in ES File Explorer phone rebooted on save and default.xml went back to stock

2. When I copied default.xml to extSD card, edited it, and tried overwriting system/customize/ACC/default.xml with edited default.xml in TWRP recovery phone also rebooted

How can I check that this actually works?
[One (M8) Original Android Development] flar2:
You need to runs fsck on your system partition, or just reinstall your rom.
[One (M8) Original Android Development] Sn8kbordin:
When typed this in TWRP in Terminal in /system/xbin/ it says: "fsck.ext4: no such file or directory"

Busybox from Playstore installed ok.

When typed this in TWRP in Terminal in /system/xbin/ it says: "fsck: applet not found"

Busybox from Playstore installed ok.

How do I run "fsck"?
[One (M8) Original Android Development] doublehp:
fsck.ext4 => create the symlink for ext4 (fsck will look for it in the $PATH). Or, create it in current dir, and run it directly.

applet not found => function not implemented in your busybox; try an other busybox.

Busybox from Playstore installed ok => playstore offers several dozens of different BB packages ...

busybox --help should give you the list of available applets ... usefull in both cases.
[One (M8) Original Android Development] italyforever:
Hey flar2, i saved you some time by using your instructions to create a write protection mod for GPE 4.4.4

i tested it and it works fine.

https://mega.co.nz/#!eQ1GSLBY!bJM60SKWiKcwvDZa_9j6OB4AdOyvay0W4x8QaF10o6Y
[One (M8) Original Android Development] flar2:
Great work, thanks!
[One (M8) Original Android Development] Sn8kbordin:
How?

I have "busybox v1.22.1-Stericson" https://play.google.com/store/apps/details?id=stericson.busybox . Which one would work to run fsck on /system?

Which one would work to run fsck on /system?

"busybox --help" makes TWRP restart.

"busybox" also makes TWRP restart.

I really could use a step by step with all the terminal command.
[One (M8) Original Android Development] flar2:
Wipe system and reflash your ROM
[One (M8) Original Android Development] Sn8kbordin:
I tired different busyboxes and all i get is:

~ # ←[6n/data/data/com.sylkat.AParted/files/busybox fsck/data/data/com.sylkat.AParted/files/busybox fsck
fsck (busybox 1.17.2, 2010-09-05 03:37:08 CDT)
~ # ←[6n/data/data/com.sylkat.AParted/files/busybox fsck -V -C -r /dev/block/mmcblk0p45
/data/data/com.sylkat.AParted/files/busybox fsck -V -C -r /dev/block/mmcblk0p45
fsck (busybox 1.17.2, 2010-09-05 03:37:08 CDT)
[fsck.ext4 (1) -- /system] fsck.ext4 -C -r /dev/block/mmcblk0p45
fsck: fsck.ext4: No such file or directory

Why am I getting this error when I am trying to fix /system?

I rather fix the problem than restart and reflash backup and still have a problem when doing the wpmod.
[One (M8) Original Android Development] flar2:
You cannot get a proper installation of busybox without system write. You really need to restore your backup. Just restore /system and you should be fine.

When you have a fresh system, make absolutely, positively sure you don't try to make any change to /system before loading wp_mod. That's what caused your current problem.
[One (M8) Original Android Development] italyforever:
Flar u should put it in the op so people can find it.
[One (M8) Original Android Development] flar2:
I'm going to, next time I'm on xda with an actual computer instead of my phone :D