how to add root to stock kernel - Miscellaneous Android Development

hi
i want to know which files must be add and which file must be edit in stock boot to make it autoroot?

i have edited
cpiolist
bootinfo.txt
init.rc
file_contexts
default.prop
and add su folders and files in
sbin
what to do more?

Related

[Q] where do i find the beni_rev01_defconfig file ?

so...another question...
what is the beni_rev01_defconfig file and where can i find it ?
i want to make changes to the boot.img file to make it accept the ext part.
i unpacked the boot.img file...so i have the zimage file and the ramdisk file.
i found the init file, and added the code . but i cant find the beni_rev01_defconfig .
here is the link for where i got the code for this
http://forum.xda-developers.com/showpost.php?p=21885765&postcount=5

[Q] What I need to compile a kernel that runs with Android 5.1?

Hi all,
I have a phone that is not popular and therefore it has no custom ROMs for it. I have managed to install a cwm from a similar phone and it worked. I have managed to install Android 5.1.1 too from a other similar phone (I've changed the paths in the flashable zip so it recognizes the /system and the /data partition). Now I'm stuck with the kernel. With the stock kernel, the phone doesn't boot, because it was designed for Android 4.4.4. I have managed to decompile the "boot.img" on my Ubuntu pc and now I have a folder with a few files... What I have to change in that folder to make it compatible with Android 5.1.1? I have following files in the decompiled "boot.img" folder:
boot.img-base
boot.img-cmdline
boot.img-pagesize
boot.img-ramdisk.gz
boot.img-zImage
I've decompiled the boot.img-ramdisk.gz and that showed more files:
data/
dev/
proc/
sbin/
sys/
system/
default.prop
file_contexts
fstab.qcom
init
... and so on
Now I know that I have to change some of those files to make it compatible, but I don't know which.
Any help is much appreciated.

Boot.img init.rc write files to folder and make them executable

Need some help. I'm trying to do this thing. Repack boot.img (unpack image, unpack ram archive, modify it, add my files to image, pack ram, pack boot.img). Flash my own repacked boot.img with heimdall to device, everything was okay, i can see files on my device after reboot. But when I try to start my file /my_bin it write 'Permission denied', same thing when I try to read it with cat (for example, cat /my_bin). Rights for file are 755 (rwxr-xr-x), everybody can run it. If i understand correctly SELinux configuration restrict my access to this files. I'm trying to copy /my_bin file in init.rc to different folder, but this doesn't help. Can i modify SELinux context from init.rc or modify it when repacking boot.img (i'm think contexts are in file_contexts.bin, but i don't know yet how to modify this binary file). Or something else?
Nobody?

Changing file permissions under /sys (SELinux, file_contexts)

Hi,
I'm building a custom boot.img for GT-I9195I with some modified permissions.
I would like to change some permissions under /sys (which by default have the 'sysfs' SELinux permissions).
I edit file_contexts and change the relevant permissions from 'sysfs' to some other group (for example 'input_device').
However, when I flash and boot my Android, 'ls -Z' still displays 'sysfs' permissions for the modified files.
Editing file_contexts to change SELinux permissions seems to work for any other file outside /sys.
I tried running 'restorecon -R /sys' from init.rc with no luck.
Is there anything special about /sys? Who's enforcing 'sysfs' permissions on /sys, regardless of file_contexts?
Thanks!

Edit Build.prop with Carliv Kitchen??

hi all i have unpacked my boot.img with Carliv image kitchen. went to RamDisk folder and edited my build.prop.. repacked then flashed and rebooted phone.. but the changes dont seem to take affect..
i changed
ro.system.build.type=user to userdebug
ro.build.type=user to userdebug
ro.build.system_root_image=False to true
ro.secure=1 to 0
ro.adb.secure=1 to 0
ro.debuggable=0 to1
dont seem to do anything.. i went into the system with X-plorer and looked at build.prop and all is back to normal. so i unpack pulled the boot.img and and looked its the way i edited it.. i know im doing something wrong JUST learning.. thanks
AFAIK build.prop is housed in system.img and/or vendor.img or in both.
jwoegerbauer said:
AFAIK build.prop is housed in system.img and/or vendor.img or in both.
Click to expand...
Click to collapse
hmmm i will check that out thank you
this is whats in the main oem rom.
well i tried to open all the .img files with carliv but no luck says something about header 4.0 or higher not supported
ok booted into recovery and tried the option ( mount /system) .. says E:Couldn't access state file. what now

Categories

Resources