FORUMS
Remove All Ads from XDA

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

13,802 posts
Thanks Meter: 30,583
 
By osm0sis, Recognized Developer / Recognized Contributor on 5th March 2014, 03:32 AM
Post Reply Email Thread
11th October 2019, 07:01 AM |#861  
sdeft's Avatar
Senior Member
Thanks Meter: 117
 
More
Quote:
Originally Posted by osm0sis

Nope. Per the Magisk documentation any .rc in overlay.d becomes appended to the live init.rc during boot (later hidden), and anything in overlay.d/sbin will be created. Anything at any other path will only replace if the file is already in the root when booted.

Yes you are right. I missed the concatenated in "All *.rc files in overlay.d will be read and concatenated AFTER init.rc"
12th October 2019, 01:37 AM |#862  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,583
 
Donate to Me
More
SAR Magisk just went stable (v20) so it's time to ideally transition from overlay to overlay.d for kernel developers. If they don't seem to be following here then point them here and to my example zip and posts.
12th October 2019, 04:03 AM |#863  
jprimero15's Avatar
Recognized Developer
Flag Oof
Thanks Meter: 3,576
 
Donate to Me
More
I did put the files on ramdisk/overlay.d and my files didn't replace the files on ramdisk... This seems not to work well with legacy devices on Android 10.
12th October 2019, 04:25 AM |#864  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,583
 
Donate to Me
More
Quote:
Originally Posted by jprimero15

I did put the files on ramdisk/overlay.d and my files didn't replace the files on ramdisk... This seems not to work well with legacy devices on Android 10.

Upload your zip where it isn't working for you, and an `ls -al /` from when booted.
12th October 2019, 06:23 AM |#865  
jprimero15's Avatar
Recognized Developer
Flag Oof
Thanks Meter: 3,576
 
Donate to Me
More
Quote:
Originally Posted by osm0sis

Upload your zip where it isn't working for you, and an `ls -al /` from when booted.

Here is the zip: https://pixeldrain.com/api/file/EdRjkdzB?download

And here is the output of ls -al: https://del.dog/disobenada

Just some info: Im Using Lineage 17.0
12th October 2019, 06:35 PM |#866  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,583
 
Donate to Me
More
Quote:
Originally Posted by jprimero15

Here is the zip: https://pixeldrain.com/api/file/EdRjkdzB?download

And here is the output of ls -al: https://del.dog/disobenada

Just some info: Im Using Lineage 17.0

So I'm seeing a few problems here. Mainly that you can't add new files like you have since new files must be in sbin, so if you need to add that .sh it needs to be in there and called from there.

What are you changing in your fstab, init.qcom.rc, init.target.rc and uevent.qcom.rc? You have the entire files there which is not best practice, e.g. what if someone flashed this on a different ROM?

The whole replacing existing files thing might not work (@topjohnwu surprised me with that one in the documentation), all I can guarantee from my testing is that any files added to sbin are added and any .rc files will be combined into the live init.rc at boot time like I was saying.

You can even check to see this occurred after flashing and booting by looking at /sbin/.magisk/rootdir/init.rc

So once again, check out my example zip and directions I've provided above.

Here's a tweaked version of your zip which should work for you to try also.

[ Attachment removed. ]
The Following User Says Thank You to osm0sis For This Useful Post: [ View ]
15th October 2019, 08:32 AM |#867  
Member
Thanks Meter: 23
 
More
sir where can i get magiskboot and magisk policy from magisk v20??? i have v20.1 canary, can i use that magiskboot to patch for android 10??? cause in android 10 , magiskboot cant be patched with latest anykernel feature which use magiskboot from magisk 19.4
15th October 2019, 12:58 PM |#868  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,583
 
Donate to Me
More
Quote:
Originally Posted by zae857

sir where can i get magiskboot and magisk policy from magisk v20??? i have v20.1 canary, can i use that magiskboot to patch for android 10??? cause in android 10 , magiskboot cant be patched with latest anykernel feature which use magiskboot from magisk 19.4

So that's a pretty dramatic post and light on details. The 19.4 canary tools currently included can patch an Android 10 boot.img (i.e. header v2) just fine, the only major change to magiskboot after the one I've included is support for some additional dtb formats but that shouldn't really affect Android 10 support.

There is currently a bug in stable v20 and Canary magiskboot that triggers vbmeta errors on a variety of devices (mostly Samsung QCom) so I'm waiting on that to be fixed in one of the release channels and doing my own regression testing of the big rewrite before updating the included AK3 versions.

Don't rush to update things because the numbers are higher, make sure you know what you're talking about.
15th October 2019, 02:39 PM |#869  
Member
Thanks Meter: 23
 
More
Quote:
Originally Posted by osm0sis

So that's a pretty dramatic post and light on details. The 19.4 canary tools currently included can patch an Android 10 boot.img (i.e. header v2) just fine, the only major change to magiskboot after the one I've included is support for some additional dtb formats but that shouldn't really affect Android 10 support.

There is currently a bug in stable v20 and Canary magiskboot that triggers vbmeta errors on a variety of devices (mostly Samsung QCom) so I'm waiting on that to be fixed in one of the release channels and doing my own regression testing of the big rewrite before updating the included AK3 versions.

Don't rush to update things because the numbers are higher, make sure you know what you're talking about.

thx sir
30th October 2019, 05:48 AM |#870  
jprimero15's Avatar
Recognized Developer
Flag Oof
Thanks Meter: 3,576
 
Donate to Me
More
Quote:
Originally Posted by osm0sis

So I'm seeing a few problems here. Mainly that you can't add new files like you have since new files must be in sbin, so if you need to add that .sh it needs to be in there and called from there.

What are you changing in your fstab, init.qcom.rc, init.target.rc and uevent.qcom.rc? You have the entire files there which is not best practice, e.g. what if someone flashed this on a different ROM?

The whole replacing existing files thing might not work (@topjohnwu surprised me with that one in the documentation), all I can guarantee from my testing is that any files added to sbin are added and any .rc files will be combined into the live init.rc at boot time like I was saying.

You can even check to see this occurred after flashing and booting by looking at /sbin/.magisk/rootdir/init.rc

So once again, check out my example zip and directions I've provided above.

Here's a tweaked version of your zip which should work for you to try also.

[ Attachment removed. ]

After testing this.. It works but it doesn't execute very last even tho its on property:sys.boot_completed=1 .. Now i want my script on .rc to run when all .rc scripts on root is executed... How can i do that?
30th October 2019, 08:10 AM |#871  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,583
 
Donate to Me
More
Quote:
Originally Posted by jprimero15

After testing this.. It works but it doesn't execute very last even tho its on property:sys.boot_completed=1 .. Now i want my script on .rc to run when all .rc scripts on root is executed... How can i do that?

It probably does run, just perhaps whatever changes you're making might still be getting overwritten by something later.

I have no idea what your question means, so I can't help you there.
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