[Q] init.d support for stock rom P500 - Optimus One, P500, V General

Hi, I just read some tips about using script for enhancing performance.
It says that the script must be places in system/etc/init.d
But in stock rom P500 (GB 2.3.3 v20G) I can't find folder init.d
The questions:
1. Is the stock rom already support init.d script execution?
2. If yes, will it works just by creating folder init.d and place script there?
3. If not, how to enable support init.d for Optimus One, stock ROM rooted?
I search this forum and find some guide about init.d support in other phone models, will it works on Optimus One too, or perhaps it needs particular way to do it?

1. No
2. If you have init.d support in rom.
3. Only way to do it is cook a custom rom through kitchen to add init.d support

terratrix said:
1. No
2. If you have init.d support in rom.
3. Only way to do it is cook a custom rom through kitchen to add init.d support
Click to expand...
Click to collapse
3. answer is some wrong:
you doesnt need to cook a custom rom, you only need the adb (android debug bridge) to "speak" with your phone:
0.) on your phone download busybox from market
1.) install android sdk on your computer
2.) install LG usb drivers on your computer
3.) open a console (on windows use the "cmd" command)
4.) remount "root" to read/write (type following commands in the cmd)
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk1 /
exit
5.) retrive the init.rc file from your device: (type the command in the cmd)
Code:
adb pull /init.rc C:\users\XXXXX\Desktop\init.rc
6.) open the init.rc file and add the busybox command to execute scripts in the /system/etc/init.d folder
after the lines that does mkdirs etc but BEFORE zygote starts (this stars the whole android)...
Code:
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
7.) close and save the file, push it back to your device, than reboot:
Code:
adb push XXXX\XXXX\init.rc /init.rc
now you can use the init.d folder as in CyanogenMod / other custom roms.

andy572 said:
3. answer is some wrong:
you doesnt need to cook a custom rom, you only need the adb (android debug bridge) to "speak" with your phone:
0.) on your phone download busybox from market
1.) install android sdk on your computer
2.) install LG usb drivers on your computer
3.) open a console (on windows use the "cmd" command)
4.) remount "root" to read/write (type following commands in the cmd)
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk1 /
exit
5.) retrive the init.rc file from your device: (type the command in the cmd)
Code:
adb pull /init.rc C:\users\XXXXX\Desktop\init.rc
6.) open the init.rc file and add the busybox command to execute scripts in the /system/etc/init.d folder
after the lines that does mkdirs etc but BEFORE zygote starts (this stars the whole android)...
Code:
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
7.) close and save the file, push it back to your device:
Code:
adb push XXXX\XXXX\init.rc /init.rc
now you can use the init.d folder as in CyanogenMod / other custom roms.
Click to expand...
Click to collapse
Ah thanks for correcting my answer ^^

Dear Andy,
Thanks 4 the procrdure, however i wanted to ask you whether there is any tool to check that the scripts in the init.d folder r getting executed?

andy572 said:
.....guide...
Click to expand...
Click to collapse
That works? I mean init.rc is in ramdisk in boot partition, and gets unpacked on boot, so any changes in / are lost on reboot - at least that is what was told to me.

Kanad said:
Dear Andy,
Thanks 4 the procrdure, however i wanted to ask you whether there is any tool to check that the scripts in the init.d folder r getting executed?
Click to expand...
Click to collapse
Option 1 - run logcat during boot (Trough ADB, type logcat in adb shell, a little simpler if using Droid Explorer)
Option 2 - Run a script that changes something that was previously different. Try installing the supercharger (with different from normal minfree values), rebooting and running the script again to make sure the minfree values are modified. If so, init.d is working and vice versa.

andy572 said:
6.) open the init.rc file and add the busybox command to execute scripts in the /system/etc/init.d folder
after the lines that does mkdirs etc but BEFORE zygote starts (this stars the whole android)...
Code:
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
Click to expand...
Click to collapse
I go directly to this step, using root explorer on phone (not using PC+ADB)
But after reboot, init.rc i've already edited before has been restored again to original value, as said by Tasssadar.
Maybe I should do it using PC+ADB instead of direct edit on phone?

optimuswhite said:
I go directly to this step, using root explorer on phone (not using PC+ADB)
But after reboot, init.rc i've already edited before has been restored again to original value, as said by Tasssadar.
Maybe I should do it using PC+ADB instead of direct edit on phone?
Click to expand...
Click to collapse
you are trying to modify a running system, sure - you have to do such things
in the boot.img file and have to re-flash it. there is no way to modify a running
system, sorry for misunderstanding.

