Android 7 - I can not write files, create folders, delete, etc. ... - Android Q&A, Help & Troubleshooting

Friends.
I put a sdcard in the device. The sdcard is recognized, but only with permission to read. I can not write files, create folders, delete, etc.
When I have tried, with X-Plorer app, the following message appears:
No activity found to handle Intent
{act = android.is.storage.action.OPEN_EXTERNAL_DIRECTORY (has extras)}
And then:
Error!
Some files could not be copied!
I put a pendrive (udisk) and the same thing happened.
I already tested the mentioned sdcard 32GB Class 10 in 2 other Android TV BOX successfully! On PC,too, the sdcard works 100%.
Question: Does anyone have any tips? Why are both sdcard and udisk only available for reading? ll applications are enabled to use storage.
Note: I am using Android 7.
Every time an application asks to authorize through the application "OPEN FROM" gives error. The application tells you which action to take, but does not open the "OPEN FROM" application, as it appears in the image below.
I can only write if go through the physical path and not direct in the "unit" SDCARD or USB DISK. Example: / mnt / sdcard or / storage / usb disk etc ...
Is it!
Thanks for your attention.

Related

[Q]Cyanogenmod 7 confusion over memory...

Hi all--
I'm sorry in advance for the confusion I might have. I'm an extreme noob when it comes to this platform, and I'm not that great when it comes to Windows either...
Basically I was surprised to see that the external SD Card is used so much by CGM7 and is required for so much. For instance, all downloads HAVE to go to the external card. In addition: I don't know if this has anything to do with operating system, but all saved documents from basically any productivity program seems to save here by default as well.
So here are my questions:
Is there anyway to alter where things are downloaded to by the built in browser? I'd prefer that internal memory (EMMC, right?) be used... Does the default location for app installation handle this?
What exactly uses the external card by default?
Using the built-in file browser, why does it not want me to move items from internal to external storage? Why can I only copy and paste them?
I thought CWM was suppose to look on the external SD card when I use "Install zip from SD card." Instead, it looks at whatever is marked as the internal SD card. Why's that?
Thanks for your help and suggestions. I am using a gTablet, and I couldn't find a more appropriate forum for this question...
scyld said:
So here are my questions:
1. Is there anyway to alter where things are downloaded to by the built in browser? I'd prefer that internal memory (EMMC, right?) be used.
Click to expand...
Click to collapse
There is a thread just for this at the forum.cyanogenmod.com and also here:
http://forum.xda-developers.com/showthread.php?t=1028305
The last link in the first post does what you want. However, read my warnings if you do switch SD cards using that method:
http://forum.xda-developers.com/showpost.php?p=13569415&postcount=26
2. What exactly uses the external card by default?
Click to expand...
Click to collapse
Is the question what will use the external SD card, or what is using the external SD card. If it is the latter, Settings > Applications > Manage applications & Storage use has that info.
3. Using the built-in file browser, why does it not want me to move items from internal to external storage? Why can I only copy and paste them?
Click to expand...
Click to collapse
You can move them in the default File Manager. Keep your finger on the filename until a menu pops up. There is a "Move" choice.
4. I thought CWM was suppose to look on the external SD card when I use "Install zip from SD card." Instead, it looks at whatever is marked as the internal SD card. Why's that?
Click to expand...
Click to collapse
I will have to look into this, but I guess what SD card it uses depends on whether you have an external SD card in the slot or not.
The version of CWM I use, which is Clockworkmod Recovery v2.5.1.3, will use the external SD card by default when installing stuff or when making backups and when restoring, if it detects an external SD card. If one is not detected, then it will use the internal SD card instead for all its actions. See the blog post on the front page of http://bekit.net
rajeevvp said:
There is a thread just for this at the forum.cyanogenmod.com and also here:
http://forum.xda-developers.com/showthread.php?t=1028305
The last link in the first post does what you want. However, read my warnings if you do switch SD cards using that method:
http://forum.xda-developers.com/showpost.php?p=13569415&postcount=26
Click to expand...
Click to collapse
Yep, that's exactly the file I flashed in order to switch what SD card was labelled as "EMMC." Hmm, I suppose I could just move all my apps from the phone to "the external SD card"...
Is the question what will use the external SD card, or what is using the external SD card. If it is the latter, Settings > Applications > Manage applications & Storage use has that info.
Click to expand...
Click to collapse
Thanks.
You can move them in the default File Manager. Keep your finger on the filename until a menu pops up. There is a "Move" choice.
Click to expand...
Click to collapse
Pardon, I should have explained: when I do use the default File Manager's "Move" command, I get the message "Could Not Move File" whenever I try to move the file from one storage to the other.
I just downloaded Root Explorer, and it allows me to do this. However, I'm a little worried that it has Super User status, making me worried that I might accidentally do something bad with my clumsy fingers. But I suppose that's why I have CWM backing up my tablet.
Speaking of CWM...
I will have to look into this, but I guess what SD card it uses depends on whether you have an external SD card in the slot or not.
The version of CWM I use, which is Clockworkmod Recovery v2.5.1.3, will use the external SD card by default when installing stuff or when making backups and when restoring, if it detects an external SD card. If one is not detected, then it will use the internal SD card instead for all its actions. See the blog post on the front page of http://bekit.net
Click to expand...
Click to collapse
Interesting, thanks. I unfortunately do not remember which version of CWM I use, but I think it is not this one. I should check it out.
scyld said:
Yep, that's exactly the file I flashed in order to switch what SD card was labelled as "EMMC." Hmm, I suppose I could just move all my apps from the phone to "the external SD card"...
Click to expand...
Click to collapse
Here's my /system/etc/vold.fstab in its entirely. With this, my tablet uses the internal SD card as the default for storage.
Code:
## Vold 2.0 NVIDIA Harmony fstab
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
#dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.3/mmc_host/mmc0 /devices/platform/tegra-sdhci.3/mmc_host/mmc1
# dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
# dev_mount emmc /mnt/emmc auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
dev_mount sdcard /mnt/sdcard auto /devices/platform/tegra-sdhci.3/mmc_host/mmc2
dev_mount emmc /mnt/emmc auto /devices/platform/tegra-sdhci.2/mmc_host/mmc1
dev_mount usbdisk /mnt/usbdisk auto /devices/platform/tegra-ehci
Pardon, I should have explained: when I do use the default File Manager's "Move" command, I get the message "Could Not Move File" whenever I try to move the file from one storage to the other.
I just downloaded Root Explorer, and it allows me to do this.
Click to expand...
Click to collapse
Ah, OK. The reason for the difference is due to the way the move is actually implemented in File Manager and Root Explorer.
I had an idea about why File Manager couldn't move files across filesystems, and to confirm my suspicion I attached strace to a running File Manager:
Code:
$ su
# strace -e rename -p `pidof org.openintents.filemanager`
Process 28466 attached - interrupt to quit
[I]lots of irrelevant output omitted[/I]
rename("/mnt/sdcard/Kernel/Pershoot/lib-2632.40_gb.tar.gz", "/data/local/tmp/lib-2632.40_gb.tar.gz") = -1 EXDEV (Cross-device link)
[I]more irrelevant output omitted[/I]
File Manager calls the rename() system call to move the lib-2632.40_gb.tar.gz file, which, as the spec says, will fail in this case. The program is then supposed to do the move the old-fashioned way if rename() returns an EXDEV error: copy file1 to file2 by reading bytes from file1 and writing bytes into file2; then delete file1 if the copy is successful.
But, File Manager doesn't perform this very basic fallback step. It throws up its hands at the first error and spits out the error message you got. And, it's not just File Manager. The system mv command (if you have it) in /system/bin also exhibits the same dumb behaviour. The busybox mv is more robust. (You should actually report this as a bug to the File Manager people.)
Which brings us to Root Explorer. I got curious about it after the experiment with File Manager. RE handles cross-device moves just fine. What's more, it also moves entire directory trees across devices. Having written directory tree-moving programs before, I know that this is a non-trivial bit of programming. So, I ran strace on Root Explorer to see how it handled things, and the result made me laugh.
Code:
$ su
# strace -f -e execve `pidof com.speedsoftware.rootexplorer`
Process 3602 attached with 12 threads - interrupt to quit
[I]lots of irrelevant output omitted[/I]
10893 execve("/system/xbin/busybox", ["busybox"..., "cp"..., "-pr"..., "/sdcard/Kernel/Pershoot/lib-2632"..., "/data/local/tmp/lib-2632.40_gb.t"...], [/* 19 vars */] <unfinished ...>
10893 <... execve resumed> ) = 0
10914 execve("/system/xbin/rm", ["rm"..., "-r"..., "/sdcard/Kernel/Pershoot/lib-2632"...], [/* 19 vars */] <unfinished ...>
10914 <... execve resumed> ) = 0
[I]more irrelevant output omitted[/I]
Root Explorer is also taking the easy way out: It's actually using busybox to do (almost) all of its work.
I suspected this when I compiled a new version of busybox a few days ago to test out a new compiler toolchain. I moved the newly compiled busybox into /system/xbin without properly testing it first, and discovered that most of the commands died with segfault errors.
I re-uploaded the working version of busybox back onto the tablet in /mnt/sdcard/download, and then went into Root Explorer to move this busybox into /system/xbin, and RE started force closing on every action. Once I had managed to replace busybox through other means, RE started working fine again. At that time, I didn't look at the issue too closely--I thought it was just another example of the random lossage that Android exhibits from time to time. Now I know why.

