kernel is not seandroid enforcing - Galaxy Grand Prime Q&A, Help & Troubleshooting

Hi,
I have Samsung Galaxy Grand Prime SM-G531F, rooted with TWRP and I tried to set SElinux to permissive to be able to install Viper4Android driver, I tried changing SElinux with command setenforce 0, tried with SElinuxModeChanger apk, some build.prop editing and with .sh scripts, but nothing worked. Then I tried compiling permissive kernel, used ramdisk from stock kernel, created boot.img, flashed through Odin and rebooted. When the device boots on top of the screen it writes in red KERNEL IS NOT SEANDROID ENFORCING and won't boot, it's stuck there. If I flash stock kernel it will continue like nothing happened. Is there any other way to set SElinux to permissive other than this? If not, how to remove KERNEL IS NOT SEANDROID ENFORCING warning? I've read somewhere that I need to set bootloader to permissive, but I don't know how. Any help would be appreciated. Thank you in advance.
(I apologize for any mistakes, english is not my native language.)

Are you specifying a DTS file when you are rebuilding it? I can't help you much as I don't have my Linux Environment anymore I will try to help you once I reinstall it. I also had a lot of problems trying to build a kernel for this phone.
I end my school for this year in 2 days so I will be rebuilding the Linux the same day. May I know why you want a permissive kernel anyway?

fabiossilva21 said:
Are you specifying a DTS file when you are rebuilding it? I can't help you much as I don't have my Linux Environment anymore I will try to help you once I reinstall it. I also had a lot of problems trying to build a kernel for this phone.
I end my school for this year in 2 days so I will be rebuilding the Linux the same day. May I know why you want a permissive kernel anyway?
Click to expand...
Click to collapse
Sorry for late reply. What DTS files? I haven't seen any when unpacking stock kernel. I followed instructions that came with kernel I downloaded from opensource.samsung.com. I needed to tweak two things in Makefile: ARCH=arm64 and CROSS_COMPILE path. Then I changed this flag EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true to false in SElinux Makefile. This is flag that forces enforcing SElinux. Then I typed: make pxa1908_grandprimevelte_eur_defconfig and it created .config. After that I typed make and waited until it compiled. When I unpacked stock kernel I had these files: rmdisk(folder), kernel(file), pagesize.txt, ram_disk(file) and ram_disk.gz. All I did was deleted kernel file, replaced with compiled one, repacked and flashed with Odin. KERNEL IS NOT SEANDROID ENFORCING. If I reflash stock kernel it continues booting normally. I want permissive kernel mainly because I want to use androidexpert35's XTREMEMusic mod.

su_root_ said:
Sorry for late reply. What DTS files? I haven't seen any when unpacking stock kernel. I followed instructions that came with kernel I downloaded from opensource.samsung.com. I needed to tweak two things in Makefile: ARCH=arm64 and CROSS_COMPILE path. Then I changed this flag EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true to false in SElinux Makefile. This is flag that forces enforcing SElinux. Then I typed: make pxa1908_grandprimevelte_eur_defconfig and it created .config. After that I typed make and waited until it compiled. When I unpacked stock kernel I had these files: rmdisk(folder), kernel(file), pagesize.txt, ram_disk(file) and ram_disk.gz. All I did was deleted kernel file, replaced with compiled one, repacked and flashed with Odin. KERNEL IS NOT SEANDROID ENFORCING. If I reflash stock kernel it continues booting normally. I want permissive kernel mainly because I want to use androidexpert35's XTREMEMusic mod.
Click to expand...
Click to collapse
Ok, so as I don't build a kernel for this phone for a while I will start setting my Linux up, build one and then put some instructions how to build one for this variant! I did have some problems so that's why I'm going to make a guide.

fabiossilva21 said:
Ok, so as I don't build a kernel for this phone for a while I will start setting my Linux up, build one and then put some instructions how to build one for this variant! I did have some problems so that's why I'm going to make a guide.
Click to expand...
Click to collapse
Thank you.

su_root_ said:
Thank you.
Click to expand...
Click to collapse
So I just built and flashed a kernel I made with the same modification you made to the selinux make file and it is still enforcing. I will try to see if I can make it permissive once I finish this year of school which is tomorrow. I just posted a guide on how to build a kernel for this phone good luck and tell me if you got it running!
EDIT: Go to security\selinux\Kconfig and have a look at the bools, before making the kernel do a "make menuconfig" and go through the options of security and try disabling them there! I'm going to sleep now, tomorrow I will recompile a kernel with those changes and checking if it works. If it does I will upload it here!
EDIT2: It doesnt work sorry! Everytime I build a kernel not SEANDROID Enforcing it will simply reboot into recovery!

