yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] MetinKale38:
I know, I also tried it there before, the only answer was that I should ask here.

Btw do you know whether install-recovery.sh is executed from the kernel or from the framework?

Tapatalked with my JellyBean powered HTC Desire
[Android Software/Hacking General [Developers Only]] atanasmk16:
list of files in init.d:

10mounts2sd

71extreme

99complete

S02minfree

S06netspeed

S07kernel

S86Battery

S86battery*

S88smoothness

S89touch

S99smoothness

it says init.rc is empty, and there is no install-recovery at all...
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Well this is a thread for an init.d script, not a thread for the init.d implementations. Init.d is executed from init which is placed in the ramdisk. These differs a lot from different devices and ROM's, so it will have to be sorted out in the sections specific to your device.

install-recovery.sh is executed from the ramdisk (kernel/boot.img). There should be an entry for it in /init.rc

If init.rc is empty, then your device would not be able to boot. Did you check the file from the recovery? You have to grab the file from within your booted Android OS using a root file manager or ADB.
[Android Software/Hacking General [Developers Only]] frankfurts:
Hey there, The script always runs in safe mode for me, I'm using the init.d script from pimp my ROM. I was Wondering

If there is a script I can flash that will enable proper init.d support so that mounts2sd doesn't need to run in safe mode.

Its probably a stupid question and I'm guessing proper init.d support has to be in the kernel or something...I'm pretty desperate though Haha. My phone has a locked boot loader so other kernels and ROMs is not an option. I do have root and custom recovery though.

Cheers
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I have tried for a long time to come up with a way of adding proper init.d to a device. The problem is that it requires altering the ramdisk (Boot.img), which can only be done from the recovery. The even bigger problem is that the boot.img, it's partition and the way it is flashed differs completely depending on the device. So creating a basic recovery script is not an option. You would have to add support for each device into the script. I have been thinking of making such a script, and then just add one device at a time to it. But for now I am more interested in finishing the new script and app. Also with a locked boot loader, I am not sure it would be a solution for you.

The good news though, is that I did manage to come up with a hack for the init.d script, which enables you to use all of the script options on any type of init.d implementation. Go to the configure screen, scroll down and check the option "Disable Safe-mode". This will enable the hack whenever improper init.d is detected, and allows you to use options like data and dalvik (Don't use R-Mount. This will most likely provide boot loop issues)
[Android Software/Hacking General [Developers Only]] frankfurts:
That's OK I just wanted data on my SD, disabled safe mode and its working perfectly.

Cheers
[Android Software/Hacking General [Developers Only]] BleedingIris:
Hi.. not sure whether it'll be of help to complete your quest for init.d support script.. but here are binaries to split up boot.img on phone ~ramdisk and kernel.. I used this on my forum to create a universal kernel for cm9,cm10 and cm10.1...since the only difference between them is ramdisk changing..

You can probably use it to unzip boot.Img and may be kernel on phone add support (may be ) Or at least make you get one step closer ;)

Go to this page, skip down to the last line of first post to find the original link post

http://xdaforums.com/showthread.php?p=40035607

LâTêS†↭ⓛⓘⓝⓚⓢ™CM10 HTC A310E.

If I haven't given you link, it's above. Just click it
[Android Software/Hacking General [Developers Only]] acestars:
how about feature to move directory /cache/download only to /sd-ext not all /cache partition?

thanks.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Thanks. Might come in handy :)

Sure, I will add that to the new script
[Android Software/Hacking General [Developers Only]] acestars:
wow, thanks for fast respond.

i am waiting then.
[Android Software/Hacking General [Developers Only]] hariraj96:
FORCE CLOSES system apps with SAFE MODE Disabled

I Use CM 10.1 on lg p500 and the apps such sa gapps,trebuchet launcher,,,,, almost everything FCs after i disablled the safe mode.is there a soln???
[Android Software/Hacking General [Developers Only]] atanasmk16:
My init.rc is not empty. It says it is. It just won't upload. Can you please tell me how to completely remove it?
[Android Software/Hacking General [Developers Only]] BleedingIris:
Dalvik cache problem. Try wiping dalvik and cache and reboot.

On the permanent side, try to get a kernel with proper init.d support

LâTêS†↭ⓛⓘⓝⓚⓢ™CM10 HTC A310E.

If I haven't given you link, it's above. Just click it
[Android Software/Hacking General [Developers Only]] CRudner:
GT-N7100 (Samsung Galaxy Note 2)

Hi dk_zero-cool,

I was wondering if its possible to get support for Sammy devices that use ExtSD path /ExtSdCard?

As your set path is /ext-sd which isn't used on most Sammy devices.

I currently use a IntSd2ExtSd mod script that swaps the Internal and External Sd's and I am looking for a better alternative as the script I use it very temperamental.

