yashsingh1/xdaforums huggingface dataset:
[One (M9) General] Oum:
yep... actually after getting official status, flashing stock twrp backup, stock recovery, re-locking the bootloader (LOCK flag)... OTA would still not apply... soooo... yep, I just flashed Maximus' firmware and AHRD and now I'm fine ^^

--- I have just read that maybe it was because my sdcard is 64gb, shouldn't be more than 32... maybe I'll try another day...
[One (M9) General] blueberry60:
Any solution for security warning on download mode after 2.10 or 2.8 base firmware update ?
[One (M9) General] scotty1223:
dd if=/dev/block/mmcblk0p8 of=/sdcard/mmcblk0p8

dd if=/dev/block/mmcblk0p32 of=/sdcard/mmcblk0p32

youll find them on internal storage.upload them and pm me a link. you likely have gibberish at the flag location,or your flag is one spot over from the usual(seen this one other time)

it should. if not,see above

havent heard anything about this. please provide more info
[One (M9) General] iElvis:
Done.
[One (M9) General] scotty1223:
Awesome. I'm at work, so I'll take a look probably sometime this evening
[One (M9) General] scotty1223:
Ahh. Nothing that you can do about that, that I am aware of. We have searched for the text, but haven't come up with anything yet.
[One (M9) General] iElvis:
Thanks, no rush.

Edit: Got it to work.

At this point in my xda tenure, I really should be reading OPs more carefully. :eek::p
[One (M9) General] ryansc375:
Forgive me if I missed this issue in the other posts, but I went through your procedure to restore my M9 to official, and sure enough it worked (thank you scotty1223)! Here's the problem: I then reinstalled all of my apps, rebooted my phone, and the phone switched back to modified, even though this took place on official T-Mobile firmware (latest version). Thinking it was some kind of weird fluke, I started all over again, and switched the status back to official. I then once again installed all my apps (standard stuff), rebooted, and the phone once again said modified. Not sure why this is happening. I followed your instructions to the letter. Any ideas? Thank you!
[One (M9) General] scotty1223:
You are s off,correct? Is the prollem occuring after you turn s on?
[One (M9) General] ryansc375:
Ahhh. I believe it is! Didn't think of that. Duh! I will confirm that this is the issue. Thanx!
[One (M9) General] ryansc375:
Hi Scott, quick follow-up question. Everything is back to "Official" and I'm not going to reenable s-on, per your comment. However, whatabout relocking the bootloader? Will that also change the status to "Modified"? Thanks again for your help!
[One (M9) General] scotty1223:
No,you are fine to lock the bootloader,just make sure that you leave s off. There really is no advantage whatsoever in being s on.

S off is a privilege.once you have it,don't ever let it go!
[One (M9) General] iElvis:
Also, going back to s-on is risky, especially now with the added "allow oem unlocking" security feature. I have seen a couple of people try to go back to stock, make a mistake doing it, and not be able to fix anything because they thought they needed to go s-on as well. If you don't get everything exactly right, going back to s-on can lock your phone into an unstable configuration. You got lucky this time.
[One (M9) General] ryansc375:
Worked perfectly: s-off, locked and official - and that's good enough for T-Mobile! Thanks again.

Ryan
[One (M9) General] LLegion:
ill be checking what else i could do, i have clean master with no real root access son many apps, maybe this is the reason.....ill post later
[One (M9) General] skulldreamz:
Thank you so much [MENTION=3437245]scotty1223[/MENTION] ( Mr.Write_protekk_b_gone ) Your works is truly appreciated and the fact that some of these hacks don't always find their way to the public, I just wanna say your a humble guy and the true definition of open source. ;D
[One (M9) General] nkk71:
Security Warning
If you flash this phone with any ROM
that was not officially released by HTC
you take the risk of
releasing your personal and financial
information to unknown sources.

If you mean this text, it's actually found two times in the same place,

but

I wouldn't touch that particular section, think it's

