FORUMS
Remove All Ads from XDA

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

13,801 posts
Thanks Meter: 30,581
 
By osm0sis, Recognized Developer / Recognized Contributor on 5th March 2014, 03:32 AM
Post Reply Email Thread
21st August 2017, 04:29 PM |#511  
Senior Member
Thanks Meter: 190
 
More
Quote:
Originally Posted by osm0sis

That's because you still did this wrong by splitting it over 2 lines with no \:

Code:
replace_section /system/etc/init.qcom.post_boot.sh "#governor settings" " " "                #governor settings\n                echo 1 > /sys/devices/system/cpu/cpu0/online\n                echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor\n                echo 0 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay\n                echo 99 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load\n                echo 60000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate\n
                echo 652800 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq\n                echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy\n                echo "80 652800:57 1036800:67 1401600:75 1689600:9 1804800:85 1958400:87" > /sys/devices/system/cpu/cpufreq/interactive/target_loads\n                echo 0 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time\n                echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor\n                echo 652800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq\n"
Please reread my previous posts to you.

You also probably need to escape those " in the replacement string.


I've tried everything, doesn't seem to work. I also skipped the post_boot file and attempted to just adjust the build.prop values, also failed.
Thanks anyway, I'll make do with manually editing everything.
22nd August 2017, 09:33 PM |#512  
AndroidGX's Avatar
Inactive Recognized Contributor
Flag ★ Montpellier ★
Thanks Meter: 9,103
 
Donate to Me
More
Quote:
Originally Posted by osm0sis

You've got a couple methods confused. The patch/ folder is for snippets you want to prepend/append, so you'd want your full .rc file in the ramdisk/ folder instead.

The next problem I see is that your service and exec commands don't have contexts included, so could get SELinux denials, but try moving the file to the right place first and take it from there, trying a service first.

Thanks for your quick answer appreciated

I made many tries before posting this, and some things are working, some not, unfortunately.
I upload you my test.zip on this post, if you may take a look, it will be really appreciated once again
(on this zip, I intentionally removed zImage and deleted modules from modules folder for zip size upload)

The thing which is working is the following line from anykernel.sh :
Code:
insert_line default.prop "ro.sys.fw.bg_apps_limit=60" before "ro.secure=1" "ro.sys.fw.bg_apps_limit=60";
After booting, value is perfectly changed

But, it is another story for : patch>init.simplegx.rc :
None of both tweak lines are beeing applied. But init.qcom.rc looks to be correctly patched since I can see after "import init.qcom.test.rc" : "import init.simplegx.rc".

So, if you can tell me what is wrong in my zip, it will be really cool, I don't understand whats wrong on it (if you see any mistake from my part)

Many thanks for your precious help
Cheers'
AGX
Attached Files
File Type: zip test.zip - [Click for QR Code] (1.53 MB, 30 views)
23rd August 2017, 02:05 AM |#513  
attack11's Avatar
Senior Member
Flag Buenos Aires
Thanks Meter: 2,491
 
Donate to Me
More
Quote:
Originally Posted by AndroidGX

Thanks for your quick answer appreciated

I made many tries before posting this, and some things are working, some not, unfortunately.
I upload you my test.zip on this post, if you may take a look, it will be really appreciated once again
(on this zip, I intentionally removed zImage and deleted modules from modules folder for zip size upload)

The thing which is working is the following line from anykernel.sh :

After booting, value is perfectly changed

But, it is another story for : patch>init.simplegx.rc :
None of both tweak lines are beeing applied. But init.qcom.rc looks to be correctly patched since I can see after "import init.qcom.test.rc" : "import init.simplegx.rc".

So, if you can tell me what is wrong in my zip, it will be really cool, I don't understand whats wrong on it (if you see any mistake from my part)

Many thanks for your precious help
Cheers'
AGX

"init.simplegx.rc" should be in ramdisk folder, not in patch folder
The Following 3 Users Say Thank You to attack11 For This Useful Post: [ View ] Gift attack11 Ad-Free
23rd August 2017, 08:16 AM |#514  
AndroidGX's Avatar
Inactive Recognized Contributor
Flag ★ Montpellier ★
Thanks Meter: 9,103
 
Donate to Me
More
Quote:
Originally Posted by attack11

"init.simplegx.rc" should be in ramdisk folder, not in patch folder

I did that new test and now it works perfectly
I'm pretty sure that osm0sis was meaning this in his previous post, but my english is still limited and I didn't understood properly
So, thank you very much to both of you for your precious help, very appreciated
Cheers'
The Following 2 Users Say Thank You to AndroidGX For This Useful Post: [ View ] Gift AndroidGX Ad-Free
23rd August 2017, 02:19 PM |#515  
attack11's Avatar
Senior Member
Flag Buenos Aires
Thanks Meter: 2,491
 
Donate to Me
More
Quote:
Originally Posted by AndroidGX

I did that new test and now it works perfectly
I'm pretty sure that osm0sis was meaning this in his previous post, but my english is still limited and I didn't understood properly
So, thank you very much to both of you for your precious help, very appreciated
Cheers'

No prob, , glad it worked !
The Following User Says Thank You to attack11 For This Useful Post: [ View ] Gift attack11 Ad-Free
11th September 2017, 05:25 PM |#516  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,581
 
