Looking for a guide or tutorial to modify init stuff - General Questions and Answers

Hello,
I have a pixel 6a with Android 13. I'm trying to start a hello world service/daemon that just loops at boot.
From what I've been reading, it seems like I have to add a rc file to /system/etc/something(?). I tried to add a rc file to it, but it's read-only
So it seems like I have two choices. Download a factory image, unpack system.img, mount it, add a rc file, repack it, and flash it or add cpio file to boot.img like Magisk.
Am I understanding this right or is there a simpler way?
Thanks!

Look inside here:
[GUIDE] How To Add Init.d Support to Your Kernel & Rom
What is init.d ? Init.d is a feature which allows you to run brunch of scripts at boot . Thats really useful while you want to set values which reset at boot or run/do any thing at every boot or install tweaks , engines and.... There are some...
forum.xda-developers.com

jwoegerbauer said:
Look inside here:
[GUIDE] How To Add Init.d Support to Your Kernel & Rom
What is init.d ? Init.d is a feature which allows you to run brunch of scripts at boot . Thats really useful while you want to set values which reset at boot or run/do any thing at every boot or install tweaks , engines and.... There are some...
forum.xda-developers.com
Click to expand...
Click to collapse
looks like a very old guide, though...
Will it work with newer Android versions (e.g: 13)?

Take note that the Android platform consists of the Linux kernel and the Android API Framework.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
When a mobile device gets powered o then as 1st thing the Linux kernel gets loaded and its code gets processed - and not the Android framework, hence at this time it's irrelevant what Android OS version - what gets loaded and its code gets processed after boot-up is completed - is present on moile device.

jwoegerbauer said:
Look inside here:
[GUIDE] How To Add Init.d Support to Your Kernel & Rom
What is init.d ? Init.d is a feature which allows you to run brunch of scripts at boot . Thats really useful while you want to set values which reset at boot or run/do any thing at every boot or install tweaks , engines and.... There are some...
forum.xda-developers.com
Click to expand...
Click to collapse
Thanks for the guide!
But will it work on Android 13 though?
I know boot.img for Android 13 no longer contains system stuff

Related

[MOD] Add init.d Scripting Support

I didn't make this, the original creator is "DooMLoRD", I just found that it works for our version of the One X as well!
DooMLoRD said:
[ info ]
i am attaching a easy to run package which contains the files required for full functionality of executing startup scripts (init.d scripts)...
basically this will allow the user to execute custom shell scripts, placed in /system/etc/init.d/ folder and they will be executed on each boot!
Please note that some custom ROMs/Kernels already have this feature... This addon is ment to be used on STOCK ROM...
[ requirements ]
stock rooted ROM
windows PC with adb drivers installed
[ how to install ]
download the provided zip package
save it on c:\
extract the contents of the package
connect phone with usb debugging active to PC via ADB
execute "runme.bat"
follow onscreen instructions & enjoy!
incase some issue is there post the output/log of script
[ additional info ]
i have added the following things in the package:
corrected /system/bin/sysint file
run-parts binary in /system/xbin/run-parts (which is basically busybox 1.19.3 binary)
correct /system/etc/install-recovery.sh file (this file gets executed by default on stock kernel too!)
test/example script /system/etc/init.d/99test
to check if this is working the test script (99test) will create a temporary file /data/local/tmp/init.d_log_test.txt on each boot
[ donations ]
if u feel that this work has helped u OR u think that the work i put into making this is worthy of donations, then click on the following link for buying me some coffee/beer/etc
PAYPAL DONATION LINK
[ download link ]
generic-init.d-support-v01.zip (mirror)
MD5HASH: 4cd2606280524aa96af9d486ce90ea7e
OR
generic-init.d-support-v01.zip
MD5HASH: 2eda273af4b91c34f868807820cceaee
let me know how it goes!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ENJOY!
Click to expand...
Click to collapse
So just follow the instructions after downloading the package below. I'll try making a CWM flashable file when I get home.
I will also port over some nice CPU scaling tweaks from my other devices and some nice maintenance scripts.
So how does this do this without modding init.rc in ramdisk? Or does it? I cant look, just wondering how it works.
scrosler said:
So how does this do this without modding init.rc in ramdisk? Or does it? I cant look, just wondering how it works.
Click to expand...
Click to collapse
He's running sysinit via /system/etc/install-recovery.sh
Very nice!
Thanks for sharing this useful script. it worked for me on MIUI Sensation sense base rom.

[MOD/THEME]Off Screen Charging MOD