andy572 said:
you are trying to modify a running system, sure - you have to do such things
in the boot.img file and have to re-flash it. there is no way to modify a running
system, sorry for misunderstanding.
Click to expand...
Click to collapse
I see.
so, is someone can guide me how to deal with boot.img on stock rom?

optimuswhite said:
I see.
so, is someone can guide me how to deal with boot.img on stock rom?
Click to expand...
Click to collapse
go to your recovery, make a backup of your current system and connect the
phone via usb to your computer and copy the rom from the phone to your computer.
then, use the htc kitchen to modify the created rom / or the boot.img

Related

[TUTORIAL] Easy method to change framework-res.apk with shell script

I created script to change framework-res.apk
--New-- Script with safer operation uploaded.
Requirements
-rooted
-busybox installed
1-copy framework-res.apk that you want to replace to the root of your sdcard (make sure it's in root)
2-extract reframe.zip(attachment) to root of your sdcard
in adb shell, use this command:
Code:
su
cd /sdcard
sh reframe.sh
your phone will reboot. and done! your framework-res.apk replaced safely.
Original framework-res.apk backed up as framework-res.apk.orig in /sdcard
Is there any method to get back original framework from SDCard, and paste it to /system, when my phone doesn't want to boot?
hugerth said:
Is there any method to get back original framework from SDCard, and paste it to /system, when my phone doesn't want to boot?
Click to expand...
Click to collapse
Use xrecovery..
Sent from my E15i using XDA App
Can't install... ok... I reflash 1.6 and root it again, install 2.1 and xRecovery for the future...
hugerth said:
Can't install... ok... I reflash 1.6 and root it again, install 2.1 and xRecovery for the future...
Click to expand...
Click to collapse
ops.if you have working rootshell, you can replace it using rootshell. but, since you've go back to 1.6, it doesn't matter. just install xrecovery in the future, quite useful.
Now I have system back (after about 2h) with working xRecovery and... God!.. why I haven't noticed it before...
i wanna ask how to recover the framework-res.apk from the xrecovery??
mount /system and use adb push
edit: new script. revised operation
D:\adb>adb remount
remount failed: Operation not permitted
any help here? I need to replace the framework
nm, forgot to chmod 06777 /system/framework
Thank you for you work. I hope to see this work Just rebooted my phone after applying your script.
propc said:
I created script to change framework-res.apk
--New-- Script with safer operation uploaded.
Requirements
-rooted
-busybox installed
1-copy framework-res.apk that you want to replace to the root of your sdcard (make sure it's in root)
2-extract reframe.zip(attachment) to root of your sdcard
in adb shell, use this command:
Code:
su
cd /sdcard
sh reframe.sh
your phone will reboot. and done! your framework-res.apk replaced safely.
Original framework-res.apk backed up as framework-res.apk.orig in /sdcard
Click to expand...
Click to collapse
Can u tell me where to find the adb shell
Sent from my E15i using XDA App
Use Super One Click, it comes with adb. Copy cmd.exe to SOC folder. Now start cmd, now type 'adb shell' (click enter) and then the other commands.
Sent from my E15i using Tapatalk
you can always change a framework by installer from available theme
mzmz83 said:
Use Super One Click, it comes with adb. Copy cmd.exe to SOC folder. Now start cmd, now type 'adb shell' (click enter) and then the other commands.
Sent from my E15i using Tapatalk
Click to expand...
Click to collapse
This is what I see when I open superoneclick t shows Root, shell Root, Unroot, allow non market apps....
Now in superoneclick folder that it comes in when u open it this is what u see
Superuser.apk
Superoneclick
Su
Sqlite3
Regeagainsttecage
Bushels
Addbwinusbapi
Adbwinapi
Ashland
Adblinux
Adb. Application
But when I try to open adb app it does not open a screen comes up then it closes so there is where am stuck at:-( :-( can u help me out from there??????
Sent from my E15i using XDA App
adb won't stay open if you click it, it will just flash out on the screen.
it was supposed to be somekind of a "bridge" for the cmd and the phone...
correct me if i'm wrong please...
You have to copy cmd.exe to the SuperOneClick folder, then you have to open the cmd.exe, not the superonecklick.exe.
I'm trying to replace framework and when I type in shell I got:
cd /sdcard
#
sh reframe.sh
sh: Can't open reframe.sh
#
oubsty, Thanks you
Boshe said:
I'm trying to replace framework and when I type in shell I got:
cd /sdcard
#
sh reframe.sh
sh: Can't open reframe.sh
#
Click to expand...
Click to collapse
I think it works if your phone is charged by your laptop/computer only. You do not allow it to connect. I mean you can not reach SDCard through Total Commander, etc. only charging.
Help
# sh reframe.sh
sh reframe.sh
sh: Cannot open reframe.sh
#
any ideas
got SuperOneClick 1.5.5 ( busybox )
root explorer ( only thing in superuser )
SE's PC companion running in background [ keeps asking for mount, but is ignored ]
got Android full SDK installed - drivers, ADB, 'the works'
root'd succesfully -(( WORLD-1-8_2.0.1.A.0.47 )) White-DarkBlue / Pink
4Gb Kingston HC4 sdc4/4gb 18 - un partitioned.
I wish to remove some bloat, and change to a custom theme.
{EDIT} - how to access recovery mode?, got customization = home-back-back-home-back-home-home-back
Dalvik Debug Monitor won't run, adb error2
thanks in advance.

ADB remount - permission denied

OK - small issue here.
It seems that you cant remount the system using the commandshell.
While you can do "su" to get super user permission when you are in the "adb shell" they get lost after closing the session and trying to mount system using the "adb remount" command.
Anyone else with the same problem?
as Bin4ry said:
Yes it's normal.
The ro.secure is set in default.prop which is part of kernel.img (boot.img) so we need to change the ramdisk for that! I only modded the system.img -> so no unsecure shell.
Edit this has been fixed by [email protected]
GScript Insecure ADB Install:
Link: Click here to download
Instructions:
1) if you already use gscript skip to step 3
2) install gscript from market, create a folder on sdcard called gscript
3) extract files from archive to gscript folder on sdcard
4) load gscript press menu, select add script, then select load script
5) Select "install modaco insecure adb.sh"
6) MAKE SURE SU is ticked, then run script
7) Enjoy adb remount
8) THANK PAUL AT MODACO
WARNING: AS PAUL HAS ADVISED THIS MAY BRICK YOUR DEVICE... Maybe.. Although I would think flashing a system.img from fastboot would repair.
WARNING: RECOMMENDED ONLY FOR UNLOCKED BOOTLOADER