Directory Bind on Sony Tab S

Now that, our tablet S is now rooted finally .... thanks to all fellow users and developers for achieving this :highfive:
After rooting, i wanted to try Directory Bind developed by slig.. target to free up some space (internal sdcard). And result, this app is damn good guys! I have Maxpayne, GTA3, 9MM, Asphalt 6, Shadowgun. With all these games installed, i have 8.1gb from 8.9gb in internal storage (source: Sony's File Transfer) :laugh:
Requirement to make this work on sony tab, is ROOT, Enable write permission on sd patch from condi's S.ony Aio
Sounds cool? give it a try
Here's original thread [TOOL] DirectoryBind - move data to external_sd (GameLoft, Shadowgun etc.) ROOT req.
Hi all !
This is my application to bind directories located on external_sd to directories on internal memory (/sdcard/). This way You can transfer large application data directories to external_sd. Could be usefull with ex.: games from Gameloft, other like Shadowgun, applications like CamScanner.
Features:
* Requires ROOT !
* Aimed at specific functionality and features (not idiot-proof)
* You can create any number of Data -> Target directory pairs, mount them manually or choose to mount them on system boot (checkbox does that).
* On/Off switch controls whole mount-on-boot function.
* Diskette icon indicates if mount operation was successful, by taping it You can mount/umount entry.
* Icon changes if application is using mounted entry
* DirectoryBind can tell what application is using this entry (tap at entry in use)
* Long tap on entry (disabled) brings edit/delete window
* App auto umount all entries on USB connected and remount after USB disconnected (for now via BroadcardReceiver UMS_CONNECTED / UMS_DISCONNECTED)
* App shows notification and vibrates if auto umount on USB fails
* If mounting all checked entries (ex. on boot) app is waiting specified time (def. 60 sec) if data directory is not available (happens sometimes at boot)
* Tested sucessfully with Asphalt 6, Shadowgun, DeadSpace, CamScanner
Click to expand...
Click to collapse
Installation and usage is pretty simple. No format of card or extra partition required.
Just install the application and it will ask for root rights. Click allow and you are in the main screen. Now FIRST step, click menu and go for prog "preference" and there click bind on boot, 'alternate dbase mgmt"
and also check default data path, target path and assistant prefix dir- if reqd.
Now start adding games to move data, Add new entry -> click menu -> Data transfer assistant.
Click on the directory you want to transfer and select. -> and tick Transfer files from target to data. and finally click ADD
Now app will create similar path directory on your external sd card and will transfer all data files to same on your external sd card.
Once this transfer is completed, and click menu and click "Bind Checked" All done, data is now on your sd card and test your games.
Rest go through the original thread, after some tries you will succeed. Good luck guys :good:
edit:
Now added Asphault7, Brother in arm 2. Internal memory 7.8gb left
That's Cool!!!

[Q] Media Storage issue

This is very frustrating... expert help needed. I have a Samsung Fascinate running AOKP JB 4.2.1 under a clean install (...formatted my system, data, datadata, cache & dalvik prior).
On phone startup, "media storage" seems to scan all internal audio files. The audio list exists... but after a while, the list just disappears and I no longer can choose my ringtones, music, etc. from any application depending on "media storage". I found out the list of media files are in the "internal.db" database under /data/data/com.android.providers.media/databases. So I cleared the "media storage" data, restarted the phone, n observed the folder contents...
On startup, "internal.db" shows up @ ~100 kb and doesn't change in file size. What does change in size is the accompanying wal-file, "internal.db-wal". According to sqlite.org, the wal-file will maintain the audio list and commit it to the database "internal.db" after so many records. Yet, at some point this wal-file drops from ~700 kb of records to 0 kb... no idea why. This is when i can't access my music.
For a long time, this wasn't an issue. I believe the records from the wal-file were already successfully committed to the database. Then I must've cleared the data (for some reason), thereby having "media storage" rebuild the database from scratch... and ultimately revealing an issue with the wal-file. I've even uninstalled the "media storage" package "mediaprovider.apk" from /system/app via TitaniumBackup. Rebooted. Then reinstalled the apk to /system/app. Rebooted. Same issue happens! All else is working perfectly.
I'm no sqlite expert, but is there some way i can force the wal-file to commit? Any other advice? Yes, I googled all i could think of. And i'd like to avoid reinstalling my ROM. Your help is greatly appreciated.
[EDIT]
Found a workaround...
1 - Delete the contents of the folder /data/data/com.android.providers.media/databases.
2 - Reboot and wait ~5 min after startup to let the media store reindex all ur media. DO NOT configure any app's ringtones/sounds just yet.
3 - In terminal, enter the following commands. You should see "x | y | z" after the checkpoint command... where x is 0 (database is ok), y is the number of modified pages, and z is the number of pages successfully committed to the database. y and z should be equal and much greater than 0. If the result is not as described, the database is probably screwed up and u were too late. Go back to step 1 and repeat.
$ su
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
> pragma wal_checkpoint(FULL);
> .exit
# exit
$ exit
4 - Trust the workaround and start configuring ur ringtones/sounds now... or reboot again and ensure the media store database stays fixed. I recommend the latter.
5 - 3 sir!
[/EDIT]

[Q] RegawMOD privilages problem

first thread, sorry if not in the right place.
I'm currently building a c# windows app that has a requirement of emptying out the sms inbox from an android devices.
I'm using RegawMOD.android lib to create and execute adb commands.
the first thought was to delete mmssms.db and reboot the device which works.
However, rebooting the device takes a lot of time.
so i took another approach :
- i copied the DB to the internal sd card
- pulled it to my pc
- accessed it with sqlite (through code) and emptied the sms table.
- copied it back to internal sd card.
- the problem is , with copying it back to /data/data/com.android.providers.telephony/databases/
when i try to run it inside the code , i get "permission denied" even though i run it with shell and su settings.
If i run the same code in adb shell on a command line prompt , it works perfectly.
this is the code :
Code:
AdbCommand MoveToData = Adb.FormAdbShellCommand(device, true, "cat", "/storage/sdcard0/download/mmssms.db > /data/data/com.android.providers.telephony/databases/mmssms.db");
help with the issue / suggesstions about a different approach would be much appreciated.
Thanks!

[SOLVED] Soft boot-loop/brick on Eken GC10X Tablet

Greetings!
First, this message will be rather long, for which I apologize. I am providing headings that allow whomever is interested to skip to whatever is relevant to them.
About the device:
It is one of two Eken GC10X tablets, purchased from Micro Center a while back dirt cheap. The second one is 6000 miles away in Europe. . . .
It is currently running Android 4.2.2
Its firmware revision is v2.0patch1
Its kernel version is 3.4.39+, dated Friday, October 18th, 2013, at 18:11:40 CST
Its build number is wing_k70-eng 4.2.2 JDQ39 20131028 test-keys
It comes pre-rooted by default. All that needs to be done is to install a terminal program and pay attention to certain paths.
About me:
I have been messing with computers, programming, and operating systems since the time of "wood burning computers"
I know my hosts file from my fstab, I have run various flavors of both Linux and Windows in both client and server configurations, and I know that both man pages and a good search engine Are Your Friends. (which is how I came to be here!)
Issue:
Since this Eken tablet comes with a bare minimum of internal memory, I was researching ways to mitigate this. I found an article that mentioned a workaround:
Copy everything in root to a large external SD card
Transpose the settings for the internal and external memory in the /etc/vold.fstab file
Save and Reboot
The result of this is a tablet that - regardless of the presence or absence of any external SD card - always boots as if it had never been booted before, (returns to "first-boot / out-of-box" setup). Any installed apps are gone and the "internal" memory - which is about 1-2 gigs - shows absolutely full. In addition to all that, I cannot do anything with the ADB port since it requires setting the "USB Debugging" flag, which gets reset on reboot. (i.e. The ADB interface is not available.
Examining the vold.fstab shows that the original setup of that file has been returned after I did a nuke-and-reboot.
I can reboot and re-install a terminal program and advanced file manager. (X-plore is my favorite)
I see three possible solutions:
Find the reason why it's booting like this and fix it.
Find a compatible firmware release for this tablet and re-flash it - if possible - from an external SD card.[/INDENT]
Do some kind of "nandroid" backup from the other Eken GC10X tablet I have and copy it to this one. Unfortunately it's 6000 miles away and I won't be able to get to it until sometime after January 2019. In addition, I cannot access the device via the ADB port.
Research I have done:
gsmhosting's allwinner forums
This site claims to have a (ahem!), "modified" version of the firmware, which I have downloaded.
The androidmtk site
This site has the "PhoenixCard" software which alleges that it can be used to create external SD card images of firmware files that can:
Install firmware from the SD card to the device.
Allow you to run the firmware from the SD card to verify it. It should be noted that MalwareBytes flags the updater.exe file because it attempts to download from a known Trojan site. Renaming the extension, (exe.bad), solves that problem.
I have not tried re-flashing any firmware version, though I have tried running the firmware from SD, which doesn't work.
Can someone help me with suggestions on how to return this tablet to normal?
Thanks in advance for any help you can provide!
Solution:
I guess it's "umpteenth time's the charm!" :highfive:
Having done considerable research, (with everything pointing to an issue with the busybox file being in the wrong place), I decided to revisit this, did a little more digging and ultimately found a solution.
Since nothing irritates me more than someone posting "I fixed it!" without telling everyone else HOW they fixed it, here are the steps I used to solve this problem.
Please be careful. You will be mucking around with your tablet's/phone's root file system in ways that can be fatal if you're not paying attention. It's not that difficult but you DO have to PAY ATTENTION to what you're doing.
TO-DO:
Instead of copying the busybox file, it should really be a symlink to /sbin/busybox.
If anyone figures out a way to create a symlink in Android that actually works, I'd like to know.
Here it is:
Pre-requisites:
The device MUST be rooted for this to work. I cannot help you with advice on how to root individual devices. This Eken tablet comes rooted by default.
Download off-line from Android Archives, (using a different system), an early version of X-plore, which is an excellent file manager.
Load X-plore onto a thumb-drive or a micro-SD card, (I used a micro-SD), and then install the SD card / thumb drive into the tablet you're trying to fix.
Steps to solve the problem:
First, go to Settings => Security and enable "unknown sources"
Open your device's file manager
Find the copy of X-plore you downloaded, and tap it to begin the off-line installation process.
Once it installs, open it and go to the "configuration" menu. This is within the three-dot menu drop-down in the upper right-hand corner.
Select:
* (near the top) Show hidden files => select the check-box. (optional)
* Root Access => Superuser + mount writable (this allows you to change permissions to permit writing the root filesystem)
* (scroll down) Dark mode => select the check-box. (this is a personal preference; IMHO it makes it easier to read.)
* Exit configuration by using the "back" button or back arrow in the upper left corner.
* You should now see two columns representing two views of the device's file-system.
On the left side, open the "Root" filesystem, also labeled with a "/"
Scroll down and find the "/sbin" folder and open it by tapping on it.
* You may, or may not, see several folders and files. You are looking for the file "busybox"
* If you don't see it there, you may have to "find" it using the magnifying glass icon in the center row of icons.
* Open the "find" dialog and replace the "*.*" with "busybox" and then select "OK".
* (assuming you found it), tap at the right-hand edge of the row with the file-name to "select" it - a big check-mark will appear there.
Go to the right-hand side list now. Find and open:
* Root (/) like you did before.
* system
* bin
* At the top of that column, you should see a folder icon, followed by "/system/bin"
Look to see if there is a file named "busybox" there. (In my case, it was missing - which is the problem)
(assuming it's missing)
Collapse the "bin" folder by tapping on it - it might take a couple of taps.
Touch-and-hold the "bin" folder until a long list appears. Scroll down to the bottom of that list and select "permissions"
Within the permissions dialog, there are three columns: Read, Write, and Execute.
* There should be three selected boxes under "Read".
* There should be ONE selected box, the top one, under "Write"
* There should be three selected boxes under "Execute"
* Directly below the last box under "Read", the box labeled "Recursive" should NOT be selected.
* To the far right of "Recursive" should be a note that reads "Mode: 755"
Under the heading "Write", select the other two boxes so that all three are selected. The word "Mode" should now be followed by "777" Close the permissions dialog by selecting "OK".
Verify the following:
* The arrow at the top of the center column is pointing to the right. If it is not pointing to the right, tap it until it points toward the right-hand column.
* The file "busybox" on the left-hand pane has a check-mark next to it and no other files are selected.
* The "bin" folder on the right-hand side has been collapsed and is selected by being a darker black with NO check-mark.
* The top of that column shows the folder icon and "/system/bin" as the selected path.
Copy the "busybox" file into the /system/bin folder by doing the following:
* Tap the "copy" icon in the center column - it will look like two pieces of paper stacked together.
* Verify that the dialog that opens:
* Just below the top right it says "busybox" (the file you're copying)
* Under that, "Copy to"
* Under that, a folder icon and then "/system/bin".
* Under that, the selection "Move mode (delete source files) is NOT selected!
* Tap "OK" to copy the file to /system/bin. Once the copy is done, the dialog will close.
Tap "bin" on the right hand side to open it if it does not open by itself.
Verify that "busybox" appears in both the left and right hand panes.
Press and hold the "busybox" file until the list dialog re-appears.
* Select "permissions".
* Verify that all three "Read" permissions are set, only the top "Write" permission is set, and all three "Execute" permissions are set. (You may have to clear the bottom two "Write" check-boxes.)
* Verify the "Mode" is set to "755"
* Close the permissions dialog by tapping "OK"
Collapse the "bin" folder by tapping on it.
Long-press the "bin" folder, select "permissions", and set the permissions of the bin folder to "755" the way you did for the busybox file above.
Return to the "Configuration" menu by following the steps at the beginning and select "Superuser" or "Normal User" instead of "Superuser + mount writable" to prevent accidental changes in the future.
At this point, you should be able to close and re-open X-plore and verify that "busybox" actually exists within /system/bin. If it does, you can reboot and your should be good to go.
If it's not there, re-trace the steps I listed above, paying particular attention to the "Superuser" setting in "configuration" and the various file permissions.
If you're still having trouble, post a reply below and I will try to provide what help I can.
Thanks for your patience and I hope this helps others who were puzzling with this as long as I was.

Categories

Resources