Before We Start
Disclamer:​
By doing his to your phone you take full responsibility to whatever happens on your device. The developer will NOT be held responsible to whatever happens on your device. Of course, this has been tested but whatever happens on your device will not be held against the developer.
Now to the good stuff
Today I Will Show You How To Modify The Off Screen Charging Images To Your Liking
Things you will need :​
[*]M8 Duh
[*]Computer With Fastboot
[*]A Photo Editor
[*]A Tool To Unpack Recovery.img's
[*]About 10 to 30min of your time
Common Sense
So Lets Get Started​First Decompile Your IMG I will Be Using This To Decompile My IMG
if your using the same tool as me then drag and drop the img on unpack.bat as seen in the picture
next navigate​ramdisk
res
offmode_charging_images
this is where we will be doing our modifying :laugh:
Now that you have your img decompiled and your in the offmode_charging_images folder
open up your fave image editor I will be using gimp(because its free and im broke lol)
key things here I kept my images at stock depth 600x362 I did not go any higher as I would think it would mess up you can try your self if you can go higher tell ME!!!
Now if you made pngs the format go's like this 0,1,2,3,4 the rest 5,6,7,8 and 9 just loop the first ones so just copy them and rename if you did not make new pngs just overwrite them
once your done messing with the pngs repack the imgs with the unpackimg.bat
now take image-new.img and put it in your fastboot folder and flash it with fastboot
Code:
flash recovery image-new.img
*NOTE* check to see if you can get in to recovery after flashing your new one
if not you messed up some where​
now power down your device and plug it in if you see your new modified images congrats
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here Is One I Made
​Images
Download
Vertical Battery TWRP Version 2.7.1.0
*NOTE* This was A Recovery Built From @Captain_Throwback Here As Said In the FAQ It Should Work For Most M8
Credits
 @osm0sis for his awesome image unpacker
 @Captain_Throwback For The Recovery :good::good::good:​
I'll take this one
Hello sir, can u make such custom mod for htc desire eye please
armaankhan354 said:
Hello sir, can u make such custom mod for htc desire eye please
Click to expand...
Click to collapse
the same method could be applied to any device with the images being in the recovery
so I believe you can do it your self
Ok sir, thank you for such mod....really appreciate your work
I was wondering if this was possible and low and behold here it is! kind regards sir flashalot

