Question Removing Retail Mode from S21+

Search This thread

Frostyb

Member
Apr 21, 2022
15
2
Hi there, I can help you out! I have some experience with Samsung.

So first off, I take it this is an Exynos model? Snapdragons require the use of a paid service to get an unlock.

It seems you've flashed stock firmware before but it didn't work out due to Knox. Did you flash all the files including the CSC (wipe all data) file? Also, you could try flashing TWRP and that would trip Knox, at which point Knox is disabled due to detecting system modifications or it will try to rollback your modifications.
I'm not sure if its Exynos or Snapdragon.

Yes I flashed the official firmware with CSC file, I have not tried flashing with TWRP yet (unsure what that is to be honest).

In regards to your developer options question, yes I can enable dev options on the phone, but the issue isnt removing the retail mode application, I actually k ow the code to remove that. The main issue is when the device is flashed and you go through the setup stage, as soon as you connect to Wifi (which you cannot skip) Knox immediately kicks in and starts applying settings, and the phone sets up in retail mode without playstore and restrictions on changing settings or privacy sharing.

The crossroads I'm at is somehow bypassing Knox during set up, so that the phone sets up like a regular stock phone. All the work around videos have ways of enabling ADB then running CMD through the PC and removing Knox before it can do anything but I can't do that because in the videos they can connect to wifi and go back a step before Knox kicks in, on my device Knox kicks in immediately after connecting to wifi and you cant stop it.
 

razercortex

Senior Member
Apr 8, 2018
299
126
I'm not sure if its Exynos or Snapdragon.

Yes I flashed the official firmware with CSC file, I have not tried flashing with TWRP yet (unsure what that is to be honest).

In regards to your developer options question, yes I can enable dev options on the phone, but the issue isnt removing the retail mode application, I actually k ow the code to remove that. The main issue is when the device is flashed and you go through the setup stage, as soon as you connect to Wifi (which you cannot skip) Knox immediately kicks in and starts applying settings, and the phone sets up in retail mode without playstore and restrictions on changing settings or privacy sharing.

