yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
And you provided a log all by yourself, I love that :)

Unfortunately you copied the wrong part of it, there should be another E/ group above the part you copied with the actual error, the part you provided is just a symptom of the crash, not the cause. If you can provide the other part, I will have this fixed for you :)

Can you provide your init.rc files? This means any file starting with init and ending with .rc (Located in the root location /init.rc).

And also, could you try installing M2SD again, boot it and grab it's log. If you can't use the device after it is booted, then reboot into recovery and grab it there. You can locate the logs in /data/m2sd.fallback.log (If this exists) and /data/local/mounts2sd.log

I am writing this with a smile, so don't take it the wrong way. Remember, there is no tone in messages. But you build your own ROM's? What is the first thing you would do when you finish a ROM and it won’t boot? It is going to be difficult to expect logs from regular users when you can't even expect it from fellow devs :)

Love to help, but really need something to go on here.

Yes, this is becoming a regular issue. Android has a rule that states, "I will not install applications on your device, unless you have at least 10% of the full data size available". This means that if your data partition is 1GB, you need at least 100MB of free space left on it in order to install from market. I think this is a little overkill, especially since I have 11GB on my data partition, so Mounts2SD has an option to lower this value, and by default it will set this to 1% (10MB on a 1GB partition).

To do this, it uses sqlite3 to alter the systems database. Most custom ROM's includes this binary by default, but not many of them remembers to includes the libraries it needs to work. So your problem is that you have sqlite3, but it does not work, because it is missing it's libraries. You can fix this by searching the Play Store for sqlite3 and install an sqlite3 installer app that can fix it.
[Android Software/Hacking General [Developers Only]] Rashed97:
Haha, sure, no prob. Thought you might have has similar issues at one point.

Although I think I found it myself. My sd-ext partition seems terribly corrupted. CWM can't format it, and file explorers can't even read the stuff in it. So I'm gonna try fixing it up in Ubuntu first ;)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Have encountered it before, but for different reasons, one being the cause you just mentioned :)
[Android Software/Hacking General [Developers Only]] Rashed97:
Haha, thought so. Now if only Windows 8 wasn't such a pain in the a** when it comes to partitioning. I'm having to install Ubuntu on a partition since my VM doesn't work so well with my SD Card reader... I'll tell you if I was able to fix it tomorrow ;)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
MiniTool?

Don't use Windows myself, but this seams to be the tool used by most Windows users to fix sd-ext partitions.
[Android Software/Hacking General [Developers Only]] Rashed97:
Hm I contemplated it, but I need Ubuntu physically installed for other things too, but I've been procrastinating. It's repartitioning right now, but it's still at 5% (been running for 30 min though)
[Android Software/Hacking General [Developers Only]] hacktrix2006:
@DK

Sorry mate about that, I have attached the logcat that i used with the full log and not just a section of the log.

Hope this helps. I am on Sense 4.1 Lite on DHD.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
No worry, to help you an others better understand these logs, you can have a look below to see what I needed.

E/AndroidRuntime( 5337): FATAL EXCEPTION: AsyncTask #1
E/AndroidRuntime( 5337): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime( 5337): at android.os.AsyncTask$3.done(AsyncTask.java:278)
E/AndroidRuntime( 5337): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
E/AndroidRuntime( 5337): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
E/AndroidRuntime( 5337): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
E/AndroidRuntime( 5337): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
E/AndroidRuntime( 5337): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
E/AndroidRuntime( 5337): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
E/AndroidRuntime( 5337): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
E/AndroidRuntime( 5337): at java.lang.Thread.run(Thread.java:864)
E/AndroidRuntime( 5337): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5337): at com.spazedog.lib.rootfw3.extenders.MemoryExtender$Memory.listSwaps(MemoryExtender.java:113)
E/AndroidRuntime( 5337): at com.spazedog.mounts2sd.tools.Preferences.loadDeviceConfig(Preferences.java:494)
E/AndroidRuntime( 5337): at com.spazedog.mounts2sd.ActivityTabController$1.doInBackground(ActivityTabController.java:200)
E/AndroidRuntime( 5337): at com.spazedog.mounts2sd.ActivityTabController$1.doInBackground(ActivityTabController.java:1)
E/AndroidRuntime( 5337): at com.spazedog.lib.taskmanager.Task$1.doInBackground(Task.java:356)
E/AndroidRuntime( 5337): at android.os.AsyncTask$2.call(AsyncTask.java:264)
E/AndroidRuntime( 5337): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
E/AndroidRuntime( 5337): ... 5 more
E/EmbeddedLogger( 1683): App crashed! Process: com.spazedog.mounts2sd
E/EmbeddedLogger( 1683): App crashed! Package: com.spazedog.mounts2sd v19 (3.1.0)
E/EmbeddedLogger( 1683): Application Label: Mounts2SD

And the important part of this

E/AndroidRuntime( 5337): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 5337): at com.spazedog.lib.rootfw3.extenders.MemoryExtender$Memory.listSwaps(MemoryExtender.java:113)

These two line explains the problem and where to locate it :)

EDIT:

And the problem was just me forgetting to check a variable for NULL before attempting to use it. It is fixed, will release a new version to day I hope with further improvements. Just as soon as I finish my work-around to fix the new hanging issue with kutch new version of he's SuperUser Daemon for Android 4.3
[Android Software/Hacking General [Developers Only]] mixednuts:
And I recall you being ever so excited prior to you picking up your copy of Windows 8... seems like your tune has changed. :p
[Android Software/Hacking General [Developers Only]] siavash2death:
sorry,DK. can you attach that sqlite installer you mentioned,here? I don't have access to playstore. I just found an app named sqlite installer,but when I tap on install,it gives me force close! what should I do?
[Android Software/Hacking General [Developers Only]] hacktrix2006:
Thanks DK, glad i could learn from your wisdom mate. Will test new version once released.
[Android Software/Hacking General [Developers Only]] Rashed97:
Yup that fixed it. But I've got another question that's not as much relating to Mounts2SD. It's about the improper implementations of init.d. How does safe-mode work in Mounts2SD and how did you design Injector? I tried fixing my init with this: http://review.androidarmv6.org/#/c/5708/ but it broke Google Play. Can you offer any advice there? I've only been dealing with sd-ext logic for about 2 weeks (pretty sure you can tell I'm a novice at this ;) )

Oh, I still love it. It's just that Microsoft didn't build a (functional) partitioning tool in it. But I found a workaround
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
It's not the binary, that you have. What you are missing is the libraries that goes with it. I don't have time to put this into an update ZIP, can you handle ADB? The two .so files should go into /system/lib/ and the other into /system/xbin/

Again note, this is NOT an recovery package, just a regular ZIP.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
If you go to github (Big link in first post) I have a whole section explaining sd-ext and one explaining init.d and the different methods.

About Safe-mode, well, some things can be moved while Android's services are running like APK's, and some things can't like application data (Will create a loop of FC's). Safe-mode is quite simple. If the script detects any running Android services, it will simply disable the options that are not safe to use in this state. However, this will limit the options that the script offers.

Instead I made a workaround, which is that the script will stop the main Android service that controls all sub-services. This will result in all Android services being stopped and content is again safe to move. Once the script is done, it will start the services again and allow Android to start. I keep both methods available in the script because a few ROM's has been proven unstable when using the workaround, they will go into boot loop. And also, unlike safe-mode which just auto disables a few options, the workaround is somewhat a nasty hack. But it has proven effective on most devices.

The best option however, is still implementing a correct init.d to avoid the usage of both safe-mode and the workaround. The best way to do this, is using Injector. I use it myself whenever I update my CM ROM. It's faster and easier than manually unpacking the boot.img and making the changes, and I love easy :)
[Android Software/Hacking General [Developers Only]] Masrepus:
Hi dk, well u might remember that i wrote you a mail today and you told me to use this newer built.

Ok i did that. But after rebooting, all my settings were gone and reset to default rom settings. My installed apps were all there, but nearly all of them giving me fcs, also your mounts2sd. So i thought if it would probably help to reinstall the app, but it told me there would be no space available for installation. Now i reverted back to old build. What did i do wrong?

Gesendet von meinem GT-S5570 mit Tapatalk 4
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
New release is out with some new important fixes and more language support
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Hmm, there should not be much wrong to do. Just install the app and update the script and that is it. If not, then there is something wrong with the script, which I hope not because it would create a very big issue when I add this to Play Store.

What is your setup with your correct Mount2SD version? Do you have R-Mount enabled for an example?
[Android Software/Hacking General [Developers Only]] Masrepus:
Uhm no i dont have r-mount, cause this made me boot loop when i did that

Gesendet von meinem GT-S5570 mit Tapatalk 4

---------- Post added at 11:02 PM ---------- Previous post was at 10:58 PM ----------

My configuration is:

Move apps, data, dalvik and cache, swap enabled, swappiness is set by my kernel itself, cannot be changed, no filesystem check, ext journal auto, filesystem type auto, safe mode enabled, readahead 512 kb, no tmpfs disabled, debug mode

