path for external sd card ? - G3 Q&A, Help & Troubleshooting

I'm trying to get an app to work and have to write a path for the external sd card, can I just use /storage/external_SD ?

try this.
mjb152 said:
I'm trying to get an app to work and have to write a path for the external sd card, can I just use /storage/external_SD ?
Click to expand...
Click to collapse
use this it might help
You can get the path of sdcard from this
code:
String path = Environment.
getExternalStorageDirectory
().getAbsolutePath();
Then specify the foldername and file
name.
if you are using an emulator, double-check
to make sure that you have filled in a
value for the SD Card size.
for kk permission is changed I hope you know.
I can provide code for it also.
for kk-
Your app can not read shared files on the external
storage when running on Android 4.4, unless your app
has the READ_EXTERNAL_STORAGE permission. That
is, files within the directory returned by
getExternalStoragePublicDirectory() are no
longer accessible without the permission. However, if
you need to access only your app-specific directories,
provided by getExternalFilesDir() , then you do
not need the READ_EXTERNAL_STORAGE permission

@SidDev said:
use this it might help
You can get the path of sdcard from this
code:
String path = Environment.
getExternalStorageDirectory
().getAbsolutePath();
Then specify the foldername and file
name.
if you are using an emulator, double-check
to make sure that you have filled in a
value for the SD Card size.
for kk permission is changed I hope you know.
I can provide code for it also.
for kk-
Your app can not read shared files on the external
storage when running on Android 4.4, unless your app
has the READ_EXTERNAL_STORAGE permission. That
is, files within the directory returned by
getExternalStoragePublicDirectory() are no
longer accessible without the permission. However, if
you need to access only your app-specific directories,
provided by getExternalFilesDir() , then you do
not need the READ_EXTERNAL_STORAGE permission
Click to expand...
Click to collapse
coo, thanks !

mjb152 said:
coo, thanks !
Click to expand...
Click to collapse
welcome and you could have pressed the thanks button.

@SidDev said:
welcome and you could have pressed the thanks button.
Click to expand...
Click to collapse
If he has root this will help:
https://play.google.com/store/apps/details?id=nextapp.sdfix
=
http://technofaq.org/posts/2014/04/fixing-external-sd-card-write-issue-on-android-kitkat/
I must have root to fix the SD problems ? (can't write to sd)
It a big probleam if google do it. but LG & S4 & Note 3 have SD what should they do with no ROOT?
what about this?
http://www.instructables.com/id/How-to-bypass-Android-44-KitKat-external-SD-write-/

nope he wants something else
u1988 said:
If he has root this will help:
https://play.google.com/store/apps/details?id=nextapp.sdfix
=
http://technofaq.org/posts/2014/04/fixing-external-sd-card-write-issue-on-android-kitkat/
I must have root to fix the SD problems ? (can't write to sd)
It a big probleam if google do it. but LG & S4 & Note 3 have SD what should they do with no ROOT?
what about this?
http://www.instructables.com/id/How-to-bypass-Android-44-KitKat-external-SD-write-/
Click to expand...
Click to collapse
you got it completely wrong, he wants something else.

@SidDev said:
you got it completely wrong, he wants something else.
Click to expand...
Click to collapse
Oh sorry! :cyclops:

u1988 said:
Oh sorry! :cyclops:
Click to expand...
Click to collapse
no problem buddy.

and what was the answer???!!!

Related

[Q] how to move data and applications and data to the external sd card?

Someone can tell me how to pass aplications an data to the extsd card I have found that the note 2 I cant doit, please helpp
THANKS
You can use Link2SD for the apk's if you have root.
I have not found a way to move the app data folders to the external sd card.
https://play.google.com/store/apps/details?id=com.buak.Link2SD
Try out directory bind.. works great for me!
Thanks but..
htaule said:
You can use Link2SD for the apk's if you have root.
I have not found a way to move the app data folders to the external sd card.
Thank you but i need to move the data of games like wild blood that ocupates 2gb of internal storage and that is to much
Click to expand...
Click to collapse
What is that?
The Dutchman said:
Try out directory bind.. works great for me!
Click to expand...
Click to collapse
Can you tell me what is a directory blind iam new here excuse me
Nicoga97 said:
Can you tell me what is a directory blind iam new here excuse me
Click to expand...
Click to collapse
From searching I'm guessing he's talking about this http://forum.xda-developers.com/showthread.php?t=1410262
I have not tried it, but I want something to move the Gameloft games to the external SD, so I'm will try it later.
LINK2SD doesn't work right after download, but if you need something simple it won't do.
you need to configure the SD using your computer.
Just wrote an explanation of Link2SD here: http://forum.xda-developers.com/showpost.php?p=34652966&postcount=6
The Dutchman said:
Try out directory bind.. works great for me!
Click to expand...
Click to collapse
htaule said:
From searching I'm guessing he's talking about this http://forum.xda-developers.com/showthread.php?t=1410262
I have not tried it, but I want something to move the Gameloft games to the external SD, so I'm will try it later.
Click to expand...
Click to collapse
Thank you i will try it
LLanito said:
LINK2SD doesn't work right after download, but if you need something simple it won't do.
you need to configure the SD using your computer.
Click to expand...
Click to collapse
Can you ecplain me how i can do it?
The Dutchman said:
Try out directory bind.. works great for me!
Click to expand...
Click to collapse
Excuse me, can you tell me how you configure the data directory and target directory in directory blind please?
Sorry for the late reaction, i have included a few screens to help you out..

[GUIDE][HOW-TO]Use SWAP As Virtual RAM Without Partitioning SD Card

Firstly what is swap, you should know about it before
you go further
What is Swap:-
Swap space in Linux is used when the amount of
physical memory (RAM) is full. If the system needs
more memory resources and the RAM is full, inactive
pages in memory are moved to the swap space. While
swap space can help machines with a small amount of
RAM, it should not be considered a replacement for
more RAM. Swap space is located on hard drives, which
have a slower access time than physical memory.
Swap space can be a dedicated swap partition, a swap
file, or a combination of swap partitions and swap files.
Normally the swap space should be equal to the Actual
physical Ram
Click to expand...
Click to collapse
.
LEGAL WARNING-Read This before you proceed
I and XDA is not responsible for any damage done to your device..........
Click to expand...
Click to collapse
Requirements for this process:-
* Kernel which supports swap(Deviant,Hells,GNU,Merruk)etc
* Rooted galaxy y
* Busybox (atleast v1.18)
* Terminal Emulator
Click to expand...
Click to collapse
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
REGARDS
You Can Rate This Thread 5 Stars......I won't ask for thank......if I deserve it..go ahead.....please do not copy the work to any other forum
Click to expand...
Click to collapse
Reserved
Feedback and WARNING by users
thewarlord said:
No confusion dude!!
Watch ur ram in task manager !! Its always in motion (increase & decrease) I think u understand that life of sd card depend on writeing amount !! Ok
If u create a swap in sd card or swap partition !! Its always write on sd card I think u r understanding my feelings!! so, It decrease the sd card life!!
Click to expand...
Click to collapse
New Method Using SWAPPER2.apk
Here the step :
go to settings -> swap place (put correct directory for
example: /sdcard/swap 128 ) bold text depend on your
swap name!
Tick "Safe Unmount" and "Safe Remount", u dont need
to turn off or turn on again before and after sharing sd
IMPORTANT!! :
go to Advanced preferences -> untick "Recreate
swap file" and "Reformat swap" MUST!!
D4rkSh4dow said:
Firstly what is swap, you should know about it before
you go further
.
LEGAL WARNING-Read This before you proceed
Steps to enable swap:-
1. Open any file explorer(I prefer root explorer) and create a folder and name
it swap
2. Browse to that folder and create a file named swap
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
(xxxxxx is the amount in KB, eg:- 383456 = 378MB),
and this process will take time.)
4. Now we will activate the swap and to activate it type
in terminal busybox swapon /sdcard/swap/swap
5. The last step is to turn on swappiness and to do it
we write echo 100 > /proc/sys/vm/swappiness in
terminal
And now you are done to check the working of swap
type busybox free in terminal emulator.
NOTE-Last two steps are needed to be done after every boot
so it is better to make a script which can be started
from script manager......... and here is a script ready for this Swap.sh
REGARDS
Click to expand...
Click to collapse
you can simply use the app swapper for doing this
ok the info is good,but i hope you know about sdcard lifedecrease by using swap.it kills sdcards.
-CALIBAN666- said:
ok the info is good,but i hope you know about sdcard lifedecrease by using swap.it kills sdcards.
Click to expand...
Click to collapse
Sir,hav a look at OP,it says without SD Card paritition.....no use of sd card in this.....
oops my fail,anyway,have you fell a better performance?you didnt need so complex settings,just use System Control from Juwe11.
D4rkSh4dow said:
Sir,hav a look at OP,it says without SD Card paritition.....no use of sd card in this.....
Click to expand...
Click to collapse
no use of sd card ??? then where the file swap is created
internal system patition
-CALIBAN666- said:
internal system patition
Click to expand...
Click to collapse
3. Open terminal Emulator and type the code busybox
mkswap /sdcard/swap/swap xxxxxx
I don't think so
and it is galaxy y section sir we don't have internal memory to install enough apps so where to create a swap folder
apps???????its about ram,dude
sangalaxy said:
no use of sd card ??? then where the file swap is created
Click to expand...
Click to collapse
I meant no need of sd partition........why don't you read the whole post again before posting smthng
-CALIBAN666- said:
apps???????its about ram,dude
Click to expand...
Click to collapse
yes I know sir but you said the swap folder is in internel memory so iwas just pointing out that we only have 190mb data folder and no internel sd partotion
---------- Post added at 01:03 PM ---------- Previous post was at 01:01 PM ----------
D4rkSh4dow said:
I meant no need of sd partition........why don't you read the whole post again before posting smthng
Click to expand...
Click to collapse
yes I know friend but partition or not you have to create a swap folder in sd card which serves as a virtual partition
bro apps are not the same like ram,google for more infos.
Or do a xda search
-CALIBAN666- said:
bro apps are not the same like ram,google for more infos.
Click to expand...
Click to collapse
yes I know sir but iam not saying about the apps ok lets make it clear by using your method we create a folder named swap in the sdcard and it serves as a virtual rom right??
and I was only saying that as caliban666 said continuos read and write in sdcard will decrease its life whether it is a partion or a folder
sangalaxy said:
yes I know sir but iam not saying about the apps ok lets stop this its going outoff topic
Click to expand...
Click to collapse
Yes,u r rite.....btw if u tried it u can post some ss here
I'll add to the OP
D4rkSh4dow said:
Yes,u r rite.....btw if u tried it u can post some ss here
I'll add to the OP
Click to expand...
Click to collapse
sorry about ss friend anyway thanks for the post
i dont know but has anyone read this"tweak"?it creates a swap part on sd,otherwise its not fully working.
-CALIBAN666- said:
i dont know but has anyone read this"tweak"?it creates a swap part on sd,otherwise its not fully working.
Click to expand...
Click to collapse
Did you tried it sir?
no i didnt need to use it,all what i need to know i see,the other thing is swap is buggy for some roms and kernel(my expierence and opinion).

Workaround to write to Ext SDCARD?

I just switched from my M7 to the M8 yesterday. I was excited to have the external SD for saving pictures, moving apps, but mostly to host my backups. I have since unlocked my bootloader and rooted the device. Unfortunately I'm unable to write any back ups through TWRP to the card. I was wondering if anyone found any fixes? I've already tried SDFix but it seems not to work with our device. Any help would be appreciated!
Sidenote: I know this probably belongs under development but I'm unable to post yet as my post count is too low. Thanks again!
iNiREALiZED said:
I just switched from my M7 to the M8 yesterday. I was excited to have the external SD for saving pictures, moving apps, but mostly to host my backups. I have since unlocked my bootloader and rooted the device. Unfortunately I'm unable to write any back ups through TWRP to the card. I was wondering if anyone found any fixes? I've already tried SDFix but it seems not to work with our device. Any help would be appreciated!
Sidenote: I know this probably belongs under development but I'm unable to post yet as my post count is too low. Thanks again!
Click to expand...
Click to collapse
You will need to edit platform.xml file in/system/etc. Are you comfortable ?
I'm not sure. If there was a tutorial that was available I could possibly follow it. Otherwise is this something that could be included in future rom builds? I wouldn't mind waiting.
Sent from my HTC One_M8 using xda app-developers app
iNiREALiZED said:
I'm not sure. If there was a tutorial that was available I could possibly follow it. Otherwise is this something that could be included in future rom builds? I wouldn't mind waiting.
Sent from my HTC One_M8 using xda app-developers app
Click to expand...
Click to collapse
Look for nextapp's SDFix in the play store.. Root and system write protection off is required. It basically edits the file for you (also backs up the original)
silentvisitor said:
You will need to edit platform.xml file in/system/etc. Are you comfortable ?
Click to expand...
Click to collapse
Could you detail the edits for reference anyway please? I'll need to know shortly too.
graffixnyc said:
Look for nextapp's SDFix in the play store.. Root and system write protection off is required. It basically edits the file for you (also backs up the original)
Click to expand...
Click to collapse
The app worked for me!
graffixnyc said:
Look for nextapp's SDFix in the play store.. Root and system write protection off is required. It basically edits the file for you (also backs up the original)
Click to expand...
Click to collapse
Thanks for the help. I tried sdfix this morning. It kept failing and rebooting. I'm rooted but if you could explain how I turn write protection off that would be awesome!
iNiREALiZED said:
Thanks for the help. I tried sdfix this morning. It kept failing and rebooting. I'm rooted but if you could explain how I turn write protection off that would be awesome!
Click to expand...
Click to collapse
the quick way? go to the module thread in Original development and follow the instructions. You'll have to do it at every boot though unless you're on a rom that supports init.d support. If you're on stock I made a guide to disable it on boot automatically without init.d support
My guide: http://forum.xda-developers.com/showthread.php?t=2702575
graffixnyc said:
the quick way? go to the module thread in Original development and follow the instructions. You'll have to do it at every boot though unless you're on a rom that supports init.d support. If you're on stock I made a guide to disable it on boot automatically without init.d support
My guide: http://forum.xda-developers.com/showthread.php?t=2702575
Click to expand...
Click to collapse
Sorry if I'm missing something totally obvious. I went and read the thread. I download the file with extension .ko. Copied it to root of internal memory. Opened up terminal app and typed "sh" then used command "insmod /storage/sdcard0/wp_mod.ko"
Am I missing something?
iNiREALiZED said:
Sorry if I'm missing something totally obvious. I went and read the thread. I download the file with extension .ko. Copied it to root of internal memory. Opened up terminal app and typed "sh" then used command "insmod /storage/sdcard0/wp_mod.ko"
Am I missing something?
Click to expand...
Click to collapse
su
not sh..
type su
hit enter
then type
insmod /storage/sdcard0/wp_mod.ko it wont show you any output or anything.. if it brings your back to the terminal prompt it ran right
graffixnyc said:
su
not sh..
type su
hit enter
then type
insmod /storage/sdcard0/wp_mod.ko it wont show you any output or anything.. if it brings your back to the terminal prompt it ran right
Click to expand...
Click to collapse
I tried it again using "su". I'm pretty sure that is what I used the first time as well because when I entered the command the super user prompt came up to allow access for terminal. Same results. Didn't see any confirmation. Exited app and tried running SDFix and failed again. I then followed your link to your thread and followed step by step. Got all the way to the point where I was trying to save the text document at the end and got the prompt that I could not save the file.
I'm usually pretty good at following tutorials and I'm sure I'm not skipping steps but who knows. I think this one has me defeated lol.
If you put it on your SD card try just /sdcard/wp_mod.ko
Sent from my HTC One using Tapatalk
If you run the command.. And then run it again. It will tell you it already exists that's how I figured out it ran ok..
Sent from my HTC One using Tapatalk
backfromthestorm said:
Could you detail the edits for reference anyway please? I'll need to know shortly too.
Click to expand...
Click to collapse
Sure. Here it is:
You need to make following change to platform.xml in /system/etc.
Add <group gid="Media_rw"/> under WRITE_EXTERNAL_STORAGE and WRITE_MEDIA_STORAGE(or similar).
Save. Set Permission to rw-r-r or 644.
Reboot and Enjoy
Good luck :good:
silentvisitor said:
Sure. Here it is:
You need to make following change to platform.xml in /system/etc.
Add <group gid="Media_rw"/> under WRITE_EXTERNAL_STORAGE and WRITE_MEDIA_STORAGE(or similar).
Save. Set Permission to rw-r-r or 644.
Reboot and Enjoy
Good luck :good:
Click to expand...
Click to collapse
Well I ran through both tutorials (yours and the others) once again. Entered the command twice to confirm and got the message "failed file already exists". So I'm assuming that part went through fine but still unable to run SDFix successfully or edit the install_recovery.sh file. Wouldn't allow me to save through es text edit or the standard one.
So now I'm trying to manually change the platform.xml file. When I navigate to system/etc I don't see any file named "platform.xml". Also tried a search through es file explorer and couldn't find any file. Any thoughts?
iNiREALiZED said:
Well I ran through both tutorials (yours and the others) once again. Entered the command twice to confirm and got the message "failed file already exists". So I'm assuming that part went through fine but still unable to run SDFix successfully or edit the install_recovery.sh file. Wouldn't allow me to save through es text edit or the standard one.
So now I'm trying to manually change the platform.xml file. When I navigate to system/etc I don't see any file named "platform.xml". Also tried a search through es file explorer and couldn't find any file. Any thoughts?
Click to expand...
Click to collapse
My apologies.
Its /system/etc/Permission/platform.xml
iNiREALiZED said:
Well I ran through both tutorials (yours and the others) once again. Entered the command twice to confirm and got the message "failed file already exists". So I'm assuming that part went through fine but still unable to run SDFix successfully or edit the install_recovery.sh file. Wouldn't allow me to save through es text edit or the standard one.
So now I'm trying to manually change the platform.xml file. When I navigate to system/etc I don't see any file named "platform.xml". Also tried a search through es file explorer and couldn't find any file. Any thoughts?
Click to expand...
Click to collapse
Are you mounting it as r/w in the file explorer? It doesn't seem like you're doing that. I know the module works.. You can't just install the module and it's magically writable.. you still have to make it r/w in a file explorer before you make any changes. I don't use es. I use root explorer and there is a r/w button on top.
graffixnyc said:
Are you mounting it as r/w in the file explorer? It doesn't seem like you're doing that. I know the module works.. You can't just install the module and it's magically writable.. you still have to make it r/w in a file explorer before you make any changes. I don't use es. I use root explorer and there is a r/w button on top.
Click to expand...
Click to collapse
Wow. Excuse my ignorance. I wasn't doing that. I downloaded root explorer and used the button to mount as you mentioned and viola I was able to save the edits! I'm now able to create folders on the ext SD. Still get an error when trying to backup from twrp but I guess that's an issue for another day.
I really appreciate all the help!
iNiREALiZED said:
Wow. Excuse my ignorance. I wasn't doing that. I downloaded root explorer and used the button to mount as you mentioned and viola I was able to save the edits! I'm now able to create folders on the ext SD. Still get an error when trying to backup from twrp but I guess that's an issue for another day.
I really appreciate all the help!
Click to expand...
Click to collapse
As of now recovery doesn't support exfat formatted cards, If your sd card is formatted as exfat it will fail in recovery. You need to either format your external sd card to fat32 or just wait until the recovery is updated to support exfat. It will once they get kernel source code
graffixnyc said:
As of now recovery doesn't support exfat formatted cards, If your sd card is formatted as exfat it will fail in recovery. You need to either format your external sd card to fat32 or just wait until the recovery is updated to support exfat. It will once they get kernel source code
Click to expand...
Click to collapse
How far out do you think that is? I was figuring I could just get a cheaper card for my backups. Only thing is if I remember correctly Fat32 only supports up to 4GB files correct? I remember my backups being a tad over that so getting another card might not even make a difference.

[Q] I need help better understanding the Kitkat SD card restristion

First, I want to say that I have unrooted version of this tablet on Version 4.4.2
After I was forced to up date I knew I would loose some function with my SD card. I thought the restriction were going to be if that app didn't create the file that app couldn't modify it. So today I had tried to create a folder with in a folder within a folder with ES File Manager and it was unable to do so. Is this apart of the regular restrictions? Is there a non root solution that doesn't involve taking the SD card to the computer and then creating the file structure with the app?
Icon000 said:
First, I want to say that I have unrooted version of this tablet on Version 4.4.2
After I was forced to up date I knew I would loose some function with my SD card. I thought the restriction were going to be if that app didn't create the file that app couldn't modify it. So today I had tried to create a folder with in a folder within a folder with ES File Manager and it was unable to do so. Is this apart of the regular restrictions? Is there a non root solution that doesn't involve taking the SD card to the computer and then creating the file structure with the app?
Click to expand...
Click to collapse
Normal........ You need to use the native file manager (my files).
kkretch said:
Normal........ You need to use the native file manager (my files).
Click to expand...
Click to collapse
Thanks for the update on this. I guess the only way to use a non native file manager is root?
Icon000 said:
Thanks for the update on this. I guess the only way to use a non native file manager is root?
Click to expand...
Click to collapse
Correct.

Tips : Fix SD card writing issue with android 5.0

Hello,
It's my first post
Since i've updated my galaxy tab S from android 4 to android 5, I detected that i haven't the right to write on the sd card and in some case, to delete file (ie with mx player)
In order to resolve this problem, i found a topic on internet that resolved my issue
Step 1: Using a file explorer with root access capabilities like Root Explorer, navigate to /system/etc/permissions folder. Make sure you have r/w access
Step 2: Find the platform.xml file and open it using a text editor. If you are using Root explorer, long press on the platform.xml file and select Open With -> Text editor to open the file in a text editor. Now, find the WRITE_EXTERNAL_STORAGE permission in the file.
Step 3: Add the following line on a new line under the WRITE_EXTERNAL_STORAGE permission without the quotes – “<group gid=”media_rw” />”.
Step 4: Save the file and restart your device
After this, you will be able to use your sdcard as you always used it
Source : androidbeat[dot]com/2013/08/fix-sd-card-writing-issue-on-galaxy-s4-gpe-android-4-3/
No need for all that messing. Just download sd card fix from the app store
Of course, this requires your tablet be rooted?
No need for all that messing. Just download sd card fix from the app store
Click to expand...
Click to collapse
I don't know if the app can work with Lollilop.
Of course, this requires your tablet be rooted?
Click to expand...
Click to collapse
Yes, cause you'll modify a file that is in the system folder
There is no need for messing with it at all on Lollipop. SD card access is granted on a per app basis.
It's up to the app developers to update their apps to support the SD card changes made in Lollipop, in MX player's case, the newest beta has that new lollipop api implemented, thus full SD card access.
Dissgro said:
There is no need for messing with it at all on Lollipop. SD card access is granted on a per app basis.
It's up to the app developers to update their apps to support the SD card changes made in Lollipop, in MX player's case, the newest beta has that new lollipop api implemented, thus full SD card access.
Click to expand...
Click to collapse
Ok, i didn't know that
1st topic, 1st fail :crying:
bibi77 said:
Ok, i didn't know that
1st topic, 1st fail :crying:
Click to expand...
Click to collapse
Never mind. You are a budding developer.

Categories

Resources