The crossroads I'm at is somehow bypassing Knox during set up, so that the phone sets up like a regular stock phone. All the work around videos have ways of enabling ADB then running CMD through the PC and removing Knox before it can do anything but I can't do that because in the videos they can connect to wifi and go back a step before Knox kicks in, on my device Knox kicks in immediately after connecting to wifi and you cant stop it.
TWRP is TeamWin Recovery Project (it's a custom recovery). My hypothesis is that Knox will be disabled if it detects custom modifications to the phone, but that's yet to be tested. You can flash it here https://xdaforums.com/t/recovery-unofficial-twrp-for-galaxy-s21-exynos.4241935/, just follow the guide and it should work
 
TWRP is TeamWin Recovery Project (it's a custom recovery). My hypothesis is that Knox will be disabled if it detects custom modifications to the phone, but that's yet to be tested. You can flash it here https://xdaforums.com/t/recovery-unofficial-twrp-for-galaxy-s21-exynos.4241935/, just follow the guide and it should work
Even if it doesn't work, there'll be a chance to root the device using TWRP and with root privileges you can likely remove Knox deployment. Do note that installing TWRP does trip the Knox warranty bit to 0x1 = warranty invalid, tampered with. But that is kind of the goal here, as that might alone disable the deployment.
 
Last edited:

Frostyb

Member
Apr 21, 2022
15
2
TWRP is TeamWin Recovery Project (it's a custom recovery). My hypothesis is that Knox will be disabled if it detects custom modifications to the phone, but that's yet to be tested. You can flash it here https://xdaforums.com/t/recovery-unofficial-twrp-for-galaxy-s21-exynos.4241935/, just follow the guide and it should work
Hmmm Interesting.

Sorry if I seem ignorant but is there any downsides to using this? I know triggering Knox means you lose certain functions of the phone but if I've read up correctly you can get the majority of the functionality back? The biggest one for me would be still being able to use banking apps.

Thanks for the help on this by the way!
 

razercortex

Senior Member
Apr 8, 2018
299
126
Hmmm Interesting.

Sorry if I seem ignorant but is there any downsides to using this? I know triggering Knox means you lose certain functions of the phone but if I've read up correctly you can get the majority of the functionality back? The biggest one for me would be still being able to use banking apps.

Thanks for the help on this by the way!
Most banking apps check Safetynet, not Knox, so as long as Safteynet passes, you should be able to use most banking apps. Even if you couldn't, just use the mobile site ;)
 

razercortex

Senior Member
Apr 8, 2018
299
126
Hmmm Interesting.

Sorry if I seem ignorant but is there any downsides to using this? I know triggering Knox means you lose certain functions of the phone but if I've read up correctly you can get the majority of the functionality back? The biggest one for me would be still being able to use banking apps.

Thanks for the help on this by the way!

Knox is used in Secure Folder, Samsung Pay, Samsung Health, some MDM deployments, Samsung Pass, and that's pretty much all I could think of. If you don't need access to any of these apps (or any others that need Knox untripped), you should be fine. Worst that could happen is you get a new phone, which isn't a problem considering that this phone is unusable in the first place.
 

razercortex

Senior Member
Apr 8, 2018
299
126
I would just recommend you keep your current phone or get a new one for everyday use and I would just keep this one as a spare or development phone for you to fiddle with.
 

Frostyb

Member
Apr 21, 2022
15
2
I would just recommend you keep your current phone or get a new one for everyday use and I would just keep this one as a spare or development phone for you to fiddle with.
See the goal is to make this my new phone if possible haha!

Okay so because I'm a bit ignorant, if I'm understanding that guide correct I need to put the TWRP file in the AP slot in Odin, the other file in USERDATA and leave the other slots blank? And do I do this from a stock firmware yes?

The other part I dont understand is the step "flash magisk apk"...
 

razercortex

Senior Member
Apr 8, 2018
299
126
See the goal is to make this my new phone if possible haha!

Okay so because I'm a bit ignorant, if I'm understanding that guide correct I need to put the TWRP file in the AP slot in Odin, the other file in USERDATA and leave the other slots blank? And do I do this from a stock firmware yes?

The other part I dont understand is the step "flash magisk apk"...
I mean, it's understandable that you want to use this as your new phone, but I'm not sure you'd want to do that...

Regardless, yes, the TWRP file should go in the AP slot, the vbmeta_disabler file in USERDATA. Then, you can reboot to recovery by using the button press.
 

Frostyb

Member
Apr 21, 2022
15
2
I mean, it's understandable that you want to use this as your new phone, but I'm not sure you'd want to do that...

Regardless, yes, the TWRP file should go in the AP slot, the vbmeta_disabler file in USERDATA. Then, you can reboot to recovery by using the button press.
Okay so I have followed all the steps now I just need to flash magisk apk in TWRP but I'm not sure what that means exactly?
 

razercortex

Senior Member
Apr 8, 2018
299
126
It means you need to download the magisk.apk to your phone, rename magisk.apk to magisk.zip, and flash it.
 

Frostyb

Member
Apr 21, 2022
15
2
It means you need to download the magisk.apk to your phone, rename magisk.apk to magisk.zip, and flash it.
Okay so I have successfully flashed the device with TWRP and installed Magisk and have root access. However Samsung Knox still kicked in during set up phase and booted the phone in to retail mode like it did previously. I have tried removing Knox via TWRP by deleting the folder for Knox but it didn't seem to work.
 

Frostyb

Member
Apr 21, 2022
15
2
Check /system in TWRP
I did that, Knox was totally removed from it. I even downloaded Titanium Backup to remove anything related to Knox.

I decided to do the process from the start and take some pictures. This shows me doing a full factory data wipe from inside TWRP -> Deleting the Knox folder inside TWRP (before setting up device) -> device saying its protected by Knox still somehow despite it supposed to have been deleted -> Knox installing its services anyway.

There seems to be something somewhere that is triggering a full redeployment and installation of Knox from cloud servers that I need to locate and get rid of but if it's not in the Knox folder I have no idea where to look.
 

Attachments

  • 20220422_202416.jpg
    20220422_202416.jpg
    1.1 MB · Views: 159
  • 20220422_202908.jpg
    20220422_202908.jpg
    798.5 KB · Views: 144
  • 20220422_202103.jpg
    20220422_202103.jpg
    1.1 MB · Views: 132
  • 20220422_203005.jpg
    20220422_203005.jpg
    842.7 KB · Views: 104
  • 20220422_202934.jpg
    20220422_202934.jpg
    695.6 KB · Views: 95
  • 20220422_202953.jpg
    20220422_202953.jpg
    809.3 KB · Views: 97
  • 20220422_203017.jpg
    20220422_203017.jpg
    916.6 KB · Views: 95
  • 20220422_203022.jpg
    20220422_203022.jpg
    914.4 KB · Views: 95
  • 20220422_203132.jpg
    20220422_203132.jpg
    814 KB · Views: 107
  • 20220422_203147.jpg
    20220422_203147.jpg
    942.7 KB · Views: 156

Frostyb

Member
Apr 21, 2022
15
2
I have indeed tried that already. The problem isn't the retail mode app I actually know the code for that because I work in a store, the problem is the device applies settings upon initial setup that installs Retail mode and applies a bunch of security settings that prevents you from using the device normally (no Play store and certain privacy sharing is disabled). I can actually download apps fine by directly installing the APKs so theoretically I could use the phone in this state although I'm yet to know the exact limitations of limited privacy sharing and such.

I've completely removed Knox using TWRP yeah, and even double checked using an app called Titanium Backup that it's removed, but it doesn't seem to matter. As per the pictures above, when the device begins initial setup, Knox Enrollment Services seems to kick in from the cloud and it applies everything again anyway. It's very strange because the Knox services are still running on a warranty voided device. I need to figure out some way of removing the Enrollment service part, which is what those videos we discussed previously does (they bypass it) however the methods they use doesn't work for my device.

I actually have a youtube guy who says he can get rid of the Enrollment service for 45 USD however he needs to remote access my PC via Teamviewer to do that and as you can imagine, I'm not exactly keen on that idea.
 
I have indeed tried that already. The problem isn't the retail mode app I actually know the code for that because I work in a store, the problem is the device applies settings upon initial setup that installs Retail mode and applies a bunch of security settings that prevents you from using the device normally (no Play store and certain privacy sharing is disabled). I can actually download apps fine by directly installing the APKs so theoretically I could use the phone in this state although I'm yet to know the exact limitations of limited privacy sharing and such.

I've completely removed Knox using TWRP yeah, and even double checked using an app called Titanium Backup that it's removed, but it doesn't seem to matter. As per the pictures above, when the device begins initial setup, Knox Enrollment Services seems to kick in from the cloud and it applies everything again anyway. It's very strange because the Knox services are still running on a warranty voided device. I need to figure out some way of removing the Enrollment service part, which is what those videos we discussed previously does (they bypass it) however the methods they use doesn't work for my device.

I actually have a youtube guy who says he can get rid of the Enrollment service for 45 USD however he needs to remote access my PC via Teamviewer to do that and as you can imagine, I'm not exactly keen on that idea.
Yeah, that (remote control) is quite suspicious. A custom ROM is the only (other) thing I can think of that would help (remove Samsung OS completely), but I don't even know what's available for this device...
 

stringman666

Member
Jul 27, 2018
31
2
Something you might try is downloading the combination firmware for your phone. Flash the combination file. Then remove retail mode. Then flash the proper firmware. No experience with this however. But was told it should work
 

kbeezie

Senior Member
Feb 23, 2010
1,935
395
Grand Rapids, Mi
karlblessing.com
Something you might try is downloading the combination firmware for your phone. Flash the combination file. Then remove retail mode. Then flash the proper firmware. No experience with this however. But was told it should work
Depending on the CSC the unit is made for, could grab the XAA one from Frija and flash over with odin in download mode. Since that'll flash over the system partition which would have had the retail app installed. The retail app itself can be used to remove it, but requires a password which is usually retailer specific.

I've noticed the demos I've installed in the past also have small hardware differences, The A* series tend to be limited to where you can't charge the battery past 60%, but nearly every one of them be it an A71 or an S21FE is going to have a zero'd out IMEI at some of the major retailers, which are usually sent directly from Samsung or their merchandising partner, and are usually either collected, or simply tossed to electronic recycle. So having one with an intact IMEI likely means it was a retail phone from box stock that simply got pulled from inventory and had the retail demo mode installed from the web (like they do with their tablets).

Long story short, find the CSC (can do this with something like Sam/Info or such from play store), use Frija to find the firmware for that model (SM-####) + CSC to download and unpack the firmware. Then use Odin to flash it with the phone in download mode, and it should give you a fresh retail experience on the demo.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi XDA, first time poster and I could not find a similar thread with the answers I was looking for, if that thread exists I apologize!

    So basically I started a job in a retail phone shop a few months back. We have a drawer in store that has a bunch of old demo units in there that, once they have been removed from display, just sit there unused. There is phones in there from almost 10 years ago. They are never given back or requested back, nor are they logged in any way.

    Well I noticed there was an almost perfect condition S21+ in there so I asked my manager if we could use it as a sales incentive and he replied saying the phones are useless because of the software on them. I said I was pretty sure you could remove the retail software and use it as a normal phone and he said if I can do that and get it working, I can take the phone for myself.

    Well, I took it home and did some digging / experimenting. The phone has a proper IMEI already, you can put a SIM into the phone and it registers to the network. The problem is, the phone has security restrictions on data sharing and it does not have the playstore on it and there is no factory data reset option in the settings, nor in recovery mode.

    I have tried flashing a stock firmware on using Odin which I thought worked, however when the phone restarts and you go through set up, Samsung Knox pops up and installs settings which forces the phone to set up in retail mode again with the same restrictions as previous (no play store, factory reset etc).

    Any idea how to get around this issue? I would have thought flashing stock software would be the obvious work around but something on the phone forces it to install on retail mode every time.

    Any advice on this is much appreciated.
    1
    Thanks for the reply!

    So I also came across this same video on the subject last night, it seems to be a workaround for bypassing Knox but I couldnt find any further info on what kind of state that leaves the phone in after, if it can still get official updates and such or if it triggered to eFuse that causes you to lose access to Samsung Pay and other official apps.

    I'm aware this is at my own risk, the phone will sit in a drawer if I cant figure it out any way so no harm no foul as far as I can see. I've thought about rooting the device (I know this will trigger the eFuse) but I cant find any info on if that would get around the specific issue I'm having of Knox forcing the phone to install in retail settings or not so do not want to go down that road just yet.
    I'd say that the Knox workaround would probably (do not quote me on that) leave you with un-tripped Knox (=e-fuse intact) if it even still is. Even if Knox would be tripped, you would still most likely be able to get software updates. But because you said that you have already used Odin successfully on the device, that would lead me to believe that OEM unlocking might already be on in which case there probably isn't any more to lose by rooting the device. On a rooted device there are instructions o WikiHow on how to remove the Knox , but I haven't personally tested them. If I were you, I'd check with a Knox warranty checker app or through recovery mode, etc
    whether the e-fuse is already triggered before continuing with anything.
    And if I confused you, feel free to ask anything!
    1
    Interesting, I may give the workaround a shot when I get home later then.

    So I have used Odin but it was with official firmware obtained through Frija and, according to reading, that does NOT trip the eFuse. I did turn on OHD in dev options but from what I can tell, the fuse is only tripped when you load an unofficial image onto the device which I havent done yet. I can check when I get home by booting into recovery mode and checking the warranty line AFAIK it will say either 1 or 0 indicating if it's been tripped or not.

    So my issue with rooting is I dont know if I root, will the phone still install in the retail setup that it does currently. I know I can run apps or code to remove Knox once rooted, but I dont know if then just reinstall firmware and it will be back to default like I want, or if I'll then need to figure out how to get the playstore loaded, if the security issues persist etc. Also as far as I can tell to root, I need to install Magisk on the device first to alter one of the image files, then move that file back to the PC to flash with Odin, and I'm not sure I can do that with the retail settings enabled.
    I am interested in how this develops. Please keep me updated with the warranty byte status and whether the workaround is successful!
    1
    I am interested in how this develops. Please keep me updated with the warranty byte status and whether the workaround is successful!
    So quick update on this: none of the workaround videos on youtube seem to be capable of doing anything. They all rely on being able to connect to Wifi then get around the device before Knox settings apply, however on my build as SOON as you connect to wifi, it immediately starts applying knox settings and cannot be skipped.

    I am wondering if this is because the version of software I flashed on using Odin was the most recent firmware, being android 12, and most of these workarounds are for android 11? Is it safe to locate the original firmware for the S21+ somewhere and flash that on to the device instead do you think?

    Also the eFuse is still currently in tact.
    1
    So quick update on this: none of the workaround videos on youtube seem to be capable of doing anything. They all rely on being able to connect to Wifi then get around the device before Knox settings apply, however on my build as SOON as you connect to wifi, it immediately starts applying knox settings and cannot be skipped.

    I am wondering if this is because the version of software I flashed on using Odin was the most recent firmware, being android 12, and most of these workarounds are for android 11? Is it safe to locate the original firmware for the S21+ somewhere and flash that on to the device instead do you think?

    Also the eFuse is still currently in tact.
    You could flash an older Android version, but if and only if it has the same bootloader version as the current one, otherwise it won't work and might even brick your device. I am unsure though if the downgrade would help but if the bootloader versions match, you can try!
    On SamMobile.com you can see older versions of firmware. Just check the bootloader version before flashing!