i need to format and reinstall my macbook air.
my android keystore is located on my hardrive.
what is the best way to preserve it?
last time i tried putting it on a portable hard drive made it corrupted.
is it even possible?
You can store the *.keystore file wherever you want. I have both stored this in dropbox, and also mailed the file to myself (using GMail). There is nothing OS specific about this file, and it can be saved anywhere without issue.
To be clear, you can store it on a portable hard-drive, so something else must have caused your previous issue.
Mine has been on my Dropbox for years, and never had any issues. I switch between Mac OS X and Windows all the time.
Related
I am writing a little python textbased game on my android phone with qpython3.
Now I want to store the highscores in a txt file but I can't find out how I can realize this. I know how I can do it on windows but it doesn't work on android.
Hope anyone has an idea.
Krowit
After testing on my device, it appears that QPython has blocked write permissions from the application. Here's a way of getting a version which allows for it*:
Download SL4A, and install it. This is what launches the Python script.
Download PY4A, this is the Android version of Python. You can download both 2.x and 3.x from here.
You'll need a text editor now. DroidEdit is my personal favourite, and you can launch a script straight from the app.
Then you can write in your code, save it, and run it!
Of course, there's no real substitute for a real desktop, at least in my opinion, but this is (again, in my opinion) the best setup I've found so far.
*I don't know where the files are saved, but you can read and write from them, wherever the saved file's directory may be.
My app is setup to allow backups to be saved to a Google Drive appdata folder. It all works perfectly well on the same device. When I make a backup, delete the app's data, then restore it all works.
However, when I try to backup on one device, then install on another and attempt to restore there are no files found. Same goes for when I uninstall the app on the original device, reinstall it on the same device and attempt to restore. Both cases result in no files being found despite the fact that I see there are files in the appdata folder when I log into Google Drive.
I read somewhere that you must use the RESOURCE_ID instead of the DRIVE_ID of a file for it to work between devices since a DRIVE_ID will be different from device to device. However the only way I've seen how to get the RESOURCE_ID is by using the driveId.getResourceId(), and I can't get the proper DRIVE_ID from another device.
tl;dr: how should I go about retrieving the proper file from the appdata folder that was created by another device/installation?
I have a database backup option in my app as well. I implemented it using the new Google Drive Android Api and what's more important, it works perfectly fine from one device to another.
Here's how I did it and what I recommend:
Before reading or writing anything to Google Drive, call requestSync to make sure everything is synchronized and up to date (see how to use it here).
Retrieve your files by name using a query instead of identifiers. As Google Drive allows multiple files with the same name, order your query by date and use the newest one.
To avoid creating multiple backup files with the same name, use a query to find if the backup file already exists on Google Drive and if it does, open it and overwrite it.
This is the point I guess you won't like: I recommend not using the Appfolder... for the moment. Google has acknowleged there might be some synchronization issues with it when uninstalling and reinstalling the app. I tried to use the Appfolder as well in my app without success and I finally ended up creating an ordinary folder in Google Drive. With that said, you can try the first three recommendations before adopting this one.
I hope these points can help with your implementation. If you need anything else, just tell.
I want to protect my application from being copied by users from device to another device. I know that wont be possible because once the apk is installed any third party application may be able to copy or extract the apk. I mostly care about the private data of the application rather than the apk itself. So, my questions are :
1- Can I protect the apk from being copied to another device by the user ?
2- If user copied an application from device to another (e.g. via third party app or by bluetooth) will he/she be able to copy the private data as well ? If yes, can I protect that ?
Thanks in advance.
To answer briefly, AFAIK, No.
Regarding the single questions:
if device is rooted it's really easy to access the /data/app/ dir and copy your apk, even on the device itself.
For un-rooted devices you need to issue some adb commands. For reference, look here:
https://stackoverflow.com/a/11013175/1865860
https://stackoverflow.com/a/17135554/1865860
How to get a list of installed android applications and pick one to run
the same applies to /data/data/com.example.app/ for the private app's data. Just different folder and possibly many files to copy.
Basically the difference it's not in having root or not, but in the ease of realization.
you can use google licence in your app even if its copied from rooted device it wont work until its downloaded from playstore
second /data/data/<packagename>/ can be copied from rooted device
I am facing this problem so many times,
I used to send the apk files through mail to my clients for reviewing.
Sometimes , they are telling that the new attached one has not get any updates , it remains same.
Even i did updates in that and, i have chacked it by uninstalling the older application and downloaded the attachment , So it was working fine with updates in myside.
I asked them to do same. But for them it wasn't.
So please give some idea,
Is there any better way to share the apk files?
Are they need to clean some other folders in their mobile, like "temp and cache" in PC?.
Or I missed somewhere in the Updated builds?
Please it is very difficult one for me to face always.
Thanks in advance.
hmm.. instead of sending the .apk file to them through email, why not upload your .apk file to a server or website folder and let them install from there using their phone / device.
in android, you can install apk files from the internet right :)
that way, you can just send them the link of the updated version of your app.
Maybe the problem there is your apk sent to their computers, is either not really saved / not overwritten. in case the .apk file has same filename.
you can try to change file name also
:)
i'm writing an application that needs to store some data,and picture. For example place's information. this information don't need to change very often. and
I have seen that databases are
stored under /data/data/package_name/databases
I decided to store my data under /data/data/package_name/files.
With the emulator i can see all these files (databases)
under the proposed directories but moving the application on a real
device and installing a file system browser i cannot see any file
under /data. i know that there are some security constrain in (not-rooted) device. However, are there any suggestion about the solution.. where can i store these data and how? because i'm quite new to android. Thanks so much for your help.
The reason you can't see it on the device is basically just as you said; the device isn't rooted, so other apps don't have access to the /data folder.
This is okay though, because you can still store your files there. Your app has access to anything under /data/data/package_name/, you just won't be able to see it in a file browser unless you root. This is normally a good thing, to keep average users from mucking around with your databases/files.
Read up more on storage methods here.