Baa's Android Kitchen - Auto Porting Tool for MT6580 Kernel 3.18.19

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Baa's Android Kitchen
Auto Porting Tool for MT6580 Kernel 3.18.19
Porting Method From Nana Iyke Quame
Download Link: drive.google.com/open?id=0BwNegVZnDr-QMVhNYktTUWhBSkU
Requirements:
Must have any text editor to edit build.prop and updater-script
How to use:
REMEMBER TO EXTRACT THE TOOL IN C:\ TO AVOID SCRIPT ERRORS.
1.Place the stock boot.img,system.img, and the rom you want to port to the dedicated folder.
2.Open the tool and select option 1. Wait for it to finish and then go back to the main menu.
3.After option 1 has finished gathering the needed files, select option 2, then select what type of porting method you want to apply.
AOSP BASIC - ports etc\firmware and mdbb only (Preferable if you just want to boot the rom then fix bugs later.)
AOSP FULL - ports bin, ports etc\firmware and mdbb, ports lib, ports vendor (Porting method with bug fixes applied, but can sometimes cause loop in some roms)
CM-BASED BASIC - ports etc\firmware and mdbb only (Preferable if you just want to boot the rom then fix bugs later.)
CM-BASED FULL - ports etc\firmware and mdbb and ports lib ((Porting method with bug fixes applied, but can sometimes cause loop in some roms)
3. After porting method is applied.Go back to the menu and select option 3, then manually edit the build.prop and updater script to your liking.
4. After you have finished editing, select the build option. After building, move the rom zip to your phone then flash
Note:
1.Make sure to place all files in their needed directories for script to successfully locate your files and proceed without errors
2.You have to manually edit build.prop and updater-script values based on your liking and needs.
3.Only use the delete all dependencies option after you have finished/ have flashed the ported rom because it will also delete the file you have finished building.
I hope you like my simple tool I have put many hours to make this
If you have something to add in this tool feel free to suggest and help.
I made it using Notepad++ for batch scripting and Quincy 2005 for C language codes
If you feel that I have helped you and you liked my tool feel free to donate, it will greatly help my studies Just inbox me, I dont have paypal atm still 17
Screenshots:
Proof: Lineage OS 13 Auto Ported with this tool
Special thanks to:
Nana Iyke Quame, droidpeepz, darkcyanidedevs, mt6580 development and porting, xda-developers, 4pda​
LOS 13 is Android 6? how i port LOS rom to Blu Vivo 5 Mini?

[ ZIP INSTALLER - Mount as RW ] Dynamic Installer V3.4 [ Android 10+ or earlier ]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ABOUT THIS:
Recovery or Magisk module installer compatible with multiple Android devices such as different types of partitions, both traditional and new partitions (Focused on the creation of normal and universal flash files)
MOVED TO:
[ZIP - Dual Installer] Dynamic Installer Stable 4.7-b3 [ Android 10+ or earlier ]
SUPPORT: TELEGRAM CHANNEL - TELEGRAM GROUP - SUPPORT ME ABOUT THIS: With this you can make Automatic Installers (.ZIP flash files) for All Android devices without limitations (Supports an installation from Recovery or can be used to create a...
forum.xda-developers.com
None
DOWNLOADS​
Moved to:
[ZIP - Dual Installer] Dynamic Installer Stable 4.7-b3 [ Android 10+ or earlier ]
SUPPORT: TELEGRAM CHANNEL - TELEGRAM GROUP - SUPPORT ME ABOUT THIS: With this you can make Automatic Installers (.ZIP flash files) for All Android devices without limitations (Supports an installation from Recovery or can be used to create a...
forum.xda-developers.com
.... reserved
All I want to do is provide R/W access for /product/media/audio and everything in that folder including /ringtones . Can you please explain the steps this script can do to accomplish that. And please, act like I'm a 5 year old because I couldn't get the script to work. Currently working with a Moto One 5G Ace. Thank you very much.
Articul8Madness said:
All I want to do is provide R/W access for /product/media/audio and everything in that folder including /ringtones . Can you please explain the steps this script can do to accomplish that. And please, act like I'm a 5 year old because I couldn't get the script to work. Currently working with a Moto One 5G Ace. Thank you very much.
Click to expand...
Click to collapse
This script is executed from recovery, to mount system, vendor and product just use auto_mount_partitions in updater-script
BlassGO said:
This script is executed from recovery, to mount system, vendor and product just use auto_mount_partitions in updater-script
Click to expand...
Click to collapse
My phone does not have a custom recovery. How can this be solved and ran as a script inside of android via termux or linux?
how to use this script?
flash from recovery or use terminal or whatever.
sorry for the stupid question please explain better how to use it thank you very much
ale82to said:
how to use this script?
flash from recovery or use terminal or whatever.
sorry for the stupid question please explain better how to use it thank you very much
Click to expand...
Click to collapse
Hi, it depends what u want, its an installer with multiple uses, but if u only want to mount the main partitions as RW, add auto_mount_partitions to the updater-script and then flash it (Partitions will stay mounted while u in recovery after flashing)
PRO
el0xren said:
PRO
Click to expand...
Click to collapse
Thx

[BOOTANIMATION] MARVEL LOGO

Custom MARVEL-Logo Bootanimation for AOSP-Based ROMs
JUST BECAUSE THIS IS POSTED IN THE SAMSUNG GALAXY A20's FORUM - IT DOES NOT MEAN THAT IT WILL ONLY WORK FOR THIS DEVICE. IT WILL WORK WITH OTHER DEVICES THAT SUPPORT "bootanimation.zip" ASWELL.
These Bootanimations will not work on OneUI ROM's due to Samsung changing the way bootanimations are processed. Samsung's OneUI uses 'QMG' files. I DO NOT MAKE QMG's.
Below is a preview of the Bootanimation, I had to make it into a GIF file so it doesn't play as smooth as the 60FPS that you will see when its booting up.
Preview : MARVEL-Logo Bootanimation on Imgur
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Screen Resolution : 720 x 1560
I have made 3 methods that a user can install this bootanimation, 2 of the methods require ROOT while 1 requires only Custom Recovery.
Installation Methods :
Method 1 - bootanimation.zip
Copy my "bootanimation.zip" to "system/media/". Replace or backup your current bootanimation.zip if you don't like mine. ( NOTE : If the permission for the file is not 0644 , make sure to set it before you reboot otherwise the animation won't show upon boot )
Method 2 - Magisk Module
Download [MAGISK] MARVEL_Bootanimation_by_KineSight.zip to your device and flash it as a module in Magisk. You can disable to remove the module to uninstall it.
Method 3 - Flash in Custom Recovery
Download [FLASHABLE] MARVEL_Bootanimation_by_KineSight.zip to your device. Boot into Custom Recovery and flash the file. ( NOTE : This method will backup your bootanimation.zip by renaming it to "bootanimation.zip.bak" , if you want to uninstall mine - just delete bootanimation.zip and rename your "bootanimation.zip.bak" back to "bootanimation.zip" )
I made this bootanimation from scratch, if you like my work please hit the "Thanks" Button.
There might be more to come in the future.
DO NOT USE OR UPLOAD THESE FILES ANYWHERE WITHOUT MY PERMISSION.
Special Thanks :
@Chatur27 for creating the Custom Recovery Flashable zip.
Will it work on stock rom magisk systemless root?
Enriquex69 said:
Will it work on stock rom magisk systemless root?
Click to expand...
Click to collapse
No it will not. It will work on any other ROM besides OneUI / a ROM that doesn't support "bootanimation.zip".
KineSight said:
No it will not. It will work on any other ROM besides OneUI / a ROM that doesn't support "bootanimation.zip".
Click to expand...
Click to collapse
Good thing i didn't install it
Enriquex69 said:
Good thing i didn't install it
Click to expand...
Click to collapse
It wouldn't damage anything if you did. Samsung OneUI only looks for .QMG files not Bootanimation.zip upon boot.

Categories

Resources