FORUMS

 View Poll Results: What do you want next for the xCover3?

Custom Kernel
 
4 Vote(s)
26.67%
Modded Firmware (Custom Rom is unfeasible for me)
 
8 Vote(s)
53.33%
Custom Built TWRP for Lollipop
 
4 Vote(s)
26.67%
Other (Post in Thread)
 
1 Vote(s)
6.67%

Samsung XCover3 Development Thread [4.4.4/5.1.1/6.0.1] [Root, TWRP, Mods and ROMS]

642 posts
Thanks Meter: 293
 
By Matt07211, Senior Member on 20th September 2016, 03:42 AM
Post Reply Email Thread
22nd September 2016, 07:33 AM |#11  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
Quote:
Originally Posted by yy1

It doesn't boot up. Black screnn with boot logo and red warning on top. i flash the original boot.img anything okay.
what means fap lock?

Was ment to FRP not FAP, autocorrect strikes again. FRP = Factory Rest Protection.Google it if you want more info, basically another barrier to stop thieves. As I reading up on this user's are stating (in a sepolicy patch thread) that when flashing boot.img via odin their phone wouldn't boot up, but said flashing bootmimg via TWRP works.

Questions:
1) When you flash the custom boot.img, does it freeze and nothing happens? Or does it reboot automatically?

2) are you using heimdall or Odin?

Tasks:

1) Flash the boot.img via Heimdall (if you've been using odin) and report back if it was a succes.

2) if possible, if adb is running, can you pull the dmesg off the device before restoring the original boot.img as this will help in debugging this problem.

E.G. "G:\" is the hard drive plugged into my computer, adjust as necessary.

Code:
adb shell dmesg  >> G:\dmesg.txt
3) ALSO TRY, after you flash the custom boot.img can you try booting into recovery (Volume Up + Home + Power Button) and try wiping cache before trying to properly boot the phone. Maybe you could also when in recovery tell me what the log files say? @yy1

Still currently searching what is blocking the custom boot.img from booting the phone.
I really appreciate the help
The Following User Says Thank You to Matt07211 For This Useful Post: [ View ] Gift Matt07211 Ad-Free
22nd September 2016, 08:20 PM |#12  
Junior Member
Thanks Meter: 4
 
More
Flash your boot.img via heimdall once again. with no reboot option. go to recovery and wipe cache. after start the phone boot anytime in recovery. flash via heimdall original boot img anyhing okay.

adb not work. there are logfiles in recovery but i don't know they way to put that from phone to pc. Sorry for that.
22nd September 2016, 10:30 PM |#13  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
Quote:
Originally Posted by yy1

Flash your boot.img via heimdall once again. with no reboot option. go to recovery and wipe cache. after start the phone boot anytime in recovery. flash via heimdall original boot img anyhing okay.

adb not work. there are logfiles in recovery but i don't know they way to put that from phone to pc. Sorry for that.

I won't be able to look into it today as i have important stuff happening. Will post back later with some more info, sorry about the wait then. Thanks for the help

===================================

Can you try this, as it will greatly help in diagnosing the problem.

Flash the custom boot.img, don't boot the phone yet. Then can you run
Code:
adb start-server
In a terminal/command prompt, then turn on the phone with the adb dmesg command from the previous post already in the terminal for you to hit enter when needed.

Turn on the phone now, and hit enter to run the above command before the phone stops and reboots itself.

Thanks.


Edit 2: When devloping the boot.img, I had to use chainfires supolicy binary to patch the sepolicy in boot.img, with one of it tasks is to patch the recovery from enforcing to permissive mode.
So in an educated geuss, and with information in other forms (user reported that they are unable to flash a custom boot.img via odin but able to via TWRP), that we may be able to flash the boot.img via recovery. See instructions for testing this below.

1) Download both the 3.0.2-1 and 2.0.8-* version of twrp (.img.tar) as we should try both of them <Linked in original post>

2) Flash my custom boot.img and then the twrp files with auto reboot turned off

3) once they both flash, boot into recovery (give it 5-10 mins, if nothig happens then it didn't work)

4) if it actually worked and booted into recovery, flash the custom boot.img in TWRP and try rebooting normally

