Insecure and Kernel - Galaxy S III Q&A, Help & Troubleshooting

New to android.
What is the difference between Insecure and secure Kernel?
edit: found the answer. Please close thread.

What you mean is insecure kernel and stock kernel.
An insecure kernel has a security flag set to 0 to gain superuser rights in adb.

Related

[Q] Root (Read/Write to system) Access from Recovery?

How do I get Root (read/write) Access in Recovery? I'm running SGS II rooted using Chainfire 's insecure kernel on XWKE7.
I can only access Superuser via Shell...
If this has been discussed before, please direct me to where.
The point to this would be to be able to push/pull stuff to system on a device that won't boot cause I messed with the framework or something else.
+1 How to make read/write full access in recovery mode ?
Thanks
When using CF-Root, in recovery connect via ADB and type:
Code:
rootsh
at the console.
Yes but how to have root without rootsh.
For push directly in /system ?
Ah, I see.
For that you need a kernel that's running adbd as root.
CF-Root kernel runns adbd with normal user priv's and SUs it to root on the shell, so no go there.
Grab one of the kernels from the "insecure kernels for rooting" thread or my one (*points-to-sig*).
The insecure kernels always run adbd as root, my kernel runns adbd as root when in recovery (not on normally booted system).

rooted stock kernel & insecure kernel

hello all
can anyone tell me whats the difference between the rooted stock kernel and the insecure kernel !!!
cuz i need to use the ./adb remount , and it gives me permission denied ,
and i read somewhere that i need the insecure kernel since the rooted stock kernel doesnt give the permission for the ./adb and ./adb shell

[To Kernel Devs]Custom kernel|Zimage/boot.img issues at stock ROMs with stock kernel