Donate to Me
More
Since AIK v2.9 will be coming out verrrry soon (just waiting on the new U-Boot..), here are the usual AK2 format updates and the fixes roll-up post for the last couple of months!

AK2: fix AVB signing:
https://github.com/osm0sis/AnyKernel...2fb7121f92def5

Backend: fix module copying on devices with links:
https://github.com/osm0sis/AnyKernel...8e6887566ec73c

Backend: miscellaneous fixes:
https://github.com/osm0sis/AnyKernel...2137d3ec7f7867

AK2: silence possible expected mount stderr with AVB signing:
https://github.com/osm0sis/AnyKernel...a7cfd719f7dbcf

AK2: rename pxa1088- AOSP variant tools to pxa- per upcoming AIK release:
https://github.com/osm0sis/AnyKernel...7d0e2c2c747a67

AK2: add DHTB signed image support:
https://github.com/osm0sis/AnyKernel...37df6664598c3d

README: optional binaries update:
https://github.com/osm0sis/AnyKernel...f60191697690c3

tools: update to latest builds, including busybox (1.27.2):
https://github.com/osm0sis/AnyKernel...0b730bdb0e26f8

AK2: add KRNL and NOOK signed image support:
https://github.com/osm0sis/AnyKernel...42b229fd02842d

README: add rkcrc to optional binaries:
https://github.com/osm0sis/AnyKernel...e44fe11ad6f5a5

Worth noting those two Backend commits finally fix wifi module replacement on OnePlus devices.

Edit: Haha of course they finally push the U-Boot update after I leave town for a couple days..
The Following 7 Users Say Thank You to osm0sis For This Useful Post: [ View ]
22nd September 2017, 04:41 AM |#517  
Senior Member
Thanks Meter: 283
 
More
Does it work for Android 8.0 Oreo?
22nd September 2017, 05:21 AM |#518  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,581
 
Donate to Me
More
Quote:
Originally Posted by mrmathematica

Does it work for Android 8.0 Oreo?

Why wouldn't it?
22nd September 2017, 06:56 AM |#519  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,581
 
Donate to Me
More
A few more fixes now that AIK v2.9 is out and I've had a bit more time to work on polishing AK2 again.

AK2: fix abort ui_prints from slot detection checks:
https://github.com/osm0sis/AnyKernel...4338a49e8974cb

Backend: fix -debugging functionality on abort, clean up abort:
https://github.com/osm0sis/AnyKernel...478752d829137c

AK2: fix patch_fstab substring replacement:
- the 'original string' ($5) was not being used, instead the entire part was always being replaced with the 'replacement string' ($6)
- replace the target 'original string' of the entry part with 'replacement string' as expected/intended

NOTE: any properly written patch_fstab commands with original string as the complete original entry part WILL remain working as this is a backwards compatible change in that circumstance

https://github.com/osm0sis/AnyKernel...7adc55d84c9aa7


The new dhtbsign binary necessary to enable Samsung/Spreadtrum DHTB signing support, the new rkcrc binary to enable Rockchip KRNL ramdisk image support, the updated pxa-unpackbootimg/pxa-mkbootimg binaries for Samsung/Marvell PXA variant boot.img support, as well as updated binaries for architectures other than ARM are, as always, available in my latest AIK-mobile package.
The Following 15 Users Say Thank You to osm0sis For This Useful Post: [ View ]
14th October 2017, 07:21 PM |#520  
osm0sis's Avatar
OP Recognized Developer / Recognized Contributor
Flag Halifax
Thanks Meter: 30,581
 
Donate to Me
More
Quiet in here. Presumably no news is good news and all is working well.

Example: clean ups and fixes for current functions:
https://github.com/osm0sis/AnyKernel...a3d46ef3eac5d2

anykernel: be clear ownership is also necessary to be set:
https://github.com/osm0sis/AnyKernel...43747b3c6e2d78

AK2: improve cpio ramdisk unpacking:
https://github.com/osm0sis/AnyKernel...8ff7830592c0a0

AK2: Improve patch_fstab:
https://github.com/osm0sis/AnyKernel...a4e656d31d5f7a

AK2: Sanitize patch_fstab for proper commas:
https://github.com/osm0sis/AnyKernel...9709cfee62e4d8

AK2: Allow users to use either "" or " " for empty strings:
https://github.com/osm0sis/AnyKernel...1c9e97aabe7c32

Naturally you don't really need to worry about the example update if you've already customized.

Thanks @nathanchance for the further fixes/improvements to patch_fstab, allowing use of an empty replacement string ("" or " ") to remove a flag/option, and updating replace_section and remove_section to also allow "" (in addition to the previous " ") for their next-blank-line matching.
The Following 11 Users Say Thank You to osm0sis For This Useful Post: [ View ]
25th October 2017, 06:02 AM |#521  
Member
Thanks Meter: 55
 
Donate to Me
More
I was thinking of using anykernel2 to patch multiple roms but just not with one zImage, multiple in fact. One for an S8 Port then a N8 Port and NFE and also stock roms. Compile some different kernel zImages for different rom bases and make anykernel2 identify what rom the user is using and install thd appropiate zimage.

Sorry if it didnt make much sense but if you could give some info on what lines to start with in anykernel.sh?
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