1- too dangerous

2- not worth it

3- not even sure it can be simply hex-edited... don't know the effect it would have

EDIT: if you want the info just PM me scotty1223
[One (M9) General] scotty1223:
Thanks,but in just the messenger. Beaups it's the one to thank for it :)
[One (M9) General] scotty1223:
I agree with you about messing with it. I'm not sure why folks care so much about the red text on the slash screen either.

Definitely shoot me a pm if you get a minute. I'd like to see what you've found :)
[One (M9) General] nkk71:
you have mail ;)
[One (M9) General] scotty1223:
Cool,I just left for work,I'll take a look in a bit :D
[One (M9) General] nkk71:
plenty of interesting stuff in there :D

oh btw, forgot to mention, it seems that text is only in the 2.xx.xxx.x ones, not the 1.40.xxx.x
[One (M9) General] iElvis:
Well, you see that text every time you reboot. This text shows up only when you're in download mode, and on a text-only screen with lots of other stuff. If you've gone to the trouble of creating and flashing a custom splash screen (:D) the aboot text is annoying.

But of course some brave person had to be the first to test/remove the hboot text. Maybe someone is OCD enough to test it here, but I agree it seems like a different sort of function and pretty risky .
[One (M9) General] nkk71:
It's not really about being brave or similar, but personally, I've avoided modded hboots (or in this case aboot, and hosd), simply because of the potential bricks involved.

If you remember the early days of revone on m7, it had an option to set s-on without needed the fastboot command.... it was quickly removed because of the bricks involved.

even users that were 100% sure they were 100% stock, but strangely got a signature verify fail, when trying to go s-on using fastboot oem ...

which luckily saved they're phones from being a brick, cause they eventually had to be told that the modded hboot in there, is not going to work.
[One (M9) General] iElvis:
Yeah, I do remember that, and it's one of the reasons I tell people at every opportunity that s-off should be viewed as a one-way trip, but you still see people viewing it like rooting, something to be tried out and abandoned on a whim. :eek:
[One (M9) General] bynarie:
Hey there, thanks for the great post. Now bootloader shows "Official" status, BUT, how do we get rid of the ugly red text during boot up - "This build is for dev purposes only...."? Thanks again
[One (M9) General] blackknightavalon:
My M9 still says modified bootloader, but I'm not bricked.
[One (M9) General] efrant:
Aside from preventing the change of the tamper flag, what else is "write-protected" after S-OFF? In other words, once someone has S-OFF, what does executing "echo -ne '\x04' | dd of=/dev/block/mmcblk0p32 bs=1 seek=4126" allow you to do (that you that you otherwise would not be able to do)?
[One (M9) General] YrrchSebor:
Easy peasy on my Tmo M9 as well. Thanks!
[One (M9) General] kokinator02:
Thhhhhhank youuu Scotty!

My M9 is a 64 GB TW variant converted to Dev Ed and I couldn't get rid of the hideous "modified" label no matter what Ruu I flashed.

That is, until now of course [emoji16]

Cheers mate[emoji481]

Nexus 9
[One (M9) General] jbfountain:
Ok I have an issue after disabling the write protection and changing the software status to Official. I cannot flash any zips in recovery. I followed everything precisely. I even copied and pasted the commands so I wouldn't make any mistakes. Is there a way to reverse this? I have a AT&T variant converted to a T-Mobile. I've tried reinstalling TWRP with no change. I tried restoring a backup with no change. I have not done any other modifications since this one. It seems as though it's created some other kind of write protection. Any ideas [MENTION=3437245]scotty1223[/MENTION] [MENTION=711482]beaups[/MENTION]?
[One (M9) General] scotty1223:
What happens when you attempt to flash a zip? Error messages,or they just don't work?

Dump blocks 8 and 32 and pm me a link
[One (M9) General] jbfountain:
It acts like it's going to flash, but then it just reboots to system. I'll dump those blocks tonight after work and send you a link. Thank you for your reply.