Gesendet von meinem GT-S5570 mit Tapatalk 4
[Android Software/Hacking General [Developers Only]] Rashed97:
Yup, I've had that loop of FCs MANY times ;)

Feel free to say no, but do you think you could show me how to implement the corrected init.d method? I'd rather implement it once and for all in my source files rather than have to use Injector every time I build a new ROM (typically about once or twice a day unless I'm testing a new feature)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
It is hard to debug this without a log. The best way for me to help, is if you install this again, and then attach the log from Mounts2SD here. It will be placed in /data/local/mounts2sd.log and you can use a File Manager with Root options to get it. Just make a recovery backup, then it's simple to just restore if it fails again. And make sure to use the new version that I just released.

This is how you do it

Install the Application

Go to Application Settings and install the script

Go to Configure (The middle tab) and make sure debug is enabled (It's one of the last options)

Make sure that all other options is set the way you had them before (If not, let me know, because this could be the issue)

Reboot

Get the log using a File Manager (Unless it FC, then use ADB)
[Android Software/Hacking General [Developers Only]] Masrepus:
Ok i will do that. But what about the options that are new, like this storage threshold or sth like that? How should i set these?

Gesendet von meinem GT-S5570 mit Tapatalk 4
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Yes it is easier to just add it to the source you build from. I use injector because I stopped compiling my own CM version after XPosed came out. So much easier to add my own small changes using a simple module.
[Android Software/Hacking General [Developers Only]] Rashed97:
OK, Thanks! I think I got it, but could you take a quick look at it anyway? http://review.androidarmv6.org/#/c/5708/ (patchset 2)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
First, the two class_start lines is already defined in the main init.rc file. I included it to show where the "exec /system/bin/sysinit" line should be. So this should not be included.

Second, you need to add this to the main init.rc line. If you include it in a sub RC file like init.qcom.rc, the class_start lines will still be invoked before your init.d execution as init.rc has first priority, and you could just as well implement the service init.d method instead.

So the package you are looking for, is android_system_core

--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -405,6 +405,8 @@ on boot
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0

+ exec /system/bin/sysinit
+
class_start core
class_start main

Third, remember to remove the other init.d implementation from init.qcom.rc in patch set 1 or your init.d scripts will be executed twice.

EDIT:

And if you'd like better debug possibilities for init.d scripts, you should do this

--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -405,6 +405,10 @@ on boot
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0

+ start adbd
+
+ exec /system/bin/sysinit
+
class_start core
class_start main
[Android Software/Hacking General [Developers Only]] Rashed97:
Ah I get it now. Thanks ;)

I'll upload patchset 3 soon

And patchset 1 won't be included since I uploaded patchset 2 over it.
[Android Software/Hacking General [Developers Only]] Rashed97:
OK, so not really a patchset 3, but a whole new change: http://review.androidarmv6.org/5713

Thanks again for your help on this one. Also, just wondering, can I include Mounts2SD in my ROM since I know a lot of people would like to be able to use it to solve their storage issues?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
That looks correct, now just remember to add the sysinit file :)

And yes, there should be no problems pre-including the script and app. And if you use Aroma for the ROM install, your users can even pre-configure it. All property info is detailed in my github readme
[Android Software/Hacking General [Developers Only]] Rashed97:
I'd just include the APK in the extras folder as to not "force" anyone to have to use it. And the sysinit file is auto generated by the build system so I don't have to do anything there.

Thanks a billion man ;)
[Android Software/Hacking General [Developers Only]] gregferns:
@dk

I tried installing the app on a YONIP rom for Micromax Canvas Hd.

I got an error in the log stating "Storage threshold could not be changed. the sqlite3 binary returned result code 255!'

What is this error ?? Can you please guide me what needs to be done ?

Another warning i got in data - "One or more directories within this option, has not been moved or linked. Check available space on the obesite partition or view log for further details.

Let me know if you need any more info.

Edit : - I do have an sd-ext and i am using it properly on other roms, so cant understand y this is not working.

thanks

greg
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
You Threshold issue is explained here. Use Sqlite Installer from Play Store to fix it.

Your second issue has already been fixed, just upgrade to the latest version (Download is in first post).
[Android Software/Hacking General [Developers Only]] gregferns:
Thank you,

Will check out the first issue, but as for the download the title shows version 3.1.8/6.08 but the download link in 1st page shows 3.1.4/6.0.6

Am i missing something....

regards,

greg
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Hmm I forgot to change the title, but the link is correct
[Android Software/Hacking General [Developers Only]] hacktrix2006:
Donwloading to test now. will let you know how it goes.

Edit: No F/C's any more thanks man
[Android Software/Hacking General [Developers Only]] Sachin Thomas:
I tried the latest beta on my HTC Explorer running CyanogenMod 10.2. I have a 1 GB ext4 partititon.

The app works without crashes and can move everything to sd-ext but there's a serous issue. The 5 MB recovery partition on my device somehow gets corrupted on every reboot. Mounts2SD incorrectly reports the size of sd-ext as 5 MB, on first launch and even after the installation of startup script.

Screenshot:

Log: View attachment log.txt
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
What recovery partition? Mounts2SD does not touch anything other than the partition and folders it moves?

About your display issues, this is actually an Android issue. Application processes is not provided with the original /proc/mounts file, but instead a reordered one. This means the locating the correct mount locations is not as easy as just checking the first entry of /proc/mounts. Instead the application needs to investigate and make some calculated guesses. However, this does not mean anything, as it only displays information. The app does not do anything itself, and the script does have access to the correct mounts file. Also, onece the script has executed and made it's own mounting, the app should have no problems locating them.

But it would be great to get this fixed, so if it was possible for you to include the file /proc/mounts and also a detailed list of the content in /dev/block, file /init.rc and maybe a "busybox df -h" output?
[Android Software/Hacking General [Developers Only]] tomaasz:
Could you add cache cleare/wipe tool and kill apps tool to your app?

Wysłane z mojego GT-S5830 przy użyciu Tapatalk 4
[Android Software/Hacking General [Developers Only]] Sachin Thomas:
/proc/mounts: View attachment mounts.txt

content in /dev/block: View attachment dev_block.txt

init.rc: View attachment init.rc.txt

busybox df -h: View attachment df.txt

Ramdisk: https://github.com/joilaroi/cm10.2_htc_pico/tree/master/ramdisk

The recovery corruption issue is more important to me. It doesn't occur when I'm not using m2sd and with int2extv2+
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
This is a storage management application, not an application manager, so killing apps will be no go. Besides, Android has a very good application control system, so there is no need to go around killing apps. You will just end up slowing down the system and using more power on constant application re-launches.

About the cache thing, this could be possible, but why? The cache clears itself. Or are we talking about application caches?

Thanks, I will have a look at this.
[Android Software/Hacking General [Developers Only]] tomaasz:
It would be manual run tool not automatic.

For old devices it is sometimes needed to wipe caches and kill apps.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The cache control has been added to the future requests, the kill app thing, I will have to think about.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Okay everyone. You should see a new fancy Pane in the top of the thread.

That is because this thread has been attached to a new DevDB section (OP Has been moved, see old OP). So now we have XDA Build-in requests, downloads, screen shots and best of all, Bug Report section (Please use it). Should make things a bit easier.
[Android Software/Hacking General [Developers Only]] gu5t3r:
NICEEEEE
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Yes. But it is not possible yet to use DevDB on threads in the general forum, so I had to create a new main thread. I attached this as Q&A, but I really don't care which one is used. With separate sections for requests, bugs and such, there really is no need to separate threads into important and less important, so use whatever.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Okay, I am not done looking over this, but from the 'df' output I can clearly see something wrong that has nothing to do with my script. You have a script, app or whatever on your device which mounts /dev/block/mtdblock1 (5MB partition, assuming this is the recovery) to /sd-ext after Mounts2SD has mounted /dev/block/mmcblk0p2 to the same location.

You say that int2extv2+ did not provide issues? Well, either this script uses a different mount location (Some does), or it just finishes writing to /sd-ext before the recovery partition is attached to it. Either way, your /sd-ext location is being used for other things than sd-ext and that I cannot help you with. /sd-ext is a reserved location for the sd-ext partition, I am not going to change the location because some ROM dev or script maker thought it would be cool to use it for something else.

From the 'df' output

/dev/block/mmcblk0p2 5.0M 1.5M 3.5M 30% /sd-ext <-- First mounted by Mounts2SD
/dev/block/mtdblock1 5.0M 1.5M 3.5M 30% /sd-ext <-- Then again by something else

Why is the recovery even being mounted?

The recovery has no place being mounted in a booted Android system. But if it is really that important, I suggest changing it's location to something more proper, like say /recovery
[Android Software/Hacking General [Developers Only]] Rashed97:
Recovery being mounted is usually a messed up ROM. In 4.3 the ROM developer probably didn't set the flags correctly.