Many thanks
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
You have misunderstood what this is. This script has nothing to do with the storage partitions. This script moves content from /data to /sd-ext (An extra second external partition). /ExtSdCard is not sd-ext.
[Android Software/Hacking General [Developers Only]] CRudner:
Ohh.. :p My bad. Thanks :D
[Android Software/Hacking General [Developers Only]] atanasmk16:
I know the init.rc file is not empty. For some reason it says it is. I think that fully removing the script will solve this problem. So please will you tell me how to fully remove it?
[Android Software/Hacking General [Developers Only]] post-mortem:
Please clarify.

Uninstall the app, and delete its script in /system/init.d.
[Android Software/Hacking General [Developers Only]] Vinsane:
Will this work for a stock rooted Asus TF300 running 4.2.1?

16GB internal which I think it considers it as external? Yet I have another external micro SD 32GB in it too?
[Android Software/Hacking General [Developers Only]] Nightshadow931:
You need to have an sd-ext partition on ur sdcard, and kernel which supports init.d
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
So I could no longer take the fact that you could not create ramdisk mods without targeting specific devices. And since a lot of people are having problems implementing other init.d methods, I took a little mount2sd break to do something about it.

So if you are in need of some init.d replacements or you do not have init.d at all, then head over to the Injector thread. At the moment, only a few devices have been added to Injector. I will add more, and if you have an idea about which devices to start with, then let me know. But do not recommend devices if you are not willing to help with it. I cannot promise that I will be able to add your desired device without getting a little info from you.
[Android Software/Hacking General [Developers Only]] mb88_peace:
Hey guys, I like to use this patch/app(!), but I already have activated a2sd via Terminal Emulator. I want to first deactivate a2sd by terminal, and then, install mounts2SD (to prevent any possible conflict). Can you please tell me the command of deactivation of a2sd?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Just install Mounts2SD. There will be no conflict as Mounts2SD will remove the other
[Android Software/Hacking General [Developers Only]] Bornin:
Hi,

So I'm planning to try this script.

I'm starting off with a new ROM install (ViperS 1.6.3) on my Sensation XE.

Instead of maybe running into all kinds of problems I feel it's better to ask how to proceed from scratch.

I copied all important data to PC

Now I need to format my sd with an Ext4 partition, How big should this be? I got a class10 32Gb SD

Then I install rom just like allways??

I'd like to use Titanium Backup to restore ALL my apps+data and settings.

Do I use this script before or after TB restore?

and one last question, for what is/could be the optional swap partition used for?

TIA

Edit: meanwhile I got it all working. Tnx for your great scripts
[Android Software/Hacking General [Developers Only]] Fat_boy555:
Im getting storage threshold not changed. The the sqlite3 binary returns results code 255
[Android Software/Hacking General [Developers Only]] dejanxxxx:
I have problem, use AOKP Milestone 6#, and install via Recovery, but when reboot I see that Script dont executed on boot, and dont see EXT partition. What do?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Get the sqlite installer from play store. You are properly missing the sqlite libraries and in a need for a proper install of this binary.

Do you have init.d support? Otherwise take a look at THIS
[Android Software/Hacking General [Developers Only]] jader13254:
Optimizing apps = rebuilding dalvik cache - thats why :P
[Android Software/Hacking General [Developers Only]] gu5t3r:
I know that =)

...but why is it generating dalvik again if I moved it?

...I experienced the same when I enabled M2SD on friends PRO... Whole dalvik was regenerated instead moved existing....
[Android Software/Hacking General [Developers Only]] MetinKale38:
Wiping (and regenerating) dalvik is always good, and nothing get lost.

Tapatalked with my JellyBean powered HTC Desire
[Android Software/Hacking General [Developers Only]] gu5t3r:
I know that but it's time consuming =)
[Android Software/Hacking General [Developers Only]] MetinKale38:
How often you do the procedure?

Tapatalked with my JellyBean powered HTC Desire
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
You never move an existing dalvik cache. These caches are easily corrupted. Also, as far as I can see from logcat, dalvik also registers the inodes of each cache, and would be able to see the change when moving. This could produce issues or force a rebuild of the cache anyway. So when moving, the cache is deleted, the mount point is changed and dalvik rebuilds the cache in the new location. This is the best way to handle this type of content.

Rebuilding might consume some times, but so does moving it. And it is not like you move it back and fourth on every boot?
[Android Software/Hacking General [Developers Only]] gu5t3r:
Few times until I managed to switch from Link2SD to Mounts2SD without data loss...

Installing directly works from first time...

OK =)

Didn't know about inode tracking...
[Android Software/Hacking General [Developers Only]] lousou76:
The easiest way to migrate from link2sd is to first open link2sd and use the batch feature to select all user apps to be moved to sd (not link, move to the fat partition)

After that you can enable mount2sd reboot and when finished open link2sd again and use batch move all from sd to intrrnal storage.

This will move everything to the right place and you dont have to worry about internal space during movements. That way you unlink everything to fat, then mount data on sdext and then move everything to mounted data which link2sd sees as internal.

You could remove link2sd mount scripts after that but it is not nessessary, mount2sd works.

If you do, you have to remove link2sd from init.d, and also file install-recovery.sh from etc and debuggerd.bin from bin or xbin system folder.
[Android Software/Hacking General [Developers Only]] kønich lars:
Updating problem

Hello,

at first, I'd like to thank you for your work done here. The app realy saves me as the Galaxy Ace only has 270 MB internal memory...

But using the App, I encounter a problem when trying to update the custom ROM (an unofficial Cyanogen Mod 10.1). When applying the update with ClockWork Recovery, the prior installed apps are no longer avalable. As one may guess, I am far away from beeing able to move the data back to internal memory to update...

The script is running in safe mode by default and thus only Cache and Apps are on SD card if this information helps.

Does anyone know how to successfully update Android with this configuration?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Go to the first post of this thread, download the recovery zip, update your ROM, flash the zip from here and reboot. Your problem is that the init.d script get's deleted when you flash a new ROM. Then when you reboot, your apps are on sd-ext but you have no script to attach the folders on to the data partition. And Android does not look for apps anywhere else.

About safe-mode. You can turn that off in the apps configuration. It has proven to work quite stable, although it enables a pretty ugly hack to make it possible. Another solution is to keep a look out for THIS. I have not yet added the Ace to the list, but it is on the todo list.
[Android Software/Hacking General [Developers Only]] bigrammy:
FYI Works on MT6575 SoC mtd partitions

Phone: HDC A9300

Android: V2.3.6 mtd yaffs2 Partitions sd-ext = ext3

SoC: Mediatek MT6575

120mb available memory :crying:

# cat /proc/filesystems
cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev devpts
ext3
nodev ramfs
vfat
msdos
yaffs
yaffs2
nodev mtd_inodefs

Hi,

First thanks for the apk :good:

I had tried lots of manual ways to use the ext3 partition on my sdcard all failed to keep the mounts to the ext3 partition mounted for some strange reason. :confused:

Anyway just when I was about to give up I spotted your app so thought I would give it a try & although I did not hold out much hope :eek: Having tried lots of others I could not find one that did all what I wanted to do which was move everything in data to the sd-ext ext3 reverse mount I think you call it.

Well I had to run the unsafe mode for it to take and after a shaky reboot Viola :victory: seems to be working fine at the moment I just hope it continues to be stable.
[Android Software/Hacking General [Developers Only]] treb88:
Will this work on cyan, aosp, aokp base roms??
[Android Software/Hacking General [Developers Only]] digitalmahdi:
I installed it from Google Play! the settings says that busybox and init.d is configured! both have the green tick! but my phone never restarted!

i have ext4 partition i even made a swap! whenever i restart the phone just boots normally!

it seems the app is totally deactive! the status point and everything else is like gray!

i downloaded the zip as well and installed it from zip using cwm but no difference!

can someone tell me what have i done wrong?

thanks.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The application does nothing. It just allows you to see the current status and change the settings. All the work is done by the upstart script. In order to have this executed during boot, you need init.d support.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
init.d folder exists on my phone and 10mounts2sd file is there

how can i be sure that i do have init.d support?
[Android Software/Hacking General [Developers Only]] ibub:
There is a test you can perform. It's listed in the OP of this thread:

http://xdaforums.com/showthread.php?t=1933849

sent from the p509 that I thought I killed again... no trouble at all :cool:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The folder is not enough (The app will create it itself if it does not already exist, which is properly why you have it). You need something in your initrd (ramdisk) to execute the content of that folder during boot.

What device do you have?
[Android Software/Hacking General [Developers Only]] digitalmahdi:
thanks!

i am using htc chacha! :crying:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Okay then, I will have a look. Will be right back
[Android Software/Hacking General [Developers Only]] digitalmahdi:
thank you very much! its been over 12 hour i've wiped the device to use this app! :crying::crying:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
In the attachment below is an altered recovery zip from my init.d_injector project. The file below have been added support for your specific device (Will be in the main project on my next release). It will inject init.d support into your boot.img, just flash it in your recovery.

And do please make a nand backup first. This has been tested on some devices, and even though most of the MTD devices, including yours, is mostly the same, things can still go wrong.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
thanks. im trying it! after i installed it what shuld i do?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Nothing. After you have flashed this in recovery, you will have init.d support and the Mounts2SD upstart script should execute when you boot into your OS.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
I am getting "Installation aborted." :crying::crying:

error in /sdcard/init.d_injector-special.zip
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
That is strange. It is the original zip which I just added a config file for. No specific error message?