Using XDA to unleash the power of Android on my S6 Edge Plus
[One (M9) General] dlads:
[MENTION=3437245]scotty1223[/MENTION] legend

:thumbup:
[One (M9) General] jbfountain:
Hey [MENTION=3437245]scotty1223[/MENTION], have you had a chance to look at the 8 and 32 blocks yet?

Using XDA to unleash the power of Android on my HTC One M9
[One (M9) General] scotty1223:
Not yet. I will do that tonight or tomorrow.
[One (M9) General] jbfountain:
Ok. It's not like I can't use the phone. It's just bugging me that I haven't been able to figure it out. I hope that you will have better results.

Using XDA to unleash the power of Android on my S6 Edge Plus
[One (M9) General] LLegion:
what are the real benefits on this, im a rom tester lover and to try out so many apps and mods, but not really interest in hchanging the softaware status since its my phone for personal use only, let me know please anyways! =D
[One (M9) General] internectual:
Worked with my phone. Developer edition purchased from HTC, bootloader unlocked, S-OFF, and rooted. "Official" status restored, not sure how to confirm the write protection but I got no errors.
[One (M9) General] jbfountain:
Issue resolved. I tried flashing a zip file with Flashify and it worked. Tried flashing in recovery again and no go. I tried reflashing TWRP, and then flashing zip and still no go. Went into mount in TWRP, and checked system (it was unchecked ), and then tried flashing zip and success. Now I can flash zips in recovery again without having to mount system. Strange? I don't know why this occurred, but I'm happy everything is working correctly again. As the old saying goes "All's well that ends well ". Thank you [MENTION=3437245]scotty1223[/MENTION] for putting this guide together.

Using XDA to unleash the power of Android on my S6 Edge Plus

---------- Post added at 11:25 PM ---------- Previous post was at 11:21 PM ----------

I believe that if you used the method described in the OP to get the software status "Official " then the remaining write protection has been disabled.

Using XDA to unleash the power of Android on my S6 Edge Plus
[One (M9) General] JochenP:
[MENTION=3437245]scotty1223[/MENTION]

hi, little offtopic, please excuse.

i'm testing the M9 methods on the A9 model and find same pattern in the p2 file but patching fails. we believe that the A9 has the same lock.

i found these pattern in p32:

4096 090000000A0000000B00000052046C06

4112 0400040000000000000000000000FDB5

the red one (4126) is the unaltered flag of your patch?

thank you
[One (M9) General] scotty1223:
I don't believe you'll find the same pattern. I'd recomend not messing with A9 and other new devices. They are enforcing more and more protections and are unfortunately becoming too complex to modify simply in this manner. There is good reason I've not put up my usual threads
[One (M9) General] Ivanovic:
In that case, before disabling remaining write protection on your M9 were you able to reset back to LOCKED instead of RELOCKED?
[One (M9) General] scotty1223:
On m9,Yes.

A9 and newer I do not believe it to be safe
[One (M9) General] Ivanovic:
Ok, then this write protection has nothing to do with the lock flag. It must be somewhere else. Thanks !

Στάλθηκε από το HTC One A9 μου χρησιμοποιώντας Tapatalk
[One (M9) General] scotty1223:
M9 and A9 are not an apples to apples comparison
[One (M9) General] Ivanovic:
Apart from that, I just wanted to know if the remaining protection on the M9 would have prevented us from reseting to LOCKED on the M9

Στάλθηκε από το HTC One A9 μου χρησιμοποιώντας Tapatalk
[One (M9) General] scotty1223:
At first,no. You could change the lock status flag without this,these Wp were not affecting p2.

It's possible for that to have changed,I haven't tried since it came out.
[One (M9) General] JochenP:
Thank's for your answer. You are right: pattern for LOCK/RELOCK has same location at A9 but doesn't work.

Gesendet von meinem HTC One A9 mit Tapatalk
[One (M9) General] weedup:
Hi, will this commands work on terminal emulator? Thanks
[One (M9) General] jeem1908:
Return to official

I have converted to developer edition with latest version of android 6, boot loader is unlocked, s-off and was wondering if I flash twrp , install supersu to gain root, I would then be able to reset official flag also after this I want to return back to stock recovery and remove root, will this process work and therefore give me the official oat updates as they come for unlocked Deb edition, just really wanna try to keep official and kind of factory.

Thanks for any advice given, appreciated

Cheers :D
[One (M9) General] scotty1223:
Yes,that will work. Just make sure you stay s off
[One (M9) General] jeem1908:
Can i leave unlocked bootloader and s-off just the same as the developer edition would be

thanks scotty1223

happy days
[One (M9) General] jeem1908:
wee update , have installed twrp-2.8.7.1_CPTB-B1-hima.img and reboot phone with no issues, so proceed to flash UPDATE-SuperSU-v2.46 and then phone only boots to htc one white screen and goes np further

am I doing something wrong

any help appreciated
[One (M9) General] scotty1223:
If your divice is on marshmallow, you'll need to use one of the "systemless" root methods,like that used to root the A9. There is a recovery flashable zip that installs the needed files,then you can install superuser from the market afterward.

There is also a beta version of SuperSU that does everything,but requires a factory reset after the install.

Look up the twrp thread in a9 original development for some more info and superuser links. I can find some links when I'm back to my computer if you can't find them.

If all you need is root to disable wp and change your software status,you could just do that in recovery. You have root access there,you don't actually need to install superuser.
[One (M9) General] scotty1223:
Sorry I missed the first part of this. Yes,you can remain unlocked and s off.

Have you gotten yourself sorted?
[One (M9) General] jeem1908:
Lol, yes managed to get a spare hour today, ended up flashing rom.zip via the sd card, fare enough this way might factory reset the phone but hey a dinny mind, now have a htc one m9 converted from international to developer edition boot loader unlocked an s-off, this I reckon should easily allow OTA to function properly with no issues.

I find it strange though that flashing the same rom.zip via htc_fastboot won't change the software status, wtf.

Anyway thanks all for your assistance, think I thanked all in the correct manor

Cheers :D:D:D:D
[One (M9) General] Rix70:
I want to thank you for this amazing thread.

Much much thanks :)
[One (M9) General] amirjalali:
i cant get my to work

ielvis plz help me im stuck in the same place like you can you help me plz.

dont know what to do have tryed it many times.

does it matter if my phone is from sweden or it the same thing?

Sorry for my bad engelish
[One (M9) General] m03sizlak:
I'm on a S-OFF Sprint M9. Just took the marshmallow OTA, and then installed supersu-v2.65 (systemless). I then ran the adb command as root from this thread to fully disable all write-protection.

However, I can't uninstall system bloatware apps using titanium. When I try, it looks as if it worked, until I reboot, then they all come back. Kind of frustrating. Any idea?
[One (M9) General] scotty1223:
Is your boot loader unlocked?
[One (M9) General] m03sizlak:
Yes, unlocked.
[One (M9) General] jbfountain:
Many apps aren't fully compatible with MM yet. I used Root Uninstaller Pro which worked, but I had to do it twice to get it to stick. Did you try TB twice or just once.

Using XDA to unleash the power of Android

If anyone's post or work has helped you please, use the thanks button
[One (M9) General] nkk71:
Not entirely sure whether it's kernel related or not, but systemless root -> /system is mounted read only
[One (M9) General] m03sizlak:
Actually it may be titanium. I used a file explorer (root explorer) to delete it and it stayed dead... Hmmm
[One (M9) General] hergosx:
Anyone know if the restriction to write M9s NV 06828 LTE Band has something to do with this?

http://xdaforums.com/one-m9/general/how-to-change-network-bands-gsm-devices-t3135401/page1
[One (M9) General] gregsarg:
Very possible...

