So, I received this phone as an award in a competition, and when I wanted to root it... nope. No root for this phone. Only for 4.4.4, but I hate ****Kat and I don't want it. So, I updated to 5.1.1 and I was looking for root.. didn't find anything. And those "universal" roots such as KingRoot, Kingo Root, TowelRoot didn't work. I also tried installing TWRP, but after installing it and rebooting into it, the phone got stuck on "recovery is not seandroid enforcing". After booting the phone and than entering the recovery, the "recovery is not seandroid enforcing" appeared again, but instead of getting stuck, the stock recovery booted. So I flashed the stock rom with stock recovery just to remove that annoying error via odin.
Any ideas how to root this f*****g knox device?
Thanks
Please..
i have the same probleme. Nothing work for root.
Hi together, i am mucho interested, too.
Also slightly skilled linux user, so if anyone has a clue where to start rooting this thing i can give it a try.
Mhh I also need a way to root this device because I need a full Image of my /data Partition.
My first idea was to flash the Kitkat bootloader and TWRP. However it will not but a L /system.
So we need a custom L system image which has the already installed SuperSU.
I really like to try it but however my task is to restore photos and not to hardbrick this phone.
Can anybody try a custom /sytem image which is Prerooted? Heimdall should be able to flash it.
_Beni_ said:
Mhh I also need a way to root this device because I need a full Image of my /data Partition.
My first idea was to flash the Kitkat bootloader and TWRP. However it will not but a L /system.
So we need a custom L system image which has the already installed SuperSU.
I really like to try it but however my task is to restore photos and not to hardbrick this phone.
Can anybody try a custom /sytem image which is Prerooted? Heimdall should be able to flash it.
Click to expand...
Click to collapse
If you have a clue where to find such images i can try. Without root this phone is useless to me, so i wouldn't mind bricking it
Tried to flash SBOOT, SBOOT2, Loke_Primary, Loke_Recovery ... it is now hard broken
Yeah maybe i forgot it has no Qualcomm processor where you even can flash a image even you dd if=/dev/zero of=/dev/mmc.
Now giving my old OnePlus Two to her.
You need to register at SAMMobile there you can the latest 5.1.1 for xcover3, you need to extract the image with 7zip then unpack the system.img with sparsed, then mount it via loop-back device. Now umount it, repack the image with sparse and flash the result into SYSTEM with heimdall.
Good luck, I ****ed it up
Oh sh*t, sorry to hear dude! Okay, this evening i can give it a try. Am i guessing right that i want to put the SuperSU binary into the /system/app? Or what's the best way to root this?
todomade said:
Oh sh*t, sorry to hear dude! Okay, this evening i can give it a try. Am i guessing right that i want to put the SuperSU binary into the /system/app? Or what's the best way to root this?
Click to expand...
Click to collapse
Yeah, however I'm not sure how su exactly works.
I know took a look at UPDATE-SuperSU.zip.
This lines are interesting:
if ($SAMSUNG); then
# Prevent "KERNEL IS NOT SEANDROID ENFORCING"
SAMSUNG_CHECK=$(cat /sutmp/boot.img | grep SEANDROIDENFORCE)
if [ $? -ne 0 ]; then
echo -n "SEANDROIDENFORCE" >> /sutmp/boot.img
fi
fi
dd if=/sutmp/boot.img of=$BOOTIMAGE bs=4096
Click to expand...
Click to collapse
It seems its just appends SEANDROIDENFORCE at the end of the boot.img and then flashes it.
Maybe it is the same for the recovery.
You could just try to "echo -n "SEANDROIDENFORCE" >> twrp-3.0.2-*.img"
and then flash this image via heimdall.
Okay, looks like i should dig some deeper into that matter. I guess i can try your suggestion within the next week. I'll post an update if i make any progress.
_Beni_ said:
Yeah, however I'm not sure how su exactly works.
I know took a look at UPDATE-SuperSU.zip.
This lines are interesting:
[...]
It seems its just appends SEANDROIDENFORCE at the end of the boot.img and then flashes it.
Maybe it is the same for the recovery.
You could just try to "echo -n "SEANDROIDENFORCE" >> twrp-3.0.2-*.img"
and then flash this image via heimdall.
Click to expand...
Click to collapse
Okay i tried it, sadly no success.
Still getting "Recovery is not Seandroid Enforcing" and default recovery
Will now try to pack a boot.img myself and flash it.
Other approaches or tips are highly appreciated!
Is the "Recovery is not seandroid enforcing" showing up on the most recent build of twrp, 3.0.2.0. For the lollipop build of the device?? I want some confirmation before deciding to flash twrp and then supersu into my phone running lollipop?
Newest twrp link: https://dl.twrp.me/xcover3ltexx/
Matt07211 said:
Is the "Recovery is not seandroid enforcing" showing up on the most recent build of twrp, 3.0.2.0. For the lollipop build of the device??
Click to expand...
Click to collapse
Affirmative.
VolterPL said:
Affirmative.
Click to expand...
Click to collapse
So do you mean that the "recovery is not seandroid enforcing" shows up with the newest twrp build (3.0.2-0) for our device while running lollipop? Are you able to use the twrp recovery and phone as normal even though that message flashes on boot.
I geuss a fix could be compiling the kernel with the flag disabled on the flag that stops you from switching between enforcing and permissive modes. As done on this guide, http://graemehill.ca/compiling-permissive-android-kernel/ . This would allow the recovery to set itself to be running in permissive mode, when it runs "setenforce 0" as seen
https://github.com/TeamWin/android_device_samsung_xcover3ltexx/blob/android-4.4/init.rc
The source code for the Samsung phone, http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=g388f
I am willing to build/compile the kernel, but due to this phone being my main phone, I am not in a position to test it out, would anyone here be willing to try?
The modified kernel will also allow you to run the OS in permissive mode if done through the terminal.
Matt07211 said:
So do you mean that the "recovery is not seandroid enforcing" shows up with the newest twrp build (3.0.2-0) for our device while running lollipop? Are you able to use the twrp recovery and phone as normal even though that message flashes on boot.
Click to expand...
Click to collapse
Yes, I can confirm it's true. The phone works fine. When I try to go to the recovery mode, it shows said message and boots to the stock recovery.
VolterPL said:
Yes, I can confirm it's true. The phone works fine. When I try to go to the recovery mode, it shows said message and boots to the stock recovery.
Click to expand...
Click to collapse
I got a few questions to ask
How are you flashing the twrp image? Is it via odin and are you using the newest twrp build (3.0.2-0)
I am willing to work, read up and compile anything necessary to get the recovery working on the device, but due to it being my only phone I cant afford to mess around with it much, so are you willing to try out stuff for me e.g. flashing a custom kernel with the ability to toggle selinux modes?
I believe a fix for the "recovery is not seandroid enforcing" can be fixed if I recompile the kernel with a flag set to false (It a custom flag from samsung that disallows the changing of selinux modes, "EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=false") allowing for the twrp recovery to change "setenforce 1" to a "0" allowing the recovery to run in permissive mode. http://graemehill.ca/compiling-permissive-android-kernel/ , https://su.chainfire.eu/#selinux , https://source.android.com/security/selinux/
If you are willing to help test for me I would really appreciate it And once I get the recovery working I am gonna root my phone by flashing the SuperSu.zip.
Matt07211 said:
How are you flashing the twrp image? Is it via odin and are you using the newest twrp build (3.0.2-0)
Click to expand...
Click to collapse
Yes, I am using the newest Odin and the newest TWRP, downloaded from TWRP site.
I would like to help you if, and only if, there's absolutely no chance of bricking my phone as I've bought it recently for quite a lot (at least for me). I don't care about warranty, as well as triggering KNOX.
VolterPL said:
I would like to help you if, and only if, there's absolutely no chance of bricking my phone as I've bought it recently for quite a lot (at least for me). I don't care about warranty, as well as triggering KNOX.
Click to expand...
Click to collapse
I can't say that their is not a chance for a brick, but all I am changing is one single flag from "true" to "flase". Their is always a chance at bricking your phone when working with root, tons, custom recovery and kernels as you are messing with the system, but as long as you have either a backup (nandroid) or now how to fix it (flashing stock firmware), their is very little chance of screwing up, and if screwed up you will in almost all cases be able to fix the problem
But yea if the device stuffs up some how e.g. unable to boot you would able to boot your phone into "download mode" and flash stock firmware, although losing you data e.g. apps,. Your phone would be back in a functional state.
Once I am able to get the recovery working properly (booting and running (in permissive mode)) I will root my phone, make a nandroid backup and then I am willing to start adding custom goveners to the kernel and would be willing to share/get help devloping the kernel in the future.
I might be able to provide the kernel later this week (internet limitations are the reason for a long wait) and will post instructions on how to flash the kernel, and how to flash stock firmware (for either you stuffed up and need to fix the phone, or for testing properly with everything at stock and then working the way up, kernel and then twrp)
So if you are willing, i would appreciate the help if given
Matt07211 said:
I can't say that their is not a chance for a brick, but all I am changing is one single flag from "true" to "flase". Their is always a chance at bricking your phone when working with root, tons, custom recovery and kernels as you are messing with the system, but as long as you have either a backup (nandroid) or now how to fix it (flashing stock firmware), their is very little chance of screwing up, and if screwed up you will in almost all cases be able to fix the problem
But yea if the device stuffs up some how e.g. unable to boot you would able to boot your phone into "download mode" and flash stock firmware, although losing you data e.g. apps,. Your phone would be back in a functional state.
Once I am able to get the recovery working properly (booting and running (in permissive mode)) I will root my phone, make a nandroid backup and then I am willing to start adding custom goveners to the kernel and would be willing to share/get help devloping the kernel in the future.
I might be able to provide the kernel later this week (internet limitations are the reason for a long wait) and will post instructions on how to flash the kernel, and how to flash stock firmware (for either you stuffed up and need to fix the phone, or for testing properly with everything at stock and then working the way up, kernel and then twrp)
So if you are willing, i would appreciate the help if given
Click to expand...
Click to collapse
@ Matt07211 If you need a tester. here i am. But what i need is, a step by step for flashing with heimdall on linux mint 18 in easy english. mx phone is sm-g388f with 5.1.1
@VolterPL @yy1
So but this is gonna be an onslaught of questions and information, I would appreciate if you are able to work through this (READ EVERYTHING AT LEAST ONCE) and test/answer my questions.
Some info: When I was searching for info for how to use heimdall for yy1 because I never used it before, I happened to stumble upon a bit of info that I found interesting, and which may solve one of our problems.
In one of the comment sections a user mentioned that their recovery gets replaced each time with stock, a user replied mentioning that their is a script that runs at boot that replaces the recovery if its been tampered with e.g. TWRP, with a stock recovery. So with a bit of digging (ES File Explorer FTW!!) I happened to find the script mentioned in "/system/bin/install-recovery.sh" and the fix is to rename the file, therefore being unable to run at boot and therfore not replacing the custom recovery.
So I believe one (maybe all) of our problems with the recovery being unable to boot can be fixed as follows, would appreciate help/testing here.
Sidenote: I still plan to build a custom kernel, as I would like the ability to run in permissive mode if needed (also including running recovery in permissive mode as well) and adding custom governors as time progress.
Now time for the fix/instructions:
NOTE: I am not responsible for any damage to the phone, system, tripping KNOX, warranty or your insanity
1. Download Odin, I am using version v3.12.3 (sorry yy1, won't have a guide for Haimdell yet as on phone typing this out) and make sure to have ADB, Fastboot and Samsung drivers installed and backup any important files
2. Download newest SuperSu (yep we are gonna try rooting the phone) from this link: http://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133/page1
and then put it on the root of the phones internal memory
3. Download the newest TWRP image for our device, which should be 3.0.2-0, link: https://dl.twrp.me/xcover3ltexx/ which should be in the .img.tar format
4. Would probably be best to enable USB Debugging and make sure you have everything backed up and have all files downloaded and Samsung drivers working before preceding any further. If you don't then you should fix that.
5. Launch Odin and boot device into download mode (Power, Volume Down and Home buttons at the same time, for a few seconds.), ensure that the phone is connected to the computer USB port
6. Check Odin and make sure the "added" message is displayed; also, the ID:COM field should now be turned yellow or blue â?? if not, reinstall USB drivers and retry the steps from above.
7. Click on the AP button and then load the TWRP recovery file from desktop. Then, make sure Re Partition and Auto Reboot fields are not checked. Make sure especially that the auto reboot is un-ticked, or this wont work properly as the install-recovery.sh would be able to work before we could get into the recovery at least once.
8. Click "Start" and once finished the â??passâ? message will be displayed; also the ID:COM field will be turned green â?? then you should unplug the USB cord and reboot your device into recovery mode (Reboot straight into recovery or you are gonna have to flash it all over again, due to the install-recovery.sh script)
9. Once in recovery, do a nandroid backup and then flash the SuperSu.zip and reboot
10. Verify that you have root and then download and install a file manager that allows you to modify the /system area, I suggest ES File Explorer and then navigate to "/system/bin/install-recovery.sh" and rename the "install-recovery.sh" to "install-recovery.sh.bak". On a side note, according to the TWRP page, if you boot into TWRP at least once it will patch the stock ROM to prevent this happening. So if TWRP has acctually done this then you probably wont need to modify this file, but try rebooting into recovery at least once after booting to the android OS to see if TWRP is their before modifying the file. If TWRP is their then you can skip the last step.
11. Now due to the "install-recovery.sh" script running at the most recent boot, we will have to re-flash the TWRP recovery once more as the current recovery has been reverted back to stock due to the script. So repeat the steps to flash TWRP one more time and verify that the recovery is persistent across reboots etc.
Outcomes:
- Should have a persistent recovery due to the disabling of "install-recovery.sh" script
- Should have Root on the phone
Stuff wanted to be completed in the future:
- IF this has actually worked, I would like feedback once completed the above steps stating if recovery is persistent across boots and can verify root access. If this worked I will write up a separate thread for rooting this phone and see if we can then get a section on XDA for this phone
- Recompiling the kernel to allow the changing of selinux modes between "enforcing" and "permissive", and as time progresses adding more CPU governors. I will be working to develop this myself so any help would be appreciated.
NOTES/Questions:
- Appreciate your input if this is successful
- If it still flashes the "recovery is not seandroid enforcing" and if the recovery still works in spite of that fact
- If you achieved root, please mention this
- Thank you for taking the time to read and test this if you do
- @yy1 I will write a tutorial for using Heimdall depending on this success of rooting and twrp this phone
Sorry for the wall of text and good luck
I rooted my phone for over a year now, and never had this problem.
But recently I used an app called "Hide My Root" to remove su binary in my phone, then I proceeded to restart my phone.
Not sure if this might cause it, I also moved a GPS spoofing app to system files.
Bam, I got permanently stuck in Samsung logo. Here's what I tried, I factory reset, wipe cache, nothing changed.
I also tried flashing stock firmware, but it shows this keep failing or stuck or SetupConnection
Flashing the custom firmware was successful, but I got thrown into the permanent samsung logo again.
Edit: Here's what my phone shows in Download Mode.
ODIN MODE PRODUCT NAME: SM-G920I
CURRENT BINARY: CUSTOM
SYSTEM STATUS: CUSTOM
REACTIVATION LOCK: OFF
SECURE DOWNLOAD ENABLED
KNOX WARRANTY VOID: 1 (0X0301)
AP SWREV: B:3 K:2 S:2 SW REV, CHECK FAIL, DEVICE:3 BINARY:1
How can I get my phone back to stock conditions again?
You tried to mod Pokemon Go lol. The only reason Odin fails is because you are downgrading to an old build for example MM to LP 502. Download the latest ROM on SamFirm and flash using Odin. Once done run factory reset in Stock Recovery.
P.S if you wanna hack Pokemon Go you need an exposed tweak call Mock Mock Locations. Don't worry about root . Pokemon Go doesn't usually detect it
Hi everyone.
(Sorry for my bad english, hope you understand)
I have just rooted my G920F with Odin and CF AutoRoot procedure for Marshmallow 6.0.1.
Once I finished the procedure my phone starting normally and the root works, but when I enter in the recovery menù a red message at the bottom of the page says: dm-verity verification failed...
I'm just shutting down the device and it started normally, without any problem.
So apparently is not a problem but I'm worry about that message, I won't try to install ROM or flash anything because I don't know what can happen.
P.S. I tried to install emoji switcher and it works, so the root works too.
I have updated the SuperSU and rebooted the device and there wasn't any type of problem.
Custom kernel usually bypass dm verity, but if dm verity check don`t pass (corrupted or altered sw), and there is no custom kernel that will bypass it, phone won`t boot properly, and will be stuck at logo, untill dm verity check passes (is fixed) or kernel that will make it bypass dm verity check is installed.
If the phone works properly, don`t bother with it.
brenner650 said:
Custom kernel usually bypass dm verity, but if dm verity check don`t pass (corrupted or altered sw), and there is no custom kernel that will bypass it, phone won`t boot properly, and will be stuck at logo, untill dm verity check passes (is fixed) or kernel that will make it bypass dm verity check is installed.
If the phone works properly, don`t bother with it.
Click to expand...
Click to collapse
Ok, thank you!! So, if I try to flash a ROM or something else or if I try to install the TWRP recovery I will not have any issues, right?
Because I'm not really sure about the country of my phone, so if I have to reload the original firmware it would be a problem... btw there is a method for check it? Because when i check my fiemware on sammobile it shows me different firmwares from different countries and I really don't know what is the right one!
if the phone works, don`t bother with it
There is a way to check which original fw was on the phone, if you try smart switch emergency initialization, with sn, it should tell you after you enter sn of the phone from which region is the original fw, but whith stock fw, it will be stuck on logo, so you wouldn`t be able to boot it because of with dm verity issue.
Like I said, if it works, don`t bother with it.