enable init.d support in rooted phones and for every ROM - HTC Pico (Explorer)

Requirement:
Rooted phone
Busy box
Terminal emulator (available in Google Play)
Download:
Term-init.zip
Instruction:
Extract the zip and Place the term-init.sh in internal sdcard
Open terminal emulator
Type: su
Allow Supersu / Superuser
Type: sh /sdcard/term-init.sh
Follow the instruction
Finish, Reboot your phone
To check whether init.d working or not:
After you reboot your phone
Go to /data directory (use Root Explorer)
You should find Test.log there, open that and make sure "init.d is working" text there
Please leave a comment if you don't understand

Related

[MOD][APK+SCRIPT+ZIP] Enable Init.d for Any Phones w/o Need of Custom Kernels!!!

** NOT Android 4.3 compatible!!! Term-init is recommended for now!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
{
"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"
}
v1.0
init.d support through an app!!!​
What is init.d:
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:
Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
Click to expand...
Click to collapse
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
BUT now, with the aid of Androguide.fr (creator of Pimp My ROM), we managed to integrate the script into an app to save the hassle of typing commands in terminal emulator! With just a button click, the commands will be carried out! With just a button click, the app will verify whether is there init.d support or not!
Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: View attachment 1612958
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.
Features:
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing (shows time of execution), another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
Instructions:
1. Download the apk.
2. Install the apk like any normal app.
3. Launch the app.
4. The rest are pretty self-explanatory...
5. You can uninstall the app after that...
Screenshots:
**To check whether init.d is really working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have a WORKING init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
Uni-init v1.0.apk
Credits:
Thanks to:
Androguide.fr for the android app base!
Donators (big thank you! ):
@bigknowz
Feel free to posts questions below...I will try my best to help......By the way, those who used the app and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details if possible...
Please don't mirror / modify my work, ask for permissions first...​
**UPDATE: v3 is out now! Android 4.3 compatible!
**Term-init is also used in Droid Manager!!!**
**Featured in the XDA News Portal: Init.d Support for Any Rooted Phone (Thanks to the_scotsman!)
Hi guys...as stated in the title above, I have created a script to be ran in terminal emulator so that it will enable the support of init.d scripts!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
init.d support through terminal emulator!!!​
What is init.d:
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:
Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
Click to expand...
Click to collapse
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: View attachment test_initd.zip
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.
Features:
- Auto checks for required files [v2]
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will move install-recovery.sh to install-recovery-2.sh if it already exists and call it from the main install-recovery.sh (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't [v3]
- If Superuser is using install-recovery.sh, will use install-recovery-2.sh instead [v3]
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing (shows time of execution [v2]), another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists. This is for utilising a similar method to enabling init.d in AOSP ROMs
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
- terminal emulator such as this: Link
Instructions:
1. Download the file.
2. Place it in the root of your sdcard directory.
3. Launch terminal emulator.
4. Type: su
5. Grant SuperUser access if prompted
6. Type: sh /sdcard/term-init.sh
7. The script will run and follow the instructions! As simple as that...
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
term-init.sh v3
Feel free to posts questions below...I will try my best to help......By the way, those who used my script and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details and screenshots if possible...
Please don't mirror / modify my work, ask for permissions first...
Source code & changelog: https://github.com/Ryuinferno/Term-init​
** NOT Android 4.3 compatible!!! Term-init is recommended for now!!!
**Note...this is only for those who do not have init.d support...if you are using custom kernels (cyanogen mod original kernel etc.) that already supports init.d, you shouldn't run this......but if you accidentally ran this, it is ok...won't mess up anything...
As Term-init does not work for certain people, I have came up with a CWM flashable zip:
init.d support through CWM!!! ​
What is init.d:
the_scotsman (Moderator Liaison Admin / Moderator Committee / XDA News Writer) said:
Init.d plays an important role in the world of Android development and customization It allows users to install scripts and mods to be run at boot—everything from battery tweaks to performance tweaks. It essentially opens the door to a world of mods only possible through the Init.d process, which in turn is usually only available on custom kernels.
Click to expand...
Click to collapse
Do I have init.d support?:
Well, here is a way to test:
1. Download the file from here: test_initd.zip
2. Extract the file, you will get a file named 00test. DO NOT flash!
3. Paste it into /etc/init.d. If there is no init.d folder, most probably you DO NOT have init.d support. However, if you still wanna try, just create the folder named "init.d"
4. Change the permissions of the init.d folder and 00test into rwxrwxrwx.
5. Reboot.
6. If you see a file named Test.log in /data, you have init.d support. If not, you will have to run Uni-init, Term-init or Zip-init.
Features:
- Utilises install-recovery.sh (if your kernel supports that, but of course, but most do...) to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing, another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysinit in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- a rooted phone of course...
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: Link and please reboot after installing before running this script......use "normal install" method, don't use "smart install"...
- a working CWM custom recovery
Instructions:
1. Download the file.
2. Flash zip-init.zip thorough CWM.
3. Reboot and you are done!
**If you get a status 0 error in CWM, please replace the update-binary in zip-init.zip with a working update-binary of your phone (just extract it from any CWM zip meant for your phone)...
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
zip-init.zip v2
Feel free to posts questions below...I will try my best to help......By the way, those who used my mod and found that it works, please leave a post here, stating you phone model, android version and ROM...thanks! but don't just leave comnents saying 'it doesn't work' etc...give more details and screenshots if possible...
Please don't mirror / modify my work, ask for permissions first...​
Troubleshooting
Troubleshooting:
**CWM might warn something about disable recovery flash when using this mod, it is just a false positive, please DO NOT select yes or else it won't work anymore**
If you have already applied the script but there is no /data/Test.log, please refer the steps below:
1. Check whether have you installed busybox properly, especially run-parts. REBOOT after installing, then only apply this script.
2. If you are using the busybox installer by Stericson, please use "normal installation method", NOT "smart installation method".
3. Check whether are these files present with the correct permissions (please change if the permissions are wrong):
- /system/bin/sysint (rwxr-xr-x) [owner: root (0), group: shell (2000)]
- /system/etc/init.d (rwxrwxrwx) [owner: root (0), group: root (0)]
- /system/etc/init.d/00test (rwxrwxrwx) [owner: root (0), group: root (0)]
-/system/etc/init.d/08setperm (rwxrwxrwx) [owner: root (0), group: root (0)]
- /system/etc/install-recovery.sh (rwxr-xr-x) [owner: root (0), group: root (0)]
- /system/etc/install-recovery-2.sh (rwxr-xr-x) [owner: root (0), group: root (0)] (may or may not be present)
4. Check whether you have run-parts installed. Go to /system/xbin, you should be able to find a fine named "run-parts"
5. Check whether you have these lines in /system/etc/install-recovery.sh (if not, please add them in manually (using Root Explorer or keep the EOL in Unix format...Google about it), remember to leave an EMPTY line at the end of the file)
Code:
# init.d support
busybox run-parts /system/etc/init.d/
6. If all the above are still not helping, please download this: run-parts.zip and extract it (DO NOT flash it). Place the file named "run-parts" in /system/xbin. Change permissions to rwxrwxrwx, owner to root (o) and group to shell (2000). Reboot and check /data again.
7. Still fails? Check your /init.rc for any lines containing "install-recovery"...if there are none, this method won't work...so use the Script Manager method.
8. Use this as a last resort: Download Script Manager from Play Store: Link. Then navigate to /etc/install-recovery.sh, select it and run as root and at boot (select the skull and gear icon).
9. If all the above are not working, and the "install-recovery" line is present, then please paste the contents of your /etc/install-recovery.sh and /etc/install-recovery-2.sh if present somewhere (like http://pastebin.com and after applying the mod of course) here for me to debug. Take a screenshot of the output after running Term-init and post here, along with your ROM version, android version and name of device.
ace 5830i stock rom
Ryuinferno said:
Hi guys...as stated in the title above, I have created a script to be ran in terminal emulator so that it will enable the support of init.d scripts!!!
Term-init --> init.d support through terminal emulator!!!
But how?
Concept:
I have recently learnt some linux scripting and was searching for a method to enable init.d scripts support for my phone which has a stock kernel. Inspired by this thread by iridaki, I finally managed to get init.d working in my phone!!! However, I thought of the other users who still do not have a proper custom recovery...how are they gonna flash zip packages? And if it has to be done manually, it requires a lot of typing, changing file permissions etc....a very tedious process...
Therefore, I've decided to come up with a script to automate this process!!! *Drum rolls*...lol
Features:
- Utilises install-recovery.sh to enable init.d scripts (busybox run-parts required)
- Will add lines in install-recovery.sh if it already exists (will not replace install-recovery.sh because certain apps such as Link2SD requires that to work), creates it if it doesn't
- Creates the init.d folder with correct permissions
- Adds 2 init.d scripts: one for testing, another to ensure that the scripts in init.d folder always have the correct permissions
- Adds sysint in /system/bin, will add the required lines if it already exists
- Deletes duplicate files and lines to ensure the least of errors
Requirements:
- busybox with required applets (especially run-parts), if not sure what is this, just install this by Stericson: BusyBox
- terminal emulator such as this
Instructions:
1. Download the file.
2. Place it in the root of your sdcard directory.
3. Launch terminal emulator.
4. Type: su
5. Grant SuperUser access if prompted
6. Type: sh /sdcard/term-init.sh
7. The script will run and follow the instructions! As simple as that...
Example:
**To check whether init.d is working or not, reboot your phone and navigate to /data...you should find a Test.log in there...If it is present, congrats, you have init.d support!
Download:
If you have already read all the instructions and understand them, then click here to download:
term-init.sh
Feel free to posts questions below...I will try my best to help...
Hit the thanks button if you liked my work...it gives me a boost!
Please don't mirror / modify my work, ask for permissions first...​
Click to expand...
Click to collapse
its not working
ranjitkhera said:
its not working
Click to expand...
Click to collapse
Well, are the all the files present? Did you follow all the steps? I suggest you to reinstall busybox by using the link I gave...then attempt this again...
This mod work on MIUI UK official for desire s
Tested with v6 supercharger by zep
Thanks a lot
Sent from my HTC Desire S using xda app-developers app
Hi ,
I use an Motoluxe xt615 , i Fllow your guide step by step . But nothing.
The Phone Restarts an in /data is no Test.log
Busybox install Terminal install . Terminal say all is ok but the test.log fails. After Reboot i cant find it.
Sorry for my bad Englisch
hexer7568 said:
Hi ,
I use an Motoluxe xt615 , i Fllow your guide step by step . But nothing.
The Phone Restarts an in /data is no Test.log
Busybox install Terminal install . Terminal say all is ok but the test.log fails. After Reboot i cant find it.
Sorry for my bad Englisch
Click to expand...
Click to collapse
Ok...let me interpret...you installed busybox by using the link I gave, then you ran this in terminal emulator right? Can you please give me a screenshot of your terminal emulator running this script? Thanks...
Ryuinferno said:
Ok...let me interpret...you installed busybox by using the link I gave, then you ran this in terminal emulator right? Can you please give me a screenshot of your terminal emulator running this script? Thanks...
Click to expand...
Click to collapse
how can i make this???
ah ok
http://s1.directupload.net/file/d/3042/ofxoh9z3_png.htm
Err...run the script in terminal emulator, when it finished running, take a screenshot...
Ryuinferno said:
Err...run the script in terminal emulator, when it finished running, take a screenshot...
Click to expand...
Click to collapse
http://s1.directupload.net/file/d/3042/ofxoh9z3_png.htm
hexer7568 said:
how can i make this???
ah ok
http://s1.directupload.net/file/d/3042/ofxoh9z3_png.htm
Click to expand...
Click to collapse
Ok...by looking at your first few lines...I saw that su permissions for terminal emulator are not granted properly...and my script seems to be only running in the surface (only shows the text)...did you reboot after installing busybox? And by the way, please check your /system/etc...is there a init.d folder and a file named "install-recovery.sh"? And what andriod version are you using?
P.s. A working example should be like my screenshot on the first page...the first few lines in your screenshot should not appear...
Ok...I will include a flashable zip soon...cause terminal emulator does not seem to work with some...
Ryuinferno said:
Ok...by looking at your first few lines...I saw that su permissions for terminal emulator are not granted properly...and my script seems to be only running in the surface (only shows the text)...did you reboot after installing busybox? And by the way, please check your /system/etc...is there a init.d folder and a file named "install-recovery.sh"? And what andriod version are you using?
P.s. A working example should be like my screenshot on the first page...the first few lines in your screenshot should not appear...
Click to expand...
Click to collapse
1 Reboot after busybox install no
2, no
3. no
That's why...the script did not have the correct permissions to run...did you grant terminal emulator su access when you type "su"? Try installing busybox again, reboot, run the script and reboot again...
Ryuinferno said:
That's why...the script did not have the correct permissions to run...did you grant terminal emulator su access when you type "su"? Try installing busybox again, reboot, run the script and reboot again...
Click to expand...
Click to collapse
When i type su , the first massage is "log_write: cannot open Device" , then after this massage i have su
When you type "su" for the first time after installing terminal emulator, a pop up will appear, asking you to grant or deny superuser access...did that happen?
Ryuinferno said:
When you type "su" for the first time after installing terminal emulator, a pop up will appear, asking you to grant or deny superuser access...did that happen?
Click to expand...
Click to collapse
i install emulator new, and i lock that
Ok..seems that the su access in your terminal emulator is not working well, so I will upload a cwm zip soon...wait for that...

[SCRIPT] Move any file via terminal

I wrote a small (<1kb) script which moves (copy and removes source).
First it copy the source file (which you provide) to dest folder (you also provide that) and then it removes the source.
Standard Disclaimer:
Spoiler
I am NOT responsible for any damage/data lose.
You choose to try this script.
If something brakes, you are responsible not me!
If you blame me, I will laugh at you.
My script is stable and works great.
How to use:
1. Install my script (see below)
2. Open (any) terminal emulator
3. Type su (see note below)
4. Type move_file
5. Type source file
6. Type dest folder
Everything should be ok now.
How to install:
1. Get file from here
2. Copy to /system/bin or /system/xbin
3. Set permissions to 777 (I think that what is needed)
Should be all right.
Note: The script needs busybox & to be run as root because it mounts /system as RW at the beginning and mounts it back to RO at the end.
Click "thanks" if it helped you .

[MyPhone My27] Changing from Kingroot to Super User

First of All it's not Mine. I just wanna post it here for I know lots of Android user comes here to get help. Just spreading some little Help.
Requirements:
1. Terminal Emulator App
2. Zip File
3. Working Internet Connection
#-#-#-#-#-#-#-#-#-#---Let's Start---#-#-#-#-#-#-#-#-#-#
1. First download/Install Terminal Emulator (available on Play Store)
2. Extract the Downloaded Zip file in the root of your SD card and copy the extracted file on your internal memory. Means SD card and internal memory has this same file.
3. Open Terminal Emulator and type the command
su
4. Hit enter
5. Then Terminal Emulator will ask for root permission, grant it, and enter the commands
su /sdcard/mrw/root.sh
6. Hit Enter
7. Now, it will start running script and wait for approximately 2-3 minutes. MAKE SURE YOU HAVE YOUR DATA/INTERNET CONNECTION TURNED ON.
8. When it's done, open your app drawer and you'll see a super su app, open it.
9. It will ask you to update binary user binary, click Continue and click Normal Mode
10. It may ask you that other root app/s are already installed, just click OK and it will remove King root app from your phone and replace it with Super Su. (Note: sometimes it takes more than a minute, just be patient)
11. Click reboot if asked and Your Done!!..
Credits:
https://missingtricks.net/replace-kingroot-kinguser-with-supersu-superuser-android-guide/

[HOWTO] Root ZB690KG

Normally, we would root device(s) with SuperSU|Phh|Magisk through a customised TWRP|CWM recovery.
Currently, there's no known custom recovery available and the only root solution is through Kingroot app.
* To the moderator(s), please move this to "asus zenfone go" thread per intention.
Updated: [20171210]
1. ROOT
To root this device, go to Kingroot's xda thread and install app-v5.3.0. Just follow the rooting[*] instructions accordingly and that's it.
* Be warned that internet access (data or wifi) is required! So before installing the app, do consider backing-up your personal data and doing a factory reset. Fyi, it can be done without sim card attached.
2. REPLACE KINGROOT WITH SUPERSU
The various scripts (mrw) available on the internet does not work with Kingroot-v5.3.0.
After going through SuperSU's ZIP script and further readings, I was able to replaced it with SuperSU-v2.76.
I made a simplified script[*] specifically targetting this device[**] with this root version.
* To be executed on a terminal window session (or ADB).
** CPU architecture is "armv7" and API level is "sdk22".
Steps:
2.1 Download supersu.zip and extract ZIP -> place "supersu" folder in device's internal storage
2.2 Download and install Terminal Emulator -> open it and type "su" -> grant root permission and type "sh /sdcard/supersu/ku2su.sh"
Code:
su
sh /sdcard/supersu/ku2su.sh

[LOCKED BL]ROOT and FlashFire

ROOT AND FLASHFIRE FOR HUAWEI ASCEND G6 (g6-u10) WITH LOCKED BOOTLOADER​Since we cannot unlock our bootloader adn we can't install TWRP, I made this guide for ROOT the device with SuperSU and install Flashfire that does the same function as TWRP.
ROOTING:
Download the attatched apk
Install it on your phone
Open it and swipe down
Click on start now
When it finishes the check click on try root and wait until it roots it
CHANGING TO SuperSU:
Download mrw.zip attatched in the post
Extract it in your adb folder
Open a CMD and type:
Code:
adb push mrw /sdcard
When it pushes all files type:
Code:
adb shell
Then:
Code:
su
Now execute the file:
Code:
sh /sdcard/mrw/root.sh
When it finishes, execute it again:
Code:
sh /sdcard/mrw/root.sh
When the SuperSU Installer finishes the device will reboot
When it turns on, open SuperSU app and set default access to grant
You're rooted with SuperSU!
FlashFire:
Download attatched FlashFire
Install it
IMPORTANT!! Set the date of the phone to: 1/1/2018
Open FlashFire and flash that you want (Xposed, Dolby, etc)
And that's all hope that it helped!:fingers-crossed:

Categories

Resources