su_root_ said:
Hi,
I have Samsung Galaxy Grand Prime SM-G531F, rooted with TWRP and I tried to set SElinux to permissive to be able to install Viper4Android driver, I tried changing SElinux with command setenforce 0, tried with SElinuxModeChanger apk, some build.prop editing and with .sh scripts, but nothing worked. Then I tried compiling permissive kernel, used ramdisk from stock kernel, created boot.img, flashed through Odin and rebooted. When the device boots on top of the screen it writes in red KERNEL IS NOT SEANDROID ENFORCING and won't boot, it's stuck there. If I flash stock kernel it will continue like nothing happened. Is there any other way to set SElinux to permissive other than this? If not, how to remove KERNEL IS NOT SEANDROID ENFORCING warning? I've read somewhere that I need to set bootloader to permissive, but I don't know how. Any help would be appreciated. Thank you in advance.
(I apologize for any mistakes, english is not my native language.)
Click to expand...
Click to collapse
Can i please have your permissive boot.img ? i will try to make Flashable .zip, then give it back to you packed in Kernel.zip then flash it through TWRP Recovery and it should fix it. Don't flash roms through odin. or kernels, if you do your phone will not boot up

Related

init.d support for 4.4.2

I try several methods to activate init.d support on leaked 4.4.2 with stock kernel ,but no one was successful.
Can someone help me ?
you placed the service in the init.rc of the kernel right?
No,when I try this and flash kernel , phone's goes to bootlop.
I try with several scripts , but they don't work.
mom4ence said:
No,when I try this and flash kernel , phone's goes to bootlop.
I try with several scripts , but they don't work.
Click to expand...
Click to collapse
Do it manually. The scripts are probably getting the repacking incorrect.

[Q] Enable ADB / USB Debugging with a broken screen

Any kernel developer can help me with this?
I have broken my lcd of my s5 and no usb debugging enabled.
So i read this here
i suggest you contact a kernel developer to automatically enable it in the default.prop and sideload the kernel in recovery!
Click to expand...
Click to collapse
brunocssoares said:
Any kernel developer can help me with this?
I have broken my lcd of my s5 and no usb debugging enabled.
So i read this here
Click to expand...
Click to collapse
I'm a kernel developer but still new here on samsung so I can't compile a kernel for s5 yet but I can explain to you the process and maybe you have the knowledge I still don't have.
1. Get any custom kernel that's compatible to your s5.
2. Extract the ramdisk from the kernel.
3. Unpack the ramdisk and edit the rc file that's responsible for enabling adb(I think it's init.rc).
4. Repack the ramdisk.
5. Make a new boot image using the modified ramdisk and the zImage you got awhile ago when you extract the ramdisk.
6. Flash the resulting boot.img using fastboot by typing "fastboot boot <boot.img file>"
Please not that the fastboot command doesn't permanently flash the kernel and will revert back to the previous kernel after reboot.
On a second thought... I'm not sure but you can try flashing one of the recoveries here or a AOSP kernel. Most of them have USB Debugging enabled by default. At least that's true base on my past devices.
Thank you for the answer!
But unfortunately i don't know how to do this things. So, I will study a little about this and if I get a solution i will post here!
Try hard always!
One more thing: Can I use other cellphone's tutorial to do this? Like this : http://forum.xda-developers.com/showthread.php?t=1262656
sorry for my horrible english!

Yoga Tab 2 Kernel Compilation