I noticed for myself with custom ROMs there is no problem to flash a kernel zip
with Zimage or boot.img inside via recovery.Tried all available kernels and all works.
But if I do a restore to my rooted and S-Off stock ROM with stock kernel,
nothing works.First I flashed kernel zip with Zimage,then I got
Code:
Flashing New boot.img ...
assert failed: write_raw_image ("/tmp/newboot.img". "boot")
(Status 7)
Installation aborted
After this,I tried to flash a kernel zip with boot.img inside.This works,but
phone stuck at HTC splash image.
Also,after flashed the kernel zip with boot.img inside,the kernel zips with
Zimage inside works too,but also stucks at HTC splash image.
Phone details:
EVO 3D GSM, rooted by:
HBOOT 1.49.1107
revolutionary s-off
CWM 5.0.2.0
Any answers/solutions for this from the devs,why custom kernels don`t
work with rooted/S-Off stock ROM and stock kernel?
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
harpss1ngh said:
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Click to expand...
Click to collapse
So no solution to get a custom kernel working on rooted/S-Off stock ROM
with stock kernel?
harpss1ngh said:
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Click to expand...
Click to collapse
I could be wrong, but as far as I know this is partly true, although I might have misread.
I agree, completely 100% stock kernels from the manufacturer have secured kernels (boot images).
Ganii said:
So no solution to get a custom kernel working on rooted/S-Off stock ROM
with stock kernel?
Click to expand...
Click to collapse
The first 256 bytes of the kernel/boot.img are the signature/encryption on 100% stock kernels for this device. Since the first 256 bytes are encrypted, the standard Anykernel (zImage in .zip file with dd, etc.) method does not work. It will successfully dump the kernel from the boot partition but it will fail when parsing out the pieces due to the 256 bytes at the beginning, at least in previous/current state.
The only way I've seen to bypass this is by flashing an unsigned kernel. I've had success removing the first 256 bytes of the dumped/RUU kernel file and flashing. Once the user has an unsigned/unsecured kernel loaded in the boot partition, the Anykernel style (zImage, dd, mkbootimg.sh, etc) type kernel usually works.
These unsigned kernel files can be found in ROMs or separately in kernel .zip files, but they have to always be in the boot.img form the first time.
Some of this is my personal theory but it is based on my experiences. Welcome anybody else with experience to chime in, especially other kernel developers.
Hope my ideas make sense!
I also tried to flash boot.img,but doesn`t work.
http://forum.xda-developers.com/showpost.php?p=18686747&postcount=166
I think you might be typing the commands wrong. Have you tried
fastboot flash zimage??? Also did you unpack/unzip the .img to the correct directory??? Also did you do fastboot reboot boot loader???
Locked & Loaded
""Shooter on Deck""
Ganii said:
I also tried to flash boot.img,but doesn`t work.
http://forum.xda-developers.com/showpost.php?p=18686747&postcount=166
Click to expand...
Click to collapse
If the kernel is compiled and verifed working properly, flashing the boot.img should work as it completely overwrites the stock kernel image.
In comparison to the Anykernel method, where they dump the stock signed kernel and attempt to split out the ramdisk, cmdline and base, which will fail due to the 256 byte signature at the front of the kernel.
As a side note, I'm fairly certain it would be simple to modify the current tools, somebody might have already, to ignore the first 256 bytes of the kernel partition, and then use the rest of the image to split out the correct information. On a mass scale, the only hard part would be determining which kernels had 256 bytes of encryption/signed or which don't. The easiest solution would be to provide a flag to pass to the binary which splits out the imagine ... probably getting off topic.
Hope the extra details help clarify the process as far as I understand it!
Whats the fastest kernel out for the EXT3? And how about EXT4?

[Help] Build kernel from source and flash it

Hi,
I don't try to flood, just to increase my chance to have any help
I want to build a custom module for my GTi9300. Since the module need to be compiled whith the same kernel on the phone, i tried to build and flash a kernel from source (aka zImage). Since fastboot is not available on GS3, I just want an alternative tech to boot my gs3 with my built zImage.
I build the source from stock kernel samsung opensource database (update 8) and receive the zImage file.
I made a backup with cwm and unpack the boot.img with a perl script, then repack a new boot.img with my zImage as kernel and the ramdick from unpack but cannot boot with new package.
Could someone maybe give me a kernel source and the right corresponding package to boot it. Or maybe just a good way to make the whole process.
------------------------------------------------------------------------------------------------------------------------------
Moreover if someone can help me directly about the module, he's very welcome.
Without having the same kernel on the phone, I already tried to insmod my module. I've got first some version error, with the module_layout. Even if I correct it the module still doesn't load. In the kernel source, I modify the Subversion in the kernel to match with the one on the phone. But the compilation result add a "-gc33f1bc-dirty" to the end. Maybe I miss something to do before the compilation
Please post all questions in the Q&A section.
Thread Moved and Closed as you already have a thread going for this over there.

First Custom Kernel for a Tizen phone! [3.10.106] [Z2]

I AM NOT RESPONSIBLE IF YOUR PHONE DIES DUE TO THIS​
I have successfully created a custom kernel for the Samsung Z2! This is built from source using the linaro 4.9 gcc toolchain here: https://github.com/ne0z/tizen_toolchain_kernel
This will only work on the Samsung Z2, not any other tizen phone.
This has only been tested on the Z200F. I have not tried any other variant, but it should work.
In my testing, there hasn't been any difference in performance.
It is a "dirty" kernel because it is not officially signed by Samsung
This kernel is an upstreamed kernel, meaning that it has been updated to linux kernel 3.10.106. There are no other edits besides that.
Attached you will find the tar file which contains two files. dzimage and modules.img. You require both of them to boot the kernel. This is because Tizen does not use a boot.img or a recovery.img.
To flash the kernel, use either lthor or ODIN. ODIN is recommended. If you don't know what lthor is, it isn't for you.
Steps:
1) Boot your Z2 into Download mode
2) Load the tar file into ODIN in AP
3) Flash
4) Profit
To verify that you have the new kernel running properly, download AIDA64 from the tizen store and open the "Tizen" option. Scroll down to kernel version and you should see the new kernel version say "3.10.106-dirty"
Enjoy!
Source (use branch "edit"): https://github.com/Qiangong2/stock_kernel_3.10.65_sc9830_samsung

Categories

Resources