You might be able to simplify the whole thing by making the actual service command /system/bin/sh -c "settings ..." and triggering it at boot completed.
Even better, thanks!
You might be able to simplify the whole thing by making the actual service command /system/bin/sh -c "settings ..." and triggering it at boot completed.
Happy New Year!
Despite me being away on vacation here's a big update to module handling thanks to @nathanchance. If you are currently pushing modules with AK2 you will need to move the files under "modules/" to reflect their destination subfolder to avoid breakage, e.g. "modules/system/lib/modules/", "modules/system/vendor/lib/modules/" and/or "modules/vendor/lib/modules/"; this will be pretty future proof so was worth the while.
update-binary: Change how we handle modules:
https://github.com/osm0sis/AnyKernel2/commit/6b11373d4ae91b10ce4745e380ee3d4b440fbde6
README: Update documentation for modules:
https://github.com/osm0sis/AnyKernel2/commit/218b5774d26f1ff1c0acd3bec273153f5b529cb2
example: Update modules folder for new location handling:
https://github.com/osm0sis/AnyKernel2/commit/a0b6db2784a3cd121a4af768a68ec88fc97c550a
dalvikvm -cp BootSignature_Android.jar com.android.verity.BootSignature /boot boot.img verifiedboot.pk8 verifiedboot.x509.der boot_signed.img
dalvikvm -cp BootSignature_Android.jar com.android.verity.BootSignature -verify boot_signed.img
Here's another fix to modules with many thanks to @nathanchance, improved support for U-Boot uImage, and extends potential support to older Sony ELF devices.
Backend: Only apply contexts to new modules:
https://github.com/osm0sis/AnyKernel2/commit/b0b754c09453d353f123a70d67223fa290c63c18
Hi @osm0sis can we push modules systemless? Ive tried but had no luck
Where do you want them? You can put them in any directory the new way.
Yes, but it will override/replace the old modules, modifying system partition
hi @osm0sis
i'm working on Oreo Rom S8/S8+ .. I noticed that Anykernel2 sets OEM UNLOCK toggle off and then i can't enable it ...
Is this your choose ? is it possible to change something to get the toggle working on or off?
thanks for your great works
your last one ... AK2: fix insert_line wc/ash bad number error when missing file .... post #592It doesn't touch anything like that by default. (Sounds more like my Nexus BootUnlocker zip..) What AnyKernel2 zip are you referring to?
your last one ... AK2: fix insert_line wc/ash bad number error when missing file .... post #592
I'm saying that because i tried with only stock kernel and oem unlock toggle worked ... (but i had the problem with recovery) ... then i added your Anykernel2 and everything is good but i can't switch the oem toggle on ..... it's always off
i was wrong sorry .... my mistake , you are rightRight that doesn't make any sense though, since my example in the repo is for a Galaxy Nexus and has a null zImage, so you shouldn't be flashing it as-is on any device. So, again, what zip are you using? Also, that commit has nothing to do with anything life changing. Some people just found the wc/ash error unsettling despite AK2 working fine, but it does nothing except suggest the target rc file in the insert_line command is missing.
@osm0sis
So I've been working on porting an app but a problem I've run into is that is uses it's own service and rc file. I've got all of that taken care of, however, it requires the creation a selinux domain in sepolicy. The current tool I've been using (sepolicy-inject) doesn't have the capability for creating a new domain like magiskpolicy and supolicy do. Do you know of any way I can do this in twrp or tool I can use (boot scripts run too late so I have to patch sepolicy directly)? I've tried supolicy from supersu but it requires a lib which is a no go. Thanks!
kernel.string=KernelName by YourName @ xda-developers
do.devicecheck=1
do.modules=1
do.systemless=1
do.cleanup=1
do.cleanuponabort=0
device.name1=maguro
device.name2=toro
device.name3=toroplus
device.name4=tuna
supported.versions=6.0 - 7.1.2
supported.patchlevels=2019-07 -
supported.vendorpatchlevels=2013-07
block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;
is_slot_device=0;
ramdisk_compression=auto;
patch_vbmeta_flag=auto;
ui_print "<text>" [...]
abort ["<text>" [...]]
contains <string> <substring>
file_getprop <file> <property>
set_perm <owner> <group> <mode> <file> [<file2> ...]
set_perm_recursive <owner> <group> <dir_mode> <file_mode> <dir> [<dir2> ...]
dump_boot
split_boot
unpack_ramdisk
backup_file <file>
restore_file <file>
replace_string <file> <if search string> <original string> <replacement string> <scope>
replace_section <file> <begin search string> <end search string> <replacement string>
remove_section <file> <begin search string> <end search string>
insert_line <file> <if search string> before|after <line match string> <inserted line>
replace_line <file> <line replace string> <replacement line> <scope>
remove_line <file> <line match string> <scope>
prepend_file <file> <if search string> <patch file>
insert_file <file> <if search string> before|after <line match string> <patch file>
append_file <file> <if search string> <patch file>
replace_file <file> <permissions> <patch file>
patch_fstab <fstab file> <mount match name> <fs match type> block|mount|fstype|options|flags <original string> <replacement string>
patch_cmdline <cmdline entry name> <replacement string>
patch_prop <prop file> <prop name> <new prop value>
patch_ueventd <ueventd file> <device node> <permissions> <chown> <chgrp>
repack_ramdisk
flash_boot
flash_generic <partition name>
write_boot
reset_ak [keep]
setup_ak