Init.d ? - General Questions and Answers

I was wondering how to use the init.d folder to run scripts during boot.
I have
# enable init.d support
service run_parts /system/xbin/run-parts /system/etc/init.d
oneshot
In my init.rc file but I do not have the init.d folder in /system/ect/
I have been trying to figure this out for about three days now. It might not even be possible but im sure someone knows better than me. Any help would be greatly appreciated!
Sent from my SCH-I500 using Tapatalk

You have to create the folder /init.d in /system/etc/init.d if it is not present.
Then, in updater-script you have to set the correct permissions to the init.d folder,
Updater script:
Code:
set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");

e334 said:
You have to create the folder /init.d in /system/etc/init.d if it is not present.
Then, in updater-script you have to set the correct permissions to the init.d folder,
Updater script:
Code:
set_perm_recursive(0, 2000, 0755, 0750, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
Click to expand...
Click to collapse
How do I use the updater script and will any script I put into init.d be run at boot or do the scripts have to be named a certain way?
Sent from my SCH-I500 using Tapatalk

Since you are using the busybox run-parts method in init.rc, you have to add the files 00banner 99complete (pull from another working rom). Any other script you add has to start with a number greater than 00 and smaller than 99. For example: 04modules
The scripts execute from the smallest number to the greatest.
You can find the updater-script in the unzipped rom you are modifying, under the directory META-INF/com/google/android/

Do u know of any roms that have the other two files I can grab and ounce I do will I need to modify them any?
Sent from my SCH-I500 using Tapatalk

Most roms, such as cyanogenmod 6 series, should have them.

Thank you very much! I will give it a try
Sent from my SCH-I500 using Tapatalk

Thanks e334 that worked perfectly! You don't know how much I appreciate the help. Thanks again.
Sent from my SCH-I500 using Tapatalk

csanmba said:
How do I use the updater script and will any script I put into init.d be run at boot or do the scripts have to be named a certain way?
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
For init.rc
# Execute files in /etc/init.d before booting
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
class late_start
user root
group root

Related

[SCRIPT][CWM] Fix Permissions Script

I am not responsible for you bricking/damaging your phone.
I did not write the fix permissions script, simply packaged it into a CWM-flashable ZIP file.
If you're like me you like to be able to fix your app permissions without having to boot into recovery. I found a stand-alone script here, and was able to push it to /system/bin, then rename it and CHMOD to be executable, and it all worked fine. The problem is that with SGS4G development exploding I've found myself doing this quite frequently, so I decided to put it into a CWM package that you simply flash and voila!
Before someone says, I am aware that there is an app on the market to do it, but last I knew it would not do them all in a batch operation, which is just plain silly.
Also, ROOT IS REQUIRED.
Usage (from adb shell, or a terminal emulator)
Code:
su
mount -o remount,rw -t ext4 /dev/block/stl9 /system
fix_permissions
mount -o ro,remount -t ext4 /dev/block/stl9 /system
If your partitions are NOT EXT4 then change the "ext4" to "rfs" in the above commands.
So just flash this script thru cwm?
Sent from my SGH-T959V using XDA Premium App
makavelicruz said:
So just flash this script thru cwm?
Sent from my SGH-T959V using XDA Premium App
Click to expand...
Click to collapse
crackpot said:
I did not write the fix permissions script, simply packaged it into a CWM-flashable ZIP file.[/color
Click to expand...
Click to collapse
Looks that way...
makavelicruz said:
So just flash this script thru cwm?
Sent from my SGH-T959V using XDA Premium App
Click to expand...
Click to collapse
op says he doesn't like to boot recovery would be pointless to flash in cwm. Unzip the download and see what's in it.
Edit: now I'm just confused
Haha, just downloaded it. CWM package, installs fix_permissions into /system/bin
Code:
ui_print("Fix Permissions Script");
ui_print("Mounting System...");
run_program("/sbin/mount", "/dev/block/stl9", "/system");
ui_print("Installing Script...");
package_extract_dir("system", "/system");
ui_print("Setting to Executable");
set_perm(0, 0, 0755, "/system/bin/fix_permissions");
That's the updater-script.
My apologies, didn't think it was confusing. Yes it is meant to be CWM flashable. All it does is put the script in /system/bin, then CHMOD to 755, aka executable.
Sent from my SGH-T959V using XDA Premium App
FBis251 said:
Haha, just downloaded it. CWM package, installs fix_permissions into /system/bin
Code:
ui_print("Fix Permissions Script");
ui_print("Mounting System...");
run_program("/sbin/mount", "/dev/block/stl9", "/system");
ui_print("Installing Script...");
package_extract_dir("system", "/system");
ui_print("Setting to Executable");
set_perm(0, 0, 0755, "/system/bin/fix_permissions");
[COLOR="Red"]run_program("/system/bin/fix_permissions");[/COLOR]
That's the updater-script.
Click to expand...
Click to collapse
check my edit
Look here ...
Enviado desde mi GT-N7105 mediante Tapatalk
mataflakitas said:
Look here ...
Enviado desde mi GT-N7105 mediante Tapatalk
Click to expand...
Click to collapse
Where?
myaservip said:
check my edit
Click to expand...
Click to collapse
mataflakitas said:
Look here ...
Click to expand...
Click to collapse
myaservip said:
Where?
Click to expand...
Click to collapse
Ugh... 4 year old thread, 3 years since the previous post.
Might want to look elsewhere.
UGH... lol

[INTRODUCTION] Updater script

Hi guys this is a small intro to updater script by a newbie for a newbie to understand more and more what it has and what it means:highfive::highfive::highfive:
now what is the updater-script and update-binary present in the META-INF>com>google>android in any flashable zip package
1. updater-script - it is just a text file which contains all the commands which tells the clockworkmod what to do with the given
zip file. the updater-script is written in the edify scripting language.
2. update-binary - it is a binary which is requiered by the clockworkmod to translate the human readable format of the updater-
script to machine readable format for execution of the updater-script in our device.
exploring the updater-script:
now let's start exploring the updater-script !
1. open the updater script with notepad++ (strongly recommended)
2. now i will try and explain commands generally used in the updater-script,
assert(getprop("ro.product.device") == "ST15i" || getprop("ro.build.product") == "ST15i" ||
getprop("ro.product.device") == "ST15a" || getprop("ro.build.product") == "ST15a" ||
getprop("ro.product.device") == "smultron" || getprop("ro.build.product") == "smultron");
the above bunch of lines checks the device model to confirm that the zip file is flashed on the device
for which it is specifically created for. These bunch of lines are very important because it prevents
flashing of zip file which is not intended for the device hence avoiding any problems due to flashing
the wrong zip. for example the above lines checks for the value of "ro.product.device" and
"ro.build.product"in the build.prop file of the already existing rom in the device, if any of the three
defined values ST15i, ST15a, smultron are found it will continue with the next line of updater-script
otherwise flashing gets aborted with error in getprop.
format("yaffs2", "MTD", "system", "/system");
the above command explains itself, it is used to format the specified partition
syntax explanation:
format - the main command to direct the cwm to format using the following parameters
"yaffs2" - filesystem type used in the device
"MTD" - type of the partition used in the file system
"system" - location of the partition to be formatted
"/system" - name of the partition to be formatted
ui_print("Format Completed");
the above command is also self explanatory, it directs the cwm to display the following text
enclosed in double quotes in the user interface (display).
after succesful formatting it displays "Format Completed" in the device screen.
mount("yaffs2", "MTD", "system", "/system");
the mount command directs the cwm to mount the following file system and the following partition
the syntax is just as explained in the format command except that this command mounts the
defined partition whereas the format command formats the defined partition.
let's review what we have done till now,
1. we have checked the device to confirm that this is the device for which we created the zip.
2. we have formatted the system partition of the device.(this is only done when a new complete rom is being flashed, for flashing mods you
should never format the system partition!)
3. we have mounted the system partition of the device.
now let's continue,
package_extract_dir("system", "/system");
this command searches for the directory (folder) named "system" in the root of the zip file and
copies all the content of the "system" folder from the zip file into the "/system" partition
which is already mounted by the previous mount command.
remember the structure of the file system in the zip file and the "/system" partition of the device must be always identical.
for eg., you have created a mod by editing the systemUI.apk and you want to flash it, the system UI.apk resides in "/system/app"
so the structure of the file system in the update zip should be "/system/app/systemUI.apk"
ie., the update zip should contain folder named "system" at the root of it and folder named "app" inside the "system" folder and the
modded "systemUI.apk" must be placed inside the "app" folder.
package_extract_file("autoroot.sh", "/tmp/autoroot.sh");
this command searches for the file named "autoroot.sh" in the root of the zip file and
copies the file to "/tmp" folder and names it as "autoroot.sh" (here it does not change the name)
symlink("mksh", "/system/bin/sh");
the above command creates a symlink.
okay, now let's see about symlinks,
symlink is nothing but shortcuts, for example if a file is requiered in two different places instead of copy pasting the file
in two different locations, the file is copied to one of the two locations and in the other location a shortcut to the file(symlink)
is created. the source and the symlink can have different names (actually this is the prime use of symlinks).
to explain in a noob friendly manner,
take the above symlink, it creates a shortcut(symlink) for the command "mksh" and places it in the path of the operating system.
the shortcut(symlink) directs to the file "/system/bin/sh" , so whenever the os gets a request to execute the "mksh" command, the actual
binary that gets excuted will be "/system/bin/sh" .
creating symlinks saves a lot of space because instead of copying the whole file and placing it in requiered places we are just
creating shortcuts which directs to the source file which can be placed anywhere in the file system (generally placed in the path of the os).
set_perm_recursive(0, 0, 0755, 0644, "/system");
the above command is used to set permission recursively for the files and folders present inside a folder (in this case for "/system" folder).
syntax explanation:
0 - uid - it defines that the following permission is set for the user id 0 .
0 - gid - it defines that the following permission is set for the group id 0 .
0775 - dirmode - it defines that 0775 permission to set to directories contained within the specified directory.
0644 - filemode - it defines that 0644 permission to set to files contained within the specified directory.
"/system" - target directory to set the above mentioned permissions.
set_perm(0, 3003, 06755, "/system/bin/ip");
the above command is used to set permission for a individual file (in this case for "/system/bin/ip" file).
syntax explanation:
0 - uid - it defines that the following permission is set for the user id 0 .
3003 - gid - it defines that the following permission is set for the group id 3003 .
06775 - it defines that 06775 permission to set to the specific file.
"/system/bin/ip" - target file to set the above mentioned permissions.
run_program("/tmp/autoroot.sh");
remember the file autoroot.sh from package_extract_file command?
that file is supposed to be a shell script, the above command directs cwm to execute the "autoroot.sh" shell script present in "/tmp" folder.
unmount("/system");
the unmount command directs the cwm to unmount the following partition
the syntax is just as explained in the mount command except that this command unmounts the
defined partition whereas the mount command mounts the defined partition.
Okay now going into slightly complex and/or not widely used updater-script commands,
Ifelse
Syntax:
Ifelse(condition),(do_this),(else_do_this);
Example:
ifelse mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Mounted!"), ui_print("Mount Failed!");
Ifelse command can be explained simply as asking the system to do something based on the result of a condition.
From the example:
The ifelse command would attempt to mount the MTD partition named "system" to "/system".
If the mounting process succeeds (the condition), the script will display "Mounted!", else it will display "Mount Failed!"
abort()
It just abort's the script execution
Note: it is usually paired with some other command for example the getprop command or with ifelse.
Independently specifying abort() in the updater-script will kill the script abruptly right there so use this command carefully.
ALWAYS LEAVE A BLANK LINE AT THE END OF THE update-script (if the code contains 50 lines then 51 lines should be visible
in the notepad++ including a blank line after the end of the script)
ALWAYS REMEMBER TO SET THE EOL (end of line) CONVERSION OF updater-script
IN UNIX FORMAT BEFORE SAVING (notepad++ > edit > EOL conversion > UNIX format)
the above mentioned commands are just basic edify scripting commands which are generally used in updater-script.
for detailed scripting and coding in edify scripting language check out the following sources:
source of update-binary
introdution to edify
http://forum.xda-developers.com/wiki...cript_language
scratchpad-documenting-edify-commands-for-android-updater-scritps
http://forum.xda-developers.com/show....php?t=1290062
Broken Links!!!
source of update-binary
introdution to edify
http://forum.xda-developers.com/wiki...cript_language
scratchpad-documenting-edify-commands-for-android-updater-scritps
http://forum.xda-developers.com/show....php?t=1290062[/QUOTE]
broken links!!! :silly:
Dude cut the reply short
Sent from my Droid Bionic using xda app-developers app
Sorry brother! i mean these links are not working!!
Current Device : MT11i Xperia Neo V
ROM : Xperia Ultimate HD ™
Build Number : 2.0.3
Kernel : Suave Kernel
Root Status : Rooted
Bootloader : Unlocked
Previous Devices : Samsung Galaxy Y
GT-5360(Sold)
Sent from my MT11i using XDA Premium HD app
tharu_roxx said:
Sorry brother! i mean these links are not working!!
Sent from my MT11i using XDA Premium HD app
Click to expand...
Click to collapse
Dont quote large posts on a whole...be specific...if u dont be specific..it may annoy others and even may affect the beauty of XDA... Next time do take a note of this....
Now please modify ur post..and keep only those links that u were referring to...
-via my "Galaxy Royale"
First i noticed it dude! When um gonna edit it, xda doesn't allowed me(as i was a new member) now it's ok....thanx!!!
Current Device : MT11i Xperia Neo V
ROM : Xperia Ultimate HD ™
Build Number : 2.0.3
Kernel : Suave Kernel
Root Status : Rooted
Bootloader : Unlocked
Previous Devices : Samsung Galaxy Y
GT-5360(Sold)
Sent from my MT11i using XDA Premium HD app
kartiknnn said:
Dude cut the reply short
Sent from my Droid Bionic using xda app-developers app
Click to expand...
Click to collapse
Thanks kartik for the thread...
Learnt some new stuff...thank you...
I would suggest u to add some ready made zips with standard updater scripts... So that people can use them for faster modding...
What say?
Sent from my GT-I9103 using xda app-developers app
bhargav143 said:
Thanks kartik for the thread...
Learnt some new stuff...thank you...
I would suggest u to add some ready made zips with standard updater scripts... So that people can use them for faster modding...
What say?
Sent from my GT-I9103 using xda app-developers app
Click to expand...
Click to collapse
Try these threads
http://forum.xda-developers.com/showthread.php?t=1561463
http://forum.xda-developers.com/showthread.php?t=732957
Hit thanks if i helped!!
Current Device : MT11i Xperia Neo V
ROM : Xperia Ultimate HD ™
Build Number : 2.0.3
Kernel : Suave Kernel
Root Status : Rooted
Bootloader : Unlocked
Previous Devices : Samsung Galaxy Y
GT-5360(Sold)
Sent from my MT11i using XDA Premium HD app
Lemme see guys will try and upload them today
Sent from my GT-I9103 using xda premium
kartiknnn said:
Dude cut the reply short
Sent from my Droid Bionic using xda app-developers app
Click to expand...
Click to collapse
dont you have your exams buddy..
Sent from my GT-I9103 using xda premium
Yup formative 2 be exact
Sent from my GT-I9103 using xda premium
Where to get the update-binary file from???
prohank said:
Where to get the update-binary file from???
Click to expand...
Click to collapse
Read the second paragraph.
Sent from my CM10.1-powered GT-I9103
2. update-binary - it is a binary which is requiered by the clockworkmod to translate the human readable format of the updater-
script to machine readable format for execution of the updater-script in our device.
Click to expand...
Click to collapse
you mean this one?
It says what it is but where to get it from?
prohank said:
you mean this one?
It says what it is but where to get it from?
Click to expand...
Click to collapse
its in any CWM zip of Galaxy R. check in Meta-info/...../Android
prohank said:
you mean this one?
It says what it is but where to get it from?
Click to expand...
Click to collapse
This:
now what is the updater-script and update-binary present in the META-INF>com>google>android in any flashable zip package
Click to expand...
Click to collapse
Sent from my CM10.1-powered GT-I9103

[Q] Modify Superuser to Supersu in updater-script

How do you change Superuser to SuperSU in the update.zip for rooting the Xperia J??
Since i found out that SuperSU > Superuser I've been trying to replace the app in the updater-script so that when i root my phone by flashing through cwm the superuser app is SuperSU instead of Superuser.
Simply changing the app in /system/app from Superuser to SuperSU and changing the updater-script
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
to
set_perm(0, 0, 0644, "/system/app/SuperSU.apk");
would result in an error.

OneFlash Init.d

OneFlash Init.d​
This .zip will give you init.d support without having to download all those stupid apps like Universal Init.d. All you need to do is flash and fill the init.d folder with your favourite scripts and watch them execute without you having to worry about if the app actually executed the scripts.
Tested On:
Xperia E - JB 4.1.1 (11.3.A.2.23)
It should be working on all devices but I have only tested it on the Xperia E, please feel free to test it yourself and tell me if its working so I can add your device to the list above.
Instructions:
1. Download and Copy the .zip file to your SD Card.
2. Go into CWM or TWRP and Flash.
3. To confirm that its working, with a file explorer of your choice go into data/local/tmp and if there is a file called init.d_log_test or something along those lines, open it and if it says done. It is working.
4. Enjoy!
V1.1: https://mega.co.nz/#!ZldFWQ4A!J5DugS3qAShvAOC8LQWOkfntwMLJJlKvvw3gO5Rk0DU
UltraGamerHD said:
OneFlash Init.d​
This .zip will give you init.d support without having to download all those stupid apps like Universal Init.d. All you need to do is flash and fill the init.d folder with your favourite scripts and watch them execute without you having to worry about if the app actually executed the scripts.
Tested On:
Xperia E - JB 4.1.1 (11.3.A.2.23)
It should be working on all devices but I have only tested it on the Xperia E, please feel free to test it yourself and tell me if its working so I can add your device to the list above.
Instructions:
1. Download and Copy the .zip file to your SD Card.
2. Go into CWM or TWRP and Flash.
3. To confirm that its working, with a file explorer of your choice go into data/local/tmp and if there is a file called init.d_log_test or something along those lines, open it and if it says done. It is working.
4. Enjoy!
Link: https://drive.google.com/file/d/0B73-53ZX-WVRdTJLYnVVc29BX0k/edit?usp=sharing
Click to expand...
Click to collapse
Great!
I had my doubts with Universal init.d.
Are you sure this is working?
Thank you! You're doing some awesome work here!
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
MatsPunt said:
Great!
I had my doubts with Universal init.d.
Are you sure this is working?
Thank you! You're doing some awesome work here!
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Just add the files in the .zip to your ROM in the correct directories and you should be good to go.
UltraGamerHD said:
Just add the files in the .zip to your ROM in the correct directories and you should be good to go.
Click to expand...
Click to collapse
Great, thank you!.
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
@UltraGamerHD Shouldn't MatsPunt need to mod the updater-script as well?
NSDCars5 said:
@UltraGamerHD Shouldn't MatsPunt need to mod the updater-script as well?
Click to expand...
Click to collapse
No. Because when you put "package extract dir: system" in the updater-script permissions are set automatically to the files.
What I do have to add is permissions for the init.d scripts itself. But I have already done that in V1, so I only have to add these files and then it's okay.
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
MatsPunt said:
No. Because when you put "package extract dir: system" in the updater-script permissions are set automatically to the files.
What I do have to add is permissions for the init.d scripts itself. But I have already done that in V1, so I only have to add these files and then it's okay.
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Make sure to test first, flash the .zip file then with a file explorer go into data/local/tmp/ if there is a file called init_log_test open it then it should say done. This way you know it works!
UltraGamerHD said:
Make sure to test first, flash the .zip file then with a file explorer go into data/local/tmp/ if there is a file called init_log_test open it then it should say done. This way you know it works!
Click to expand...
Click to collapse
add that in OP so other phone users can see/try
Grimlock007 said:
add that in OP so other phone users can see/try
Click to expand...
Click to collapse
Its already there.
UltraGamerHD said:
Its already there.
Click to expand...
Click to collapse
O!
i'm turning blind maybe...sorry
fix the link please its showing inside the zip file [file>download works though]
---------- Post added at 03:45 PM ---------- Previous post was at 03:38 PM ----------
{status 0} error while flashing
Grimlock007 said:
O!
i'm turning blind maybe...sorry
fix the link please its showing inside the zip file [file>download works though]
---------- Post added at 03:45 PM ---------- Previous post was at 03:38 PM ----------
{status 0} error while flashing
Click to expand...
Click to collapse
just extract it and paste it into the relevant folders using a file explorer!
UltraGamerHD said:
just extract it and paste it into the relevant folders using a file explorer!
Click to expand...
Click to collapse
Either that or you can take the update-binary from any proved working flashable .zip and paste it in this .zip.
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
MatsPunt said:
Either that or you can take the update-binary from any proved working flashable .zip and paste it in this .zip.
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I have --> Check V1.1
UltraGamerHD said:
I have --> Check V1.1
Click to expand...
Click to collapse
Ah, OK.
You might want to delete the link of the first one. It isn't really of any use right? *just thinking out loud*
Mats
Sent from my Xperia E using XDA Premium 4 mobile app
this trick won't work if you don't have busybox :3
I don't know where you got this zip file but in the original file it call sysinit via install-recovery.sh and use the run-parts. your install-recovery.sh have been modified. if you want to use it without busybox,
Code:
#!/system/bin/sh
#init.d support
/system/xbin/run-parts /system/etc/init.d/
some of app is using install-recovery.sh (namely, supersu app). I'm not recommend this script if you're using supersu. the easiest and safest method to implement init.d script is manually add this line into install-recovery.sh and install busybox
Code:
busybox run-parts /system/etc/init.d/
kurotsugi said:
this trick won't work if you don't have busybox :3
I don't know where you got this zip file but in the original file it call sysinit via install-recovery.sh and use the run-parts. your install-recovery.sh have been modified. if you want to use it without busybox,
Code:
#!/system/bin/sh
#init.d support
/system/xbin/run-parts /system/etc/init.d/
some of app is using install-recovery.sh (namely, supersu app). I'm not recommend this script if you're using supersu. the easiest and safest method to implement init.d script is manually add this line into install-recovery.sh and install busybox
Code:
busybox run-parts /system/etc/init.d/
Click to expand...
Click to collapse
i got busybox 1.20.2 from rom and 1.21.1 from "free busybox " app
kurotsugi said:
this trick won't work if you don't have busybox :3
I don't know where you got this zip file but in the original file it call sysinit via install-recovery.sh and use the run-parts. your install-recovery.sh have been modified. if you want to use it without busybox,
Code:
#!/system/bin/sh
#init.d support
/system/xbin/run-parts /system/etc/init.d/
some of app is using install-recovery.sh (namely, supersu app). I'm not recommend this script if you're using supersu. the easiest and safest method to implement init.d script is manually add this line into install-recovery.sh and install busybox
Code:
busybox run-parts /system/etc/init.d/
Click to expand...
Click to collapse
I have included run-parts in this zip so no need to worry about busybox.
Sent from my Xperia E using Tapatalk
Code:
#!/system/bin/sh
#init.d support
busybox run-parts /system/etc/init.d/
this is your install-recovery.sh content. your run-parts binary file is not used. I also found sysinit file in your zip file. if you're using direct command like this that file is not needed. the original init.d implementation using install-recovery.sh was something like this
Code:
#!/system/bin/sh
#init.d support
/system/bin/sysinit
kurotsugi said:
Code:
#!/system/bin/sh
#init.d support
busybox run-parts /system/etc/init.d/
this is your install-recovery.sh content. your run-parts binary file is not used. I also found sysinit file in your zip file. if you're using direct command like this that file is not needed. the original init.d implementation using install-recovery.sh was something like this
Code:
#!/system/bin/sh
#init.d support
/system/bin/sysinit
Click to expand...
Click to collapse
sysint is executed at boot because of the edit I made in the ramdisk. Therefore sysint executes init.d scripts.
Sent from my C1505 using Tapatalk
if that true it means you have messed up the init.d implementation :3
luckily, it isn't. you do nothing with the ramdisk. your updater-sript honestly say that your tweak has nothing related with the ramdisk
Code:
ui_print("One Flash Init.d");
ui_print("UltraGamerHD @ XDA-Developers");
mount("ext4", "EMMC", "/dev/block/mmcblk0p11", "/system");
package_extract_dir("system", "/system");
set_perm(0, 2000, 0755, "/system/bin/sysinit");
set_perm(0, 2000, 0777, "/system/xbin/run-parts");
set_perm_recursive(0, 0, 0777, 0777, "system/etc/init.d");
ui_print("Update Complete. Enjoy!");
unmount("/system");
anyway, what I do was giving suggestion to improve it and make it better but it seems that you think that I'm offending you. at the first, I thought that you originally develop this tweak but it now becomes clear that you're not the one who create this tweak. the inconsistence between how this tweak work and your explanation suggest that you take someone's work without knowing how it works. what you do was modifying the installer script to make it fit with your device. I think I shall take my leave now :3
NOTE: for other user who found this thread
1. don't use it on CM/AOSP rom. they have different init.d implementation and this tweak will ruin it.
2. if you're using superSU, check if you have /etc/install-recovery.sh. don't use it if you already have that file in your system
3. this tweak only tested on E. be cautious if you're using tipo, miro, or J.

what mmcblk to mount for data extraction for updater.script

i am trying to custom some gapps, so i can install some apps i want, what mmcblk0 is used to mount data folder so i can install some data/app apps through updater.script
thank u
Bradl79 said:
i am trying to custom some gapps, so i can install some apps i want, what mmcblk0 is used to mount data folder so i can install some data/app apps through updater.script
thank u
Click to expand...
Click to collapse
You need this:
1. Make sure you have the folder data/app in the root of the zip file with included .apk
2. Make a backup
Add this in the updater-script
3. mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/data", "/data");
4. package_extract_dir("data", "/data");
5. set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
6. unmount("/data");
Save the edited updater-script and put it back in the zip and install it ....make a backup before!!!
Make sure you edited the updater-script correctly!
The 3 lines are sorted by number 3-6.
I hope i helped you
Thank u so much

Categories

Resources