Simple folder copy script - Android Q&A, Help & Troubleshooting

I'm looking for a script that I can lauch from my media box to copy a folder from a and paste it to b. Is there anything like that about?

Related

[Q] Way to list apks in a folder

I know there has to be a way, I just can not find it.
What I want to do is with the terminal find a way to create a list of only the .apk files in a folder, would also be nice to know how to list other different file extensions.
My goal is to create a text file with a list of all the apks in my /system/app folder, and other folders as needed.
Thanks
Don't know if this works on Android, but in a standard Linux shell you can cd to the directory (which would be /system/app in your case) and then type ls > file.txt (file can be named anything).

[How To] How To Install a Boot Animation (Rooted AND Non-Rooted)

This is mainly for the users of my animations who were asking! - Have fun guys!
If you are rooted:
1. Download a root explorer app (ES File Explorer is suggested and free)
2. Enable root directory (in ES File Explorer hit menu, go to settings, and check "Up to Root", then go farther down and check "Root Explorer". Accept any Superuser requests.
3. Go back to your explorer and navigate to where you downloaded the "bootanimation.zip" file. Copy (or cut) it.
4. Navigate as far up as you can into your root directory, and then to /data/local/
5. Paste your "bootanimation.zip" file into /data/local/ (it MUST be named bootanimation.zip)
6. Reboot and enjoy!
Alternatively, you can put it in /system/media, HOWEVER, make sure you back up your stock bootanimation.zip (rename it to bootanimation.zip.bak or move it to your sdcard somewhere) in case something goes wrong.
If you are not rooted (or rooted, this method works with both)
**PC only! I'm not sure how to set the Max OSX terminal to accept "adb" commands by default!**
Setup:
1. Download the newest Android SDK
2. Click the start menu, right click "Computer", and click "Properties"
3. Click "Advanced System Settings" on the left (On Win7)
4. In the advanced tab, click "Environment Variables"
5. In the system variables window, find "Path", select it and click "edit"
6. At the end of the bottom line, paste:
For 64-bit users:
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
For 32-bit users:
Code:
;C:\Program Files\Android\android-sdk\platform-tools
7. Click OK.
Process:
1. Plug in your device using a USB cable and enable USB Debugging (in the settings menu under development on your device)
2. Click the start menu, and either search for "cmd" or click run, and type "cmd.exe"
3. Navigate to the folder that you downloaded the bootanimation.zip file to using the following commands:
Code:
dir - lists all files in the directory stated
cd - changes directory to the given path. If "cd ..", it will navigate one folder backwards.
4. Use the following commands (your file must be named bootanimation.zip)
Code:
adb pull /data/local/bootanimation.zip C:\
adb push bootanimation.zip /data/local
NOTE: Alternatively for part 2 you can type "adb push ", open windows explorer, and drag the file infront of the command which will give you the path without having to type it in or navigate to it.
5. Be patient, when it is done it will say something like "X kb/s (X bytes) in X seconds"
6. You can test to see if you did it correctly by rebooting manually or entering
Code:
adb reboot
7. If you no longer want a custom bootanimation, just enter
Code:
adb pull /data/local/bootanimation.zip C:\
Remember to look in your main HDD directory and delete the bootanimation.zip file if it in fact did show up there for some reason.
Note: if it STILL does not revert to the stock boot animation after doing this step, type
Code:
adb shell
cd /data/local
rm bootanimation.zip
**If you have adb problems or questions, I'm not the one to ask, Google is
Thank you for thanking me!
I was completely unaware you could change your boot animation unrooted, thanks
Sent from my Transformer Prime TF201 using Tapatalk 2 Beta-5
Thanks for this.
I thought it could not be done without a un-rooted Prime.
Thanks for this! Wasn't planning on rooting my Prime just yet and it's great that I can change the boot animation!
If you do copy a bootanimation.zip to the data/local directory do you have to do anything to the Original bootanimation.zip in the system/media Directory?
Sent from my Transformer Prime TF201 using Tapatalk
RonH54 said:
If you do copy a bootanimation.zip to the data/local directory do you have to do anything to the Original bootanimation.zip in the system/media Directory?
Sent from my Transformer Prime TF201 using Tapatalk
Click to expand...
Click to collapse
Nope! It stays there safe and sound and will start playing again as soon as you remove the one from /data/local!
Nolam20 said:
Nope! It stays there safe and sound and will start playing again as soon as you remove the one from /data/local!
Click to expand...
Click to collapse
Thanks. I had always just renamed my bootanimation.zip file and copied new one to the system/media directory but with these Bigger File size bootanimation.zip I was getting error that there not enough room to copy some of these bootanimation.zip files to the system/media directory.
Thanks
lovit
Awesome Workaround, but I have a little problem
I'm trying to get this working, but when I type in the commands in cmd, it says the adb is not recognized as a command. Help?
theManchur said:
I'm trying to get this working, but when I type in the commands in cmd, it says the adb is not recognized as a command. Help?
Click to expand...
Click to collapse
Make sure you've correctly done steps 3-7 of setup, otherwise cmd.exe will not know what to do with adb commands.
i always put my bootanimations in system/media and make sure your permissions are set like this
Uploaded with ImageShack.us
blaxican25 said:
i always put my bootanimations in system/media and make sure your permissions are set like this
Uploaded with ImageShack.us
Click to expand...
Click to collapse
His problem appears to be something different.
Can't get past the CMD command section. more detail help for us no bodies
Nolam20 said:
This is mainly for the users of my animations who were asking! - Have fun guys!
If you are rooted:
1. Download a root explorer app (ES File Explorer is suggested and free)
2. Enable root directory (in ES File Explorer hit menu, go to settings, and check "Up to Root", then go farther down and check "Root Explorer". Accept any Superuser requests.
3. Go back to your explorer and navigate to where you downloaded the "bootanimation.zip" file. Copy (or cut) it.
4. Navigate as far up as you can into your root directory, and then to /data/local/
5. Paste your "bootanimation.zip" file into /data/local/ (it MUST be named bootanimation.zip)
6. Reboot and enjoy!
Alternatively, you can put it in /system/media, HOWEVER, make sure you back up your stock bootanimation.zip (rename it to bootanimation.zip.bak or move it to your sdcard somewhere) in case something goes wrong.
If you are not rooted (or rooted, this method works with both)
**PC only! I'm not sure how to set the Max OSX terminal to accept "adb" commands by default!**
Setup:
1. Download the newest Android SDK
2. Click the start menu, right click "Computer", and click "Properties"
3. Click "Advanced System Settings" on the left (On Win7)
4. In the advanced tab, click "Environment Variables"
5. In the system variables window, find "Path", select it and click "edit"
6. At the end of the bottom line, paste:
For 64-bit users:
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
For 32-bit users:
Code:
;C:\Program Files\Android\android-sdk\platform-tools
7. Click OK.
Process:
1. Plug in your device using a USB cable and enable USB Debugging (in the settings menu under development on your device)
2. Click the start menu, and either search for "cmd" or click run, and type "cmd.exe"
3. Navigate to the folder that you downloaded the bootanimation.zip file to using the following commands:
Code:
dir - lists all files in the directory stated
cd - changes directory to the given path. If "cd ..", it will navigate one folder backwards.
4. Use the following commands (your file must be named bootanimation.zip)
Code:
adb pull /data/local/bootanimation.zip C:\
adb push bootanimation.zip /data/local
NOTE: Alternatively for part 2 you can type "adb push ", open windows explorer, and drag the file infront of the command which will give you the path without having to type it in or navigate to it.
5. Be patient, when it is done it will say something like "X kb/s (X bytes) in X seconds"
6. You can test to see if you did it correctly by rebooting manually or entering
Code:
adb reboot
7. If you no longer want a custom bootanimation, just enter
Code:
adb pull /data/local/bootanimation.zip C:\
Remember to look in your main HDD directory and delete the bootanimation.zip file if it in fact did show up there for some reason.
Note: if it STILL does not revert to the stock boot animation after doing this step, type
Code:
adb shell
cd /data/local
rm bootanimation.zip
**If you have adb problems or questions, I'm not the one to ask, Google is
Thank you for thanking me!
Click to expand...
Click to collapse
riorancho said:
Can't get past the CMD command section. more detail help for us no bodies
Click to expand...
Click to collapse
What specifically are you having trouble with?
Section 7 and down. I am not that dos smart to understand what you substitute in the cmd screen and I don't even know if my zip file is correct. I had it on my desktop then in c: adk\tool folder but I can't get any further than completing line 6 set up. Compressed with no compression using winzip.
And I really don't know if my txt file is correct?? My image size is 960 x 540
Using a Razr Maxx. site won't let me download the win zip file
Nolam20 said:
What specifically are you having trouble with?
Click to expand...
Click to collapse
riorancho said:
Section 7 and down. I am not that dos smart to understand what you substitute in the cmd screen and I don't even know if my zip file is correct. I had it on my desktop then in c: adk\tool folder but I can't get any further than completing line 6 set up. Compressed with no compression using winzip.
And I really don't know if my txt file is correct?? My image size is 960 x 540
Using a Razr Maxx. site won't let me download the win zip file
Click to expand...
Click to collapse
I'm not really sure how exactly I can help you, I'd go over the guide a few more times and google your problem.
I need specific problems like errors or what you don't understand.
Also, I don't know the size for a Droid Razr, but you can probably find it via a quick search.
I get lost here
Process:
1. Plug in your device using a USB cable and enable USB Debugging (in the settings menu under development on your device) OK
2. Click the start menu, and either search for "cmd" or click run, and type "cmd.exe" OK
3. Navigate to the folder that you downloaded the bootanimation.zip file to using the following commands:
Code: LOST RIGHT HERE WITH THE PROPER COMMAND
dir - lists all files in the directory stated
cd - changes directory to the given path. If "cd ..", it will navigate one folder backwards.
what command do I put in in cmd at this point?
dir - lists all files in the directory stated
cd - changes directory to the given path. If "cd ..", it will navigate one folder backwards.
and then:
Use the following commands (your file must be named bootanimation.zip)
Code:
adb pull /data/local/bootanimation.zip C:\
adb push bootanimation.zip /data/local
what is this command above??
Where do I save my boot zip file to??
Nolam20 said:
I'm not really sure how exactly I can help you, I'd go over the guide a few more times and google your problem.
I need specific problems like errors or what you don't understand.
Also, I don't know the size for a Droid Razr, but you can probably find it via a quick search.
Click to expand...
Click to collapse
riorancho said:
I get lost here
Process:
1. Plug in your device using a USB cable and enable USB Debugging (in the settings menu under development on your device) OK
2. Click the start menu, and either search for "cmd" or click run, and type "cmd.exe" OK
3. Navigate to the folder that you downloaded the bootanimation.zip file to using the following commands:
Code: LOST RIGHT HERE WITH THE PROPER COMMAND
dir - lists all files in the directory stated
cd - changes directory to the given path. If "cd ..", it will navigate one folder backwards.
what command do I put in in cmd at this point?
dir - lists all files in the directory stated
cd - changes directory to the given path. If "cd ..", it will navigate one folder backwards.
and then:
Use the following commands (your file must be named bootanimation.zip)
Code:
adb pull /data/local/bootanimation.zip C:\
adb push bootanimation.zip /data/local
what is this command above??
Where do I save my boot zip file to??
Click to expand...
Click to collapse
Ok, so, for example, if your file is in user/Fred/Documents and named bootanimation.zip, then you need to type:
Code:
cd users
then
Code:
cd Fred
then
Code:
documents
then type
Code:
adb pull /data/local/bootanimation.zip
Then
Code:
adb push bootanimation.zip /data/local
part of the problem may be that I have a mac and use windows under parellas so the files are not the same
in c: Users\DT\Documents DOCUMENTS IS WHERE ZIP FILE IS LOCATED
get error message: "adb" is not reconized as an internal or external command operabtle program or batch file
Nolam20 said:
Ok, so, for example, if your file is in user/Fred/Documents and named bootanimation.zip, then you need to type:
Code:
cd users
then
Code:
cd Fred
then
Code:
documents
then type
Code:
adb pull /data/local/bootanimation.zip
Then
Code:
adb push bootanimation.zip /data/local
Click to expand...
Click to collapse
riorancho said:
part of the problem may be that I have a mac and use windows under parellas so the files are not the same
in c: Users\DT\Documents DOCUMENTS IS WHERE ZIP FILE IS LOCATED
get error message: "adb" is not reconized as an internal or external command operabtle program or batch file
Click to expand...
Click to collapse
Then you didn't follow steps 2-7 correctly.
2. Click the start menu, right click "Computer", and click "Properties"
3. Click "Advanced System Settings" on the left (On Win7)
4. In the advanced tab, click "Environment Variables"
5. In the system variables window, find "Path", select it and click "edit"
6. At the end of the bottom line, paste:
For 64-bit users:
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
For 32-bit users:
Code:
;C:\Program Files\Android\android-sdk\platform-tools
7. Click OK.
This guide is for windows, if you're having problems getting it to work on Mac or a virtual Windows machine, I'm sorry but I can't help you.

New Custom BootSound and Instructions

Credit's go to Eollie and ricspeed From AndroidCentral where I found the information below
The oroginal post can be seen here
http://forums.androidcentral.com/optimus-v-rooting-roms-hacks/114730-how-boot-sound.html
The bootanimation is the stock animation for the XT912
I have a XT910 so I put it in the folder for other XT910 users
I did a bit of chopping and splicing for this bootsound, hope you enjoy it
If you're like me and had no audio on boot here's the steps made noob proof from the post above
Make sure you're rooted
extract folder and place files on either internal or external sdcard, just make sure it's in the root folder (not within any folders)
Install RootBrowser
Grant SuperUser Permissions
go to location of files (sdcard or sdcard-ext)
menu > Multi-select
select bootanimation.zip and RazR-CusT-BooT.ogg
Copy
go to /system/media/
long press bootanimation.zip and select rename
rename it to bootanimation.zip.bak
paste
log press RazR-CusT-BooT.ogg and select copy
go to /system/media/audio/notifications/
paste (I also had a notifications2 folder, I pasted it there as well)
Go back to sdcard or sdcard-ext (wherever you saved the files)
long press init.local.rc
go to /system/etc/
rename init.local.rc to init.local.rc.bak
paste
make sure permissions are set to rw-rw-rw
(if not long press and edit permissions)
Go to /system/ and open build.prop
open with text editor
look for ro.config.play.bootsound=1
delete entire string
menu "save and exit"
reboot
There still shouldn't be any bootsound
Install Android Terminal Emulator
Grant Superuser permission
open android terminal emulator
type the following
su (enter)
cd /sdcard (if placed on internal sdcard) (enter)
cd /sdcard-ext (if placed on external sdcard) (enter)
sh bootsnd.sh (enter)
(ignore any errors)
reboot - you have sound now
Optional - I also included a ringtone that I made that I personally like
you can place it in /system/media/audio/ringtones/ to be able to select it natively
Download Link - http://bit.ly/XmIRzv
Just Audio
If anyone wants just the audio without all the other stuff here you go
Like I said, the boot audio timing is made to work with the stock XT912 bootanimation
RazR-CusT-BooT : http://bit.ly/Wc1DbK
Niggas In Paris Ringtone - http://bit.ly/U3lwmN

[HELP] Create .sh to delete select folders.

As the title says, I need a terminal emulator script to quickly delete some folders from the data/data/*appname* partition.
All these folders are named "temp" but they are all subfolders of subfolders of subfolders.
Is there a terminal emulator command to identify all the "temp" subfolders (or subsubsubfolders) in a directory and delete them or do I have to type the location of every single one of them (like -rm data/data/app/sub/sub/temp ?)
Thanks in advance for your help.

[SOLVED]How to share files between Kali Nethunter and Android?

I want to share some files between Android and Kali Nethunter. Please tell me how to do it.
Well, I finally found a way to do it. I had overlooked that I can do it using any Root Explorer app.
The kali chroot is installed in the following directory on your device:
Code:
/data/local/nhsystem/kali-armhf
In the above directory, you will find the whole chroot filesystem.
If you want to place a file in any folder, you just have to navigate to the directory stated above and paste or, copy the file or folder and move it to the destination you want.
HIT THANKS IF FOUND USEFUL

Categories

Resources