OneFlash Init.d - Sony Xperia Miro, Tipo (Dual), J, E

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.

Related

[BASH][CWM] BASH shell for android, credit: nubecoder

First off, all credit goes to nubecoder. Original post:
[Bash] android_bash: Bash, cross-compiled and modified for the android platform.
Introduction...
Most (All) modern Linux distributions utilize bash (Bourne Again SHell) rather than sh (Bourne SHell). Android, by default uses sh. Bash has numerous advantages over sh, sush as tab completion and history support.
Some ROM developers include bash in their ROMs by default. It makes adb, terminal, and scripted commands much easier and more powerful/flexible. I noticed that Sidekick 4G ROMs don't come with bash, hence this thread.
How to Install BASH...
Simpy flash this zip through Clockworkmod recovery: (if ORANGE, check mounts. Not sure if neccessary, but it doesn't hurt)
android_bash-4.1.11(2)_installer-SK4G.zip
Then load your preffered terminal emulator application, type bash, press enter, and there you go.
What's the difference between the SK4G version, and the original Epic 4G version?
- Modified device/product check in updater-script to "SGH-T839"
- Modified $PATH variable in /data/local/.profile to "/sbin:/system/bin:/system/xbin:/data/local/tmp:/bin"
- Modified $PATH variable in /system/etc/bash.bashrc to "/sbin:/system/bin:/system/xbin:/data/local/tmp:/bin"
- [Personal preference] Add alias su='su -c bash' to /data/local/.bash_aliases
- [Personal preference] Modified $PS1 to PS1="\[$txtgrn\]\w $ \[\e[m\]"
- [Personal preference] Modified root $PS1 to PS1="\[$txtred\]\w # \[\e[m\]"
- [Personal preference] Modified location of .bash_history from /sdcard/.bash_history to /data/local/.bash_history
Click to expand...
Click to collapse
As any experienced bash user should know, if you want to revert/modify my personal preferences, just modify "/data/local/.bashrc", "/data/local/.bash_aliases", or "/system/etc/bash.bashrc" to your liking.
Extras...
mntsystem Make /system partition read-only or read-write. Usage:
# mntsystem [ro|rw|status]
Unzip mntsystem.zip, copy mntsystem to /system/bin, chmod 744 /system/bin/mntsystem
Click to expand...
Click to collapse
defaultshell Replace sh with bash, or revert. Usage:
# defaultshell [bash|sh|current]
Unzip defaultshell.zip, copy defaultshell to /system/bin, chmod 744 /system/bin/defaultshell
Click to expand...
Click to collapse
More extras (bash scripts) to come! Please post you own as well!!
PS: I was confused on where I should post this (General vs. Development), figured it isn't "technically" ROM related, so I posted in General. Please move if necessary. Thanks.
mntsystem extra added!
Awesome
Oh man, I have been missing BASH so much, thank you! Now I will finally have a fully-functioning terminal on my phone. I can't wait to tab-complete (seriously).
One question about installation, though. I'm supposed to "install zip from sdcard" in CWM, correct? Will this replace anything I already have, or just copy over the files for BASH? Does it leave sh as the default shell?
nteleky said:
I'm supposed to "install zip from sdcard" in CWM, correct? Will this replace anything I already have, or just copy over the files for BASH? Does it leave sh as the default shell?
Click to expand...
Click to collapse
Yes, flash through Clockworkmod. And, no it will not replace any files already on your phone (unless you already have bash, or some bash configuration files on your phone). Yes, it will leave sh as the default shell.
I can make a bash script to "replace" sh with bash, and post in the Extras if you want. When I say "replace", I mean backup /system/bin/sh, then symlink bash to /system/bin/sh. Therefore any time you try to execute a script through sh, it actually is executed by bash.
Although, for your information bash is/should-be fully backwards compatible with any sh script. I say should be, because:
Bash (Unix shell) - Wikipedia said:
The vast majority of Bourne shell scripts can be executed by Bash without modification, with the exception of Bourne shell scripts stumbling into fringe syntax behavior interpreted differently in Bash or attempting to run a system command matching a newer Bash builtin, etc.
Click to expand...
Click to collapse
Very rare chance though.
I personally keep sh as the default though, android system level scripts are designed for sh (its works), I just use bash for any script that I decide run (through a shell, or adb). So, I start connectbot with a profile that runs "/system/bin/bash" automatically at start.
New extra!
defaultshell Replace sh with bash, or revert. Usage:
# defaultshell [bash|sh|current]
Unzip defaultshell.zip, copy defaultshell to /system/bin, chmod 744 /system/bin/defaultshell
Click to expand...
Click to collapse
Hey
I'm a noob and I'm curious if this could run on my galaxy s 2 running stock?
The bash binary (with supporting files) should work on any rooted android device, however the flashable zip file I posted WILL ONLY WORK on the sidekick 4g.
If you want to install bash, you can download the flashable zip, extract it and copy the the files to their correct location (Quick, easy solution), or you can modify the update-script to work with your phone. Be sure the mounts are the same! Then alter the device check. (More difficult at first, but results in easily reuseable and distributable, flashable zip)
Sent from my SGH-T839 using XDA App
hey after I go to the emulator and type bash.. what should it read?
Sent from my SGH-T839 using XDA App
Should be a green prompt that reads:
/ #
If you cd to, for example, to /sdcard, then the prompt will read:
/sdcard #
If you enter su, then the prompt will become red and use a $ instead of #.
If your prompt says sh-4.1 # then you invoked bash as sh, ie you symlinked (or renamed) bash to sh (usually /system/bin/sh).
Sent from my SGH-T839 using XDA App
well when i enter bash this comes up... 0localhost:// $
and the last two are green ..
What terminal emulator are you using?
Sent from my SGH-T839 using XDA App
The free one.. lol. Idle I just typed emulator and that's the first one in the list ..
Sent from my SGH-T839 using XDA App
I'm not sure why its doing that. Although, all it means is that bash is being accessed from localhost, aka from the phone itself (not an outside source). It doesn't mean anything is wrong.
If it bothers you, you can use connectbot (free on the market, also includes an ssh client) instead. Just create a profile and make sure its local. Then it will work as expected.
Sent from my SGH-T839 using XDA App
Ok. Thanks .. ill let u know if it works
Sent from my SGH-T839 using XDA App
Well it work. Lol.. thank you
Sent from my SGH-T839 using XDA App
bc54 said:
The bash binary (with supporting files) should work on any rooted android device, however the flashable zip file I posted WILL ONLY WORK on the sidekick 4g.
If you want to install bash, you can download the flashable zip, extract it and copy the the files to their correct location (Quick, easy solution), or you can modify the update-script to work with your phone. Be sure the mounts are the same! Then alter the device check. (More difficult at first, but results in easily reuseable and distributable, flashable zip)
Sent from my SGH-T839 using XDA App
Click to expand...
Click to collapse
I tried doing this for my Droid 3, by changing updater-script file to the values I get from my terminal emulator, like so:
Code:
assert(getprop("ro.product.device") == "cdma_solana" || getprop("ro.build.product") == "solana_vzw");
But CWM tells me it fails because "(bad)". Do you have to somehow change the update-binary file as well?
no i didnt change the update-binary file.
however i think the source of you problem is the "/dev/" names the sidekick uses for its partitions.
for example the sidekick "/dev/" name for the partition mounted to "/system" is "/dev/block/stl9"
the droid 3 most likely uses a different "/dev" naming scheme.
find out the "/dev/" name for "/system" on the droid 3.
in the update-script file, replace "/dev/blocl/stl9" with the corresponding name for the droid 3.
find out the "/dev/" name for the "/data" partition on the droid 3.
in the update-script file, replace "/dev/blocl/stl10" with the corresponding name for the droid 3.
then rezip it, and flash. if that fails, then you could just manually copy the files to their respective location using adb, a terminal emulator app, or even a file manager.

[UTIL][22/2/13]Auto Odexer Script V2.1-Mod your odex files with a breeze

NEW VERSION 2.1, it is now much easier and like a breeze...
Before u read, u should know that this thread is for themers and modders only... and this is not a tool for odexing the whole ROM.
Hello everybody
While I was working on my ROM, and releasing an odex version, I suffered alot in working on the odex files and modifying them. Every time I should use the command line and copy certain commands from a notepad, in addition I have to edit the notepad file to make the commands odex other files... that was a pain...
ok.. the odex commands that were used are taken from this thread by sicopat, big thanks to his efforts. Actually I was thinking in how to make it easier for me to odex these modified files, so I tried to make a script that easily odex files, put the files in the right folder, run the script, and then write the name of the file u want to odex, then..... Waw the file is odexed in the phone and ready to run
For anyone that want to use these scripts, I wanted to share it with you, and I hope they would be useful to you.
Update (2/22/13) v2.1:
1. bootclasspath should be put manually from now, because $BOOTCLASSPATH doesn't work when no root in recovery.
2. Fixed a mistake in extracting and archiving files, now it's ok.
3. Now you can restore the original files if you like after odexing.
4. 7zip 32 bit is used instead of 64 bit, sorry for this, now it should work with 32 bit windows too.
5. Script re-arranged, and 7zip log operations saved in 7z_log.txt. you can check this one if you suspect in 7zip operation.
6. Backup of the original files before odexing and restore them after odexing.
Update (1/4/13) v2: All things automated, no need to edit the script for bootclasspath, and even no need to drag and drop the edited files from the modded apk or jar.
Update (9/20/12) v1.4: remount using busybox, this solves some remounting problems.
update (9/18/12) v1.3: adb added to the program, to make it work independently. And now you can pull the files after odexing if u need that.
update (9/10/12) v1.2: updated and added a missed command, it should works perfect. No need to put any files in your sdcard to make the operations... and the operations are commented so you can diagnose the problem if occurred.
download from here
Before you use, make sure u r running the corresponding odex rom in your device, then read how to use this tool.
How to use:
first extract the downloaded file to a folder then:
1. Put your bootclasspath in bootclasspath.txt (follow the instruction below in Important Note 2).
2. Put the original odex and apk (or jar) file in the "original" folder.
3. Put your modded deodexed apk (or jar) file in the "mod" folder
4. Connect your phone with usb and make sure adb is working. ( and don't forget to check the USB Debugging in the settings of your device).
5. It is better that you boot in recovery mod, specially when odexing framework files.
6. Now run the script (.bat file), choose the one for apk or for the jar, according to file you want to odex.
7. after the script opens, write the name of the apk (or jar) file without the .apk (or .jar)
8. Odexing......done.
9. after finishing odexing, u can pull the odexed apk or jar file by pressing 1 then Enter, the it will be pulled in the (pulled_files) folder. Or if you want to restore the original apk (or jar) file with its odex, then press 2.
If you find this thread useful, pressing the thanks button is appreciated.
Important note: If you r using a rooted stock kernel, then u could face problem in remounting, hence a problem in the script. To solve this problem check this post.
Important note 2:To get Your BOOTCLASSPATH:
1. In adb:
adb devices
adb remount
adb shell echo $BOOTCLASSPATH
after that, you can right click and choose (mark), then mark the bootclasspath then press (enter) now you have copied the bootclasspath. go to bootclasspath.txt in the extracted folder of the script, then paste the bootclasspath and save the file.
OR
2. In the root of your device, in the init.rc file:
look for a line with (bootclasspath= ), then copy everything on the right hand of the equal mark. Go to bootclasspath.txt then paste it there, then save the file.
screenshot:
{
"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"
}
Credit:
Sicopat- for his guide on odexing.
M_j_Nazari- for his guide on odexing and his written commands for the odexing operation. thread link
I keep getting this error when trying to use your script. Help please?
Code:
remounting
'adb' is not recognized as an internal or external command,
operable program or batch file.
daveyannihilation said:
I keep getting this error when trying to use your script. Help please?
Code:
remounting
'adb' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
This happened cuz u didn't add the adb directory to the system variables...
Anyway I updated it and it should work now without doing that...please try it and give me a feedback..
alkhafaf said:
This happened cuz u didn't add the adb directory to the system variables...
Anyway I updated it and it should work now without doing that...please try it and give me a feedback..
Click to expand...
Click to collapse
Ok mate. I'll download it and try it when I get home. Just for future reference though, how do I add the ADB directory to system variables??
daveyannihilation said:
Ok mate. I'll download it and try it when I get home. Just for future reference though, how do I add the ADB directory to system variables??
Click to expand...
Click to collapse
Go to my computer,then properties, in advanced there is Environment Variables, press it .. then in system variables add the (path) and write the directory that leads to the adb that u have when u installed android development tools ( it should be in platform-tools folder).
Try odexer first before doing that I can not try it cuz I don't know who to delete the adb from the system variables
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
alkhafaf said:
Go to my computer,then properties, in advanced there is Environment Variables, press it .. then in system variables add the (path) and write the directory that leads to the adb that u have when u installed android development tools ( it should be in platform-tools folder).
Try odexer first before doing that I can not try it cuz I don't know who to delete the adb from the system variables
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
Click to expand...
Click to collapse
Will do when I get home from work mate. So in about 6 hours. But who's counting?
daveyannihilation said:
Will do when I get home from work mate. So in about 6 hours. But who's counting?
Click to expand...
Click to collapse
Lol.. of course not.. cuz I will sleep now... its 6 am here and didn't sleep yet... and you r living the new day
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
alkhafaf said:
Lol.. of course not.. cuz I will sleep now... its 6 am here and didn't sleep yet... and you r living the new day
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
Click to expand...
Click to collapse
Ok I tried it and it didn't work properly.
Code:
remounting
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0019295d0b1c9e device
remount failed: Operation not permitted
Enter the name of the .apk file u want to odex (without .apk): Mms
sending dexopt-wrapper to the device
failed to copy 'dexopt-wrapper' to '/system/bin/dexopt-wrapper': Read-only file
system
Unable to chmod /system/bin/dexopt-wrapper: Read-only file system
sending the deodexed file to the device
failed to copy 'mod\Mms.apk' to '/system/app/Mms.apk': Read-only file system
Odexing the file:
Unable to create '/system/app/new_Mms.odex': Read-only file system
No error found
pushing the original files to the system
failed to copy 'original\Mms.apk' to '/system/app/Mms.apk': Read-only file syste
m
failed to copy 'original\Mms.odex' to '/system/app/Mms.odex': Read-only file sys
tem
Setting permissions..
Unable to chmod /system/app/Mms.odex: Read-only file system
Unable to chmod /system/app/Mms.apk: Read-only file system
Unable to chmod /system/app/new_Mms.odex: No such file or directory
copying signature from original file:
/system/bin/sh: busybox: cannot execute - Permission denied
replacing with the new odex file
/system/bin/sh: cp: not found
settings permissions for the new odex file
Unable to chmod /system/app/Mms.odex: Read-only file system
Unable to chmod /system/app/Mms.odex: Read-only file system
deleting worked- on file
rm failed for /system/app/new_Mms.odex, No such file or directory
Finished
To odex a file again, press any key
To pull the apk file, press 1
To exit, press 0
That's the error I keep getting. What does it mean? Am I doing something wrong?
daveyannihilation said:
Ok I tried it and it didn't work properly.
Code:
remounting
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
0019295d0b1c9e device
remount failed: Operation not permitted
Enter the name of the .apk file u want to odex (without .apk): Mms
sending dexopt-wrapper to the device
failed to copy 'dexopt-wrapper' to '/system/bin/dexopt-wrapper': Read-only file
system
Unable to chmod /system/bin/dexopt-wrapper: Read-only file system
sending the deodexed file to the device
failed to copy 'mod\Mms.apk' to '/system/app/Mms.apk': Read-only file system
Odexing the file:
Unable to create '/system/app/new_Mms.odex': Read-only file system
No error found
pushing the original files to the system
failed to copy 'original\Mms.apk' to '/system/app/Mms.apk': Read-only file syste
m
failed to copy 'original\Mms.odex' to '/system/app/Mms.odex': Read-only file sys
tem
Setting permissions..
Unable to chmod /system/app/Mms.odex: Read-only file system
Unable to chmod /system/app/Mms.apk: Read-only file system
Unable to chmod /system/app/new_Mms.odex: No such file or directory
copying signature from original file:
/system/bin/sh: busybox: cannot execute - Permission denied
replacing with the new odex file
/system/bin/sh: cp: not found
settings permissions for the new odex file
Unable to chmod /system/app/Mms.odex: Read-only file system
Unable to chmod /system/app/Mms.odex: Read-only file system
deleting worked- on file
rm failed for /system/app/new_Mms.odex, No such file or directory
Finished
To odex a file again, press any key
To pull the apk file, press 1
To exit, press 0
That's the error I keep getting. What does it mean? Am I doing something wrong?
Click to expand...
Click to collapse
That's because your system isn't being set to read write. And it looks like your using an old adb
Sent from my Sensation
blahbl4hblah said:
That's because your system isn't being set to read write. And it looks like your using an old adb
Sent from my Sensation
Click to expand...
Click to collapse
Ok then. Is there a way of setting my file system to read write? And do I just need to update the SDK via Eclipse to get a newer version of adb??
daveyannihilation said:
Ok then. Is there a way of setting my file system to read write? And do I just need to update the SDK via Eclipse to get a newer version of adb??
Click to expand...
Click to collapse
You need to mount it as read write.
Ask the OP to fix the script since he made it
Sent from my Sensation
Did u boot into recovery while doing this operation ?
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
alkhafaf said:
Did u boot into recovery while doing this operation ?
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
Click to expand...
Click to collapse
No I didn't. Do I just need to be on the main screen of ClockWorkMod recovery? And do I put it into recovery before I plug it into the USB cable or half way through the process?
alkhafaf said:
Did u boot into recovery while doing this operation ?
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
Click to expand...
Click to collapse
You don't need to go into recovery to do this.
Just make the script to mount system as a rw
Sent from my Sensation
blahbl4hblah said:
You don't need to go into recovery to do this.
Just make the script to mount system as a rw.
Sent from my Sensation
Click to expand...
Click to collapse
But the script already include that (adb remount)
I think the problem is in the adb itself.. I put the adb with two files with it related to it for the script to use... r these the only files related to adb? Cuz I can not test it as i can not delete the adb from the system variables.
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
alkhafaf said:
But the script already include that (adb remount)
I think the problem is in the adb itself.. I put the adb with two files with it related to it for the script to use... r these the only files related to adb? Cuz I can not test it as i can not delete the adb from the system variables.
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
Click to expand...
Click to collapse
Well my advice is to test this completely before releasing an update
blahbl4hblah said:
Well my advice is to test this completely before releasing an update
Click to expand...
Click to collapse
It should work for anyone who added the adb path to the system variables...I really tested it and works fine.
The only thing that I didn't test is how the script run independently (using the adb which comes with it without using the adb of the platform-tools by adding its path to the system variables )
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
daveyannihilation said:
No I didn't. Do I just need to be on the main screen of ClockWorkMod recovery? And do I put it into recovery before I plug it into the USB cable or half way through the process?
Click to expand...
Click to collapse
Bro. Did u add the adb path to the system variables and tried ?
If u want the instructions Google it and u will probably find it.
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
alkhafaf said:
Bro. Did u add the adb path to the system variables and tried ?
If u want the instructions Google it and u will probably find it.
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+
Click to expand...
Click to collapse
No mate I didn't because you asked me not to so that I could test how it works independently for you. You gave me the instructions in a previous post in this thread.
If that's the only way that I can get it to work (by adding it to the system variables) then I will just have to do that. I don't mind testing it for you, but it's up to you.
Let me know what you would like me to do.
daveyannihilation said:
No mate I didn't because you asked me not to so that I could test how it works independently for you. You gave me the instructions in a previous post in this thread.
If that's the only way that I can get it to work (by adding it to the system variables) then I will just have to do that. I don't mind testing it for you, but it's up to you.
Let me know what you would like me to do.
Click to expand...
Click to collapse
I really appreciate yhat , thanks alot..
But u can try to to add The adb to the system variables, maybe the problem is not with the adb..
If it works for u then please give me a feedback about it
Sent from tapatalk using sgs i9000
[ROM][GB][JW8] MesoROM v2.0 8/27/2012 Ultra Light-Smooth-Beauty
Google+

[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 ways to add this feature to you rom but always best way is to add init.d support directly by your kernel . I want to help you to do this
Requirements
1- Ability to unpack boot.img & ramdisk
2- Some basic linux shell knowloedge
3- Having Busybox located in /system/bin/busybox at your rom
Step 1: Making kernel ready
1- Unpack kernel then ramdisk
2- Open Init.rc with a text editor
3- Add this codes at the end , before the paragraph which there is "stop bootanim" command in it :
Code:
service sysinit /system/bin/sysinit
oneshot
4- Save , Exit and repack ramdisk and boot.img
Step 2 : Making Rom Ready !
1- Open /system/bin/sysinit
2- Add this codes :
Code:
#!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
chmod 777 /system/etc/init.d/*
logwrapper busybox run-parts /system/etc/init.d/
3- Set permissions of sysinit to 777 or 755 ( rwxrwxr-x | rwxrwxrwx )
4- Make a directory at system/etc and name it init.d
Now you have init.d support !
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.:victory:
Someone had to document this ^^, good job
RobyRc said:
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.:victory:
Click to expand...
Click to collapse
Pimp uses one of the worst method to add this feature to your ROM ! it doesn't effect on kernel so : 1- running init.d is slower 2- init.d is not stable at all 3- not usable for ones want to add this feature to his/her kernel 4- not run init.d at end of boot so some script which needs some binaries that are not loaded yet doesn't work 5- Can not be used for room devs
This method is the official method which is used on most famous kernels such as brood kernel . and best for devs and users
any way that depends on users idea that this is good or not
RobyRc said:
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.:victory:
Click to expand...
Click to collapse
Why are you so rude?
There are ways and ways to express own opinions... And alireza has just explained you why this method is better then PIMPMYROM.
Sent from my AriesVe using xda premium
alireza7991 said:
Pimp uses one of the worst method to add this feature to your ROM ! it doesn't effect on kernel so : 1- running init.d is slower 2- init.d is not stable at all 3- not usable for ones want to add this feature to his/her kernel 4- not run init.d at end of boot so some script which needs some binaries that are not loaded yet doesn't work 5- Can not be used for room devs
This method is the official method which is used on most famous kernels such as brood kernel . and best for devs and users
any way that depends on users idea that this is good or not
Click to expand...
Click to collapse
You are wrong.
RobyRc said:
You are wrong.
Click to expand...
Click to collapse
well, if he is wrong you can explain why, he explained why according to him is better this way, you could explain why not
What happens if your ROM doesn't have /system/bin/sysinit?
vMAC said:
What happens if your ROM doesn't have /system/bin/sysinit?
Click to expand...
Click to collapse
* Your rom has sysinit -> You have already init.d support and no need to this guide
* Your rom has'nt it -> You need to do my guide to get init.d support
alireza7991 said:
* Your rom has sysinit -> You have already init.d support and no need to this guide
* Your rom has'nt it -> You need to do my guide to get init.d support
Click to expand...
Click to collapse
And is it possible to create sysinit and init.d folder with an updater script?
GT-af said:
And is it possible to create sysinit and init.d folder with an updater script?
Click to expand...
Click to collapse
sure but do'nt forget :
1- your kernel must support init.d ( look at first post step 1)
2- do step 2 at fist post on sys init or you wo'nt have init.d support !
I have MTK 6577 device this will work ?
andrman1 said:
I have MTK 6577 device this will work ?
Click to expand...
Click to collapse
all android devices are supported
alireza7991 said:
all android devices are supported
Click to expand...
Click to collapse
In init.rc file I haven't code "stop bootanim" why and where I put this code ?
And I haven't in /system/bin file "sysinit" ?
andrman1 said:
In init.rc file I haven't code "stop bootanim" why and where I put this code ?
And I haven't in /system/bin file "sysinit" ?
Click to expand...
Click to collapse
Place those codes on the middle of init.rc ; the only difference is execute order . if you put it at first init.d wont execute becuase we have'nt system mounted still and if you put it at the end you will stop at your homescreen for a few secound so its better to execute it while you are seeing bootanimation
make new file name it sysinit and put codes siad in OP inside it .
Step 2 : Making Rom Ready !
1- Open /system/bin/sysinit
2- Add this codes :
Code:
#!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
chmod 777 /system/etc/init.d/*
logwrapper busybox run-parts /system/etc/init.d/
Is this needed?
I've seen some ROMs not having /system/bin/sysinit but init.d kernel support, and I've tested a ROM myself not having this file, but the
99test init.d script gave some output to /data/tmp. So I guess it was executed properly.
t-ryder said:
Step 2 : Making Rom Ready !
1- Open /system/bin/sysinit
2- Add this codes :
Code:
#!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
chmod 777 /system/etc/init.d/*
logwrapper busybox run-parts /system/etc/init.d/
Is this needed?
I've seen some ROMs not having /system/bin/sysinit but init.d kernel support, and I've tested a ROM myself not having this file, but the
99test init.d script gave some output to /data/tmp. So I guess it was executed properly.
Click to expand...
Click to collapse
There are many ways to get init.d working , you may include sysinit in init.rc or you may completely remove it and use a direct code in init.rc to execute init.d scripts or ....
Here in this method , I used sysinit in user-space to let init.d be dynamicly modifed or removed without repacking the kernel
alireza7991 said:
There are many ways to get init.d working , you may include sysinit in init.rc or you may completely remove it and use a direct code in init.rc to execute init.d scripts or ....
Here in this method , I used sysinit in user-space to let init.d be dynamicly modifed or removed without repacking the kernel
Click to expand...
Click to collapse
So just the file
Code:
#!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
chmod 777 /system/etc/init.d/*
logwrapper busybox run-parts /system/etc/init.d/
would make it run (having busybox in /xbin) without having to mess around in the kernel using e.g. virtous ten studio?
t-ryder said:
So just the file
Code:
#!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
chmod 777 /system/etc/init.d/*
logwrapper busybox run-parts /system/etc/init.d/
would make it run (having busybox in /xbin) without having to mess around in the kernel using e.g. virtous ten studio?
Click to expand...
Click to collapse
there are many strange and not suggested methods which add init.d without repacking kernel but the best method is using init.rc .
But I have some ideas on getting init.d working withouy messing around kernel . I am going to test them ;
alireza7991 said:
there are many strange and not suggested methods which add init.d without repacking kernel but the best method is using init.rc .
But I have some ideas on getting init.d working withouy messing around kernel . I am going to test them ;
Click to expand...
Click to collapse
Hi; I googled for a while to find a way to add init.d to my ROM and found your thread. Can you also explain how to adjust the source tree before compilation that I get the init.d? I am compiling AOSP with the stock kernel. I saw a few posts before that this method just works for a kernel which supports init.d. I have no clue if the stock kernel does. Thanks

[SCRIPT] Recovery & Kernel Management Tool

Hi guys,
I had some free time and decided to write this script specially for Terminal Emulator's users like me.
It's a simple script allows you to:
Backup
Restore backup
Flash
Reboot in any mode
Copy the script to /system/bin
recovery and /or kernel IMG files without the need to input so long codes again and again.
This script will make a new folder named Recovery-Kernel-Tools in your internal storage, including 3 more folders inside it:
Backups (max one backup for each partition, names are "case-sensitive")
Flash (but any recovery.img / boot.img to flash them, names are "case-sensitive")
Input (for future use)
Everything is self explanatory, when you execute this script for the first time, it will ask you to set your partitions, you can change them later at any time.
If it's useful for you and you need more options, feel free to suggest me.
Download link: ReKeTv1
After downloading, cd to installation folder and input:
Code:
su
sh ReKeTv1
If you're using Script Manager, just execute it as root.
Latest busybox is required.
Bassel Bakr said:
Hi guys,
I had some free time and decided to write this script specially for Terminal Emulator's users like me.
It's a simple script allows you to:
Backup
Restore backup
Flash
Reboot in any mode
Copy the script to /system/bin
recovery and /or kernel IMG files without the need to input so long codes again and again.
This script will make a new folder named Recovery-Kernel-Tools in your internal storage, including 3 more folders inside it:
Backups (max one backup for each partition, names are "case-sensitive")
Flash (but any recovery.img / boot.img to flash them, names are "case-sensitive")
Input (for future use)
Everything is self explanatory, when you execute this script for the first time, it will ask you to set your partitions, you can change them later at any time.
If it's useful for you and you need more options, feel free to suggest me.
Download link: ReKeTv1
After downloading, cd to installation folder and input:
Code:
su
sh ReKeTv1
If you're using Script Manager, just execute it as root.
Latest busybox is required.
Click to expand...
Click to collapse
There are three files in it...which 1 to download?
Sent from my GT-S7500 using Tapatalk 2
tandon.ayush said:
There are three files in it...which 1 to download?
Sent from my GT-S7500 using Tapatalk 2
Click to expand...
Click to collapse
ReKeTv1
Don't forget to leave some suggestions.
Bassel Bakr said:
ReKeTv1
Don't forget to leave some suggestions.
Click to expand...
Click to collapse
Tried with both terminal emulator and script manager
Got this error
" exec /system/bin/sh '/mnt/sdcard/download/ReKeTv1.txt'
# bin/sh '/mnt/sdcard/download/ReKeTv1.txt'
head: /mnt/sdcard/Recovery-Kernel-Tools/partitions: No such file or directory
tail: can't open '/mnt/sdcard/Recovery-Kernel-Tools/partitions': No such file or directory
tail: no files
Root access denied!
Please issue su command first"
Any solution?
Sent from my GT-S7500 using Tapatalk 2
tandon.ayush said:
Tried with both terminal emulator and script manager
Got this error
" exec /system/bin/sh '/mnt/sdcard/download/ReKeTv1.txt'
# bin/sh '/mnt/sdcard/download/ReKeTv1.txt'
head: /mnt/sdcard/Recovery-Kernel-Tools/partitions: No such file or directory
tail: can't open '/mnt/sdcard/Recovery-Kernel-Tools/partitions': No such file or directory
tail: no files
Root access denied!
Please issue su command first"
Any solution?
Sent from my GT-S7500 using Tapatalk 2
Click to expand...
Click to collapse
Run as root
Or in terminal emulator type
su
First
Bassel Bakr said:
Run as root
Or in terminal emulator type
su
First
Click to expand...
Click to collapse
Did both...still the same error
Any solution??
Sent from my GT-S7500 using Tapatalk 2
tandon.ayush said:
Did both...still the same error
Any solution??
Sent from my GT-S7500 using Tapatalk 2
Click to expand...
Click to collapse
In terminal emulator:
su
set -x
sh ReKeTv1 2> /sdcard/log1.txt
sh -n ReKeTv1 2> /sdcard/log2.txt
Then upload log1.txt & log2.txt files here.
Bassel Bakr said:
In terminal emulator:
su
set -x
sh ReKeTv1 2> /sdcard/log1.txt
sh -n ReKeTv1 2> /sdcard/log2.txt
Then upload log1.txt & log2.txt files here.
Click to expand...
Click to collapse
"No such file or directory"in both logs
Sent from my GT-S7500 using Tapatalk 2
tandon.ayush said:
"No such file or directory"in both logs
Sent from my GT-S7500 using Tapatalk 2
Click to expand...
Click to collapse
After set -x cd to installation directory then complete the code.

[Guide] Viper4Android for Sprint S4 on Lollipop [5.0.1]

Make a Nandroid backup first!!
For Stock Lollipop:
You will need to install busybox for the init.d support on your phone. Follow these instructions:
http://forum.xda-developers.com/showpost.php?p=32716412&postcount=2
The guide provides a test script that you need to flash to ensure it works properly. Once you install init.d and it is working properly push the file below
For Custom Roms:
Typically init.d and busybox are included. If it doesn’t support it then install using the method above. If it does support init.d and already has busybox push the file below. I would download the test script above just to make sure the init.d works properly.
The Viper4Android script file contains the following:
Code:
#!/system/bin/sh
/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"
Resource:
http://forum.xda-developers.com/showpost.php?p=60672119&postcount=18334
Push file to system/etc/init.d folder and set the right permissions (rwx-rwx-rwx). Remove the .txt at the end of the file.
The second file you will need to edit. Its the init.qcom.post_boot.sh. This is needed so the Viper4Android script continues to work after reboots. Open the file using ES File Explorer or something equivalent. The file is system/etc. Open init.qcom.post_boot.sh and scroll all the way to the end and add the following three lines. Make sure there is a empty line at the end.
Code:
# init.d support
run-parts /system/etc/init.d/
Download Viper4Android:
http://vipersaudio.com/blog/?page_id=48
Follow app installation instructions
Enjoy!!!
Here is a material dark one.
http://forum.xda-developers.com/showthread.php?t=3190352
Sent from my EVO using Tapatalk
Hi
The Viper4Android script doesnt work for me.
Tried to execute it manually through terminal and i get "Failure".
Can you help me out on that ? Am i missing out someting ?
PS : I had installed viper4android and even installed driver yet i see driver status abnormal and on every reboot it asks me to install driver again.
Thanks
SG
I don't get it. I followed all the instructions, I have init.d (kernel auditor confirms it), my device is rooted with busybox installed and it still says that busybox "does not work."
Suggestions?

Categories

Resources