init.d doesn't work

Hi,
I've followed this how-to: http://forum.xda-developers.com/showthread.php?t=1933849 to enable init.d support on my phone (GT-S5570i, Android 2.3.6, stock rom)
I have installed BusyBox (standard install, not smart install), then, after installing and launch Uni-init, i get "SUCCESS ! You have init.d support !"
Well, so I went into init.d folder and I manually launch the script "00test" to see if I am able to run scripts on my phone: ok: inside /data folder i see the test.log file! Then I delete this test file to see if my phone is really able to execute this script from the init.d folder at the boot.
Well, after reboot I go in /data but I don't see any test.log file.
Why? Uni-init told me that I have init.d support, but this don't seems true. The permissions on init.d folder and scripts are ok (rwxr-xr-x). I've also tried to change the ownership to 0 (root) and to 1000 (system) to the test script, and I've also tried another init.d activator, this one: http://download.apks.org/?apkid=com.broodplank.initdtoggler&ver=1.3&server=apk-s#.VbluDvldLcc bot no luck again.
Then I've found this solution: http://forum.xda-developers.com/showthread.php?t=2725680 which, differently from the other solutions, has inserted the runinit script inside /bin. Well: so I rebooted again, but the init scripts aren't still able to run at boot.
If i start the runinit script from a shell window, ok: scripts from init.d folder are properly executed, but again, when I boot my phone, these scripts aren't executed. Maybe I should tell to some system files to execute runinit at the boot time? I miss something?
Many thanks.
In another discussion I've read the following statement:
- the boot process calls install-recovery.sh while executing init.rc
- the install-recovery.sh calls sysinit script
- the sysinit script runs /system/etc/init.d/* in order
Click to expand...
Click to collapse
But I've found that my init.rc exclude the install-recovery.sh script:
Code:
#service flash_recovery /system/etc/install-recovery.sh
# oneshot
So, I don't have any chance to implement the init.d solution?

Minami M-750 stuck on boot - need expert help

Hi, I have been using Rom toolbox Lite for a while now and never had a problem, untill I got the "not so great" idea to change the heapsize in build.prop - after reboot the tablet is stuck on Loading - screenshot http://imageshack.com/a/img924/2306/BJbCT1.png
I have tried to reset, reset to factory default, to push back an old build.prop by ADB from prompt, tried the same from QtADB(0.8.0(newer 32bit not availble) - seems I have full access to all folders), even tried modifying the build.prop as root and start QtADB as root then copy it back - nothing has helped.
I have a complete backup(rom dump) made with uberizer, but since I'm not using windows anymore but instead Peach OSI(heavily modified Xubuntu). I'm not really sure what to do now.
My Minami M-750 DualCore A20(allwinner) tablets info is uploaded at specdevice long time ago as I were trying to find others with the same tablet:
http://specdevice.com/showspec.php?id=e5ba-9ce5-0033-c58700000000
It doesn't have custom Rom or custom recovery, but do have an option in recovery to update from external storage(where I can access internal sdcard and external sd) - update from ADB - update from cache.
Anyone have any suggestions?
With kind regards
JBJ
EDIT: Thanks to this article below the problem is now solved.
Note: Step 1 . instead of Eclipse ADT download SDK command line tools https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
Follow this guide on how to install the SDK: https://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/
Step 3. Open a Terminal and shoot this command: —–Note: The “Android” in the command is the folder in which we extracted the SDK in.
cd ~/Android/sdk/platform-tools/
Edit build.prop using ADB
by Louis Matthijssen · July 26, 2014
There are many reasons why you may like to edit your build.prop file. I always edit it in order to lower my DPI, resulting in a bigger looking screen.
You can edit it on the device itself using a file manager or a build.prop editor but it may be more convenient to edit the file using a PC.
Please note that your device has to be rooted to edit the build.prop file.
Download and unzip the Eclipse ADT
Make sure your device has USB debugging enabled
Open a command prompt or terminal and cd to the platform-tools directory:
cd C:\adt-bundle-windows\sdk\platform-tools
Check if your device is recognized:
If it’s not you may install the Google USB driver and try again
adb devices
The device may ask you if the computer is trusted, choose yes
Restart ADB as root:
adb root
Remount /system as rw (read-write):
adb remount
Download build.prop to your pc:
adb pull /system/build.prop
Now you can edit build.prop using your favorite editor
Important: use a plain text editor! I recommend Notepad++ for Windows and Geany for Linux
Upload build.prop to your device:
adb push build.prop /system/build.prop
Fix permissions:
adb shell chmod 644 /system/build.prop
Reboot your device:
adb reboot

[MOD] [Stratos/Pace] Universal init.d Enabler!

What is init.d?
init.d is a folder placed in /system/etc wich has been legendary used since the old android times to run scripts at boot. I've decided to make this simple script becouse lots of my users on my AmazBoost MOD thread were asking how they can enable init.d on stock ROM or simply on an unsupported ROM. It's easy to run and doesn't require any kind of coding skills!
What you need
- AmazFit Stratos/Pace
- Rooted ROM
How to install
1) Download the mod zip from download link and unzip it
2) Connect the wath to the PC
3) Place the enable.sh file inside your adb folder and open there a command prompt (or terminal for Mac OS/linux) then type the following codes:
Code:
adb root
adb push enable.sh /sdcard/
adb shell sh /sdcard/enable.sh
4) Done!
5) You NEED to reinstall the mod running the installer after every ROM update!
Changelog
First release!
Download and enjoy!
https://goo.gl/HYqEZt
If my work was useful always press thanks!​
There is a typo in the script:
touch /system/ect/install-recovery.sh
chmod 755 /system/etc/install-recovery.sh
chown 0:2000 /system/ect/install-recovery.sh
should be
Code:
touch /system/etc/install-recovery.sh
chmod 755 /system/etc/install-recovery.sh
chown 0:2000 /system/etc/install-recovery.sh
jprelay said:
There is a typo in the script:
touch /system/ect/install-recovery.sh
should be
Code:
touch /system/etc/install-recovery.sh
Click to expand...
Click to collapse
Ooops didn't check it perfectly just used a Compiler to see if there were some syntax errors, thanks I'll updating the file now!
Inviato dal mio G8141 utilizzando Tapatalk
Script name and command name don't match either, enabler.sh
I think that I found a solution..I wish is helpful !
1) First of all you need to have unlock bootloader and then run the temporary root
(check in "PERMANENT INSTALL" description)
AFTER ROOTING LETS GO FOR UNIT SUPPORT!
I used the init.d support through terminal emulator
2) Download the term-init.sh v3 .
3) Connect the watch to your PC.
4) Place the term-init.sh file inside your adb folder and open the command prompt.. then type the following codes:
(if adb shell or adb root not working, try to disconnect and connect your watch )
Code:
adb root
adb push term-init.sh /sdcard/
(or you can drag and drop it in your sdcard)
adb shell sh /sdcard/ term-init.sh
5) After that go and run the installer.bat file from Amazboost folder!
6) Done!​
I tried this tools but i have error
Code:
+ $'\r'
: not foundble.sh[12]:
/sdcard/enable.sh[13]: syntax error: 'if' unmatched
tminhnhat said:
I tried this tools but i have error
Code:
+ $'\r'
: not foundble.sh[12]:
/sdcard/enable.sh[13]: syntax error: 'if' unmatched
Click to expand...
Click to collapse
Same here too, the OP seems to have been making a lot of mistakes in his scripts
How is the init.d supposed to be enabled?
Hi, i want to enable AmazBoost so i came to this post to enable init.d but i lost, i dont understand what i need to do, when i follow the instructions i get this error.
########################################################
# #
# AmazFit universal init.d enabler by @AmazDev #
# #
########################################################
Mounting system...
Usage: mount [-r] [-w] [-o options] [-t type] device directory
: not foundbler.sh[12]:
/sdcard/enabler.sh[13]: syntax error: 'if' unmatched
I have Stratos 2 A1619
I have a Stock ROM 2.3.6.0 Unlocked
Thanks
---------- Post added at 05:20 PM ---------- Previous post was at 05:04 PM ----------
Hi, i tried with the other instructions but again i have a error:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell sh /sdcard/term-init.sh
Init.d Enabler by Ryuinferno @ XDA
Script NOT running as root!
Superuser access not granted!
Please type 'su' first before running this script...
C:\Program Files (x86)\Minimal ADB and Fastboot>su
'su' is not recognized as an internal or external command,
operable program or batch file.
kostasntamas said:
I think that I found a solution..I wish is helpful !
1) First of all you need to have unlock bootloader and then run the temporary root
(check in "PERMANENT INSTALL" description)
AFTER ROOTING LETS GO FOR UNIT SUPPORT!
I used the init.d support through terminal emulator
2) Download the term-init.sh v3 .
3) Connect the watch to your PC.
4) Place the term-init.sh file inside your adb folder and open the command prompt.. then type the following codes:
(if adb shell or adb root not working, try to disconnect and connect your watch )
Code:
adb root
adb push term-init.sh /sdcard/
(or you can drag and drop it in your sdcard)
adb shell sh /sdcard/ term-init.sh
5) After that go and run the installer.bat file from Amazboost folder!
6) Done!​
Click to expand...
Click to collapse
hi mate, do you modify the term-init.sh?
may i know which version of busybox that you are using?
currently im using the busybox from here: https://forum.xda-developers.com/showpost.php?p=78031249&postcount=107
and when i try to install term-init.sh, i encountered below error:
Code:
grep applet NOT FOUND!
run-parts applet NOT FOUND!
Required applets are NOT FOUND!
Please reinstall busybox!
illkid69 said:
hi mate, do you modify the term-init.sh?
may i know which version of busybox that you are using?
currently im using the busybox from here: https://forum.xda-developers.com/showpost.php?p=78031249&postcount=107
and when i try to install term-init.sh, i encountered below error:
Code:
grep applet NOT FOUND!
run-parts applet NOT FOUND!
Required applets are NOT FOUND!
Please reinstall busybox!
Click to expand...
Click to collapse
i have same problem do u find any solution?
Is anybody enable init.d on stock fw?
Hi,
I'm trying to install the Amazboost tweaks on my rooted Stratos (A1619) with Global FW (2.3.10.5) but I suspect that the installation of the tweaks via busybox is not running correctly. I have followed precisely the procedures with success but there is no log in the AmazBoost/LOGS folder after the reboot.
I have installed the last version of busybox (V1.29.3 for MIPS) in both /system/bin and /system/xbin but no log at all.
Some posts said that init.d is not working with stock fw.
Is that true?
Is anybody can help me to check if init.d can be enabled on my rooted Stratos (A1619) with Global FW (2.3.10.5)? And how can we verify that it works?
Thanks
Hi,
I'm still trying to understand why init.d is not running on my Stratos (A1619) with Global FW (2.3.10.5).
The init.d script refers to the "run-parts" file located in the /system/xbin/ directory.
But run-parts is not present.
I have found one file coming from the xperia x10 forum but it is not working on the Stratos: /system/xbin/run-parts: not executable: 32-bit ELF file
Is somebody could provide me this run-parts file compliant with the Stratos? (or help me to understand why the amazboost tweaks are not correctly installed)

Categories

Resources