5) If it managed to get this far, then continue from my original post by tuning either the root script/bat file

Please Report how far you got in this process or if it worked.

===================================

I am currently trying different versions of my boot.img, will post once I have it working properly
24th September 2016, 05:45 PM |#14  
Junior Member
Thanks Meter: 4
 
More
No way for me to give you adb log-file, because adb find no device if phone in download- or recovery-mode.

try the second way. Flash boot.img and recovery.img (TWRP) start the phone in recovery-mode. red warning on top RECOVERY IS NOT SEANDROID ENFORCING.
wait 5 minutes phone starts automatic in normal-mode.
25th September 2016, 12:43 AM |#15  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
Quote:
Originally Posted by yy1

No way for me to give you adb log-file, because adb find no device if phone in download- or recovery-mode.

try the second way. Flash boot.img and recovery.img (TWRP) start the phone in recovery-mode. red warning on top RECOVERY IS NOT SEANDROID ENFORCING.
wait 5 minutes phone starts automatic in normal-mode.

Yea thanks for that, I had been trying a bunch of combinations yesterday with none of them working. And when trying to find what blocks custom boot.img from booting up, all I come across is stuff staying to flash back stock firmware, but nothing for the reasons why.
But I have some stuff to look in to and will replie back when done (if I'm succesful or not)

These include:
- looking more into pains secure download mode and what it does
- having a go with exploiting a bug that had happend with stock recovery. Running 4.0 (we are not running this version of android) and recovery version 3e(our stock recovery version ) where you could flash updates.zip signed with testkeys instead of the manufacturers keys
- OR try getting TWRP to run on lollipop (probably have to rebuild it) this leaves us with two options in twrp. 1) Flash SuperSu and get system install (probably won't be able to unpack the boot.img) or then flash my customized boot.img for the Systemless version of root.

Either way it may be a little while before lolipop root is working.
I have important exams coming up so this project is gonna have to be out onto the backburner for about 4 weeks or so, meaning I won't be putting much effort into this for a while, but will continue it after the exams. @yy1
- '
The Following User Says Thank You to Matt07211 For This Useful Post: [ View ] Gift Matt07211 Ad-Free
25th September 2016, 07:33 AM |#16  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
@yy1 I belive I have found out why the phone won't boot when using the custom boot.img

I belive it has to do with the unpacking/repacking of the ramdisk.cpio.gz file. When ever I try to boot an image with a repacked ramdisk the phone won't boot.

I know that the phone can boot custom boot.img 's as I removed the word "SEANDORID" from the original and flashed it to my phone. My phone booted up, even when the red text (KERNEL IS NOT SEANDROID ENFORCING) was shown at the top of my phone.

So once I got it got it booting I will post back here.
The Following 3 Users Say Thank You to Matt07211 For This Useful Post: [ View ] Gift Matt07211 Ad-Free
1st October 2016, 11:49 AM |#17  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
My previous post, was somewhat on par. What I mean by this is yes, the ramdisk was a reason why it was not boot, but not for any reasons like permissions, ownership or the like, it was in fact that when unpacking and repacking the cpio archive increase the size, and from what I have reduced from my trial and errors is when the boot.img size is changed by even one byte in size it won't boot. But you are able to modify its contents with a hex editor, E.G. Zeroing out the word SEANDROIDENFORCING at the bottom of the raw image file, would still let the phone boot fully with the text show "KERNEL is not SEANDROIDENFORCING" and it showing up as a custom binary in Download more. I belive it may be becuse of some outside security verifying the boot.img. maybe download mode (it's in secure mode, haven't looked into it yet) or some script, I am not sure. And its all most impossible to get any errors logs or dmesg via adb or otherwise, with my only way to read them is via stock recovery, which is a bit impractical and inelegant reading as it speeds past lines you want to read when trying to scroll down (if anyone knows how to pull these logs from cache without a custom recovery or root, please tell me.

Now when I try to replace the ramdisk in boot.img via hex editor the size increase and thus unable to boot. When I try to repack it with various versions of mkbootimg, including Google's python script, other bi nary compiled versions of it by various people and mkbootimg's binary modified to also with with Device Tree Files which get appended onto the boot.img. I have analysed and reverse enginered the boot.img file, and analyzed the other files included with the stock firmware downloadable from sites like sammobile, sam-firmware etc.

I will be updating one of the is original post with all the information that I have uncovered, I'm great detail and when my internet situation allows (my mobile data is running low, lol), upload the reversed enginered files of boot.img for anyone else to inspect and have a crack at creating their own custom kernel/boot.img.

TL;DR: Uploading detailed information and reverse enginered files of boot.img. Any of my custom boot.img's won't boot if the size changes at the minimum one byte from the original boot.img, but the phone can boot a custom version if the size of the file size deos not change a single byte.
The Following 2 Users Say Thank You to Matt07211 For This Useful Post: [ View ] Gift Matt07211 Ad-Free
5th October 2016, 10:21 AM |#18  
Junior Member
Thanks Meter: 6
 
More
Hi;

TWRP is ready for SM-G389F :

https://twrp.me/devices/samsunggalaxyxcover3ve.html
The Following 2 Users Say Thank You to Heledir For This Useful Post: [ View ] Gift Heledir Ad-Free
5th October 2016, 11:18 AM |#19  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
Quote:
Originally Posted by Heledir

Hi;

TWRP is ready for SM-G389F :

https://twrp.me/devices/samsunggalaxyxcover3ve.html

This currently only works for Kit Kat, after I unpacked it I read the files at it was aimed at android 4.4.4. I am, after I have my exams in the next few weeks I am gonna try and get TWRP working on lollipop (after I got root )
5th October 2016, 02:40 PM |#20  
Junior Member
Thanks Meter: 6
 
More
Software for Samsung Galaxy Xcover 3 VE (SM-G389F) is Android 6.0, so I think it's for MM. The links:
- Device Tree / files

https://github.com/TeamWin/android_d...g_xcover3velte

Say its Android 6.0 branch.

I've install it yesterday with Odin and it works fine on my SM-G389F.

But i haven't find root for SM-G389F and MM.
The Following 2 Users Say Thank You to Heledir For This Useful Post: [ View ] Gift Heledir Ad-Free
6th October 2016, 08:37 AM |#21  
Matt07211's Avatar
OP Senior Member
Thanks Meter: 293
 
More
Quote:
Originally Posted by Heledir

Software for Samsung Galaxy Xcover 3 VE (SM-G389F) is Android 6.0, so I think it's for MM. The links:
- Device Tree / files

https://github.com/TeamWin/android_d...g_xcover3velte

Say its Android 6.0 branch.

I've install it yesterday with Odin and it works fine on my SM-G389F.

But i haven't find root for SM-G389F and MM.

Oh my fault, I Haden't noticed the "ve" in the end of the link, indicating that it was the value edition version of the phone (I belive the only difference between the two phones is, I belive (I have no proof as I haven't looked into the value edition version yet, is that the system partition is bigger allowing for marshmallow to fit into the system partition. In the normal edition, we have only 200 megabytes left after lollipop update, so probably not enough for Marshmallow. Other then the slightly different partition sizes I belive that the two devices have identical hardware)
I was referencing this version (https://twrp.me/devices/samsunggalaxyxcover3.html) when I said it wasn't working on lollipop, so I wonder if your value edition TWRP would work on the lollipop version (gonna test it later tonight)

Will update the OP with the relevant information/links with credit to you.

As for root on this device I am currently working on it (albeit not my full attention with both work and exam revision gaining most of my attention at the moment, my exams finish on 26 October, so it then will have my full attention until then this isn't of high priority)

My only road block is getting the boot.img to boot once flashed with Odin, which it isn't at the moment, not sure what security they have in place, but hey I will still keep trying till I get it.

Note: for anyone wanting the write-up I mentioned in a earlier post, I haven't had much time to work on it so it's slowly being written up.
Sorry for the wait
Post Reply Subscribe to Thread

Tags
noad, xcover3

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes