[Q] Getting mount point to show on widget - Nexus One Q&A, Help & Troubleshooting

I recently created an ext4 partition and have been using A2SD. I was wondering how hard it is to create a widget that would show the available space of that mount point... or really any mount point.
My thought was that it really only takes a "df -ah" command to show them all and it would be cool to be able to select the mount point info via a widget or even a dialog box on widget tap.
I am no programmer at all so maybe I am asking about something that is insanely difficult, but I was hoping to find someone that could at least point me in the right direction. I messed around withe the App Inventor, but I am not sure what to call to get that info to display.
I did find some info though so I at least know what to look for...
Filesystem
/dev/block/mmcblk0p2
Size
915.1M
Used
67.0M
Available
799.3M
Use%
8%
Mounted
/system/sd
That is my mounted ext4 partition ...
So I have a program that actually detects and shows my mounted points inside the app... I have an app that will run cli commands and output to the screen or text. So displaying that info on a widget can't be impossible. I emailed the dev for Mini Info and he/she said that adding ext4 isn't possible because there is no API currently for that. This may be true, but can someone explain how hard this would be or point me to some resources so I can figure it out?
I attached some screenshots as references as well... thanks all
Sent from my Nexus One using XDA App

Nothing? I was pretty sure someone in here had an idea or two about this.

Related

A2SD view apps loaded in partition

First post, hope I haven't picked the wrong place. I did search the forum before asking this.
Is there a way to see the A2SD partition, or to see the apps installed on it? I set mine rather low, at 512MB (that's what it asked for at default) and I figured that should be more than enough since I only have ~100MB or so on stock ROM.
So yeah, none of the market apps I have seen can show me the space being used or how much room is left free on the partition.
Any idears?
Quick System Info in the Market, will show you the total amount of mb being used and what is left for a2sd.
Connect to your phone via USB cable and enter the following in a command prompt (this of course assumes you have installed the android sdk):
adb remount
adb shell
ls /system/sd/app/
I got this from this post: "forum.xda-developers.com/showthread.php?t=603052"
just put the http tag in front of the above and cut and paste it into the browser address bar.
Thanks, to both of you. The Quick System Info App does the trick!

Database full: how to solve this probem?

Dear all,
first of all I wish to thank everyone in XDA that with his contribution helps us to make our devices blazing fast and really snappy.
Since I installed JPY firmware and I backed up every application I had the warning "Database almost full, please delete messages, contacts etc..." and in fact I have only 20Mb free.
I saw that Samsung to perform this big improvement in the software moved some application data in dbdata partition that is formatted to have only 128Mb!!
The problem is that at moment the maximum number of installable applications is limited due to dbdata space and this could be a big problem.
In other posts I read that other people had my same problem but no possible solution to fix it has been find out.
Is there any chance to fix this limitation?
Thank you for your awesome support
paky79 said:
Dear all,
first of all I wish to thank everyone in XDA that with his contribution helps us to make our devices blazing fast and really snappy.
Since I installed JPY firmware and I backed up every application I had the warning "Database almost full, please delete messages, contacts etc..." and in fact I have only 20Mb free.
I saw that Samsung to perform this big improvement in the software moved some application data in dbdata partition that is formatted to have only 128Mb!!
The problem is that at moment the maximum number of installable applications is limited due to dbdata space and this could be a big problem.
In other posts I read that other people had my same problem but no possible solution to fix it has been find out.
Is there any chance to fix this limitation?
Thank you for your awesome support
Click to expand...
Click to collapse
yes, it can be fixed by:
1/. remove/relocate the files under /dbdata
2/. disable the disk full warning (it will show u the prompt if the free space is under a certain percentage)
I still have over 90 MB left. Just how many apps do you have? 100+?
I have ca 80 applications.
Is it safe to move the app data from dbdata? If yes, where do I move the data?
80 applications!?! you a collector?
Any solutions
I've had the problem also till recently when I installed Darky's 9.0 and did a wipe for the sake of cleanness.
I am sure I'm going to encounter it again and I would gladly take some measures now when i have the time to do it before I am constrained by it.
At a rough search I did find some info about it, some even here on XDA, but nobody had a definitive solution.
Is there a way to increase this partition size or keep some info stored there in another place ?
Is there an app that will tend to put big chunks of data there, more than usual?
Hope somebody with better kung fu than us drops by and enlightens us
Every Smartphone has limited space. Every Computer has limited space.
Everything has limited space.
It's a smartphone, not a huge trash container where you can put everything you find at market into.
Only install apps which you are using often and not apps which you're using once a year.
segun_aduba said:
I've had the problem also till recently when I installed Darky's 9.0 and did a wipe for the sake of cleanness.
I am sure I'm going to encounter it again and I would gladly take some measures now when i have the time to do it before I am constrained by it.
At a rough search I did find some info about it, some even here on XDA, but nobody had a definitive solution.
Is there a way to increase this partition size or keep some info stored there in another place ?
Is there an app that will tend to put big chunks of data there, more than usual?
Hope somebody with better kung fu than us drops by and enlightens us
Click to expand...
Click to collapse
There was a discussion in the cache bug thread about increasing partition size. No one knows for sure because none of these problems popped up until quite recently. Cache is even more troublesome since it means we might not be able to download apps in the future.
But your usage is still unusual. I would suggest going through the app manager and see if any app is hogging up data.
Sent from my GT-I9000 using XDA App
I also have this problem, using right now 45mb of 96mb, that is with only 44 downloaded apps installed...
Sent from my GT-I9000 using XDA App
I have 109 apps installed and have 105mb free in dbdata, go figure.
peachpuff said:
I have 109 apps installed and have 105mb free in dbdata, go figure.
Click to expand...
Click to collapse
Do you have lagfix activated? Are you on 2.2.1 version?
I may be talking rubbish here, but shouldn't it be possible to move some of the folders to another partition and symlink them? This is Linux after all...
I'd try something like:
(THIS HAS NOT BEEN TESTED AND IT MIGHT BREAK SOMETHING)
- Move some of the biggest folders from /dbdata to another partition (if you're lagfixed and care about speed, you should move them to another partition with ext4 or whatever your lagfix uses). In a terminal emulator you could move them with:
mkdir /data/dbdata2; mv /dbdata/databases/com.whatever /data/dbdata2
- After moving them you should be able to symlink them with something like:
ln /data/dbdata2/com.whatever /dbdata/databases/com.whatever
Like I said, this isn't tested and might awfully break something (I'd do a backup and try with non-system programs first), but I'd guess it's worth a try if you really want to have more dbdata space.
EDIT: I just noticed that /system has limited space too, so you'd be better of moving them do /data, which seems to be the biggest partition on the SGS.
If anyone is interested I could try and create a shell script that would move all of the stuff from /dbdata to /data/dbdata and replace the stuff with symlinks automatically. Let me know...

[Q] Nook wont read mSD card written by camera

I taking a trip abroad soon and trying to avoid taking a laptop.
I want to use my Nook (1.1 rooted) to send emails with pics I take.
If I put the microSD card from the camera directly in the Nook, it says it needs to be formatted.
If I format with the Nook (or the camera as it turns out - both use FAT32), I can put it back in the camera and take pictures, but when I put it back in the Nook it once again says it needs to be formatted.
If I put the microSD card in a card reader and rename a directory, rename it back, then eject and 'safely remove hardware', it works when I put the microSD card into the Nook.
This seems to indicate that the camera is not properly unmounting the file system or not closing a file handle or something (not too surprising - cameras need to be able to write quickly, so probably take shortcuts). By touching the file system in Windows and ejecting properly, it fixes the problem.
Details:
Camera is a Panasonic Lumix DMC-FX75
I do turn the camera off completely before removing the microSD card
Directory touched is "E:\PRIVATE\AVCHD\BDMV\STREAM" (I rename to STREAMx then back to STREAM before ejecting).
Popping the card into my cell phone (Samsung Behold I) and renaming the dir does not work -- I'm assuming the cell phone has the same shortcuts as the camera or something. Or maybe my assumption is wrong.
Obviously I don't want to haul around a windows computer just to 'fix' the file system on the card, that would defeat the purpose.
Is there a solution?
A tweak to the Nook system files to change it's mount arguments?
An Android app that can fix the SD card so it will mount?
A terminal command I can run on the nook via the Android Terminal Emulator app?
I commend you on your question asking ability sir.
You are a Scholar and A Gentleman.
A rarity of sorts in this fine community.
Apologies for not having a clue about your dilemma. I just wanted to point out the dying art of a well thought out question.
Hell, I`ll even assume you used the search function....Outstanding!! :yay:
Good luck on your lil adventure
Thanks TainT, but actually the search function wasn't operating when I posted
Has anyone been able to use a camera card with pictures in their nook though, to view (on the great screen) or send images?
Or anyone have any details about what a camera might be doing to improperly close the file system or whatever?
"fsck" info on the web says:
"Unix, any Unix, will refuse to mount a filesystem that was not unmounted cleanly."
This seems to be what I'm dealing with here -- the camera does not cleanly unmount the camera card's filesystem, and the nook's Android refuses to mount it. Putting the card in Windows, touching the FS, and ejecting properly 'fixes' the filesystem.
Running fsck type operations is pretty unfamiliar territory for me, but I have found that the nook has a /system/bin/fsck_msdos command that seems like it should help. So I formatted again and found that the sd card is mounted from /dev/block//vold/179:17. I then took some pics, got the problem scenario again, then used the terminal emulator app on the nook:
#cd /system/bin
#./fsck_msdos /dev/block//vold/179:17
** /dev/block//vold/178:17
Attempting to allocate 1924 KB for FAT
Attempting to allocate 1924 KB for FAT
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
** Phase 4 - Checking for Lost Files
Free space in FSInfo block (-1) not correct (492336)
Fix? [yn] y
[1] + Stoped (signal) ./fsck_msdos /dev/block//vold/179:17
#
[1] Segmentation fault ./fsck_msdos /dev/block//vold/179:17
It appears that it doesn't actually work. I also tried "-p" which is supposed to automatically fix simple errors rather than being interactive -- it failed with a seg fault as well.
I think in theory this should be how one would fix the problem, it's just not working - could be a bug in the system?
If anyone reading this has CM7 or a rooted 1.2 nook, this could be fixed with a later version of the OS than I have. If anyone can try recreating, I'd appreciate it.
At last, as I'm learning more I am also learning what search terms to use!
Googling "android fsck_msdos segfault" provides this post:
http://www.mobileread.com/forums/showthread.php?t=137919
quote:
Turns out that the Nikon camera mangles the FAT32 file system so that fsck_msdos dies upon trying to repair it (this is not a Pocket Edge issue, but a wholesale Linux issue. It seems fsck_msdos is in a very shoddy state).
Well, I found out that as long as I format my SD card in FAT16 instead of FAT32, PE can read it just fine. Limits the card size to 4GB which is about 800 pics on my camera, but that I can deal with.
Click to expand...
Click to collapse
I am now pretty certain this is what's going on in this case. I'm still searching, but if anyone knows of a possible fix I'm all ears.
I'm so far unable to use the 'force' option to mount, such as
#mount -t vfat -o force /dev/block//vold/179:17 /sdcard
mount: invalid argument
The 'mount' command in this version of Android (perhaps all versions of android?) appears to reject the force option.
fsck_msdos and mount (with default options) both segfault with the sdcard written to by the camera. The only possibility I see to get this to work is to get a fixed fsck_msdos or mount executable. This might happen with an upgrade to a newer operating system, e.g. CM7 or B&N 1.2 update, but I'm not willing to replace everything I have working this close to my travel dates (I have the nook set up with maps, apps, translation notes, etc).
Could I get the fsck_msdos binary from CM7 or even some Honeycomb distribution and paste it into my system as "fsck_msdos_future" and have a hope that it might work?

[q] sd-ext s2e

Hello all. I have problem with my sd-ext. What i mean. It happend with 2 different ROMs. Yesterday with CM9 and today with Apocalypse. All works ok till i use S2E. I checked in S2E option Mount as ext4, reboot, checked move apps to sd-ext and all gone. No have them and system looks like after reinstal - fresh. Inn app manager apps are but only as browser.dolphin.firefox.opera... or com.sygic.aura. But they are invisible in drawer. What i am doing wrong. How to move safetly to sd-ext without that problems. Help!
try darktremors app2sd
But i want to know what heppend... It is S2E fault or sd-ext sth wrong?
Wojtys said:
But i want to know what heppend... It is S2E fault or sd-ext sth wrong?
Click to expand...
Click to collapse
I tried S2E today, and it did not work. Looks like undocumented rubbish to me.
I tried moving only the Dalvik cache, but after I activated that function and rebooted, all the settings but the last were greyed out, so I could not even undo what the piece of garbage had done.
Another point is that it has a setting allowing you to choose between ext3 and ext4. This is stupid, because the normal user cannot possibly know what to choose there. He cannot know whether his ext partition is ext3 or ext4, because the most common recovery, Clockworkmod, has no such choice in its SD card partitioning function. If the program itself cannot find out, how can the user? It is not even clear what the setting actually does.
So we keep wading through the idiot swamp, until somebody writes a usable program and documents it properly, if a really good program needs documentation at all.
My general advice is, look carefully at a program. Check its settings. Check its documentation for quality and completeness. As soon as you spot the first sign of madhouse style, drop it like a hot potato and look for something better. There are too many garbage programs around these days to waste our time with.
If you cannot find any that fulfills the minimal requirements for decent software, give up on the apps-to-ext idea. Buy a phone with more internal memory, if you have money to spare, or delete the programs you can do without.
The minimal requirement for an apps-to-sd program would be that it can cleanly move installed programs to the ext partition and back. Since you may have installed too many programs to move them all back, I would think that the program should help you to uninstall enough programs to make the rest fit, if you have to move them back.
hgmichna said:
I tried S2E today, and it did not work. Looks like undocumented rubbish to me.
I tried moving only the Dalvik cache, but after I activated that function and rebooted, all the settings but the last were greyed out, so I could not even undo what the piece of garbage had done.
Another point is that it has a setting allowing you to choose between ext3 and ext4. This is stupid, because the normal user cannot possibly know what to choose there. He cannot know whether his ext partition is ext3 or ext4, because the most common recovery, Clockworkmod, has no such choice in its SD card partitioning function. If the program itself cannot find out, how can the user? It is not even clear what the setting actually does.
So we keep wading through the idiot swamp, until somebody writes a usable program and documents it properly, if a really good program needs documentation at all.
My general advice is, look carefully at a program. Check its settings. Check its documentation for quality and completeness. As soon as you spot the first sign of madhouse style, drop it like a hot potato and look for something better. There are too many garbage programs around these days to waste our time with.
If you cannot find any that fulfills the minimal requirements for decent software, give up on the apps-to-ext idea. Buy a phone with more internal memory, if you have money to spare, or delete the programs you can do without.
The minimal requirement for an apps-to-sd program would be that it can cleanly move installed programs to the ext partition and back. Since you may have installed too many programs to move them all back, I would think that the program should help you to uninstall enough programs to make the rest fit, if you have to move them back.
Click to expand...
Click to collapse
Undocumented rubbish? What? The app or ur brain? You cant just call an app like that just because you cant make it work. Alot of users have been using it without problems.
Sent from my GT-S5830 using xda premium
Shadow xD said:
Undocumented rubbish? What? The app or ur brain? You cant just call an app like that just because you cant make it work. Alot of users have been using it without problems.
Click to expand...
Click to collapse
What exactly do you mean by, "make it work"?
S2e moves all non System apps to SD-ext. So, it will move itself to SD-ext aftwr reboot. This means the SD-ext won't be mounted at boot, and non System apps won't be accessible after boot (even if their shorcuts are there).
Simple solution for this problem; make s2e a system app before running it, and use some common sense before flaming a great app.
How to make it a System app? Move s2e to System/app and give rw, r, r permissions.

[Q] Is there a shortcut to unmount a USB OTG device?

Hi!
I just got my USB OTG cable and it works great. Is there an easier way to unmount the USB storage? Do I have to go into settings>storage every time to unmount the USB device safely?
Thanks!
You can install stickmount free app or donate version. Will put a mount/unmount in the notification bar.
gunnyman said:
You can install stickmount free app or donate version. Will put a mount/unmount in the notification bar.
Click to expand...
Click to collapse
Thanks!
I installed stickmount but it doesn't seem to work. After I unmount the USB drive from StickMount, it's still visible in "settings>storage" and I have to unmount from there again. Am I missing some thing here?
I am rooted on ElementalX kernel.
I'm sorry. I thought it would work.
Try otg helper https://play.google.com/store/apps/details?id=net.shajul.usbotg
I'm using Paragon NTFS but it also doesn't seem to be working as You would like. It kind of unmounts but after connecting some other device, Settings>Storage shows stats of previous one. So I need to unmount and mount again. But it's still a low price for possibility of connecting NTFS devices.
I may be wrong, but I'm of the opinion that the HTC One actually mounts the USB/OTG itself and the other programs attempt to re-mount it to another location (which thy know about) hence, when you unmount it, you only unmount 'their mount' .. the 'HTC mount' is still in place ... hehce the One still thinks that it's mounted ... which it is.
It shouldn't be beyond the kind of devs we have on here to produce a notification for a USB/OTC (click to unmount/mount) once it's detected ad present.
Bump
I would very much like this as well and after a couple of weeks of searching, with detours, side tracks, and no solutions I've finally decided to post about it. The best solution would have been if hTC or Google (?) had included a shortcut to unmount from the settings, so that the user could create a shortcut on the home screen or in their favourite widget (I'm quite liking multicon and widgetsoid, between the two I can open or toggle almost anything from the home screen); as it is it's not even possible to shortcut to the storage page.
The hunt for a solution took me first to the apps store, to find a bunch of root only apps; so naive me (this is my first android phone, indeed my first smart phone) I googled and followed the root instructions from cnet. And it seems I've probably lost all hope of ever returning to stock, PLUS the htcdev bootloader unlocking process actually deleted the stock calculator and flashlight. Silly me, I thought "factory reset" meant what it sounds like, e.g. a factory reset; oh well, I prefer to cross my fingers and ignore warranties anyway :silly:. Then I found out that those apps weren't useful anyway because the stock automount still happens and you actually have to unmount the stock mount point in order to mount with any of them (e.g. stickmount). Stickmount was the closest I got, if I recall correctly nothing else I tried would even mount - I probably didn't try that many, I cottoned on pretty quick that the automount wasn't going to let me go this route anyway. At this point I got side tracked and started playing with other root required apps, but my ham fisted stock + root thing acted funny, with many random root apps I installed to play with unexpectedly restarting the phone. Then I found XDA and I've been lurking, though probably not doing as much reading as I should: thousands upon thousands of pages are a tad intimidating. Now I've got ARHD 71.1, with the toolbox & exposed & XSBM more or less tweaked to my liking and everything running smooth. Stickmount gets closer now: it can mount as well as the system. I started thinking about custom kernels, ntfs support, etc; but with no clear info searching whether kernel ntfs support would even automount, and it still doesn't get me what I want so I think I've had enough poking the system files for now. I just tried 'su' then 'umount /storage/usb/', it appears to unmount but I still get 'USB storage unexpectedly removed' when I unplug, and I can't find a way to create a shortcut without the window persisting (android terminal emulator). Also tried scripter, no idea if it can create shortcuts and it couldn't even run the scripts it created so I uninstalled it pretty quickly.
It comes down to: can I get a shortcut to dismount the stock OTG or can I disable the stock mount to properly use an alternative instead of doubling up? And (looking at you hTC and Google, NOT the XDA community which I greatly appreciate), if not why not? This thing is basically a computer so why is android so limited out of the box?
(Sorry for the long noobish ramble, hopefully I got across what I've tried and why it doesn't work. I'm too tired to reread it again. Perhaps at least this has cautionary tale value?)
Found the widgetsoids command option which works silently, unfortuneately it also fails silently too leaving usb mounted if there's any file operations. Maybe there's a more complicated command I could use then 'umount /mnt/usb/'? I have zero idea where to start, but at this point I want to make an app that can hook into the native process and either send it commands or disable it. I don't suppose there's a newbie guide to figuring out what service is responsible for something and then hacking it?
i tried stickmount on a rooted huawei GR5
it works perfect thank you

Categories

Resources