A few days ago I cracked my phone screen and I can't see anything, but I want to access the internal storage, can I do this through ADB command?if possible, HOW?
Please! can someone help me!
Thanks!
alex26aly said:
A few days ago I cracked my phone screen and I can't see anything, but I want to access the internal storage, can I do this through ADB command?if possible, HOW?
Please! can someone help me!
Thanks!
Click to expand...
Click to collapse
1. Connect your device to your pc
2. Open command prompt from Adb folder. (hold shift key, then right click on a blank space, select open command window here)
3. #check if your device is connected via adb by typing in the command window: adb devices
4. #copy all the content of your sdcard by typing in the command window:
adb pull /mnt/sdcard \mysdcard
wait for the process to finish
Check you C: drive for a folder named "mysdcard". all the files and folders in your internal storage will be there.
Good luck
Jokesy said:
1. Connect your device to your pc
2. Open command prompt from Adb folder. (hold shift key, then right click on a blank space, select open command window here)
3. #check if your device is connected via adb by typing in the command window: adb devices
4. #copy all the content of your sdcard by typing in the command window:
adb pull /mnt/sdcard \mysdcard
wait for the process to finish
Check you C: drive for a folder named "mysdcard". all the files and folders in your internal storage will be there.
Good luck
Click to expand...
Click to collapse
It says:
0 files pulled.0 files skipped.
All the files I have are on the internal memory of the SGS2 - I have around 7-8gb that I want to recover
alex26aly said:
It says:
0 files pulled.0 files skipped.
All the files I have are on the internal memory of the SGS2 - I have around 7-8gb that I want to recover
Click to expand...
Click to collapse
is your phone turned on normally or booted to recovery?
Thanks a lot!!
I found a solution
adb pull / - it copied everything from the phone
Now how can I format the memory?? to delete the files from the phone, I found someone that wants the phone
alex26aly said:
Thanks a lot!!
I found a solution
adb pull / - it copied everything from the phone
Now how can I format the memory?? to delete the files from the phone, I found someone that wants the phone
Click to expand...
Click to collapse
type as follows in adb
adb shell
cd /mnt/sdcard
ls
### ls lists all the directories/folders. so it will list all the directory in your internal storage
### you have to delete the folder type the name of each folder in front of this command:
rm -r "folder name"
### repeat the above command for all the folders you wish to delete
### for example, to delete DCIM, then i just type: rm -r dcim
done
Jokesy said:
type as follows in adb
adb shell
cd /mnt/sdcard
ls
### ls lists all the directories/folders. so it will list all the directory in your internal storage
### you have to delete the folder type the name of each folder in front of this command:
rm -r "folder name"
### repeat the above command for all the folders you wish to delete
### for example, to delete DCIM, then i just type: rm -r dcim
done
Click to expand...
Click to collapse
I tried, but I have this problem:
adb shell
~ # cd /mnt/sdcard
cd /mnt/sdcard
/mnt/sdcard # Is
Is
/sbin/sh: Is: not found
/mnt/sdcard #
__________________________________________________
DCIM is here \storage\sdcard0\DCIM
In that folder is now on PC after I used adb pull/ and copied everything from the phone
Sorry, this is the first time I use adb...
alex26aly said:
I tried, but I have this problem:
adb shell
~ # cd /mnt/sdcard
cd /mnt/sdcard
/mnt/sdcard # Is
Is
/sbin/sh: Is: not found
/mnt/sdcard #
__________________________________________________
DCIM is here \storage\sdcard0\DCIM
In that folder is now on PC after I used adb pull/ and copied everything from the phone
Sorry, this is the first time I use adb...
Click to expand...
Click to collapse
Ok. then change /mnt/sdcard to /storage/sdcard0
everything should be fine now.
Can someone please help me!
How to connect my SGS2 into MassStorage mode using adb??
Or how to delete files from the internal memory of the phone???
Thanks!
alex26aly said:
Can someone please help me!
How to connect my SGS2 into MassStorage mode using adb??
Or how to delete files from the internal memory of the phone???
Thanks!
Click to expand...
Click to collapse
did you face any other error?
The only way you can help yourself is by reporting error/success instead of making the person that's helping you look stupid!
Swyped from my Samsung Galaxy SII
Supercharged ParanoidAndroid 2.12
Dorimanx kernel 5.76B
GT I9100
Next phone: Galaxy NOTE II
Jokesy said:
did you face any other error?
The only way you can help yourself is by reporting error/success instead of making the person that's helping you look stupid!
Swyped from my Samsung Galaxy SII
Supercharged ParanoidAndroid 2.12
Dorimanx kernel 5.76B
GT I9100
Next phone: Galaxy NOTE II
Click to expand...
Click to collapse
Sorry!
C:\android-sdk-windows>adb sh
~ # cd /storage/sdcard0
cd /storage/sdcard0
/storage/sdcard0 # Is
Is
/sbin/sh: Is: not found
/storage/sdcard0 # rm -r dcim
rm -r dcim
it didn't give any information about the forder to say if is deleted or not
C:\android-sdk-windows>adb shell
~ # cd /storage/sdcard0
cd /storage/sdcard0
/storage/sdcard0 # rm -r SmartStay
rm -r SmartStay
/storage/sdcard0 # rm -r SmartStay
rm -r SmartStay
rm: can't remove 'SmartStay': No such file or directory
/storage/sdcard0 # rm -r TitaniumBackup
rm -r TitaniumBackup
/storage/sdcard0 # rm -r TitaniumBackup
rm -r TitaniumBackup
rm: can't remove 'TitaniumBackup': No such file or directory - This means it works, the folder has been deleted
/storage/sdcard0 #
Can you confirm that it works, I'm not 100% sure?
alex26aly said:
Sorry!
C:\android-sdk-windows>adb sh
~ # cd /storage/sdcard0
cd /storage/sdcard0
/storage/sdcard0 # Is
Is
/sbin/sh: Is: not found
/storage/sdcard0 # rm -r dcim
rm -r dcim
it didn't give any information about the forder to say if is deleted or not
Click to expand...
Click to collapse
The command to list directory is LS (small cap = ls) not IS.
When you delete a folder using rm -r you can then check if the folder is deleted using ls.
If you don't miss anything everything should be fine now
Swyped from my Samsung Galaxy SII
Supercharged ParanoidAndroid 2.12
Dorimanx kernel 5.76B
GT I9100
Next phone: Galaxy NOTE II
Jokesy said:
The command to list directory is LS (small cap = ls) not IS.
When you delete a folder using rm -r you can then check if the folder is deleted using ls.
If you don't miss anything everything should be fine now
Swyped from my Samsung Galaxy SII
Supercharged ParanoidAndroid 2.12
Dorimanx kernel 5.76B
GT I9100
Next phone: Galaxy NOTE II
Click to expand...
Click to collapse
The command to list directory is LS (small cap = ls) not IS. - I'm such a noob
Thanks a lot!!! works!:good:
if i cant turn on the phone, can i mount the internal storage?
No, you can't. Think about it. What you just asked is illogical.
alex26aly said:
Thanks a lot!!
I found a solution
adb pull / - it copied everything from the phone
Now how can I format the memory?? to delete the files from the phone, I found someone that wants the phone
Click to expand...
Click to collapse
I found this post googling for answers as I'm trying to copy photos off a gs2 that freezes when it boots up. I can boot it into recovery(stock recovery...not rooted everything is bone stock).
I was having the same issue as you and the only thing that works for me is adb pull and the cmd prompt scrolls like its doing something but I have no clue where it pulled the files.
ls with a small L
alex26aly said:
I tried, but I have this problem:
adb shell
~ # cd /mnt/sdcard
cd /mnt/sdcard
/mnt/sdcard # Is
Is
/sbin/sh: Is: not found
/mnt/sdcard #
__________________________________________________
DCIM is here \storage\sdcard0\DCIM
In that folder is now on PC after I used adb pull/ and copied everything from the phone
Sorry, this is the first time I use adb...
Click to expand...
Click to collapse
i know this topic is too much old but for new with this problem , i noticed he wrote "Is" with a big "i"
it should be "ls" with a small "L"
besides i just registrerd to xda , it was a big lost to me i didnt join earlier
Jokesy said:
1. Connect your device to your pc
2. Open command prompt from Adb folder. (hold shift key, then right click on a blank space, select open command window here)
3. #check if your device is connected via adb by typing in the command window: adb devices
4. #copy all the content of your sdcard by typing in the command window:
adb pull /mnt/sdcard \mysdcard
wait for the process to finish
Check you C: drive for a folder named "mysdcard". all the files and folders in your internal storage will be there.
Good luck
Click to expand...
Click to collapse
This works for me : adb pull /sdcard/ mysdcard
euh im a root user and i have delete systems apps on my arnova tablet the rest of apps are settings kingroot and the calculator
i try to install some apps via adb .. fail using apk installer
on now i can not use it please help me i dont know what to do now i cannot use my tablet ....
please help respond me on [email protected] please neeeeed help
Related
WARN: For developer only.
attachment is the EXPANDSD script.
Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.
How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh
Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Hi mate,
Thks for your shares. I have a question. How run init_expandsd.sh?
I tried gscript and init.d, but doesn't seem to be working
woohoo a great dev has come. glad you got here mate! love your work on Desire section.
harrynghiem said:
Hi mate,
Thks for your shares. I have a question. How run init_expandsd.sh?
Click to expand...
Click to collapse
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
dexterdave said:
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
Click to expand...
Click to collapse
Does it work for you?
It's a great idea thanks a lot for your work. I was wondering why ln was not working.
But too bad it does not work for me, i get the following error :
[1] Segmentation fault
Do you have any idea why ?
Thanks again
problems when connecting phone to pc
hi,
tried the "mount --bind" in order to try your script.
works fine. the directory contents is shared between the 2 path's,
but i have a problem when i connect the phone to a pc.
when i try to disconnect, the sdcard and external_sd are not
available anymore until i reboot the phone
note: the commands that i have executed are:
Code:
mkdir /mnt/sdcard/external_sd/foo
echo "test" > /mnt/sdcard/external_sd/foo/test
mkdir /mnt/sdcard/foo
mount --bind /mnt/sdcard/external_sd/foo /mnt/sdcard/foo
Can this script be placed in init.d folder for autorun at boot?
Edit: sorry, already answered above: no, it cannot.
Sent from my GT-P1000 using Tapatalk
Seems abandoned by @ownhere
Sent from my GT-I9100
Idan73 said:
Seems abandoned by @ownhere
Sent from my GT-I9100
Click to expand...
Click to collapse
too bad, it could be very useful..
TheFirstBen said:
It's a great idea thanks a lot for your work. I was wondering why ln was not working.
But too bad it does not work for me, i get the following error :
[1] Segmentation fault
Do you have any idea why ?
Thanks again
Click to expand...
Click to collapse
got the same problem please help
How to use?
ownhere said:
WARN: For developer only.
attachment is the EXPANDSD script.
Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.
How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh
Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Click to expand...
Click to collapse
thanks,
this is genius
I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android
Ridiculously simple and efficient
Did it my own way and it works great
Thanks a lot for this
dawabz94 said:
thanks,
this is genius
I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android
Ridiculously simple and efficient
Did it my own way and it works great
Thanks a lot for this
Click to expand...
Click to collapse
Then why not share with us please !
Let us know how you did
Yes I'd like to know another method also.!
Sent from my GT-I9100 using XDA
Chairmansaab said:
Then why not share with us please !
Let us know how you did
Click to expand...
Click to collapse
Hi,
it's very easy indeed, once you got the point.
I do most of my stuff using an "adb shell" session so I'll post here my steps to get it working.
Also I like simple implementation so my script is the strict minimum needed to mount necessary folders
I assume you have a rooted device with working busybox and a kernel that supports /etc/init.d/
I suggest you do the test on a dummy folder before applying on a real folder.
So start by creating a folder called /sdcard/dummy
Do it the way you want , I do it with an "adb shell" session
Code:
cd /sdcard
mkdir dummy
Then copy some files in it (photos for examples)
Code:
cd /sdcard
cd DCIM
cd Camera
cp `ls -1 |tail -5` /sdcard/dummy
From now on, we consider we want to move transparently /sdcard/dummy to the external SD
1. move the folder to the external sd
CAUTION : I'm running a CM9 rom => my external sd is mounted on /mnt/emmc
Standard samsung sdcard mount is /sdcard/external_sd
The path might be different according to your brand and rom
Moving the folder code
Code:
cd /sdcard
mv dummy /mnt/emmc/
2. Create the mount point in the indernal SD
Code:
cd /sdcard
mkdir dummy
3.a Check the mount is successful by manually doing it
Code:
mount --bind /mnt/emmc/dummy /sdcard/dummy
3.b Check you see exactly the same thing on both folders
Both commands should return exactly the same output
Code:
ls -l /sdcard/dummy
Code:
ls -l /mnt/emmc/dummy
If everything is fine, then you're good to go
4. Automate mount at boot time
Create a script in /etc/init.d to automate the mount at boot time
I personally use "vi" but most people prefer graphical UIs, I can't recommend any here, do it your own way
So basically you would go root,remount /system in read/write mode and create the file
Code:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
vi 90binds
Insert following lines, save and exit
Note that the "sleep 60" is to let the system boot up before mounting partitions (thanks to the initial script shared here)
Code:
#!/system/bin/sh
sleep 60
mount --bind /mnt/emmc/dummy /sdcard/dummy
Change owner and permissions, flush disk cache and remount /system in read only
Code:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
chown root:shell
chmod 6755 90binds
sync
mount -o remount,ro /dev/block/mmcblk0p9 /system
To check, run
Code:
su
cd /etc/init.d
ls -l 90binds
The output should look like this :
Code:
-rwsr-sr-x 1 root shell [I]0 MMM D HH:MM[/I] 90binds
5. Now you can reboot and check - after reboot - that the mount is done
Both commands should return exactly the same output (always ran in an "adb shell" session)
Code:
ls -l /sdcard/dummy
Code:
ls -l /mnt/emmc/dummy
6. Now you're good to move other folders
Basically, you move the folder to external SD
Create the mount point on the internal SD
Append the mount command in the 90binds script
And that's it
Hope this helps
---------- Post added at 11:09 AM ---------- Previous post was at 11:04 AM ----------
benc88 said:
Yes I'd like to know another method also.!
Sent from my GT-I9100 using XDA
Click to expand...
Click to collapse
Just posted
Take time to read and understand the idea
I have an app on my rooted NT called IMAIOS. It's installed already. The thing is, it downloads more information to view the anatomy more in detail, like images of the cranial, chest cavity, etc. Those files that get downloaded, gets saved into my external memory which is only 1gb, so it fills up fast. I have about 10gb free on my nook.
How can I have the app save the data onto the nook instead of the SD card?
Is this an APP issue or an android issue that it can only download into the SD?
Get adb working, backup what is inside your app "IMAIOS" folder in sdcard
$ cd path-to-adb-drivers
$ adb shell
# cd /sdcard
# rm -r IMAIOS
# mkdir /mnt/media/IMAIOS
# rmdir IMAIOS
# ln -s /media/IMAIOS IMAIOS
ctrl+c to exit shell more
$ adb kill-server
$ exit
* Where IMAIOS is the folder that your app created, if it has a different name then just follow the instructions with the correct name.
The aboive should create a symbolic link named IMAIOS to the directory you just created. It's like a shortcut in windows and it should redirect everything to the new location.
Let me know if t works
Edit: Just realized won't work as symlinks can't be done in fat32 partitions . Ill think in something else...
~ Veronica
Hey, can someone tell me how to create a script to run a terminal command. I looked up google but didn't find any good results.
Open a new file, and write:
Code:
#!/system/bin/sh
your_command
another_command
another_one_xD
Save the file with sh extension, and run your script as follows:
Code:
su #optional, if your script needs root access.
sh yourscript.sh
If you get an error, probably need to grant permissions to your script, so:
Code:
chmod +x yourscript.sh
And try again.
Granting su is
$ su
Correct?
And thanks for the reply :]
Sent from my XT862 using Tapatalk 2
Yep
When you set the permissions, you only have to do that once right?
Yes.
I'm trying to build a script to move pics and video from my internal storage to external storage. I have the script made and on my phone but when I run it, I get an error: "failed on /storage/sdcard0/DCIM/Camera/*.jpg" - Cross-device link . Any idea what that means?
mmurphmsu said:
I'm trying to build a script to move pics and video from my internal storage to external storage. I have the script made and on my phone but when I run it, I get an error: "failed on /storage/sdcard0/DCIM/Camera/*.jpg" - Cross-device link . Any idea what that means?
Click to expand...
Click to collapse
Move (mv) only move the directory entry, not the actual data. Because of this, you can not move files from one disk to another (e.g. from internal to sdcard), hence the cross device error. You'll have to copy and then delete the original.
kuisma said:
Move (mv) only move the directory entry, not the actual data. Because of this, you can not move files from one disk to another (e.g. from internal to sdcard), hence the cross device error. You'll have to copy and then delete the original.
Click to expand...
Click to collapse
That seems to have done the trick but I have found another issue. When going into multiple directories (/storage/sdcard0/DCIM/Camera) from the script or even the root directory, I get a No Such file or directory error. But I can CD into that directory and manually cp and rm the files. Any idea why that is happening?
mmurphmsu said:
That seems to have done the trick but I have found another issue. When going into multiple directories (/storage/sdcard0/DCIM/Camera) from the script or even the root directory, I get a No Such file or directory error. But I can CD into that directory and manually cp and rm the files. Any idea why that is happening?
Click to expand...
Click to collapse
You've simply done something wrong. Show us the script.
Here is the script I created:
#!/system/bin/sh
#
#
#
#
#Move Pictures from Internal Storage to External Storage media
cp /storage/sdcard0/DCIM/Camera/IMG* /storage/sdcard1/DCIM/Camera
rm /storage/sdcard0/DCIM/Camera/IMG*
#
#
#
#Move Videos from Internal Storage to External Storage media
cp /storage/sdcard0/DCIM/Camera/VID* /storage/sdcard1/DCIM/Camera
rm /storage/sdcard0/DCIM/Camera/VID*
I put the script in the root directory and run it from there. Its permissions are rwxrwxr
mmurphmsu said:
Here is the script I created:
#!/system/bin/sh
#
#
#
#
#Move Pictures from Internal Storage to External Storage media
cp /storage/sdcard0/DCIM/Camera/IMG* /storage/sdcard1/DCIM/Camera
rm /storage/sdcard0/DCIM/Camera/IMG*
#
#
#
#Move Videos from Internal Storage to External Storage media
cp /storage/sdcard0/DCIM/Camera/VID* /storage/sdcard1/DCIM/Camera
rm /storage/sdcard0/DCIM/Camera/VID*
I put the script in the root directory and run it from there. Its permissions are rwxrwxr
Click to expand...
Click to collapse
Does /storage/sdcard1/DCIM/Camera exists? Try add:
mkdir -p /storage/sdcard1/DCIM/Camera
... to the script before you begin the copy. This will create the destination(s) in case of non-existent.
Also, your cp and rm command will fail with this error if there aren't any files named both IMG* and VID* in the source directory.
kuisma said:
Does /storage/sdcard1/DCIM/Camera exists? Try add:
mkdir -p /storage/sdcard1/DCIM/Camera
... to the script before you begin the copy. This will create the destination(s) in case of non-existent.
Also, your script will fail with this error if there aren't any files named both IMG* and VID* in the source directory.
Click to expand...
Click to collapse
Yes it exists. I can navigate to the directory in Root Explorer. I tried running the script in Root Explorer but it didn't move the two pics i have in the /storage/sdcard0/DCIM/Camera directory to the /storage/sdcard1/DCIM/Camera directory.
mmurphmsu said:
Yes it exists. I can navigate to the directory in Root Explorer. I tried running the script in Root Explorer but it didn't move the two pics i have in the /storage/sdcard0/DCIM/Camera directory to the /storage/sdcard1/DCIM/Camera directory.
Click to expand...
Click to collapse
And you DO have files named IMG* and VID* in your source directory?
kuisma said:
And you DO have files named IMG* and VID* in your source directory?
Click to expand...
Click to collapse
Yes. I took to pictures and then tried running it and it still fails. I wonder if its not working cause I'm on CM10?
mmurphmsu said:
Yes. I took to pictures and then tried running it and it still fails. I wonder if its not working cause I'm on CM10?
Click to expand...
Click to collapse
You realise that even with pictures in the directory, you'll still get this error from the next operations you try executing on the videos? Still, the script should a) still copy the images, and b) not terminate due to this error anyway (i.e. consider it a warning).
But you say the images are not copied. Quite odd, I'd say.
Add a path to the script (export PATH=/system/bin:/system/xbin plus the places you need), add a test "echo Running" to make sure the script actually is launched by Root Explorer. And add +x permissions for all, even "other". You can also add:
echo /storage/sdcard0/DCIM/Camera/IMG*
... before the first copy. This will show you what files matching your expression.
I'll just manually move them. I was just hoping for an easier way until CM10 is enabled to save pictures to the external SD card.
mmurphmsu said:
I'll just manually move them.
Click to expand...
Click to collapse
Take this as an opportunity to learn more about script programming, I'd say.
Experience is what we get when we expected something else.
kuisma said:
Take this as an opportunity to learn more about script programming, I'd say.
Experience is what we get when we expected something else.
Click to expand...
Click to collapse
I do a little in UNIX at work that's why I tried this. I really want to learn how to program for actual Android apps. Just need to find something to help me get started, as I have no clue where to start.
Where save the file ?
Hello
I'm french and don't speak english very well ....
I try to do what is explain in this topic ( for tethering with a Sony Ericsson KYNO V - ics 4.0.4 with root access ....
I don't understand where to save the file with sh extension
What i want to run is : #!/system/bin/sh
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE
My script is :
su root
sh scripttether.sh
Thank you very much for your help
BR
RoberGalarga said:
Open a new file, and write:
Code:
#!/system/bin/sh
your_command
another_command
another_one_xD
Save the file with sh extension, and run your script as follows:
Code:
su #optional, if your script needs root access.
sh yourscript.sh
If you get an error, probably need to grant permissions to your script, so:
Code:
chmod +x yourscript.sh
And try again.
Click to expand...
Click to collapse
Hi guys!
I created this thread mainly because many useful things can be done in Terminal emulator. I will show you some simple commands which are useful.
Very useful if you don't have Root explorer when you need it.
Make sure you take a Nandroid backup before you try out just in case you can restore when you do something wrong!
You can get terminal Emulator from here: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Note: Most commands need root. So type su and press enter and grant superuser permissions to Terminal Emulator!
First type this command before using any of the commands below just in case(needs root)
Code:
su
Some useful commands:
Turning device off (Turns your device off very fast!! ):
Code:
poweroff
Rebooting:
Code:
reboot
Rebooting to Recovery
Code:
reboot recovery
Rebooting to download mode:
Code:
reboot download
Forcing Most Apps to install to SDcard(Root needed with Terminal Emulator, no need root with ADB):
Code:
pm setInstallLocation 2
Alternatively, you can type 0 at the end instead of 2 for Auto location install mode or 1 for Internal memory install mode
To check what the current install location is:
Code:
pm getInstallLocation
Mounting R/W in system(Use with caution)
Code:
mount -o rw,remount -t /system
If above one doesnt work, try this.
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Unmounting R/W in system.
Code:
mount -o ro,remount -t /system
If above code doesn't work, try this
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Moving files from sdcard to system (Use after mounting R/W):
Code:
busybox cp /sdcard/<path> /system/<path>
Example: busybox cp /sdcard/demo/framework-res.apk /system/framework/
Changing file permissions to rw-r--r-- (Use after mounting R/W):
Code:
chmod 644 <path>
Example 1: chmod 644 /system/app/mms.apk
Example 2: chmod 644 /system/app/*.apk (This command changes the file permission of all apps in the folder to rw-r--r--)
Changing the current directory:
Code:
cd <path>
Example: cd /sdcard
Listing all the files and folders under the current directory:
Code:
ls
If you want to view all the files and folders in your sdcard, type:
cd /sdcard
ls
Making a new folder:
Code:
mkdir <path>
Example: mkdir /sdcard/newfolder
Removing files (For System files, Use after mounting R/W)
Code:
rm <path>
Example: rm /system/app/demoapp.apk
Removing Folders:
Code:
rmdir <path>
Get info of your build.prop values
Code:
getprop
That's all for now. I will add a few more later!
If you have any more new commands or if I have given an improper command, feel free to post it in the thread
Thanks for reading.
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
UserU said:
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
Click to expand...
Click to collapse
I don't understand your question...
Anyways...Thanks for reminding me of that command!
system.img said:
I don't understand your question...
Anyways...Thanks for reminding me of that command!
Click to expand...
Click to collapse
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
u0 [email protected]:/ $ pm set-install-location 2
Killed
137|u0 [email protected]:/ $
Click to expand...
Click to collapse
UserU said:
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
Click to expand...
Click to collapse
I never got that problem on adb.
Let me see....
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
panpjp said:
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
Click to expand...
Click to collapse
Isnt it /system?
ok...will add to op.
Thanks.
system.img said:
Isnt it /system?
ok...will add to op.
Thanks.
Click to expand...
Click to collapse
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
panpjp said:
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
Click to expand...
Click to collapse
Ok....
system.img said:
I never got that problem on adb.
Let me see....
Click to expand...
Click to collapse
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
UserU said:
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
Click to expand...
Click to collapse
I got it.
It needs root.
So type
su
pm set-install-location 2
Then you are done!
wow thanks !!
Bassesh said:
wow thanks !!
Click to expand...
Click to collapse
Welcome!
Useful
A question: once i tried to type
bootanimation
Click to expand...
Click to collapse
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Toni5830 said:
Useful
A question: once i tried to type
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Click to expand...
Click to collapse
That is the use of the bootanimation command. You can stop it either by pulling battery or closing terminal emulator!
But what I did to stop it was to rotate my phone to landscape and somehow close terminal emulator.
But in ADB it is easier to stop using exit command.
how to get info about /system memory and /data memory ?
rajxelton said:
how to get info about /system memory and /data memory ?
Click to expand...
Click to collapse
What info do you exactly want? Free Space, Partition Size or Used space?
system.img said:
What info do you exactly want? Free Space, Partition Size or Used space?
Click to expand...
Click to collapse
partition size. well can you tell me for all.
Anyone know a command to trigger media scanner?
Thanks for the commands. Quite new to all of this and these will help me understand things a little better
Hello there. I have a MyPhone A888 (4.0.4) and I was planning to wipe the Internal SD Card. How exactly do I do this? I have not rooted my phone yet also so if anyone can provide a link or tutorial as to how to root this phone, then that would be great. But really, my main question is as to how to format the internal sd card. I am not very sure yet if TWRP or CWM supports my phone since I haven't used them yet. Thanks!
Likach said:
Hello there. I have a MyPhone A888 (4.0.4) and I was planning to wipe the Internal SD Card. How exactly do I do this? I have not rooted my phone yet also so if anyone can provide a link or tutorial as to how to root this phone, then that would be great. But really, my main question is as to how to format the internal sd card. I am not very sure yet if TWRP or CWM supports my phone since I haven't used them yet. Thanks!
Click to expand...
Click to collapse
To wipe all your internal sdcard using adb (see attachment for adb folder), toggle usb debugging mode in your device then connect device to pc by usb cable and go to adb folder and open linux terminal or windows command prompt there (by right-click on any empty space while holding shift button) and enter these commands:
Code:
adb shell
rm -f /mnt/sdcard/*.*
adb kill-server
Make sure to remove your external sd card first, since in android 4.0.4 the external sd card is a part of internal sdcard
majdinj said:
To wipe all your internal sdcard using adb (see attachment for adb folder), toggle usb debugging mode in your device then connect device to pc by usb cable and go to adb folder and open linux terminal or windows command prompt there (by right-click on any empty space while holding shift button) and enter these commands:
Code:
adb shell
rm -f /mnt/sdcard/*.*
adb kill-server
Make sure to remove your external sd card first, since in android 4.0.4 the external sd card is a part of internal sdcard
Click to expand...
Click to collapse
I don't need to be rooted for this right? And I open the adb folder right then open command prompt?
Likach said:
I don't need to be rooted for this right? And I open the adb folder right then open command prompt?
Click to expand...
Click to collapse
Technically no root needed since it is not system partition that you are going to manipulate.
Open adb folder, put mouse cursor on any empty space, hold shift key, and press mouse right-click, choose open command window here and then enter the commands mentioned.
majdinj said:
Technically no root needed since it is not system partition that you are going to manipulate.
Open adb folder, put mouse cursor on any empty space, hold shift key, and press mouse right-click, choose open command window here and then enter the commands mentioned.
Click to expand...
Click to collapse
This is what appears when I do it. Is this what is supposed to show up?
C:\Users\Pabben\Desktop\Stuffs\Chrome Downloads\adb>adb shell
rm -f /mnt/sdcard/*.*
adb [email protected]:/ $ rm -f /mnt/sdcard/*.*
rm failed for -f, No such file or directory
255|[email protected]:/ $
Likach said:
This is what appears when I do it. Is this what is supposed to show up?
C:\Users\Pabben\Desktop\Stuffs\Chrome Downloads\adb>adb shell
rm -f /mnt/sdcard/*.*
adb [email protected]:/ $ rm -f /mnt/sdcard/*.*
rm failed for -f, No such file or directory
255|[email protected]:/ $
Click to expand...
Click to collapse
This message means wrong directory or verbose action.
Try to type this one:
Code:
adb shell "rm -r /mnt/sdcard/*"
If still, then can you check your device in which directory the internal sdcard is on?
majdinj said:
This message means wrong directory or verbose action.
Try to type this one:
Code:
adb shell "rm -r /mnt/sdcard/*"
If still, then can you check your device in which directory the internal sdcard is on?
Click to expand...
Click to collapse
This is what I got:
C:\Users\Pabben\Desktop\Stuffs\Chrome Downloads\adb>adb shell "rm -r /mnt/sdcard
/*"
adb server is out of date. killing...
* daemon started successfully *
rm failed for /mnt/sdcard/*, Permission denied
C:\Users\Pabben\Desktop\Stuffs\Chrome Downloads\adb>
What is the name of the folder of the Internal SD card? There is a folder here called App2SD. Is that it?
Likach said:
This is what I got:
C:\Users\Pabben\Desktop\Stuffs\Chrome Downloads\adb>adb shell "rm -r /mnt/sdcard
/*"
adb server is out of date. killing...
* daemon started successfully *
rm failed for /mnt/sdcard/*, Permission denied
C:\Users\Pabben\Desktop\Stuffs\Chrome Downloads\adb>
What is the name of the folder of the Internal SD card? There is a folder here called App2SD. Is that it?
Click to expand...
Click to collapse
Yes, the command now is correct, but you had been welcomed by "Permission denied" message. and since you are not rooted, nor cwm recovery installed (with emmc format function), so you will not be able to do it through these commands, because we will need to have mounting command to overcome the "Permission denied" message.
So what is left to do, is to do it manually (manual deleting by going to sdcard folder and delete what you can delete after showing all hidden folders)
wow this is an old thread hahah thanks for the help from July 2020