FORUMS

[DEV][TEMPLATE] AnyKernel3 - Easily Mod ROM Ramdisk + Pack Image.gz [Flashable Zip]

13,899 posts
Thanks Meter: 30,850
 
By osm0sis, Recognized Developer / Recognized Contributor on 5th March 2014, 03:32 AM
Post Reply Email Thread
24th January 2020, 08:59 PM |#891  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,850
 
Donate to Me
More
Next up!

My development work on my many projects comes out of my free time, so if you enjoy this project or anything else I've done on xda, please consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thank you for your support!

AK3+Backend: introduce systemless kernel modules support:
- with do.systemless prop enabled in anykernel.sh, will push the contents of modules/ to create a simple "ak3-helper" Magisk module, where testing on devices thus far shows it loads early enough that even replacement kernel object .ko modules will get loaded
- the ak3-helper module info is populated from the kernel.string and parsed kernel version from the kernel being flashed, and if at boot time a different kernel is detected the module automatically removes itself before being loaded to avoid conflicts
- since logical partitions and ext4-dedup on Android 10 now prevent mounting /system or /vendor rw under any circumstances, this feature gives kernel developers back the freedom they had before all this to improve kernel .ko modules, .conf files, etc. with the added bonus of it cleaning up after itself

https://github.com/osm0sis/AnyKernel...e711dad4848690

anykernel: add do.systemless:
https://github.com/osm0sis/AnyKernel...f59c4b8bee2410

README: document do.systemless, update and sync with XDA thread:
https://github.com/osm0sis/AnyKernel...cc6e649db19421

Backend: fix link restoration post-install:
https://github.com/osm0sis/AnyKernel...74c776e0b86f37

Backend: overdue clean up and refactor:
https://github.com/osm0sis/AnyKernel...a86c041623c0f8

Backend: work around ongoing TWRP SAR support fragmentation:
https://github.com/osm0sis/AnyKernel...092f09e380e825

Backend: put debugging down where it belongs too:
https://github.com/osm0sis/AnyKernel...c6200f68ea7dbf

Backend: fixes for mounting system on Lineage Recovery:
https://github.com/osm0sis/AnyKernel...8c9eb386c322a6

Thanks @eng.stk for his extensive time and help testing out whether replacing .ko files would even work during the development of this feature!

Happy hacking!
The Following 6 Users Say Thank You to osm0sis For This Useful Post: [ View ]
26th January 2020, 07:18 AM |#892  
Senior Member
Thanks Meter: 100
 
More
Hi All, anyone can help to patch default.prop for a/b devices? I using lineageos-16.0 official and this rom is detect native root, i think its for ro.secure and ro.debuggable.

Yes, i dont want using Magisk.

Thanks for advance.
26th January 2020, 08:03 AM |#893  
Senior Member
Ngayogyakarta Hadiningrat
Thanks Meter: 51
 
Donate to Me
More
Quote:
Originally Posted by ImNotThere

Hi All, anyone can help to patch default.prop for a/b devices? I using lineageos-16.0 official and this rom is detect native root, i think its for ro.secure and ro.debuggable.

Yes, i dont want using Magisk.

Thanks for advance.

Yes, mine too
26th January 2020, 02:47 PM |#894  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,850
 
Donate to Me
More
Quote:
Originally Posted by ImNotThere

Hi All, anyone can help to patch default.prop for a/b devices? I using lineageos-16.0 official and this rom is detect native root, i think its for ro.secure and ro.debuggable.

Yes, i dont want using Magisk.

Quote:
Originally Posted by WongJawa

Yes, mine too

It's in the system partition on A/B devices, so you either need to mount system rw (which isn't possible at all anymore on devices with logical partitions), or use Magisk.
The Following 2 Users Say Thank You to osm0sis For This Useful Post: [ View ]
26th January 2020, 07:20 PM |#895  
fbs's Avatar
Senior Member
Flag not in brazil
Thanks Meter: 986
 
Donate to Me
More
ramdisk modification doesnt seem to work on android 10 because it uses ramdisk with system image, not with kernel image
26th January 2020, 08:29 PM |#896  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,850
 
Donate to Me
More
Quote:
Originally Posted by fbs

ramdisk modification doesnt seem to work on android 10 because it uses ramdisk with system image, not with kernel image

Uhh with SAR there's either a 2-stage init ramdisk, boot-as-recovery ramdisk (A/B), or no ramdisk (A-only). In any of those cases you can't modify the root directory files of booted Android since they're in the system partition (system-as-root), so your options are as I explained in my last post.
26th January 2020, 09:06 PM |#897  
fbs's Avatar
Senior Member
Flag not in brazil
Thanks Meter: 986
 
Donate to Me
More
Quote:
Originally Posted by osm0sis

Uhh there's either a 2-stage init ramdisk, boot-as-recovery ramdisk (A/B), or no ramdisk (A-only). In any of those cases you can't modify the root directory files of booted Android since they're in the system partition (system-as-root), so your options are as I explained in my last post.

but.. help me understand something, please.. after booting my S5 (with android 10), I CAN remount / as RW and modify it, but these modifications won't stick. Isn't it because / is a ramdisk as before? Why can't it be modified by anykernel in a way similar that was done before?

I thought the only difference in 10 was that the ramdisk image was saved on the same partition as the system, instead of kernel's partition.
26th January 2020, 09:06 PM |#898  
Pierre2324's Avatar
Senior Member
Thanks Meter: 1,634
 
Donate to Me
More
Hi @osm0sis ,
I was wondering, you said .rc files in overlay.d are appended to rom rc files. But where are located the kernel's .rc file after boot? They are not placed in root🤔
26th January 2020, 10:54 PM |#899  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,850
 
Donate to Me
More
Quote:
Originally Posted by fbs

but.. help me understand something, please.. after booting my S5 (with android 10), I CAN remount / as RW and modify it, but these modifications won't stick. Isn't it because / is a ramdisk as before? Why can't it be modified by anykernel in a way similar that was done before?

I thought the only difference in 10 was that the ramdisk image was saved on the same partition as the system, instead of kernel's partition.

No. Not at all. They're in the system partition. Since they don't "stick" you changing them is probably just you changing them in Magisk's booted version of the root directory, which is not the same as the real one.

Quote:
Originally Posted by Pierre2324

Hi @osm0sis ,
I was wondering, you said .rc files in overlay.d are appended to rom rc files. But where are located the kernel's .rc file after boot? They are not placed in root🤔

Check at the bottom of /sbin/.magisk/rootdir/init.rc
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
27th January 2020, 01:27 AM |#900  
Senior Member
Thanks Meter: 100
 
More
Quote:
Originally Posted by osm0sis

It's in the system partition on A/B devices, so you either need to mount system rw (which isn't possible at all anymore on devices with logical partitions), or use Magisk.

Thanks for confirm, Sir.
27th January 2020, 02:39 AM |#901  
Senior Member
Ngayogyakarta Hadiningrat
Thanks Meter: 51
 
Donate to Me
More
Quote:
Originally Posted by osm0sis

It's in the system partition on A/B devices, so you either need to mount system rw (which isn't possible at all anymore on devices with logical partitions), or use Magisk.

Wait, for me. Now i use Mi-a1 LineageOS-16.0 official. And its possible to patch default.prop using anykernel, Dude?

On redmi2, redmi note3, redmi note4, my simple patch is succes using anykernel. But i try to patch on mi-a1 a.k.a tissot its not change anything.
Post Reply Subscribe to Thread

Tags
anykernel, flashable zip, kernel, scripting, template

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes