how to make a autorun script on android 6,and mount tf card,360 qiku n5 cellphone - General Questions and Answers

i want my 360 qiku n5 cellphone to use the tf card as an internalSD card, and also link to the /data/data diretory,so that I can make the storage more sufficient.
i have so many app to install, and the app use much space consuming up the internal space,leaving the tf card empty.
i'd tried making tf card ext4 and mounted to /mnt/sdcard-ext,and maked a link "ln -s /mnt/sdcard-ext/data /data/data",but the apps just crashed as soon as they started.then i deleted the link and cellphone return normal.
after try i found using the "su, mount" script to mount tf card on any directory,the nornal apps which do not use "su" can't read the mount point,I think that's why i link the tf card to /data/data but apps could not start. So how can i solve this problem?I use the supersu as the root and have allready turn off the "Mount namespace separation" option.
And how can i make a startup autorun script on the android6 phone?

Anybody help me please?

This will not work how you want. Apps on SD cards only work with Googles new feature to make the sdcard as internal storage. But even that is buggy due to the sdcard code that has never been made to work for apps on sdcard.

Related

[Q] App2SD working but apps cannot access SD Card

Hi,
I have a weird problem that only happened days after I installed App2SD. I used GOT Open Recovery to format my SDcard and installed App2SD, but not knowing which version to install, i installed both the normal one and the symlink one.
I proceed to install all my apps and such and everything is into the SD card. Then just today, I found that my apps cannot access the SD card. Such as the camera, even titanium reports that no card is mounted. Under settings>SD card, there used to be a value but now its shown unavailable. But if I used astro, i can access the sdcard and launch stuff from it with no problems.
I can even connect my phone to my PC and see the SD card contents using SD Share.
I tried to reinstall App2SD using the GOT Open Recovery, but unable to. It'll hang there. for both versions, with and without symlink.
May I know what is happening or what can I do to enable my phone to see my card? Can I issue commands using terminal on my phone? If so, may I know what commands?

[Q] Moving and linking Folders to external SDCard (eg Google Music cache)

Hello folks,
I am trying to move my google music cache to the external 32GB SD card so that it won't fill up my internal storage but somehow I fail.
Here is what I did so far:
format sdcard as ext2
manually mount sdcard since it won't automatically when ext:
Code:
mkdir /Removable/MicroSD
mount -r -w -t ext2 /dev/block/vold/179\:9 /Removable/MicroSD
mkdir /Removable/MicroSD/GoogleMusicData
Then move all data from /sdcard/Android/data/com.google.android.music/cache to /Removable/MicroSD/GoogleMusicData/cache
I did this with root explorer since I'm not too much of a terminal h4xx0r.
Delete the folder /sdcard/Android/data/com.google.android.music/
Link the new Folder on external MicroSD Card to the original location via this terminal command:
Code:
ln -s /Removable/MicroSD/GoogleMusicData /data/media/Android/data/com.google.android.music
Since /sdcard is already a link like the one I am setting up here, it is not possible to link to this linked location (/sdcard/Android/data/com.google.android.music).
Instead I had to link to the origninal destination of /sdcard which is /data/media.
Now the microSD card is accessible for root explorer. It shows read and write access.
But google music won't find it. It says that it doesn't have enough space to stream music so I figure that it somehow doesn't have access to the sd card.
What could be the issue here?
Also instead of 28GB free memory root explorer shows me only 364,44MB free memory. the command "df" in terminal however confirms 28GB of free memory.
I thought that a reboot might do it. But it doesn't. Instead it gets rid of all the hacking I've done in terminal. So I guess I would have to place a script in /etc/init.d for the link to be set everytime I reboot, right?
Help please?
We don't know how gmusic checks that, but I would suggest checking the perms on the mount, perhaps even mounting somewhere else.
Never done it and don't have the resources but I'm sure with root, making /mnt/sdcard a real microsd is possible.
Sent from my Transformer Prime TF201 using Tapatalk
Maybe this thread will help ?
Thanks for your response!
What do you mean by "checking the perms on the mount"?
I don't want to mount my microsd to /sdcard since then I would have 16 gigs of unused space on my internal memory.
I would rather just link this music folder to my external card and maybe some others later (e.g. DCIM and so on).
I have also tried the mount -o bind command instead of ln but that didn't do the job either. the folder com.google.android.music then only appeared under /data/media/Android/data/ but not under /sdcard/Android/data/ which I totally don't understand how that can happen.
I have root of course.
Does anybody maybe have a script by hand of a similar undertaking so that I can look into that and try to understand how this whole mounting and binding thing works?

Solved! How to swap the internal and external SD cards so apps install externally

If you are like me and bought the 16GB version of our beloved SG3, thinking you could always move apps to the external sd card, then this mod is for you. It swaps the internal and external sd cards so apps install on your external card, because your phone is fooled into thinking the external card is the internal card.
I suggest that if you are going to do this, you should probably do it right after installing a new ROM, and before you install any apps. That way everything will get installed onto the external SD card.
I didn't invent this, Zedomax adapted in from mattiadj. But most people haven't been able to get it fully working, probably due to variations in the init.d function of various ROMS. They'd be able to see the External SD card as the internal SD, but the internal SD would disappear. This method avoids using init.d, and instead uses the app Script Manager to load the script on boot.
After much fooling around, I figured out how to do it so the External SD card and the internal cards are swapped, but you can see both with any file Explorer. I got it working on CleanROM 2.0, but it should work on Beans 10 as well.
Here's how to do it: Warning, if you do not understand the following instructions, or don’t have experience doing these things, you probably don’t want to do this hack. I am not responsible if you a) brick your phone, b) delete your data, or c) get very frustrated. That being said, the most likely failure will be that you only see the one card (the External card).
Back everything up that you care about first!!!!
1. First, I'd recommend making a Nandroid backup of your phone.
2. Next, just to be extra safe, I would backup your internal SD card to your PC. While you are doing that, if you have data on the external SD card, back that up too.
3. Next, I would format your external SD card to fat 32. (You could probably use Ext format too, but I didn’t test that.)If you already have it in that format, and have content on it, this won't affect the content, but back it up just to be safe. It’s probably better to have the Ext SD blank to begin with, you can always copy back its content from your pc.
4. Next copy the contents of the internal SD to the External SD card. This is to avoid confusion about apps and such.
5. Next install script manager free from the play store:
https://play.google.com/store/apps/...anager&feature=nav_result#?t=W251bGwsMSwyLDNd
It will show up on your phone as S manager ads.
6. Download the mod from here: http://downloadandroidrom.com/file/...ternalsd_gs3_fat32orextfat_US_ZEDOMAXv0.2.zip
7. You’ll see a folder called: 11extsd2internalsd_gs3_fat32orextfat_US_ZEDOMAXv0.2.zip
You need to unzip the folder, then go to System/etc/init.d and copy the 11extsd2internalsd file from there to your phone. Put it into the /data directory. Use Root Explorer, and your phone will need to be rooted.
(https://dl.dropbox.com/u/6305/SD Card Hack SG3/11ext file in data directory.png)
Or you can get just the 11extsd2internalsd file here: https://dl.dropbox.com/u/6305/SD Card Hack SG3/11extsd2internalsd
8. Using Root Explorer, navigate to that file in the /data directory. Press and hold the file name until the menu pops up, and click on permissions.
https://dl.dropbox.com/u/6305/SD Card Hack SG3/Permissions.png
(Unix geeks set them to 777, and everyone else copy the picture below. Click OK.
https://dl.dropbox.com/u/6305/SD Card Hack SG3/Permission settings 777.png
9. Open the script manager app, and select Browse as Root in the config screen. Tell it to remember this setting.
https://dl.dropbox.com/u/6305/SD Card Hack SG3/Script manager browse as root and save.png
10. Navigate to the /data directory and choose the 11extsd2internalsd file that is located in /data and click on it. Click on the “Is script” button.
11. Now tap on the buttons that say Su, Boot, and Save. The file name will come up in yellow after the save.
https://dl.dropbox.com/u/6305/SD Card Hack SG3/Script manager setting after save.png
12. Reboot your phone and you should see the swap working and be able to access both internal and external SD cards. The external card will show up as sdcard, and the internal card will show up as extSDCard. Your apps should now install to the external card, since your phone will think it's the internal card. Is that confusing? It was to me too!
Good luck and please share your experiences specifying which ROM you used, so that others can avoid frustration.
Thank you’s always appreciated.
Wonder if this works on asop roms as well.
Please excuse my Galaxy S III, it's a bit Paranoid.
On my X2, this same mod was done via a flashable zip...not sure how it worked, but it was worked perfectly. At some point the roms incorporated the flip flop as part of the Rom. I like the feature because I wouldnt need to move certain app data to my external sd card. Also, I wouldn't have to show tibu where to look for my backups.
Sent from my SCH-I535 using Tapatalk
Clienterror said:
Wonder if this works on asop roms as well.
Please excuse my Galaxy S III, it's a bit Paranoid.
Click to expand...
Click to collapse
What's the consensus on this? Can this mod as posted above be applied to AOSP/CM9/CM10?
Just flashed this on aokp and both sdcard and external_sd are my physical sd card. The internal card is not showing.
Op, can we get an cm10 ver?
Did a little playing around. Below seems to work on cm10 aokp. Can op confirm this is good?
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /storage/sdcard0
mount -o bind /data/media /storage/sdcard1
maniac2k said:
Just flashed this on aokp and both sdcard and external_sd are my physical sd card. The internal card is not showing.
Op, can we get an cm10 ver?
Click to expand...
Click to collapse
Are you actually flashing it, or using the Script Manager? As far as I know, only the Script Manager approach works.
maniac2k said:
Did a little playing around. Below seems to work on cm10 aokp. Can op confirm this is good?
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /storage/sdcard0
mount -o bind /data/media /storage/sdcard1
Click to expand...
Click to collapse
Not sure, but take a look at the code from 11ext2internalsd file. If it works, and you can see both sd cards, then you've nailed it.
Yeah sorry, im running the script apk. It seems to work. I just dont understand the exacts of the vold/179:97 or if it should be vold/197:96?
When i go into settings/storage, should my physical sdcard stats be showing under internal memory?
Thanks I got mines to work now. Thanks to your suggestions.
Sent from my SCH-R530U using Xparent SkyBlue Tapatalk 2
Update: ive been using the script below for a littlw while and it is working great on cm10. It is best to enable it after a fresh rom install.
mount -t vfat -o umask=0000 /dev/block/vold/179:97 /storage/sdcard0
mount -o bind /data/media /storage/sdcard1
I need to do this.
MODERATOR.
This is not a Q&A Thread. Needs to be moved to appropriate location.
Apps Did Not Move After Internal / External SD Swap for GS3
Well I thought everything went perfectly because as mentioned, when I go to storage my internal shows my 64g card and internal of 12g now shows as external. However the apps are still on my internal which is now called my external and when I go to app manager it shows remaining space 5.9g. So I am not sure what I did wrong because I have reviewed this several times and started right after I installed a fresh rom . I am hoping someone can help me correct this because basically all it did was change the name of the two drives but apps are still getting installed to original location. Thanks in advance for any help you can give me
Swapping internal>external did not work
i followed all steps as stated above but when I go to File Manager (default), long pressing Internal SD>Details show 1.2 MB and External SD shows 1.8 GB which is not true. I have external SD of 8 GB and internal is 2 GB in my micromax a110 phone.
The steps above did not work to swap the memory but it now shows even incorrect size. I installed Root Browser lite but got no way to chck the size of the SD cards.. Please help
Does this work with the new Verizon Jelly Bean which they are now sending out via OTA? Are there other Verizon S3 Jelly Bean Roms that are known to work with this method? Thanks
Its works on the leak so i dont see why it wouldnt work on the actual vz rom
not working
This is not working with my samsung s duos please help
Any cm 10.1 updates for this?
I am unable to change the file permissions to -rwx-rwx-rwx- whenever I try to change it I get an error that the phone is unable to change permissions.
EDIT:
Successfully changed permissions and followed the instructions as given. Still not working on the international S3, my internal memory is still 16 GB and external 32GB

Can't run mount script with Link2SD

Any solution for this problem ?
http://forum.xda-developers.com/showthread.php?t=919326
As mentioned in the above link, i hv followed every step but still can't get this to work.
1.) Rooted my Xperia L with Rootkit for Xperia on latest firmware 15.3.A.1.12 (stock kernel).Root successful.
2.)Installed latest version of Link2sd, i.e. 3.1.2
3.)Connected my phone to pc as mass storage device
Formatted external 32gb sandisk card with Minitool in two partitions.First one is 20gb, primary, fat32.
Second 10gb, primary, fat32
4.)Disconnected the phone from pc & rebooted it.
5.)Checked the Storage in settings & it was showing only the second partition of my ext. sd card, i.e. 10gb
6.)Ran Link2sd, it asked for Super User permission which i granted with SuperSu
7.)Then it asked for filesystem for the second partition on ext card.i chose fat32.
8.)In next screen Link2sd said it Mount script error. Mount script cannot be created. mount : No such file or directory.
9.)Again i ran that script from left pane of link2sd.It said to reboot the phone which i did.
10.)From then on the phone goes into bootloop whenever i create two partitions in that external card.
I have to delete both partition and format it again as single one and then put it back into phone and it will normally boot.
Anyone successfully transferred apps, games to ext card with link2sd ? Pls guide me.
If you want to transfer games, GL to SD is the best option available to rooted users to transfer game data to ext.SD Card! You can also transfer apps using that, but it's not recommended. But I believe you must not be having apps that take 4gb+? I have tested GL to SD with my XL - Virtua Tennis, Asphalt 8 all work like charm and occupy no space in my Int.SD Card.
thanks .. i'll try that ...
for apps what i should use ? what about foldermount or apps2sd ?
JOYGR said:
thanks .. i'll try that ...
for apps what i should use ? what about foldermount or apps2sd ?
Click to expand...
Click to collapse
Did not try, will give a go tomorrow and tell you! Perhaps you should also try.. I had a good experience with GL to SD, so did not try them..Heard of Apps2SD Quiet often, but never Foldermount.
ok .. i'll try gl to sd
is there any bug in foldermount ?
if someone solved my link2sd prob, it would have been nice...... if i create a second partition in ext card, the phone goes into bootloop ... i think the mount script can't recognise it during bootup ... is there anyway to clear that mount script ?
can anyone atleast guide me how to do this using Terminal ?
1. Install Link2SD, launch so it makes the mounting script.
2. Remove mount scripts from /etc/init.d using terminal in my device.
Code:
cd /etc/init.d ; rm 05mountsd ; rm 11link2sd
3. transform to system app by moving Link2SD from /data/app to /system/app
Code:
mv /data/app/com.buak.Link2SD-1.apk /system/app/com.buak.Link2SD-1.apk ;reboot
JOYGR said:
can anyone atleast guide me how to do this using Terminal ?
Click to expand...
Click to collapse
What all are the files you are having in /etc/init.d directory?

Default Downloads to SD Card

Hi,
Gorgeous new S7 in hand. The first thing I did was put a SD card in, it seems to be working fine however I can't find a way to set downloads to go on the SD card by default.
With internal storage at a premium, can anyone help?
Andy
From your browser > menu > settings > advanced > save content to > sd card
Your camera also has the option to save to SD card
Thanks, that works for the Samsung browser however I tend to use Chrome and there's no (apparent) way to do this within Chrome.
Andy
Thanx
If you weren't worried about Windows being able to see your SD then you could format to ext4 or a few others and
Code:
ln -s real/directory/location/ /directory/you/are/linking/to/
That should work, I know we've symlinked on Android before. I'm trying to think of a practical format that supports symlinks and can still be read by both linux and Windows. If anyone can think of one then we can simply do as above and symlink the internal download folder to one on the sdcard. There's a much more simple solution to your issue however.
If space is the reason you're wanting to do this then I'd simply use adoptive storage or format a few GBs on your sdcard to ext4 and (you'll have to google a bit, it's been a long time on this one) permanently mount it as part of the internal memory. This is effectively what using adoptive storage does.

Categories

Resources