I guess the only way to know for sure is to remove the write protections and attempt the edit of NV 06828....and see if it sticks...

I haven't attempted it yet....g
[One (M9) General] angasreid:
Can any of this be done on a mac? If so how! I appreciate the help, thank you!
[One (M9) General] donmarkoni:
Probably...

You will have to find fastboot and adb for it, everything else is the same, just use your logic.

Also, you could do it on your phone, use your logic on what to skip.
[One (M9) General] angasreid:
Sorry... what?? It's not possible to ./adb shell without modification to bash profiles in OsX. Found myself a Windoze machine and just did it there. Thanks for the help?
[One (M9) General] donmarkoni:
It was much easier to do it on the phone, I did it that way, no need for desktop computer.

If you don't know how, I would advise you not to mess with stuff you don't fully understand...
[One (M9) General] iElvis:
I did this ages ago, and I have a Mac, but I can't remember if I did it on via adb or on the phone.
[One (M9) General] cincon:
pls do that for verizon htc m8 =)
[One (M9) General] bigp951:
Wasn't there instructions on how to regain lost memory after running sunshine? If I remember correctly sunshine will cause you to lose about 3 gb unless yo go delete the file... Do you know where the instructions for that is?
[One (M9) General] scotty1223:
sorry,no idea
[One (M9) General] Lynx12:
Thanks for orders, they work great :)
[One (M9) General] doomscooter:
Awesome
[One (M9) General] aestivalisakito:
Pretty surr this has already been figured out and not to ressurrect an old thread but in vase anyone wants to know the answer to this question:

After You S-Off, You May Notice Your Internal Memory Is 3GB Short. This Is Because S-Off Devices Are Supposed To Be Seen As "Tester" Devices. To Reclaim Those 3GB Of Space, Navigate To: /system/bin/ And Rename The "hrdump" File To "hrdump.bak" After That, Navigate To /data/ And Delete The Two hrdump file's. (You'll Notice One Of Them Is 3GB)
[One (M9) General] RAdXXL:
I realize this is an old post..but I'm having the same issue that you had a while back..followed the steps but still says modified. I'm S-off, rooted..commands seem to go through without error..kinda stumped. Am I missing something too? lol.
[One (M9) General] zambalik:
what is the benefit from this procedure?
[One (M9) General] ovodda:
Could this procedure works on HTC 10 with "status software modified"?
[One (M9) General] Kisakuku:
No.
[One (M9) General] HarleyDoesntKnowMuch:
Hi! I somehow managed to Put my Software Status : Modified and i dont really know what im doing,

Any help on how i can turn S-OFF?
[One (M9) General] jndav83:
? about whether this worked

I did all this but permission denied was the response from command window. what should I do now?
[One (M9) General] osm0sis:
[MENTION=3437245]scotty1223[/MENTION] [MENTION=2605798]nkk71[/MENTION]

echo -ne '\x04' | dd of=/dev/block/mmcblk0p32 bs=1 seek=4126

What's the default value of this byte? I'm looking into adding this device to BootUnlocker

Another question I had was without the above set is the following command possible?

echo -ne '\x00\x00' | dd of=/dev/block/mmcblk0p8 bs=1 seek=4228100

Also, where S-OFF is a prerequisite, is there any byte or something to check to determine the S-OFF status?
[One (M9) General] nkk71:
Dunno how much this will help, but:

Since I never used it, mine is reporting 0x00

~ # ls -l /dev/block/bootdevice/by-name/ | grep p32
lrwxrwxrwx 1 root root 21 Oct 18 15:43 misc -> /dev/block/mmcblk0p32
~ # hexdump -C -n 32 -s 4125 /dev/block/bootdevice/by-name/misc
0000101d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0000103d

afaik, misc is not a secured partition anyway, so whatever value that is can be changed easily.

