Copy Files Using Android Studio - Android Q&A, Help & Troubleshooting

Is it possible to make an app that when you tap the button on the screen it copy's "/sdcard/pic1.png" to "/sdcard/pictures/pic1.png (That is an example, not sure if that's the right directory format). I want to copy "fileA.txt" to "/text/fileA.txt" but I can not find out how. I have tried many ways. I believe I have all the permissions added. I'm just don't know how to copy the file.

Related

How do I get to build.prop file?

I am new to android but I was to fix PPP problems. I read how you can make changes in the build.prop file to fix it.
How exactly do I get to it? I tried searching my SD card for that file and couldnt find it. If someone could explain to me where it is located and how to get to it and how to make changes in the file, do let me know thanks.!!
it's in /system
do I have to plug it in the computer to see the system folder? I dont see the folder anywhere....
prbly long winded, but simple method - install ASTRO file manager, browse to /system, long press on build.prop - Edit - Copy. Press on the home icon then Edit icon - Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Either make a directory like this:
e.g. E:/Android/root/system
and paste the modified build.prop in there.
Thank you I got it working.
Sent from my HTC HD2 using XDA App
How can i edit it? I'm using android commander, copied to my PC but then i can't edit it due to the .prop extention? Do i need to rename it?

[Q] Editing an APK, any APK.

EDIT: Figured it out.
Care to share?
Yeah, will be nice if you could share this information with others
aitorTheRed said:
Yeah, will be nice if you could share this information with others
Click to expand...
Click to collapse
Man, I hate it when people do that...
1. Search for APK Manager in XDA and install it on your PC
2. Download and Install the Android SDK kit on your PC
3. Follow the instructions for APK Manager and place the APK file in the modding folder
4. Open APK Manager and select Decompile APK (Your APK file will be placed in a separate folder for you to work on)
5. Change what you want to change in the APK
6. Recompile the APK and sign it (unless it's a system file like framework, those are not signed)
A lot more is involved in modding an APK file and you really should know something about how the files inside the APK work before you go changing things, but in a nutshell, that's the basics.
Hope that helps!
What I have learned.
I had a specific question, but here is what I can tell you.
1. Setup APK Manager, it saves a lot of command line typing.
2. Pretty much always use option 9 and 11, never 1 or 3.
3. If you are simply changing graphics and not smali or XML files, don't use this, open it in 7zip and drag the files. Decompiling changes the image darkness sometimes.
4. Unless you are working on your own apk file, always say yes to 'is it a system apk', when it asks you to keep existing files, say yes. Delete from the 'keep' folder what you edited.
5. If you edit XLM files, delete resources.arsc from the file, this is where they all get compiled to.
6. You can use this for jar files, just rename to apk then back to jar when finished.
7. If you get an error try using option 20 to increase the memory to 1024.
8. If you edit jar files, delete classes.dex in the 'keep' folder when compiling.
9. Treat all files as signed system files (as noted above) and you will be much safer. If the file has a signature on it, this will save it.
Thanks for the info
Is there anything that can install system files. They won't install with ap manager so does it have to be pushed?
Sent from my Desire HD using XDA Premium App

(Tool) Compare files.

First off I have nothing to do with the creation of this tool I'm merely sharing what I've found.
Anyone who has dug into smali files knows that they can be somewhat overwhelming and trying to track down a problem can be a time consuming nightmare. One thing I do to hunt down a problem is compare what I know to be working against what is broken so I was sitting here today thinking that I would write a script or create a tool to batch compare files then I said to myself "EB, you're not the first one that's wanted to do this so there must already be something." I fired up Google and sure enough there are a few. The one that I found that is free and handled my task can be found here http://www.grigsoft.com/download-windiff.htm
Quick tutorial;
1. Download the file.
2. Create a new folder (anywhere you want)
3. Extract the contents to your new folder
4. Place the items you want to compare in that folder (they can be anywhere really but it's simpler to have them in the same directory.)(For my purposes I de-compiled the classes.dex of two framework.jar files and moved the entire output files to this directory in two separate folders.)
5. Run the program
6. Select File
7. Select either Compare Directory (what I did for my purpose) or Compare files. A dialogue box will pop up where you select the 2 sources that you want to compare.
Now this tool will only output what files are changed. There are other tools out there that can do more but I like the ones that are free. At least with this I can scan hundreds of files at once and see where I need to begin
if you want to search for code in multiple files and what not else,
http://notepad-plus-plus.org/
has a great program for that
You can search inside the files of a whole folder if you want to....pretty cool

[Q] Data Folders on Home Screen

Is there an app or widget that will show me what files are located in a folder? For example I have a folder called DOCUMENTS. I want a widget that will allow me to scroll through the files in the folder, pick a file and open it in one of the Office apps. I know I can go to a File Manager app and hit a few directories and get it that way I am but just looking for a short cut to a specific folder.
I am ONLY looking for a single folder that I have my project files in for work.
Here is an app that kind of does what I am looking for (searches the SDCARD for predefined files) but doesn't work on ICS as I tried it.
Data Folder
https://market.android.com/details?...EsImNvbS50YWthaGFyYWJvb2tzLmRhdGFfZm9sZGVyIl0.
I solved my problem of putting a shortcut for a folder or file on the home screen.
The answer is here:
Shortcut for Folders-Files on Home Screen
http://forum.xda-developers.com/showthread.php?t=1463707
I am a little surprised this functionality isn't built into Android already for shortcuts or in the more "popular" file explorer apps.

[Q] How to Hide Folder Or Files in Android Without any Software Or App

In this thread you will read about simple and easiest way using which you can hide any folder or file in Android phone without using any software or app. So why don’t you check the steps below:
Guide to Hide Folder/Files in Android Without Software
1. First of all Open file manager of your device. I’m using Samsung Galaxy Note 3 for this tutorial. (but procedure is same in all the device)
2. In File Manager, Tap on Device Storage or SD Memory Card to head over to the next step.
3. Now in My Files you need to Create New Folder with any name. But make sure to add . before the name of the folder. For Example, If you name the folder “lavish” add . and it will look like “.lavish”
4. Once folder is created you need to copy and paste all the private content in this folder an check your gallery whether its showing your photos/videos or not. Once you confirm it to be visible follow the next step
5. In option you will see Setting option, just tap on it.
6. When you click on Settings, another window will open. In this window you will notice two option Show Hidden Files and Show Hidden Extension. You need to uncheck show hidden files option which is checked by default.
Note: If you want to hide file uncheck show hidden files, and if you want to hide particular extension uncheck show hidden extension
7. Now after doing above step you will notice that the folder you created is not visible in the Windows. Now this means you have successfully hidden your private content. To confirm this, again head over to gallery and I’m sure that you will notice all the photos and videos which was visible to till 3 steps are not visible any more.
8. Whenever you want to access these files. You just need to check Show Hidden Files or Show Hidden Extension and all Folders and File become visible to you.
Note: In case, if you’re seeing the hidden files in gallery after following the above method. You just need to move the folder to another location and move it back to same location.
Check all the image and tutorial at Imgur using this link: http://imgur.com/a/D9R3A
Credit to this guide: http://goo.gl/xD3mrH
So this is how you can hide folder of files in Android phone without using any software of application. Try this trick and let me know whether this was helpful or not. You can also share what other method you’re using to hide your folders and files.
Good idea.trying now.
Why do all that. Just stick a empty file with the . nomedia file extention in what ever folder you don't want picked up in gallery or other folders.

Categories

Resources