Has anyone else made any serious attempts at compiling a kernel? Prompted by doctorow's thread about the wakelock issue, I got interested in compiling a kernel so it could actually be fixed. For anyone who's tried at all, there are obviously some missing files in Lenovo's release.
I tried copying over the missing files from ASUS's Zenfone kernel release (since it uses the same SoC and their kernel had all the files that make was complaining about). Between that and commenting out some references to a nonexistent tablet_config.h header, it managed to at least finish compiling. Unfortunately I don't have a bootloader-unlocked device to test on yet, so I'm not terribly confident that it actually works.
P.S.: I'm not really sure if this belongs in the dev section or not? Sorry if it's in the wrong place, but I can't start threads there anyway at my current post count.
iampanis said:
I tried copying over the missing files from ASUS's Zenfone kernel release (since it uses the same SoC and their kernel had all the files that make was complaining about). Between that and commenting out some references to a nonexistent tablet_config.h header, it managed to at least finish compiling. Unfortunately I don't have a bootloader-unlocked device to test on yet, so I'm not terribly confident that it actually works.
Click to expand...
Click to collapse
Interesting, I haven't even gotten that far when I tried to compile them. The sources are most likely not up to date or even representative of the actual firmware kernel. For example, when I looked at the battery driver, I noticed in the published sources, the polling interval was hard-coded in such a way that it would completely ignore the setting of the poll_interval kernel parameter. But we know that this is not true for the actual firmware which is in fact respecting the setting of said parameter.
@Grarak and me have managed to get the messy "source code" of Lenovo to build. I have additionally added some security patches and stripped some kernel modules. Since we don't want to violate the GPL like Lenovo, we have pushed the kernel to GitHub.
Bear in mind that there may be some issues, given the kernel is a work in progress. It boots on stock as well as on cm-12.1, though.
Olivier said:
@Grarak and me have managed to get the messy "source code" of Lenovo to build. I have additionally added some security patches and stripped some kernel modules. Since we don't want to violate the GPL like Lenovo, we have pushed the kernel to GitHub.
Bear in mind that there may be some issues, given the kernel is a work in progress. It boots on stock as well as on cm-12.1, though.
Click to expand...
Click to collapse
Same kernel works for both 830f and 1050f?
Could you please post a compiled kernel? (which I assume can be flashed simply via fastboot)
Thanks!
raenye said:
Same kernel works for both 830f and 1050f?
Could you please post a compiled kernel? (which I assume can be flashed simply via fastboot)
Thanks!
Click to expand...
Click to collapse
Sure, here you go: kernel-yt2-20160327.img. I think it will boot on 1050F.
Olivier said:
Sure, here you go: kernel-yt2-20160327.img. I think it will boot on 1050F.
Click to expand...
Click to collapse
Hello, I have a 1050F too is somebody tried this kernel on 1050F? Is it possible to support wake gesture kernel extensions with this kernel?
Olivier said:
Sure, here you go: kernel-yt2-20160327.img. I think it will boot on 1050F.
Click to expand...
Click to collapse
I was able to unlock bootloader, install TWRP and flash this kernel via fastboot on both 830F and 1050F.
It works fine (and the battery life seems better since there's no wakelock bug).
Thanks!
Looking forward to alpha-grade CM....
raenye said:
I was able to unlock bootloader, install TWRP and flash this kernel via fastboot on both 830F and 1050F.
It works fine (and the battery life seems better since there's no wakelock bug).
Thanks!
Looking forward to alpha-grade CM....
Click to expand...
Click to collapse
Did you use.
Fastboot Flash recovery recoveryname.img.
or
Fastboot flash boot bootname.img
To send it to the tablet.
corasman said:
Did you use.
Fastboot Flash recovery recoveryname.img.
or
Fastboot flash boot bootname.img
To send it to the tablet.
Click to expand...
Click to collapse
The kernel goes to the boot partition. So 2nd option.
raenye said:
The kernel goes to the boot partition. So 2nd option.
Click to expand...
Click to collapse
Thanks ,I'll give it a try.
O.K tried this
I put the file in to my ADB folder
from a command prompt I typed Fastboot flash boot c:/adb/kernel-yt2-20160327.img and it returned
FAILED (remote: unknown command) any suggestion please.
corasman said:
Thanks ,I'll give it a try.
O.K tried this
I put the file in to my ADB folder
from a command prompt I typed Fastboot flash boot c:/adb/kernel-yt2-20160327.img and it returned
FAILED (remote: unknown command) any suggestion please.
Click to expand...
Click to collapse
Using windows? paths are c:\directory\file and not c:/directory/file
I used the fastboot executable from the tethered recovery package.
Checklist:
Did you unlock bootloader? it won't boot otherwise.
Did you backup current boot partition from TWRP/CWM?
Did you boot the tablet in fastboot mode? (down+pwr)
Can fastboot detect your tablet? (fastboot devices)
raenye said:
Using windows? paths are c:\directory\file and not c:/directory/file
I used the fastboot executable from the tethered recovery package.
Checklist:
Did you unlock bootloader? it won't boot otherwise.
Did you backup current boot partition from TWRP/CWM?
Did you boot the tablet in fastboot mode? (down+pwr)
Can fastboot detect your tablet? (fastboot devices)
Click to expand...
Click to collapse
Yes to all.
I wondered if the command slashes were the right way / or \ the way I used is what I used to unlock the bootloader and install TWRP.
I have tried the slashes the other way and get the same result, as in \ .
raenye said:
I was able to unlock bootloader, install TWRP and flash this kernel via fastboot on both 830F and 1050F.
It works fine (and the battery life seems better since there's no wakelock bug).
Thanks!
Click to expand...
Click to collapse
Hmm, I'm getting a high battery_wake_lock (on the April OTA firmware) -- even when running this kernel!
Any idea how can this be?
Hi,
I was trying to play a little bit with kernel provided by @Olivier and @Grarak ...
1. Binary Image kernel-yt2-20160327.img boots up fine on 1050l, but LTE is not working. Rest seems to be fine...
2. In next steps I replaced initrd.img with a little modified stock one - and LTE started to work - I removed from initrd almost all modules leaving only bcm43241.ko.
3. Battery wakelock problem seems not be resolved - brief check at bq27x00_battery.c in repository shows that wake_lock is still set under bq27x00_battery_suspend_resume()
... so I trying to fix this battery driver but I have problem with kernel - I can compile it successfully, but it doesn't boot
@Olivier:
1. Which branch was used to build kernel-yt2-20160327.img?
2. Which config did you use ?
My procedure using android-ndk-r12b toolchain:
# git clone ...github.com/lenovo-yt2-dev/android_kernel_lenovo_baytrail
# export PATH=~/android_yoga/toolchain/bin:$PATH
# export CROSS_COMPILE=x86_64-linux-android-
# export ARCH=x86
# make cyanogenmod_YT2_10_defconfig --- if this right config?
# make -j8 ----- lot's of warninigs, but kernel is compiled sucesfully.
# abootimg --create boot_test5.img -f bootimg.cfg -k bzImage -r initrd.img ---- bzImage from arch/x86/boot
> fastboot.exe flash boot boot_test5.img
... kernel stuck somewhere, it's doesn't even come to Zygote phase (lenovo animation). Is there any way to see kernel boot messages ?
Hi
I would also like to experiment with the Kernel, but I need to unlock the bootloader. unfortunately the thread is deleted files and I can not, can anyone help me even for private?
I have a 1380F in KitKat
Kind regards
airmalaga said:
Hi
I would also like to experiment with the Kernel, but I need to unlock the bootloader. unfortunately the thread is deleted files and I can not, can anyone help me even for private?
I have a 1380F in KitKat
Kind regards
Click to expand...
Click to collapse
I used this procedure: mobility.forumsee.com/a/m/s/p12-9574-0973888--yoga-tab-unlocking-daaa-deee-daaa-dooo.html
Patched ESP file I found on another forum: forum.android.com.pl/topic/259763-odblokowanie-bootloader%C3%B3w-yoga-tab-2/#entry4598175
For me it worked on Lolipop, but I as know bootloader changed arch x32->x64 during Lolipop->KK upgrade... I don't know if this esp will work on KK (at least do backup of ESP and boot partitions before).
---------- Post added at 12:07 PM ---------- Previous post was at 11:52 AM ----------
BTW: I was able finally to compile and startup my modified kernel using CM building engine from this thread .
I removed all wakelock code from bq27x00_battery_x8.c
For 1050L I merged: kernel from @Olivier repository + my patch on bq27x00_battery_x8.c + my initrd based on stock + stock Lolipop.
First tests seems to be very promising:
- finally NO battery_wakelock in Wakelock Detector
- LTE is working
- GPS is working
- Sound system is working
- No crashed till now
If anybody is interested i can attach img file.
Thx :good:
jasfasola said:
I used this procedure: mobility.forumsee.com/a/m/s/p12-9574-0973888--yoga-tab-unlocking-daaa-deee-daaa-dooo.html
Patched ESP file I found on another forum: forum.android.com.pl/topic/259763-odblokowanie-bootloader%C3%B3w-yoga-tab-2/#entry4598175
For me it worked on Lolipop, but I as know bootloader changed arch x32->x64 during Lolipop->KK upgrade... I don't know if this esp will work on KK (at least do backup of ESP and boot partitions before).
---------- Post added at 12:07 PM ---------- Previous post was at 11:52 AM ----------
BTW: I was able finally to compile and startup my modified kernel using CM building engine from this thread .
I removed all wakelock code from bq27x00_battery_x8.c
For 1050L I merged: kernel from @Olivier repository + my patch on bq27x00_battery_x8.c + my initrd based on stock + stock Lolipop.
First tests seems to be very promising:
- finally NO battery_wakelock in Wakelock Detector
- LTE is working
- GPS is working
- Sound system is working
- No crashed till now
If anybody is interested i can attach img file.
Click to expand...
Click to collapse
jasfasola said:
I removed all wakelock code from bq27x00_battery_x8.c
For 1050L I merged: kernel from @Olivier repository + my patch on bq27x00_battery_x8.c + my initrd based on stock + stock Lolipop.
Click to expand...
Click to collapse
Cool, could you push your patch to GitHub?
jasfasola said:
First tests seems to be very promising:
- finally NO battery_wakelock in Wakelock Detector
- LTE is working
- GPS is working
- Sound system is working
- No crashed till now
Click to expand...
Click to collapse
The kernel should be working, but the ALS is broken (seems to be a sensor from Avago) - you'll notice that if you use automatic brightness.
Olivier said:
The kernel should be working, but the ALS is broken (seems to be a sensor from Avago) - you'll notice that if you use automatic brightness.
Click to expand...
Click to collapse
Fixed. That was quite easy. Driver al3320 was in place. The problem was permissions set by script init.byt_t_ffrd8.rc in initrd. By default it's root/root, but it should be system/system. I already corrected paths and checked it - it's working. If you could give me permission to repo I can push the patch.
BTW: I see lot's of things are being hard-coded into initrd scripts. Since we changed config kernel, all those scripts must be checked. I can try to do it in free time...but some things are platform depended so, another original initrd from lolopop on 830f would be nice to compare...
jasfasola said:
so, another original initrd from lolopop on 830f would be nice to compare...
Click to expand...
Click to collapse
What do you need exactly? @jasfasola

"System Destroyed" with a custom compiled kernel?

I just spent a few days compiling this kernel. Fixed the paths and whatnot for RNDIS, etc. Its compiling fine but upon packing it with AnyKernel2 and flashing, I get a System Destroyed message, where I have to boot a TWRP img via fastboot and restore a working boot.img. I tried a brand new kernel source with no edits as well, same issue. What am I missing?
I did a make for tissot-perf_defconfig first, then I built it with make -j4 (i have 4 threads). Compiles to a Image.gz-dtb, place it in the AnyKernel2 root and zip it and flash. Flashes fine, boot fails before boot anim.
I tried manually packing the kernel into a boot.img i pulled from a TWRP backup (RR), but fastboot complains its missing DTB no matter which kitchen I use (AIK, Carliv Image Kitchen). Maybe this is the issue?
Thanks!
PS: I'm running it on top of RR 8.1 if that affects anything.
Also is there a Telegram I can join for these questions?
edit: tried pulling the config from a stock boot img using extract-ikconfig. still the same issue booting.

SM-T590 root/custom recovery?

So i got today the "Samsung Galaxy Tab A 10.5 (gta2xlwifi /SM-T590) with Android 8.1, the first Question i had "Can i root the Tablet?".
Well this is now my Question, i used google for a Hour and the Search function in XDA but apperently i cant find smth about this Device + root/custom recovery, i just found a news article with rumors about the Bixby Button.
so i wanted to ask if someone know already smth about rooting this device or give me some advises where i should begin with workarounds or smth like that.
Hi,
As far as I know there is no custom recovery for the SM-T590 yet. You're best bet to root the device is most likely to use Magisk and create a patched boot.img with Magisk Manager. The following steps should do the trick, but no guarantees as I have not tested it with this device:
Download the firmware matching your device firmware version
Unlock your bootloader (this will also trigger the KNOX fuse, so apps like Samsung Pay will no longer work)
Install Magisk Manager
In the settings of Magisk Manager, set the boot image format to img.tar
Unpack the lz4 compressed image
Install Magisk and select the Patch boot image method
Flash the patched boot image with ODIN/Heimdall
Cheers, Tom
tomparr said:
Hi,
As far as I know there is no custom recovery for the SM-T590 yet. You're best bet to root the device is most likely to use Magisk and create a patched boot.img with Magisk Manager. The following steps should do the trick, but no guarantees as I have not tested it with this device:
Download the firmware matching your device firmware version
Unlock your bootloader (this will also trigger the KNOX fuse, so apps like Samsung Pay will no longer work)
Install Magisk Manager
In the settings of Magisk Manager, set the boot image format to img.tar
Install Magisk and select the Patch boot image method
If sucessful, flash the patched boot image with ODIN/Heimdall
Cheers, Tom
Click to expand...
Click to collapse
(That English sounds kinda bad not gonna lie xd im really sorry for this crappy text tried my best)
first of all thanks for your time
so..... i did not found any infos about unlocking bootloader for this tablet... probably i dont search the right terms...
Well i tried it without unlocking it (idk if its maybe already unlocked)
now i created the boot image, install it via odin now yeah...
ive got magisk now and "root" but root do not actually work (apps like titaniumbackup cant find the "su") (probably because the bootloader isnt unlocked?)
so maybe its because of the bootloader not unlocked, just not working because of this "workaround", so i basically just can wait till someone take her/his time with this device or i did something wrong and didnt do it right
tomparr said:
Hi,
As far as I know there is no custom recovery for the SM-T590 yet. You're best bet to root the device is most likely to use Magisk and create a patched boot.img with Magisk Manager. The following steps should do the trick, but no guarantees as I have not tested it with this device:
Download the firmware matching your device firmware version
Unlock your bootloader (this will also trigger the KNOX fuse, so apps like Samsung Pay will no longer work)
Install Magisk Manager
In the settings of Magisk Manager, set the boot image format to img.tar
Install Magisk and select the Patch boot image method
If sucessful, flash the patched boot image with ODIN/Heimdall
Cheers, Tom
Click to expand...
Click to collapse
Edit: I tried this and the boot.img won't patch, comes back saying it can't patch the stock kernel.
airmaxx23 said:
Edit: I tried this and the boot.img won't patch, comes back saying it can't patch the stock kernel.
Click to expand...
Click to collapse
Hi,
Could you upload the boot.img(.lz4) somewhere? My device should arrive any day now, so I am really interested to get it working.
-- Tom
tomparr said:
Hi,
Could you upload the boot.img(.lz4) somewhere? My device should arrive any day now, so I am really interested to get it working.
-- Tom
Click to expand...
Click to collapse
Here you go, please keep me updated on your progress and let me know if I can help. This is from the December update.
https://drive.google.com/file/d/1hlntpS7hj6zsfuBW6JbPvJoCOEVSDG3i/view?usp=drivesdk
airmaxx23 said:
Here you go, please keep me updated on your progress and let me know if I can help. This is from the December update.
https://drive.google.com/file/d/1hlntpS7hj6zsfuBW6JbPvJoCOEVSDG3i/view?usp=drivesdk
Click to expand...
Click to collapse
Thank you. I ran the above steps (after decompressing the image with lz4) and the patching process went through without any issues. You can find the recompressed image here. No warranty it will work though since I don't have access to the device (yet) but please let me know if it works.
tomparr said:
Thank you. I ran the above steps (after decompressing the image with lz4) and the patching process went through without any issues. You can find the recompressed image here. No warranty it will work though since I don't have access to the device (yet) but please let me know if it works.
Click to expand...
Click to collapse
It's my first time messing with Samsung firmware in a long time so I've pretty much forgotten everything, I've also never messed with the lz4 extension before. How did you go about extracting the boot.img?
I'll probably wait until you try it since you're obviously more experienced with Samsung firmware. Please keep me posted.
airmaxx23 said:
It's my first time messing with Samsung firmware in a long time so I've pretty much forgotten everything, I've also never messed with the lz4 extension before. How did you go about extracting the boot.img?
I'll probably wait until you try it since you're obviously more experienced with Samsung firmware. Please keep me posted.
Click to expand...
Click to collapse
My last Samsung device was a Galaxy S2, so it has been a long time for me too. For now I just did a bit of reading about the new formats. The lz4 compression also seems to be relatively new and replace the old img.tar format. You can simply extract the boot.img from the boot.img.lz4 by using the official lz4 binary with the command
Code:
lz4.exe boot.img.lz4
After Magisk patched the image you can repack it by using
Code:
lz4.exe -B6 --content-size patched_boot.img patched_boot.img.lz4
The new image should be flashable with Odin/Heimdall.
tomparr said:
My last Samsung device was a Galaxy S2, so it has been a long time for me too. For now I just did a bit of reading about the new formats. The lz4 compression also seems to be relatively new and replace the old img.tar format. You can simply extract the boot.img from the boot.img.lz4 by using the official lz4 binary with the command
Code:
lz4.exe boot.img.lz4
After Magisk patched the image you can repack it by using
Code:
lz4.exe -B6 --content-size patched_boot.img patched_boot.img.lz4
The new image should be flashable with Odin/Heimdall.
Click to expand...
Click to collapse
Would I use the AP slot in Odin? If I have issues I'd just flash the stock boot.img.lz4?
airmaxx23 said:
Would I use the AP slot in Odin? If I have issues I'd just flash the stock boot.img.lz4?
Click to expand...
Click to collapse
Yes and yes
tomparr said:
Yes and yes
Click to expand...
Click to collapse
There's only one problem, the file you patched needs to have a .tar or .md5 extension for Odin, it won't accept an .lz4 extension. When you patched it with Magisk did you select .tar format?
From what I've read, you need at least Odin 3.13.1 to flash a lz4 image.
tomparr said:
From what I've read, you need at least Odin 3.13.1 to flash a lz4 image.
Click to expand...
Click to collapse
I have Odin 3.13.1 and there's no option or way to flash an LZ4 image.
airmaxx23 said:
I have Odin 3.13.1 and there's no option or way to flash an LZ4 image.
Click to expand...
Click to collapse
My bad, I've been away too long from Samsung firmwares. Please try this patched boot image. I've recreated it as an img.tar file.
tomparr said:
My bad, I've been away too long from Samsung firmwares. Please try this patched boot image. I've recreated it as an img.tar file.
Click to expand...
Click to collapse
That worked, we have root. A couple things are acting strange but it may be a Samsung thing. Adaway won't stay enabled after a reboot, when trying to edit the build.prop with Root Explorer the tablet reboots when I hit "save". Root Explorer won't delete anything in system/app or system/priv-app.
I have Magisk installed, V4A, Substratum and OnePlus Gestures.
Could you do me one favor and repackage the stock boot.img.lz4 with a .tar extension so I have it. Or explain to me the steps to do it.
airmaxx23 said:
That worked, we have root. A couple things are acting strange but it may be a Samsung thing. Adaway won't stay enabled after a reboot, when trying to edit the build.prop with Root Explorer the tablet reboots when I hit "save". Root Explorer won't delete anything in system/app or system/priv-app.
I have Magisk installed, V4A, Substratum and OnePlus Gestures.
Could you do me one favor and repackage the stock boot.img.lz4 with a .tar extension so I have it. Or explain to me the steps to do it.
Click to expand...
Click to collapse
Glad to hear it worked, at least to some extend.
I've created a flashable tar from your initial boot image, which you can find here. If you want to try it yourself, here's what I did:
Decompress lz4 image: 'lz4 -d boot.img.lz4'
Create tar archive: ' tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f boot.img.tar boot.img'
tomparr said:
Hi,
As far as I know there is no custom recovery for the SM-T590 yet. You're best bet to root the device is most likely to use Magisk and create a patched boot.img with Magisk Manager. The following steps should do the trick, but no guarantees as I have not tested it with this device:
Download the firmware matching your device firmware version
Unlock your bootloader (this will also trigger the KNOX fuse, so apps like Samsung Pay will no longer work)
Install Magisk Manager
In the settings of Magisk Manager, set the boot image format to img.tar
Unpack the lz4 compressed image
Install Magisk and select the Patch boot image method
Flash the patched boot image with ODIN/Heimdall
Cheers, Tom
Click to expand...
Click to collapse
Thanks for that, worked for me after some glitches. Now rooted with xposed working.
gscollier said:
Thanks for that, worked for me after some glitches. Now rooted with xposed working.
Click to expand...
Click to collapse
Which SDK version did you install?
Also, can you please do me a favor? Go into system/app or system/priv-app and try to rename an apk and see what happens.
So you guys are making some progress. Its been a while for me too. I used to develop ROMs here ages ago but I am so out of the loop. Can't find any repos either. The last time I used Odin (and hated it) was back in the skyrocket days. Is it absolutely mandatory? Would adb work in Linux?
I always tried to avoid magisk or just didn't need it. Is it possible to avoid a recovery with it?

Categories

Resources