[KERNEL] root/init.d support for stock insecure kernel - Samsung Captivate Glide

Hello,
Some users requested this so I put it together as well as a template for devs to include with their kernels.
i927_rooted_initd_boot.tar.md5
Flash this via ODIN as usual.
The initial ramdisk can be found here on my github: android_samsung_i927_initrd
Feel free to use/modify this devs, just give credit.
Credit to: the provider of the insecure stripped down kernel
Da_G for his script in the ramdisk
Enjoy.

This kernel works great, provides root on stock ROM as expected and scripts run. Good work.

It may be useful...
For the i927_rooted_initd_boot.tar.md5 file:
CRC32: 7031B711
MD5: FED634B455931E667FFE31BEC3857A66
SHA-1: F4B8AEBF3C6C531C4C24CDBB425DDAAB530C6350

I do not have root after flashing this kernel.
Edit: I finally got it working by reflashing and rebooting.

utkanos said:
Hello,
Some users requested this so I put it together as well as a template for devs to include with their kernels.
i927_rooted_initd_boot.tar.md5
Flash this via ODIN as usual.
The initial ramdisk can be found here on my github: android_samsung_i927_initrd
Feel free to use/modify this devs, just give credit.
Credit to: the provider of the insecure stripped down kernel
Da_G for his script in the ramdisk
Enjoy.
Click to expand...
Click to collapse
If you don't mind, how did you go about getting init.d to work? I am working on a similar kernel but have not yet been able to get my scripts to run.

Wetzel402 said:
If you don't mind, how did you go about getting init.d to work? I am working on a similar kernel but have not yet been able to get my scripts to run.
Click to expand...
Click to collapse
It's in the source I posted on my github.
https://github.com/utkanos/android_samsung_i927_initrd/blob/master/init.superuser.sh

Thanks! I actually looked through your git earlier today but must have read over that line. Looks very easy to get going on a Samsung device. I tried that exact line on my device but it didn't work unfortunately. I think I may have a work around but haven't tested it yet.

I can't seem to get rooted with this. I've got it stock besides have flashed CWM via Odin.
I should just be able to get root by flashing a custom ROM and kernel through CWM, right? This device is a little different than my last one.

this is for GB only if you are using ICS then install likekernel or other root ICS based kernel.

Am on GB, but thanks anyways. I got it by other methods.

Related

[APP][ABANDONED] z4mod

