[How To[Root required]]Play games from external sdcard! - Sony Xperia L

Requirements :
Terminal Emulator/GScript
Game data
SuperUser
The game data is usually found in /sdcard/Android/data or at /sdcard/Android/obb....
1] Copy the game data from your internal sdcard to the external sd card.
2]Create an empty folder with the same name as that of the game data folder at the place from where you copied the data.
[In my case i copied jp.sega.vt folder from /sdcard/Android/obb to /ext_card/gamedata
3]Open terminal emulator and type
su
mount -o bind /"current location of game data" /"location from where you copied game data"
In my case, i wrote
Code:
su
mount -o bind /ext_card/gamedata/jp.sega.vt /sdcard/Android/obb/jp.sega.vt
Do this for all games you want to move..
Enjoy the game...
You'll have to repeat this process every time you restart the tab..Otherwise create a shell script and run it..
Tips:
Also you can use GScript and store this code there. Then next time just when you restart your phone, just open gscript and select the script and it will run automatically.
Also you can directly mount the obb folder to the external card. Then you won't have to repeat the procedure for every game.
If you want the mounting to happen automatically whenever you boot, use Script Manager and store the code there. Whenever you restart your phone, it will automatically mount the folders for you.

Related

Clone an SD card (including EXT3) to another?

Like ghosting a HDD to another, I wanted to know if there's an app that can do this?
I think my 8GB LG branded MicroSD is failing as Windows keeps reporting that the drive needs to be scanned when I mount it via USB from my Desire so I'd like to just get a new Sandisk 8GB card and clone the old to new one to avoid having to go through restoring backups and so on.
If anyone has any ideas that would be grand!
check winimage.
That app can make image and recover it to drives!
Doesnt matter if disk is bigger than previous ( NB! may need to resize to get total space if its bigger, cannot remember)
I've always used it for vmware ESXi embedded sticks, made a million of them and the app works!
also linux routers.
Hope this helps.
vmware ESXi runs linux so it supports EXT!
No need for a program, copy data from fat partitions vis pc and use this ( from cyanogen wiki page) Used it three times now and no problems
Upgrading SD / Moving data to new SD
If you are using RA recovery, this is all done for you by making a BART backup. The following is if you're wanting to do it from the command line.
1. First, backup your ext partition on to your fat32 partition. Note, you will need enough free space to hold all of your apps.
* In Terminal Emulator or recovery console:
mount -a [enter]
tar cvf /sdcard/ext.tar /system/sd [enter]
Note that you must have root access for Terminal Emulator. If you get "permission denied" after entering the above command, then try entering the command "su". "sudo" will not work. After entering "su" try the above command again.
* Or, Using ADB shell from your PC:
adb shell
mount -a [enter]
tar cvf /sdcard/ext.tar /system/sd [enter]
2. Next, mount your SD card and download/backup everything on your fat32 partition. Make sure to get the ext.tar file that you just created in the previous step.
3. Change cards/repartion, or do whatever it is you planned to do here. For instructions on creating new partitions see the installation instructions above.
4. If you're not already, reboot into your recovery. Restore your backup files to your fat32 partition. Don't boot into CM yet!
5. Either go to console or ADB shell and type:
*
mount -a [enter]
*
tar xvf /sdcard/ext.tar [enter]
6. Double check that your directories are moved with:
ls /system/sd [enter]
7. Now you can reboot into CM!
8. Run fix permissions to fix any corrupted permissions.
9. Enjoy your new card!
If you have Amon Ra's recovery on your android phone you can do a bart backup with your old sd card, partition the new sd card as required, copy the bart backup to new sd card and then do a bart restore. It is what i did when i upgraded from my 2gb to 8gb, worked a treat.
Since I created this thread a few great things have happened, EXT4 support in unrevoked permanent flashed AmonRA recovery being the main one so now I am sorted thanks!
I use Gparted just copy paste

KitKat link play store cache to external sd (root)

Im new here and I've been searching for a solution to the play store telling me i need more space.. And I have found it out myself. Like I said, I am new.
So, let's get started.
First, download terminal emulator if you haven't already.
Next, grant superuser permissions by typing su.
Now, make a folder in the directory of your SD card.. For this, use mkdir. I named it play.
My SD card was located in the directory of /sdcard. So, I used the command mkdir /sdcard/play
After that, you will be removing the folder that the Google Play Store downloads files in
and symlinking that folder to your SD card.
So, type the command cd /data/data/com.android.providers.downloads
Then after that command, type rm -r cache
After that, symlink the cache folder to the sdcard.
ln -s /(insert your sdcard folder here)/play(or whatever you named your folder)
Bam. Done.
Now, this will not move all app data and stuff to the sdcard,
This will only make the Play Store download the app you are trying to get to the SD.
Therefore bypassing the not enough space error
To sum all of the commands up, how I used them...
su
mkdir /sdcard/play
cd /data/data/com.android.providers.downloads
rm -r cache
ln -s /sdcard/play cache
Done.
Note: this probably won't work with all phones, my phone is an LG L70 although my old LG (android 2.2) I tried to do this on had the SAME FILE that Play Store downloads to.. AKA downloadfile.apk.
I am not sure if it was in the same location, so I'm saying KitKat just to be safe.
Thank you!

How to decrypt SD storage(removable) | Phone to PC transfers | Easy | Automagically