I will try it on one of my test devices.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
no other error. just this thing:(:(
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Try this. I have replaced the updater-binary with one from a ROM zip from your devices forum section.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
it seemed to be working but at the end it said injector wasn't successful and referred me to injector.log into sd card which contains:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The boot.img get's written the same way as used by ROM's for your device. Do you have one of those HTC devices where you have to separately write boot.img via fastboot?
[Android Software/Hacking General [Developers Only]] digitalmahdi:
i dont know. my device was s-on and i unlocked it. before going to cwm also i see the fastboot menu and i choose recovery! sorry i'm noob on these stuff
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Did you unlock it using a hack from XDA, or did you unlock it using a method from HTC themselves?
[Android Software/Hacking General [Developers Only]] digitalmahdi:
i used htcdev website to get it unlocked and then used xda-dev tutorials to get it rooted.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Most of the devices unlocked via htcdev, are not provided with real S-Off. It just unlocks the system partition and makes it accessible from within a booted OS and unlocks the boot partition to be flashed via fastboot, but not via the recovery.

Download this.

It will extract your boot.img, inject init.d into it and move it to your sdcard. You will then need to extract it from the sdcard into your PC and use fastboot to flash it into the boot partition.

If you don't know how, check out this. It is for the HTC One S, but it works the same on all fastboot enabled devices.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
thanks. i downloaded adb and fastboot and driver and this file u provided! but in that tut i require a boot.img! is it something specific? where can i get it?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Just run the zip I provided in the post above in your recovery. It will put a boot.img in your sdcard. Extract that boot.img from the sdcard and use fastboot to flash it.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
done!

after i did fastboot reboot i opened mounts2sd but it still doesnt show anything!?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Can you attach the new boot.img here? I would like to take a look at it. Also, what does the log say (Just go to the log from within the app).
[Android Software/Hacking General [Developers Only]] digitalmahdi:
i attached the img.

the log is empty in mount2sd
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Well the init.d injection worked fine. You now have, not only init.d support, but a proper implementation of it.

The problem must lie somewhere else. You have two options.

Update busybox, just search busybox in Play Store. Most sd-ext issues are due to old and limited busybox versions and there is a good chance that updating this will fix whatever issue you have.

Find out exactly what the issue is. Now that you have ADB working on your machine, this is no problem at all. Just turn off your device. Open a terminal on your computer and type "adb logcat". Turn your device on and grab some of the first lines of the log output (Just press Ctrl+C about 10 seconds after the output starts printing). Somewhere in the top of the log, some errors about mounts2sd should be printed, explaining the exact issue.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
i think the problem is about init.d again! i installed this universal init.d thing and its test said also it is not enabled.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
In that case, it can only be /system/bin/sysinit. Make sure that the file exists and that is has executable rights.
[Android Software/Hacking General [Developers Only]] AlbusDumbelodr:
Hi,

I have installed Mount2SD from the app store on my HTC Explorer.

I have a 8GB Class 10 card and i made a 2GB ext4 partition. But after installing about 20-25 apps , it says internal memory full.

130MB of 150 MB of my internal memory has been used while only 230MB of 2GB from the ext4 has been used.

Is there a way i can move more stuff from internal memory to the ext4 partition ??

Thanks
[Android Software/Hacking General [Developers Only]] digitalmahdi:
the file is there. i give it all permissions!

i checked the init.d with uni-init application from xda it says i have init.d enable :( why isnt it still working? do i have to do anything else for mounts2sd? downloaing it from google play or installing it from zip is enough?
[Android Software/Hacking General [Developers Only]] digitalmahdi:
dk_zero-cool i believe no settings are being saved! i set everything in configuration file! when i reboot the phone every change is gone! did anyone had the same problem before?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The script should still run with defaults. You need to get a log during boot
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Just enable more options, dalvik and maybe data to
[Android Software/Hacking General [Developers Only]] digitalmahdi:
I read all this topic! somebody had same problem and seems he fixed it with removing gapps and flashing it after installing this software.

can you please help me how can i unflash gapps and install it again later?

thanks.
[Android Software/Hacking General [Developers Only]] digitalmahdi:
here is 10 first second of logcat when i turn the device on!:crying::crying:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I know that this is getting frustrating, but this log is not starting at the beginning. This log starts with an entry from SystemServer which is not started until after init.d has been run.

In Linux we can do something like this

adb logcat > log.txt

The DOS in Windows has many similar methods as the Linux/Unix shell, so this might work for you as well. What it does is redirecting the output to a file. That way you will not loose anything. The shells can only display a max amount of lines at a time.
[Android Software/Hacking General [Developers Only]] Lark987:
Im using your previous version on my P500 RUnning Cm7.2 Nightly.. and it works well.. I dont have problem with it.. Im gonna Try the latest build..