Alright, here is the z4mod app at long last! This release needs a lot of testing for different devices still, so make sure you check the compatibility table below unless you know how to use Odin to flash back your original kernel. Thanks for helping to test this!
[size=+1]This is still in beta! If you know how to flash with Odin, please help test so all bugs can be found and fixed to allow for wider release![/size]
What is this?
Another lagfix. This one is a bit different from existing lagfixes though:
- Differences from OCLF: Uses native EXT/JFS instead of loopback mounts. Loopback mounts in linux can be a bit flakey at times, especially when they're on RFS. So this is generally better.
- Differences from lagfix kernels such as voodoo or sztupy's: These types of lagfixes are kernels compiled from GPL sources for specific devices. This can cause a number of issues, such as losing out on bug fixes in later Samsung kernels released after the GPL code, or differences in devices such as the I9000B, etc. z4mod also has (imo) a nicer design, in that it uses /etc/fstab for filesystem mounting, as well as keeping the convert scripts outside the kernel. It should also work across ALL (or many?) Samsung devices without changes!
How do I use this?
Install the app. Click the buttons. It should all just work. Let me know of any issues or complications! This is still in testing!
Device/firmware compatibility table
Samsung Galaxy S Devices
Stock Samsung
I9000 Stock Samsung 2.2 : WORKING
I9000 Stock Samsung 2.1 : NOT TESTED
I9000B Stock Samsung 2.2 : NOT TESTED
I9000B Stock Samsung 2.1 : NOT TESTED
I9000T Stock Samsung 2.2 : NOT TESTED
I9000T Stock Samsung 2.1 : NOT TESTED
I9000M Stock Samsung 2.2 : NOT TESTED
I9000M Stock Samsung 2.1 : NOT TESTED
Captivate Stock Samsung 2.2 : NOT TESTED
Captivate Stock Samsung 2.1 : NOT TESTED
Vibrant Stock Samsung 2.2 : NOT TESTED
Vibrant Stock Samsung 2.1 : NOT TESTED
Epic Stock Samsung 2.2 : NOT TESTED
Epic Stock Samsung 2.1 : NOT TESTED
Fascinate Stock Samsung 2.2 : NOT TESTED
Fascinate Stock Samsung 2.1 : NOT TESTED
Stock Japanese Docomo Galaxy S (SC-02B) : WORKING
Stock SHW-M110S (Korean SGS) : WORKING
Custom Firmwares
Any custom firmware that uses a stock kernel works as the stock kernel in the table above
Custom kernels that make use of changed filesystems or boot up scripts are unlikely to work at this time. Emphasis is on stock kernels currently.
Custom Kernels
BLN (backlight notification) custom kernel for GT-I9000 works
Voodoo kernels do not work
Kernels with heavily modified boot procedures such as rooted Vibrant kernels do not work
CFRoot kernel does not work.
DamianGto's kernels work
Other Samsung Devices
NOT TESTED
More info on z4mod
http://www.sgscompilebox.dreamhosters.com/about.html
Source Code
http://github.com/z4/z4mod
V0.9.2 Changelog
Fix for EXT2->RFS Conversion. Please update to this app version before using this conversion.
Other small bug fixes.
Conversion page now has scrolling text informing you of progress and any errors.
V0.9.3 Changelog
Critical: Upload kernel now passes binary MIME type to prevent corrupt kernels
Fixes for text in conversion screen.
Fix for 'mmcblk0p2' always being chosen for /data, even on devices that use 'mmcblk0p1'
Bug fixes for UI
Donations
Donate link is available at https://www.paypal.com/cgi-bin/webs...=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted
quick question I need to disable vodoo before using this right ?
anyways im running vibrant rom ( axura ) on my rogers captivate ( i896 )
testing now
DAGr8 said:
quick question I need to disable vodoo before using this right ?
anyways im running vibrant rom ( axura ) on my rogers captivate ( i896 )
testing now
Click to expand...
Click to collapse
This probably won't work if you have a Voodoo kernel installed. The Voodoo kernel is unlikely to be patchable, since it's not native RFS, and does not use /etc/fstab.
RyanZA said:
- Differences from OCLF: Uses native EXT/JFS instead of loopback mounts. Loopback mounts in linux can be a bit flakey at times, especially when they're on RFS. So this is generally better.
Click to expand...
Click to collapse
I have a Vibrant and this is why I have avoided using the OCLF in the past. Many ROMs don't even need a lag fix. However, with that issue gone, I'll at least try it and report back on it.
RyanZA said:
This probably won't work if you have a Voodoo kernel installed. The Voodoo kernel is unlikely to be patchable, since it's not native RFS, and does not use /etc/fstab.
Click to expand...
Click to collapse
hey I forgot to mention I had flashed setiron's reoriented kernel on it , so yea result is could not patch kernel ..
I guess i have more test to do. But right now Im stuck with 0.12 problem.
I did test it
I knew it would not work.;-)
The thing i was testing was if you could do this on a kernel that has note been patched. Well you can press the button and the phone restart. I guess it try but failed and restart again.
Can you do a check on the kernel so you know its patched?
I thinking of ways happens if people try every kernel without the patch. It should point them to the website.
Instead of restarting the phone.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
can i use this with speedmod kernel?
DamianGto said:
I guess i have more test to do. But right now Im stuck with 0.12 problem.
I did test it
I knew it would not work.;-)
The thing i was testing was if you could do this on a kernel that has note been patched. Well you can press the button and the phone restart. I guess it try but failed and restart again.
Can you do a check on the kernel so you know its patched?
I thinking of ways happens if people try every kernel without the patch. It should point them to the website.
Instead of restarting the phone.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
Click to expand...
Click to collapse
It checks for a /z4mod/z4version file to determine if it's been patched already. If you are using an earlier patched z4mod kernel that doesn't have that file, then it won't work right. If you start with a stock samsung kernel then it should work fine.
specialex said:
can i use this with speedmod kernel?
Click to expand...
Click to collapse
Feel free to give it a shot, but the current emphasis in this 0.9 app release is on patching and lagfixing the stock samsung kernels. Once that is all working and bugfree across devices, then I will look more at supporting custom kernels. At present, any custom kernel that does not change the initramfs (in particular, the /init binary and init.rc mount options) too heavily should work fine.
Hey Ryan,
I patched the stock Vibrant JK2 kernel and it patched successful, however the conversion to ext2 did not work. Said it worked, rebooted, but I was still on RFS.
Whitehawkx said:
Hey Ryan,
I patched the stock Vibrant JK2 kernel and it patched successful, however the conversion to ext2 did not work. Said it worked, rebooted, but I was still on RFS.
Click to expand...
Click to collapse
Thanks for testing!
Could you upload the z4mod.log file in your sdcard? /sdcard/z4mod.log
Okay. Then its just because the bug in the latest z4build then.
That's why it tried to apply the change.
Z4ziggy is working on that problem
Hope he will solve that soon. Right know Im on stock filsystem with my new kernel. Lol.
Kind of fun to compare them.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
RyanZA said:
Thanks for testing!
Could you upload the z4mod.log file in your sdcard? /sdcard/z4mod.log
Click to expand...
Click to collapse
I just looked and there isn't one there.
Whitehawkx said:
I just looked and there isn't one there.
Click to expand...
Click to collapse
Hah... Okay that's pretty strange. What method did you use to root btw? Perhaps it's a busybox conflict of some type.
RyanZA said:
Hah... Okay that's pretty strange. What method did you use to root btw? Perhaps it's a busybox conflict of some type.
Click to expand...
Click to collapse
Hmmm the rom/kernel I flashed came pre-rooted. Now that I think about it, I was using the stock JK2 kernel but it has a custom init script to allow the use custom boot animations. Could this be effecting the conversion process by chance? Anytime I manually root though I use OCLF from the market.
Hey RyanZA,
I see that there is a list of devices in the first post but I dont see a listing for the GT-i9000M specifically. I see the i9000, i9000B and i9000T but no "M". Is there a reason for this? Is the i9000M considered in the generic i9000 family? Also...
A bit off topic here but I am curious to know if I root using z4root and need to unroot for warranty purposes, will it remove ALL traces that it had been rooted including Busybox and Superuser app?
I know that Samsung has issued a memo stating that if a phone shows up rooted to a service center that the warranty will be voided and Id really like to try this rooting method.
Also, as you are probably aware, the i9000M here in Canada has issues with internal sd card failures and I am curious to know if just rooting with z4root will possibly kill my internal sd?
Thanks...
Flashed my Epic using the DK05 2.2 Rom, ran Z4mod, get error: zimage test failed when i try and patch the kernal.
RyanZA said:
Feel free to give it a shot, but the current emphasis in this 0.9 app release is on patching and lagfixing the stock samsung kernels. Once that is all working and bugfree across devices, then I will look more at supporting custom kernels.
Click to expand...
Click to collapse
should probably put this on OP , less hassle probably .
if nobody else test it on the cappy ill flash to stock just to test ..
@DamianGto:
The problem is with CWM recovery - it's busybox-tar is not working properly.
I think I found a way to overcome this and I updated the git, so now CWM option should be working again.
Whitehawkx said:
Hey Ryan,
I patched the stock Vibrant JK2 kernel and it patched successful, however the conversion to ext2 did not work. Said it worked, rebooted, but I was still on RFS.
Click to expand...
Click to collapse
If you could paste the contents of the following 2 files we might learn more:
/z4mod/log/init
/sdcard/z4mod.log
Just installed on my device (GT-I9000 with official JPA just released today in Thailand)
It worked fine. I got 1730 from quadrant.
Thanks for your excellent job. ^__^

