Shoud I Root My Android Phone to Write/Read From SD Card? - java

Yesterday, I tried to make some simple apps which can download xml files from website, and put them on /mnt/sdcard/ . And fortunately, I succeeded in doing it. However, just a moment ago, I wondered if it works just because my phone is rooted. So I wonder if it works on un-rooted android phones?
And thank you, I found the answer :
It will work both rooted an un-rooted phone. It wont be any problem. :)

The answer is: No, you shouldn't. Just make sure you add the Write permission in your msnifest (and I think you already did).

You should be able to read/write files to your SD card without any issues.
Android supports also access to the SD card, all files and directories
on the SD are read and writable for all applications.
This tutorial contains more information.

Not needed.
Add this line to your AndroidManifest.xml inside Manifest tag
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Related

Permission denied in Android Emulator Device File Explorer

I want to check if a folder has been created in the External Storage.
I already added permissions inside the AndroidManifest.xml:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
but it doesn't work either.
Any clue?
/sdcard is a symlink to /storage/emulated/0. You should therefore be able to see external files for your app in /sdcard/Android/data/<your app>.
Looks like you are using Google Play system image.
You need to use a standard Android (AOSP) system image (not one of the Google APIs or Google Play system images)
see details here
cause there is system files located and for your access device file open self-> primary folder.
The correct location for my emulator was data/data/app_name/ as per the docs that phlip referred to.

How to remove world-read/write permissions from android application's files and folders programmatically?

I'm trying to get a security certificate for my application and the evaluators told that I need to change the permission of my application folder to not world-read/write.
I have googled the problem for days but I have not found any logical solution for it. For the example one of the proposed methods was to run "chmod(destinationfile, 0644)" but it needs root permission to run.
Is there any other way to do it programmatically?
Any help is appreciated.
Thanks

How to prevent Admob ad ids from leaked by android hackig app

I have developed an android app. All the things are working fine but the main problem is, using the Hack App Data anyone can see the ad codes which is a very dangerous threat.
Now how can i prevent hack app to open my application or edit my application data or how can i prevent hack app data to access this sensitive information?
note: I have turned off android:exported="false" and also add <permission android:protectionLevel="signature"
android:name="apricot.com.newshunt"/> to my menifest file
you can set the Copy Protection to On in the Android Market upload page. It's near the bottom. I doubt it is fool-proof but it can help keep some of the people likely to do this from being able to.
You should add the view in Java instead of XML and obfuscate your code.

changing android Manifest.xml

I have an android project that create other android app using zip and zipSigner. This app works great but i need to change the app name and package name in manifest so user can create different apps.
I have download this library to parse xml from the apk but dont know how to use it using java.
Can anyone give some ways to use it or maybe other library?
i see that apk editor, apk tool can modify it.
Ive already solve it:
this library give me a good work

HandleSignInResult = false when trying to Google sign in

I followed this google documentation and I just copy and pasted the whole SignInActivity with xml files and some string resources that were needed.
But everytime when I try to sign in from the emulator in the LogCat it shows handleSignInResult: false. I've been trying to get the google sign in to work for about a week now so I could setup my Achievements and Leaderboard. I really hope that someone could help me to solve this huge headache.
EDIT: That part where you have to choose your email to sign in was working, but the actual sign in not.
EDIT: I got the release key SHA 1 and added the json file to my app/ module, but still even after it has shown me which email to pick to sign in I click on one and it still doesn't connect!!!
EDIT: I JUST 4 seconds ago saved the edit and after that IT WORKED!!!!:D:D:D:D!!!!!! And just in case if anyone sees this and has problems with SHA1 then download this program, it's much easier then getting a headache from the freaking terminal/cmd. And now I'm off to celebrate my win against the evil Google Sign in. Oh and I got it working on my phone and it's still not working on the emulator, but that's not a problem.
First check your Manifest, do you add the INTERNET permission?
<uses-permission android:name="android.permission.INTERNET" />
Also, check to make sure your Gradle has all the compile commands and dependencies that are on the same page for that API

Categories

Resources