I wanted an encrypted external sd on my phone that i could remove and transfer files to as needed.
This is the solution I conjured up after doing some testing and research
Thanks to @POQDavid who wrote How to decrypt and split adopted storage? which ive modified
Make sure your SD card is formatted as internal storage
Your device must be rooted.
Use a file browser like ES Explorer/Ghost/TotalCommander, browse to /data/misc/vold.
Copy the .key file to another folder and then move to your pc
DO NOT need to dump the hex like in other guides
Copy your key somewhere safe on PC
Code:
sudo mkdir /etc/keys/
cp <keyfilename>.key /etc/keys
On any Linux distro check where your drive is mounted, you can use
Code:
fdisk -l or lsblk
to find the large encrypted partition of the SD card, my SD card was mounted to /dev/sdd2.
Create the mount point:
Code:
sudo mkdir /mnt/1
Then run this command
Code:
sudo cryptsetup create usbcrypt1 /dev/sdd2 --key-size 128 --key-file /etc/keys/<keyfilename>.key
If your key is correct you can mount it by
Code:
sudo mount /dev/mapper/usbcrypt1 /mnt/1/
Test the mount
Code:
ls /mnt/1
Finally you can run
Code:
cd /mnt/1
to browse the decrypted storage.
Automation
Im tired now and so far I have automated this using terminal aliases
Just drop the alias into command and hit enter, the cryptmount to mount and cryptumount to unmount. (alias will be removed on reboot) edit and insert into ~./bashrc to make aliases stay
Code:
# alias mounting
[B]alias cryptmount="sudo su -c 'cryptsetup create usbcrypt1 /dev/sdd2 --key-size 128 --key-file /etc/keys/<keyfilename>.key' && sudo su -c 'mount /dev/mapper/usbcrypt1 /mnt/1'"[/B]
#alias unmounting and luksClose
[B]alias cryptumount="sudo su -c 'umount /mnt/1' && sudo su -c 'cryptsetup luksClose usbcrypt1'"[/B]
Remember to replace <keyfilename> with your keyfile name to make it work.
Next step make this automount in crypttab using dm-crypt method if thats possible... Any help appreciated.
cheers and good night
Table reserved for 2
Ok it works, but kind of a hassle. To copy files over you basically should copy them to a readable folder like user or any other one you can create directories in after mounting.
Copy your files to the encrypted drive, unmount .
then using a file manager with root access on your phone copy them from /mnt/expand/<UUID> to /mnt/sdcard and you should be good. It works for be but i wont be using this method anymore because its a pain to copy large amounts of files so many times. better to use an OTG usb for that
However this does have benefits if your phone is destroyed and only the adapted sd card exists and you need access to your files.
Enjoy.
[xzel] said:
Ok it works, but kind of a hassle. To copy files over you basically should copy them to a readable folder like user or any other one you can create directories in after mounting.
Copy your files to the encrypted drive, unmount .
then using a file manager with root access on your phone copy them from /mnt/expand/<UUID> to /mnt/sdcard and you should be good. It works for be but i wont be using this method anymore because its a pain to copy large amounts of files so many times. better to use an OTG usb for that
However this does have benefits if your phone is destroyed and only the adapted sd card exists and you need access to your files.
Enjoy.
Click to expand...
Click to collapse
Is it possible to browse adoptable storage from twrp using the aforementioned method?
I have busybox and cryptsetup in termux so i can use it from twrp terminal..?
Unreal_Hawkz said:
Is it possible to browse adoptable storage from twrp using the aforementioned method?
I have busybox and cryptsetup in termux so i can use it from twrp terminal..?
Click to expand...
Click to collapse
I believe you can mount it thru termux but I havent tried, I tried this on an Ubuntu system.

Can't delete folder via adb or twrp

Hi guys,
as the title states, I'm not able to delete the folder "/sdcard" I created.
What I tried:
TWRP:
File manager > Go into folder > Delete - error 1
Mount system > File manager > Go into folder > Delete - error 1
Mount system and Micro SD card > File manager > Go into folder > Delete - error 1
Mount everything > File manager > Go into folder > Delete - error 1
ADB:
adb shell rm -rf /sdcard - resource busy
adb shell mount -o remount,rw and then rm -rf /sdcard - resource busy
Why is this folder there?
Well, I have this HTC e8 with barely no battery and when I was installing LOS yesterday there was a power outage and it corrupted the installation. After being able to go into recovery I lost the touch controls in TWRP. Went via adb and didn't remember the path to the sd card, so I could send the restore command. After trying the ls and find commands and end up with millions of records my "brilliant" idea was to use the mkdir command to test for the common sd card path names...
Anyway, after reinstalling LOS (with wipe data) I noticed it didn't let me use the sd card without formatting. Then I went into TWRP File Manager and found out the "/sdcard" folder I created had all the folders that LOS usually creates in my sd card (which the path is "/external_sd"). So now I need to delete this folder and reinstall everything again so that LOS can see "/external_sd" as the true sd card path
Do you guys have any suggestion I can try here?
Thanks in advance
You cannot operate on a folder / file that is currently in use by another process - this might be a daemon or whatever: If you try nevertheless then you get error message "Resource is busy" or similar.
When I try to mount a partition then I always do it this way
Code:
cd /
mount -o rw,remount <mount_point>
what always worked for me.

Question Trying to backup phone with adb, where is sdcard?

Right now I am backing up my files with adb and I have tried the following commands
adb pull /sdcard D:\[backupfolder]
adb pull /sdcard
But they just copy the internal storage folders, while what I want is to copy the stuff in the sdcard. I have tried
/storage/sdcard0
/storage/sdcard
/storage/0
/disk (it is how the folder is called in my phone)
but none of them exist.
Can anyone who has backed up their sd card on a Poco X3 tell me the actual storage path to use in adb? Thanks!
You can't.
Cuz SD card is always some strange digit number.
Try to enter ADB shell and then use the ls command to list all folders.
It should be in Mount or mnt
/sdcard is usually a chain of links that is not followed by ADB.
You need to:
Code:
$ stat /sdcard
And it will tell you where it points to. Then you stat that and keep on going until you stat something that is a real directory.

Categories

Resources