Well mine reports *official* anyway (even though I never used that method), can't say for sure why, but the M9 is being flashed a lot, so one of the RUUs must have set it *clean*, even though the device is currently anywhere but clean.

(I'm guessing it doesn't get triggered once you've gone s-off and reflashed RUU, but I cannot say that for sure at all)

Here's that part:

~ # ls -l /dev/block/bootdevice/by-name/ | grep p8
lrwxrwxrwx 1 root root 20 Oct 18 15:43 pg2fs -> /dev/block/mmcblk0p8
~ # hexdump -C -n 32 -s 4228100 /dev/block/bootdevice/by-name/pg2fs
00408404 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00408424

S-OFF being a prerequisite is because you're trying to write to the pg2fs partition, which is one of the rather *sensitive* partitions.

As for how to check for S-OFF, instead of trying to probe a certain byte, maybe it's just easier to use fastboot?

eg:

From download mode:

> [B]fastboot oem readsecureflag[/B]
...
(bootloader) Device security level S-OFF
OKAY [ 0.064s]
finished. total time: 0.068s

From bootloader mode:

> [B]fastboot oem readsecureflag[/B]
...
(bootloader) read secure flag: 0
OKAY [ 0.016s]
finished. total time: 0.016s

secureflag == 3 -> S-ON, secureflag == 0 -> S-OFF, any other value, and you're in lalaLand :eek:
[One (M9) General] osm0sis:
Thanks! It'll be from an app though, so if there's a byte or prop or something that indicates S-OFF that'd be ideal. :)
[One (M9) General] nkk71:
if it's a booted app, then i think ro.sf property does the job

but maybe [MENTION=711482]beaups[/MENTION] would like to comment, since it's his anyway
[One (M9) General] beaups:
You aren't going to be able to accomplish an app-based lock/unlock tool for the M9 without extensive reverse engineering and a vulnerability or two.
[One (M9) General] osm0sis:
Just the unlock/relock + tamper toggling once already rooted like we can do for Nexus, OnePlus and other LK bootloader devices. See here: https://xdaforums.com/galaxy-nexus/themes-apps/app-bootunlocker-nexus-devices-version-t1731993
[One (M9) General] nkk71:
Thought he just wanted a "decent" way to read the s-off flag, i only suggested doing it through fastboot, because I dont know any better :o

Perhaps a nice // if (soffPos[0] == 0) "yay" else "nay" // yeah yeah. badly formatted code, what else is new :p
[One (M9) General] beaups:
Understood. But HTC doesn't follow the standard LK APIs for any of this. As nkk71 said, you can query s-off status in-app by checking the ro.sf property.

--beaups
[One (M9) General] osm0sis:
Yes, HTC devices like this would be the exception, while not LK, due to the similar method of echoing HTCU to unlock. Thanks for the help!
[One (M9) General] nkk71:
Then again, once an HTC device is S-OFF, the bootloader lock status becomes pretty much irrelevant. So you could have a locked bootloader, but still be able to flash things left right and centre :)

But I'd definitely be sure to either be S-OFF or remain bootloader unlocked on an frp device.
[Galaxy Note Pro 12.2 Q&A, Help & Troubleshooting] GalaxyNotesTx:
Im rooted on my 12.2 Lte 907A via Towelroot.. Is there a link with instructions to remove root and let me take the Update?

Much appreciated. .
[Galaxy Note Pro 12.2 Q&A, Help & Troubleshooting] GalaxyNotesTx:
I flashed back to stock firmware and realized no Lollipop for 907A! Lol
[Galaxy Note Pro 12.2 Q&A, Help & Troubleshooting] dstarr:
How did you root via Towelroot if the 907A is not supported?
[Galaxy Note Pro 12.2 Q&A, Help & Troubleshooting] GalaxyNotesTx:
Is was supported when i did it last year.. easy one click operation, but my tab was running slow and wanted to take root out. flashed new fresh firmware, and it runs like a champ now.