+- +-

+- Site Stats

Members
Total Members: 291
Latest: bibobdaddy
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 852
Total Topics: 138
Most Online Today: 7
Most Online Ever: 360
(November 29, 2023, 03:10:08 am)
Users Online
Members: 0
Guests: 2
Total: 2

Top Posters

rcunningham
Posts: 322
Drewie88
Posts: 74
Matt
Posts: 48
rm571
Posts: 42
edodson84
Posts: 38

Author Topic: [MOD] Alternative INIT.D support  (Read 232 times)

0 Members and 1 Guest are viewing this topic.

Offline DevilSlayerDante

  • Member
  • **
  • Posts: 11
    • View Profile
[MOD] Alternative INIT.D support
« on: September 02, 2016, 08:43:10 pm »
I never did make a working ramdisk with native init.d support, but I DID find a better solution than the install-recovery.sh method.

I added a few lines to the end of /system/etc/init.gammaw.post_boot.sh, here's how it looks:
Code: [Select]
#!/system/bin/sh
...
...

if [ -d ${INIT_DIR:=$ANDROID_ROOT/etc/init.d} ]; then
logwrapper busybox run-parts $INIT_DIR
elif mount -o remount,rw $ANDROID_ROOT; then
mkdir -p $INIT_DIR
chown 0.0 $INIT_DIR
chmod 0755 $INIT_DIR
mount -o remount,ro $ANDROID_ROOT
fi
(NOTE: the elif condition, and lines before the fi keyword, aren't necessary.)

This script is executed during the last boot phase, when the boot animation stops, and is responsible for applying hardware-specific settings. Therefore, if any governor, scheduler, or virtual memory parameters are modified via init.d script, they must be done here. Remember to set your init.d scripts' permissions:
Code: [Select]
chown 0.0 /etc/init.d/script
chmod 0750 /etc/init.d/script

(NOTE: if your init.d scripts are not working, make sure busybox is installed, script names do not include an extension (script, not script.sh), and /etc/init.gammaw.post_boot.sh has root permissions set to 0750.)

Share on Facebook Share on Twitter


Offline rcunningham

  • Developer
  • Administrator
  • Senior Member
  • *
  • Posts: 322
  • Location: Portland, ME
    • View Profile
    • TracFone Developers
Re: [MOD] Alternative INIT.D support
« Reply #1 on: September 18, 2016, 11:31:40 pm »
Thanks for the info! It's always nice to have multiple ways to do things.
ROM Developer - LG Fan - Site Founder - Volvo Owner & Enthusiast

Register for TracFone Developers!

YouTube: http://www.youtube.com/ryancunningham12
Instagram: rcunningham757
Snapchat: the-ryandroid
Donate: https://www.paypal.me/RyanCunningham

 

User

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Recent Posts

Re: [ROM][5.1.1] Cyanogenmod 12.1 for LG REALM W5C by rcunningham
January 07, 2021, 06:09:54 pm

[ROM][5.1.1] Cyanogenmod 12.1 for LG REALM W5C by Cipher-M
October 14, 2020, 10:59:34 pm

[Recovery] TWRP 3.4.0.0 Unofficial for LG REALM, W5C by Cipher-M
October 13, 2020, 02:18:21 pm

Re: [ROM] [4.4.2] ULTALOLLI ROM for LG Ultimate 2 by rcunningham
February 12, 2020, 10:04:17 am

Re: [ROM] [4.4.2] ULTALOLLI ROM for LG Ultimate 2 by Dave
February 01, 2020, 08:18:20 pm

Re: recovery for the LG L39c? by Reahum1616
July 26, 2019, 01:06:07 am

Re: [Tool] LG Ultimate 2 Advanced Recovery Tool by rcunningham
June 09, 2019, 06:36:11 pm

Re: [Tool] LG Ultimate 2 Advanced Recovery Tool by adisrael
May 24, 2019, 12:36:21 am

Re: [Tool] LG Ultimate 2 Advanced Recovery Tool by rcunningham
August 24, 2018, 12:03:29 am

Re: [Tool] LG Ultimate 2 Advanced Recovery Tool by dmackey935
August 15, 2018, 04:00:55 pm