Test Kernels From Adrynalyne

THIS HAS NOT BEEN TESTED!!! USE AT YOUR OWN PERIL!!! Make WORKING Odin Files First!!!
Hey folks,
I do not have a Continuum, but I noticed in a few threads that some folks are seeing trouble with the cdrom/mass storage bug that the Samsung Fascinate users are plagued with.
I cannot test this kernel, as I do not have the device. However, for the brave (and those who have ODIN images!), please try this:
http://adrynalyne.us/files/kernels/adryn_continuum_02.zip
I wish I could test it beforehand (especially since I saw no Continuum kernels), but I do not have a device to test. This was built from DL17 source.
Features
---------
cdrom/mass storage fix
undervolted
cifs support
tun support
bunch of debugging crap in the kernel removed.
Hope I was able to help, and please, be careful with this!
Do you just flash this in recovery?
CrazyKnight122 said:
Do you just flash this in recovery?
Click to expand...
Click to collapse
Yup That is right!
The kernel flashed, and all seems well
Just flashed it seems to be wOrking good.
Sent from my SCH-I400

[KERNEL]{S} Advanced Stock ICS Kernel Build 17 [08/12/12]

Advanced Stock ICS Kernel for Xperia S​Here is a kernel based on the Stock ICS kernel with some features which come from DoomLord's GB kernel.
Features
autorooting
CWM recovery (with reboot recovery support)
init.d support (thanks DoomLord)
TUN/TAP driver
Download links
Build 17 (Fastboot)
Build 17 (CWM)
Build 16 (Fastboot)
Build 16 (CWM)
Prerequisites
An unlocked bootloader: Tuto here.
A stock ICS ROM (6.1.A.0.452 to 6.1.A.2.55). Don't expect this kernel to work with CM9/10.
How to flash
For elf files :
Read DoomLord's guide
You just have to replace kernel.elf by the name of the downloaded kernel in the flash command (eg : ics4.elf)
For zip files:
Flash the zip file from the recovery
Changelogs
Build 17 (08/12/12) :
Merge 6.1.A.2.55 kernel sources
Autodetect rom version in default.prop based on build.prop
Updated recovery, adbd and busybox (JB version)
Build 16 (01/11/12) :
Random reboot issue probably fixed (patch from CM10 kernel, thanks Kali)
Rom version increased to 6.1.A.2.50
Updated recovery, adbd and busybox (JB version)
SD card mounted by default in recovery
Vibration at boot removed, only led and backlight now
Build 15 (05/09/12) : Increase ROM version in default.prop from 6.1.A.0.452 to 6.1.A.2.45
Build 14 :
New MMC driver (from codeaurora) : it fixes issue while formatting partitions in CWM
Wifi module built from source (in the ramdisk)
Updated recovery
Disable again hardware clock
Build 13 :
Backup / Restore fixed with dedupe
Backlight enabled in CWM
Better "reboot recovery" handling in adbd / busybox and recovery
Build 12 :
Updated recovery
Hardware clock correctly saved (from CM9 kernel)
Build 11 : Go back to GCC 4.4 (fix artifacts with camera preview)
Build 10 :
Kernel built with GCC 4.6
Several autoroot fixes (Superuser app pushed just once and correctly removed in /data)
Working reboot recovery command (with adb too)
Updated su (3.1.1) and Superuser (3.1.3)
A bunch of new command included in the new busybox (ifconfig, wget, vi, and many more !)
Build 9 :
Kernel built from sources
TUN/TAP driver included (for VPN)
Build 8 : Fix mass storage in CWM
Build 7 : Fix MTP
Build 6 : Key mapping in CWM fixed
Build 5 :
New recovery built from latest CM9 sources
Fixed generation of md5sum with nandroid
Increased font size in CWM
Boot partition backup and restore
New adbd built from CM9 sources (fixed an issue with hardcoded sh path in /system)
Build 4 :
Correct su binary
Don't wait 3 sec if /cache/recovery/boot exists
Build 3 :
Leds and vibrator at startup fixed
Sources
Ramdisk sources
Kernel sources
Credits
DoomLord : many thanks to him for its kernel and all his scripts.
championswimmer and sminki for their help
FreeXperia team for their work on CM
makes it perfectly start does not make any errors
greetings and thanks
yes it boots!
(maybe you can help with my Question here )
Hey, I also have tested several times to include recovery, but withut succes, didn't get any further then a booting kernel without recovery or vibration and LED on to enter recovery but no entering recovery and kernel that doesn't boot.
Please pm me if you want to work together, I saw your kernel is from ICX team? I know nick very well so I'd would be a pleasure to work with you too
sminki said:
yes it boots!
(maybe you can help with my Question here )
Click to expand...
Click to collapse
for this question and any other other question similar to this
head here
http://forum.xda-developers.com/showthread.php?t=1659584
it has menu driven process to extract and repack kernel.elf (ramdisk also can be extracted and packed )
Welcome Champ, good to see you mate.
I will leave the thread here as knowing you, you will have a kernel ready for us in a few hours.:fingers-crossed:
thanks for the test guys... so now i'm diving into including recovery....
good to know i could pull off kernel.elf editing in my first attempt lol
@colossus if not in hours, then definitely within 1 or 2 days
EDIT :
can someone send me the kernel.elf from FXP122 cm9 ??
will save me the time to download the whole ROM
This is sweet, good job!!
john9 said:
This is sweet, good job!!
Click to expand...
Click to collapse
Only a few files to edit now
We'll keep you updated
Sent from my LT26i using XDA
championswimmer said:
btw if anyone wishes to do this before me,
this diffstats should help you
https://github.com/championswimmer/xps-ramdisk/commit/a61969aefca00ce3a6e4e112e97403fb6f0c79e9
it shows how doomlord added recovery to gb kernel..
Click to expand...
Click to collapse
cool.. well that's a hell of a lot easier than the manual route I was taking. This was my goal, but for personal rather than pseudo "xda glory" as I'm working with DooM's stuff I didn't feel right posting it without his permission, but he's probably too busy to care
go for it championswimmer :victory:
Excuse my noob-ish question, but... what's the difference between a 'stock' kernel with recovery and a completely custom kernel like DoomLord's? Is it to do with core frequencies/governors?
fNOOB said:
Excuse my noob-ish question, but... what's the difference between a 'stock' kernel with recovery and a completely custom kernel like DoomLord's? Is it to do with core frequencies/governors?
Click to expand...
Click to collapse
Frequencies and governors are one possible customicing for kernels, for the most users the most important thing. also Kernel modifing can allows you init.d support, undervoltscripts and also allows (or denies) MSC support... and, for shure, clean out some tings, make things more efficiently and and and... a dev is nearly totaly free to create a very customiced kernel with or without special Driver support or so
noob.fl said:
Frequencies and governors are one possible customicing for kernels, for the most users the most important thing. also Kernel modifing can allows you init.d support, undervoltscripts and also allows (or denies) MSC support... and, for shure, clean out some tings, make things more efficiently and and and... a dev is nearly totaly free to create a very customiced kernel with or without special Driver support or so
Click to expand...
Click to collapse
Cheers mate
sminki said:
cool.. well that's a hell of a lot easier than the manual route I was taking. This was my goal, but for personal rather than pseudo "xda glory" as I'm working with DooM's stuff I didn't feel right posting it without his permission, but he's probably too busy to care
go for it championswimmer :victory:
Click to expand...
Click to collapse
using someone's work just because 'he's too busy to care' is not the aim which we at xda strive for ...
i've already talked with Doomlord regarding using his recovery... and as long as I clearly mention it's his work and provide links back to his thread, he has no issues with anyone else using it...
(and i'll surely do that ^^ when i release a kernel containing his recovery, if i ever do that)
championswimmer said:
using someone's work just because 'he's too busy to care' is not the aim which we at xda strive for ...
i've already talked with Doomlord regarding using his recovery... and as long as I clearly mention it's his work and provide links back to his thread, he has no issues with anyone else using it...
(and i'll surely do that ^^ when i release a kernel containing his recovery, if i ever do that)
Click to expand...
Click to collapse
cool, i was only making a bad joke, we all know DooM cares
sminki said:
cool, i was only making a bad joke, we all know DooM cares
Click to expand...
Click to collapse
lol.. ok
and i'll bring you some unicorns soon
championswimmer said:
lol.. ok
and i'll bring you some unicorns soon
Click to expand...
Click to collapse
I can't wait! :victory:
so this kernel has the ro.secure property in default.prop set to 0??
Tnaks mate for your job!
tested right now the test version and the sony logo fades and reboots
can you plug it into a pc and run a logcat from command prompt and give me the output of any comes??

[DEV][KERNEL]Kexec-hardboot patch

I would like to explain this a little bit:
What is kexec?
It is a function which allows you to boot an alternative kernel without needing to flash it or using `fastboot boot`. I am not going to write a thousand words to explain this, so if you want more info, search it yourself.
What is kexec hardboot?
It does the same as what kexec aims to do, but instead of booting another kernel directly, it reboots the device before doing so so that the hardware can be reinitialized by the bootloader. Normal kexec boots the kernel with the hardware in an unclean state, which is not very healthy. Kexec hardboot is somehow healthier.
I know I am not explaining very well, so please refer to the original thread by @Tasssadar
So what is this post about?
At this moment, there aren't any non-stock ROM, CAF or CM kernel isn't ported yet, so this is pretty useless actually.
In the future, if there are any custom ROMs, this will come in handy because it will allow "installing" multiple ROMs without having to flash them to the device memory.
Basically, this is just to prepare for the future.
Who should be reading this?
Well, developers who can properly compile a kernel.
Patches:
Kernel patch: https://gist.github.com/alvinhochun/7945428
Or, if you cloned my github stock kernel tree, check this: https://github.com/alvinhochun/sony-xperia-m-kernel/commit/2e818d81f21f6a627bc629e477052045426b0663
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
All these options must be enabled.​
Userspace kexec binary: Use the one compiled by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952​
Usage:
I have wrote a simple shell script to automatically set the correct cmdline here:
https://gist.github.com/alvinhochun/7945270
Basically, the most important thing is to make sure the addresses are correct and the cmdline has the proper information in it.
The script requires kernel to be packed with CWM which also provides /boot/busybox. You can use this tool: http://forum.xda-developers.com/showthread.php?t=2481864
Just download the kexec binary and put it in place.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices.
My patch is based on the one by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952
So, are this is like 'Live CD' for android?
Richardsentosa said:
So, are this is like 'Live CD' for android?
Click to expand...
Click to collapse
Well, that analogy can't exactly be used. It's more like the kernel acts as a bootloader that is used to boot another kernel.
alvinhochun said:
Well, that analogy can't exactly be used. It's more like the kernel acts as a bootloader that is used to boot another kernel.
Click to expand...
Click to collapse
after see N4 multiboot, i think this is a great feature.
alvinhochun said:
I would like to explain this a little bit:
What is kexec?
It is a function which allows you to boot an alternative kernel without needing to flash it or using `fastboot boot`. I am not going to write a thousand words to explain this, so if you want more info, search it yourself.
What is kexec hardboot?
It does the same as what kexec aims to do, but instead of booting another kernel directly, it reboots the device before doing so so that the hardware can be reinitialized by the bootloader. Normal kexec boots the kernel with the hardware in an unclean state, which is not very healthy. Kexec hardboot is somehow healthier.
I know I am not explaining very well, so please refer to the original thread by @Tasssadar
So what is this post about?
At this moment, there aren't any non-stock ROM, CAF or CM kernel isn't ported yet, so this is pretty useless actually.
In the future, if there are any custom ROMs, this will come in handy because it will allow "installing" multiple ROMs without having to flash them to the device memory.
Basically, this is just to prepare for the future.
Who should be reading this?
Well, developers who can properly compile a kernel.
Patches:
Kernel patch: https://gist.github.com/alvinhochun/7945428
Or, if you cloned my github stock kernel tree, check this: https://github.com/alvinhochun/sony-xperia-m-kernel/commit/2e818d81f21f6a627bc629e477052045426b0663
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
All these options must be enabled.​
Userspace kexec binary: Use the one compiled by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952​
Usage:
I have wrote a simple shell script to automatically set the correct cmdline here:
https://gist.github.com/alvinhochun/7945270
Basically, the most important thing is to make sure the addresses are correct and the cmdline has the proper information in it.
The script requires kernel to be packed with CWM which also provides /boot/busybox. You can use this tool: http://forum.xda-developers.com/showthread.php?t=2481864
Just download the kexec binary and put it in place.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices.
My patch is based on the one by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952
Click to expand...
Click to collapse
can we use this to boot cm10 cm11 on sony Xperia z?
nabelar82 said:
can we use this to boot cm10 cm11 on sony Xperia z?
Click to expand...
Click to collapse
I guess you are mislead this is a kernel feature and is not at all related to booting of a rom
SpinXO said:
I guess you are mislead this is a kernel feature and is not at all related to booting of a rom
Click to expand...
Click to collapse
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
nabelar82 said:
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
Click to expand...
Click to collapse
Not really.
But Recognized Developer @Rachit Rawat has explained how the Locked Bootloader CM is booted and I see @Olivier have worked on the same for Xperia S you can try to contact him
Explanation Link: http://forum.xda-developers.com/showthread.php?p=49073506#post49073506
nabelar82 said:
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
Click to expand...
Click to collapse
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
aweosomeabhijeet said:
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
Click to expand...
Click to collapse
Well I am very interested on this patch but I am not a developer it will be very interesting if someone apply on a xperia z an we can test can someone try? I can test
aweosomeabhijeet said:
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
Click to expand...
Click to collapse
Contact Skrilax_CZ on freenode at channel #motomagic and he might be able to help us.

[Recovery] TWRP 2.8.7.x for the G925T on 5.1.1 (OF6) + [Kernel]Aou's OH6 Stock Kernel

Intro:
I've put in a serious number of hours poking around my G925T that I've upgraded to the official G925TUVU2COH6 firmware, trying to get TWRP installed and working on our device. With help from @bigbiff, @_that, and several testers in this thread, we finally have something working solid for our device. Before continuing, please take a moment to read through the extremely-relevant warnings below:
WARNING: Intentionally modifying your System partition from TWRP recovery, without first flashing a custom kernel (kernel must have no "verify" mount parameter in fstab), will likely cause a soft-brick (boot-loop). Before flashing this (or any) custom recovery/kernel, it is advised that you know how to restore your phone back to OH6 stock using Odin.
Note: Flashing a custom kernel (while keeping a stock System/ROM) may cause your device to report a security threat. If you proceed without caution, the device will literally attempt to re-flash the stock OH6 kernel again. It is possible to freeze "Security Log Agent" (or uninstall it completely), and this should keep your device from reporting this problem. Other reports say that using "Smart Manager" might also report the security threat, and there are some options out there for replacing it with a patched version.
Rooted Phones: Do NOT allow "com.tmobile.pr.adapt" to obtain root permissions, EVER. This app might be something that T-Mobile uses to determine if your device has ever been rooted. I would recommend freezing/disabling this app.
Unlocked Phones: If you have unlocked your phone, you might run into problems with 5.1.1. There have been reports of phones stuck in a boot-loop when upgrading from 5.0.2 -> 5.1.1 when the phone has been unlocked or EFS/IMEI has been tampered with. Combine this with the new "FRP LOCK" (Factory Reset Protection) in 5.1.1, and you might find yourself with a complete brick with no warranty. This issue may or may not have anything to do with rooting or custom firmware.
WARNING: Flashing any custom firmware to your device will trip the KNOX Warranty Bit. At this time, this is irreversible, and might cause you problems when returning faulty devices to T-Mobile or Samsung. YMMV.
Click to expand...
Click to collapse
How-To-Install (The Short Version):
Recognize that this will trip KNOX.
Be sure you're actually already running the 5.1.1 (OH6) firmware. If you're on 5.0.2 (OCG, for example), this thread is not for you.
Turn on "OEM unlocking" in Settings -> Developer options. This is the dreaded "FRP LOCK" that prohibits custom firmware from being flashed to the G925T/G920T (and maybe others) - it's something new in 5.1.1.
Download and Odin-flash my v13 of TWRP 2.8.7.x.
Download and Odin-flash (or TWRP-flash) my v1 build of the OH6 kernel. G920T users should use the appropriate G920T kernel for their device.
(Optional): Download and TWRP-flash Chainfire's SuperSU v2.49 (.zip format).
(Advice): Use Titanium Backup or some other app to freeze/disable/uninstall "SecurityLogAgent" (remove nagging about security) and "com.tmobile.pr.adapt" (remove nagging about root, helps with sleep, and may be used by T-Mobile to determine your rooted status).
Enjoy TWRP + Root with an almost-completely-stock OH6 kernel/system!
Click to expand...
Click to collapse
Official TWRP for G925T:
It's official! Thanks to all of our hard work in this thread, plus a bunch of work getting things fine-tuned and finalized by @bigbiff, our device is now officially supported by TeamWin! Check out the official page here. Development will continue here on this thread until further notice, and I'll always be building the latest-and greatest from source and making it available in this thread (not to mention this is the go-to place to get the latest version of my kernel).
Click to expand...
Click to collapse
Downloads:
Here's the Odin-flashable OF6 kernel I've built:
Version 1 (6/25/15) - built from OF6 stock kernel source, no modifications
Version 2 (6/27/15) - built from OF6 stock kernel source, fixes boot-loop
Version 3 (6/28/15) - built from OF6 stock kernel source, fixes boot-loop and allows root
Version 4 (6/28/15) - built from OF6 stock kernel source, fixes boot-loop, allows root, and fixes Deep Sleep - also available as a TWRP-flashable .zip or Flashify .img
Here's the Odin-flashable OF8 kernel I've built:
Version 1 (8/10/15) - built from OF8 stock kernel source, fixes boot-loop, allows root, and fixes Deep Sleep - also available as a TWRP-flashable .zip or Flashify .img
Here's the Odin-flashable OH6 kernel I've built:
Version 1 (9/15/15) - built from OH6 stock kernel source, fixes boot-loop, allows root, and fixes Deep Sleep - also available as a TWRP-flashable .zip or Flashify .img
Here's the Odin-flashable TWRP recovery I've put together:
Version 13 (7/10/15) - also available as a Flashify .img
And, in case you need it, here's the stock OF8 recovery as an Odin-flashable:
OF8 Stock Recovery - No guarantees it won't trip KNOX (it shouldn't), but if you're needing this, you've probably already tripped KNOX. Sorry, I'm too lazy to package and upload a flashable OH6 stock kernel.
G920T users! I bring you a gift! I took the G920TUVU2DOH6 Samsung source, built it with the same modifications as I did the G925T kernel to allow modified System partitions (allows root w/o bootloop), and then stuck that into the G920T OH6 stock kernel provided by @icepuente (thanks!). Also, some additional thanks to @icepuente for testing it, too!
Version 1 (9/21/15) - FOR G920T - built from G920TUVU2DOH6 stock kernel source, fixes boot-loop, allows root, and fixes Deep Sleep - also available as a TWRP-flashable .zip or Flashify .img
Click to expand...
Click to collapse
Building this OH6 kernel from source:
Setup your build environment for compiling Android.
Download the latest NDK, unpack, etc., etc.
Download the OH6 source code directly from Samsung.
Update the Makefile's CROSS_COMPILE to use the NDK toolchain. Mine ended up looking like this: /home/aou/android/NDK/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
make exynos7420-zerolte_tmo_defconfig
For some reason, gcc treats CONFIG_ALWAYS_ENFORCE as always defined, and therefore the kernel will, of course, always enable SELinux: Enforcing. This makes it "impossible" to root Android 5.1.1. There is a workaround:
rm -rf security/selinux
svn export https://github.com/glewarne/S6-UniKernel/trunk/security/selinux security/selinux (snags a copy of their security/linux folder...)
Go give the guys over at the UniKernel thread some "Thanks!" for making this workaround in their kernel, especially @AndreiLux - he was the one to author this change to their source that fixes this problem.
Replace drivers/scsi/sd.c with Sujit Reddy Thumma's Deep Sleep fixed version, referenced in the UniKernel's source:
curl https://raw.githubusercontent.com/glewarne/S6-UniKernel/master/drivers/scsi/sd.c > drivers/scsi/sd.c
make -j#
Go snag that juicy arch/arm64/boot/Image - This is your kernel zImage.
Go download the official OH6 Odin package and extract the boot.img (kernel) from it.
Unpack the official kernel using the mkbootimg_tools, available here, replace the kernel file in the unpacked boot.img, and then repack it into a boot.img again. This boot.img would need to be tarballed and md5summed to be Odin flashable.
You'll want to remove the ,verify from both of these files in the ramdisk: fstab.samsungexynos7420 and fstab.samsungexynos7420.fwup
At the bottom of default.prop, you'll want to add these two lines:
Code:
ro.securestorage.support=false
androidboot.selinux=0
Building TWRP from source:
Setup your build environment for compiling Android.
Download the latest NDK, unpack, etc., etc. Mine ended up in ~/android/NDK.
Git clone the TWRP zerolte kernel source somewhere useful. Mine was cloned into ~/android/kernel:
git clone https://github.com/TeamWin/android_kernel_samsung_zerolte.git -b android-5.1 ~/android/kernel
The next several steps The next several steps are performed in & relative to this path.
Update the Makefile's CROSS_COMPILE to use the NDK toolchain. Mine ended up looking like this: /home/aou/android/NDK/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android- (to match my NDK path above - note I couldn't use the relative ~ path for /home/aou).
make exynos7420-zerolte_defconfig (ignore warnings about 'jump')
make -j# (replace # with number of CPU cores + 1)
Note the location of the output kernel - you'll need it in a little bit. In my case, it would be ~/android/kernel/arch/arm64/boot/Image.
Setup your Omnirom compile environment. Mine's in ~/android/omni. The next several steps are performed in & relative to this path.
Git clone the TWRP zeroltetmo device source into device/samsung/zeroltetmo:
rm -rf device/samsung/zeroltetmo && git clone https://github.com/TeamWin/android_device_samsung_zeroltetmo.git -b android-5.1 device/samsung/zeroltetmo
For some reason, TWRP doesn't build too well with the Omnirom's version of busybox. Replace the whole external/busybox folder with that from cm-12.1 source:
rm -rf external/busybox && git clone https://github.com/CyanogenMod/android_external_busybox.git -b cm-12.1 external/busybox
Remember that kernel we built? Rename/copy it to replace device/samsung/zeroltetmo/kernAl. In my case:
cp ~/android/kernel/arch/arm64/boot/Image device/samsung/zeroltetmo/kernAl
At this time (7/10/15), we need to cherry-pick a change by Dees Troy from the TWRP Gerrit. This is the stuff about forcing Read-Only mode on first boot, which will help with some of the boot-loop stuff (if you still have a stock kernel). You can grab the changes fairly easily using:
cd bootable/recovery && git fetch https://gerrit.omnirom.org/android_bootable_recovery refs/changes/15/14015/3 && git cherry-pick FETCH_HEAD && cd ../..
Since we're using Omnirom source and we're going to use lunch later, we need to create device/samsung/zeroltetmo/vendorsetup.sh. We can do that like this:
echo add_lunch_combo omni_zeroltetmo-eng > device/samsung/zeroltetmo/vendorsetup.sh
Do a . build/envsetup.sh (note the space between the period and "build" - was important for my environment).
lunch for omni_zeroltetmo-eng
make -j# recoveryimage (again, number of CPU cores +1)
Take that precious out/target/product/zeroltetmo/recovery.img and tarball/md5sum it to be Odin flashable.
Flash away!
Click to expand...
Click to collapse
Notes about accidentally causing a boot-loop:
The OF6/OF8/OH6 kernel, out-of-the-box, checks the hash/signature of your system partition. Modifying your system partition in any way (without flashing a custom kernel that does not perform this check) will cause your device to boot-loop.
Additionally, if you decide to use TWRP to mount your System partition read-write (despite warnings), upon exiting TWRP properly, it will make some changes to your system partition for you (namely, renames /system/recovery-from-boot.p to /system/recovery-from-boot.bak to prevent some systems from re-writing over your custom recovery). This would cause the boot-loop.
You obviously have some options to avoid causing a bootloop!
Option 1a: Flash my v4 kernel above. It does not have the hash/signature checks, plus it sets SELinux to permissive (allowing root!). You'll still need to root the device manually by flashing Chainfire's SuperSU.
Option 1b: Flash a different custom kernel that does not have these checks. The S6 UniKernel seems to work fine, for example.
Option 2: Don't modify your System partition, and don't let TWRP exit properly while you have the "read-only" checkbox unchecked (in the Mount screen).
Recovering from a boot-loop:
Something go wrong? Skip a step? No big deal. To get our device back in working order, you have a couple options:
Option 1: Flash the official OH6 firmware via Odin again. In my experience, the package DOES NOT wipe your data or sdcard partitions, so it really isn't that big of a deal to do. It just takes downloading a monster-size file, and the foreknowledge on how to flash it. But, caveat, don't blame me if something goes wrong with restoring the stock firmware!
Option 2: See Options 1a & 1b in the first list above. By flashing a custom kernel that doesn't have the hash/signature checks included, it should fix the boot-loop.
Click to expand...
Click to collapse
More Notes:
Huge thanks to @bigbiff for reading through prior versions of this post and updating the TWRP source code to work without device without the need of heavy modification. Additional thanks to @_that for his invaluable help in this project.
Click to expand...
Click to collapse
Hope this get resolved thanks soo much @Aou !
That's some progress made
Good to hear!
Nice work @Aou
Yay! Progress has been made! Congratulations, @Aou!
http://forum.xda-developers.com/showthread.php?t= check that out looks like root via a odin able unified kernel pre rooted and twrp
Sent from my SM-G925T using XDA Free mobile app
@tylerholbrook - I'm not sure what you're linking to? (broken link?)
And, to update everyone following this post, I've just uploaded v7 and a custom OF6 kernel, and replaced my DIY instructions with what I've done this time around. MUCH simpler with 2.8.7.0!
Also:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Is this proof enough for anyone that 5.1.1 does NOT lock the bootloader?
Aou said:
@tylerholbrook - I'm not sure what you're linking to? (broken link?)
And, to update everyone following this post, I've just uploaded v7 and a custom OF6 kernel, and replaced my DIY instructions with what I've done this time around. MUCH simpler with 2.8.7.0!
Also:
Is this proof enough for anyone that 5.1.1 does NOT lock the bootloader?
Click to expand...
Click to collapse
http://forum.xda-developers.com/gal...-stockmod-kernel-t3100395/page50#post61551321
try that one,, sorry, on my computer now. Its in the unified development section for the unified kernel.. They have a working TWRP for the non edge and there is a patched kernel that should give root for us when flashed in odin. If I read correctly. I'm still on 5.0.2 or I would test it, I just dont want to upgrade and it not work and be stuck having to flash the whole factory image. I need root for tethering ect..
---------- Post added at 08:34 AM ---------- Previous post was at 08:30 AM ----------
tylerholbrook said:
http://forum.xda-developers.com/gal...-stockmod-kernel-t3100395/page50#post61551321
try that one,, sorry, on my computer now. Its in the unified development section for the unified kernel.. They have a working TWRP for the non edge and there is a patched kernel that should give root for us when flashed in odin. If I read correctly. I'm still on 5.0.2 or I would test it, I just dont want to upgrade and it not work and be stuck having to flash the whole factory image. I need root for tethering ect..
Click to expand...
Click to collapse
@Aou somehow Sunderwear got another mysterious update OTA that was prerooted to my understanding... more info on that is in the TMobile galaxy s6 thread in the general section.
tylerholbrook said:
http://forum.xda-developers.com/gal...-stockmod-kernel-t3100395/page50#post61551321
try that one,, sorry, on my computer now. Its in the unified development section for the unified kernel.. They have a working TWRP for the non edge and there is a patched kernel that should give root for us when flashed in odin. If I read correctly. I'm still on 5.0.2 or I would test it, I just dont want to upgrade and it not work and be stuck having to flash the whole factory image. I need root for tethering ect..
---------- Post added at 08:34 AM ---------- Previous post was at 08:30 AM ----------
@Aou somehow Sunderwear got another mysterious update OTA that was prerooted to my understanding... more info on that is in the TMobile galaxy s6 thread in the general section.
Click to expand...
Click to collapse
I'll have to mess with those tomorrow. Thanks!
(okay, now I really need to go to bed! Work in the morning...)
Aou said:
I'll have to mess with those tomorrow. Thanks!
(okay, now I really need to go to bed! Work in the morning...)
Click to expand...
Click to collapse
Ha yeah no problem. Really hoping it works for us but they had success on the 920x versions as well as a fully working TWRP that could probably be used to branch and get yours fully working. Fingers crossed :good: Thanks for your hard work!
Bam. 5.1.1 root
Did you see bigbiff released a TWRP for the other guys where everything works. Should I test out v7? I just don't want a bootloop lol
ktetreault14 said:
Did you see bigbiff released a TWRP for the other guys where everything works. Should I test out v7? I just don't want a bootloop lol
Click to expand...
Click to collapse
For the other guys? Mind linking me up?
Adizzzle said:
For the other guys? Mind linking me up?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=3080940
The only missing piece of the puzzle
Thank you for having this so I didn't I'm have to reodin
Sorry a little confused here does that mean we have a new TWRP image available for the G925T/W8
Well I can't take a backup but it doesn't screw my boot up
ktetreault14 said:
Well I can't take a backup but it doesn't screw my boot up
Click to expand...
Click to collapse
Really? It didn't screw up your boot? Interesting...
In any event, the v7 I had uploaded last night was not actually v7. It was some bastardized hybrid of v6 and v7. I re-uploaded the REAL v7.
Still breaks System at this time, but I'm working on it. The TWRP for the international S6 seems to have pretty much all the same source as mine, at least what they're showing right now. I'll double check and verify some stuff.
As for root, great! I'm looking into baking the same thing into my kernel, so those who want to say closer to TMO stock can do so without fear. It's possible that the SuperSU flashable zip would work on 5.1.1 if we just set SEAndroid to "permissive" which is what I see that those guys are doing, primarily. The rest is just convenience - taking advantage of:
a) some emergency-flash feature that samsung has baked in (lets the device flash or execute something on boot, if it needs to), and
b) some modified int.rc script and injecting root and starting it with every boot.
I'm looking into this, and fixing my TWRP. Also looking into the feasibility of flashing/repairing the System partition from my existing v7 broken TWRP...
Aou said:
Really? It didn't screw up your boot? Interesting...
In any event, the v7 I had uploaded last night was not actually v7. It was some bastardized hybrid of v6 and v7. I re-uploaded the REAL v7.
Still breaks System at this time, but I'm working on it. The TWRP for the international S6 seems to have pretty much all the same source as mine, at least what they're showing right now. I'll double check and verify some stuff.
As for root, great! I'm looking into baking the same thing into my kernel, so those who want to say closer to TMO stock can do so without fear. It's possible that the SuperSU flashable zip would work on 5.1.1 if we just set SEAndroid to "permissive" which is what I see that those guys are doing, primarily. The rest is just convenience - taking advantage of:
a) some emergency-flash feature that samsung has baked in (lets the device flash or execute something on boot, if it needs to), and
b) some modified int.rc script and injecting root and starting it with every boot.
I'm looking into this, and fixing my TWRP. Also looking into the feasibility of flashing/repairing the System partition from my existing v7 broken TWRP...
Click to expand...
Click to collapse
Yeah it didn't break system. It also didn't let me backup. Though. Haven't tried other yet.

Categories

Resources