Can't access local files in data/data of some phones - android

I'm having three not rooted phones here. Two of them have Android 10 and one has Android 8.0. On one with Android 10 I just cant access the app files in /data/data directory with the Device File Explorer in Android Studio.
The error I get is:
`run-as: /data has wrong owner: 0/1000, not 1000ยด
I'm just not finding anything useful to fix this.

Since I had to dive into the comments of the original question to solve it for myself, I'll repeat the answer that helped me.
I uninstalled the app, restarted my phone, installed it again with android studio and it worked like a charm after that.

In case you're still looking for an answer.
This most likely happens when your database is created in the past (probably from some code that was a bit off). I advise you to delete the existing database from the device file explorer, make sure your code is right, and re-run the app.
This should create a new database and work.

Related

How to transfer android app to pc for storage

I have seen this question before on this site, but the solutions have eluded me.
I have an app that I like, an app no longer supported by the developer. It's called DragonMobileApp. I'd like to copy it to my PC so that I can add it to another phone that I own.
Unfortunately, I can't figure out where it is in the file system on my phone. I've tried ADB and MyAppSharer and nothing seems to work for me. (Not the least of which I think I'm not actually able to see all of the files on my phone.)
And, of course, if you help me solve this problem, then I'll need to figure out how to load it from my PC onto a phone.
Thanks in advance for your assistance. I really did try all the solutions I found here before posting this question.
Install Xplore app from Store
Open it and click on App Manager
Click and hold the App and select Copy
Select a folder from your memory card or a folder you'd want to copy the apk file to
Click Ok to complete.
I'm guessing you don't need help to copy a file from your device to your PC.
Cheers!!!

database file does not appear under data/data/packagename/databases or anywhere else

First I have been searching for a solution for acouple of days now. It is very strange as the answer to my problem maybe very simple.
I am trying to make the simplest code to create sqlite database. there is plenty of examples in the web. the code does not generate any error and the application appears on the device. but when I try to locate the database in the specified location as in the title it does not seem to be created.
my specific questions
1-does the device has to be rooted to create a database file.
2-do I need special manualy entered permissions in the manifest file to create the database file.
3-Is there any prior settings that I have to do in android studio or a plug-in that I have to add.
4-Do I have to create the sub folders manualy because some devices dont even have the second data subdirectory of the main data directory in the main internal storage. Any way I created the folders and subfolders but no database appeared after running the application. I use a file explorer in the target device to inspect the existance of the database file.
many thanks for any attempts to help me as I seem to be stuck for few days now.
I found the files in the internal device memory using a root explorer.
The strange thing I have not seen any tutorial which alerts me to the hidden memory and root explorer. time wasted but along the way I learned many new things.
thanks all

Recovering program from Android device

Ive written a program for my android device and its installed and working on my phone (S3), BUT ive just lost my PC HD and thought id saved my eclipse android coding folder but I didn't, the program is only a small one but took me a while to perfect so i need to recover it into eclipse to edit it more and save it.
Any ideas?
Cheers people
Mark
What you can do is since you still have the working app on your S3, you can use something like
Use ES File Explorer to back up the app and retrieve the .apk file.
Decompile using: http://www.decompileandroid.com/, or APK Tool

Android root access

I have a Google Nexus 7, and I've been developing on it. Only recently, however, have I become unable to access the /data/ directory using the file browser in eclipse. The device was never rooted, but now since I upgraded it, I believe that I have lost access to this. Is there any way to get eclipse to use the "run-as" command to access my app's data directory? How come I have suddenly lost access to this?
Is the only option left to root the device?
Thanks
Is there any way to get eclipse to use the "run-as" command to access my app's data directory?
There is nothing for you to run "as" that would help here, AFAIK.
How come I have suddenly lost access to this?
You should not have had access to it in the first place. If you did, that was a security flaw in the device, perhaps fixed by a firmware upgrade.
Is the only option left to root the device?
You could not browse the /data/ directory on production hardware. For example, you can browse /data/ on the emulator.
I am able to given root permission by installing apk.
http://gadgets.ndtv.com/mobiles/features/how-to-root-nokia-x-and-get-access-to-google-play-store-and-google-now-508391

Android application uploaded using eclipse seems to still be taking up space even though I deleted it

I recently had to build an app which was pretty big (just under 180mb) mostly of stuff in the assets folder.
At one point I was running the application from eclipse and I got a strange error. I wish I recorded it but as far as I remember it was something along the lines of
Failed to launch application (null)
I was about to try install again when I realized the app had appeared on my phone. I ran it and everything was fine. Then I uninstalled it using adb uninstall.
I tried installing another app and it said I didn't have enough space. The available internal storage on my phone was around 250mb. Now it's 70mb. It looks like the previous application I ran is stuck somewhere in my phones internal storage even after I uninstalled. I had even set
android:installLocation="preferExternal"
The extra content doesn't seem to be accounted for anywhere. The application manager says my largest application is 12mb. Can't find anything strange in the DDMS file explorer.
Has anyone come across this kind of thing before? Is there some way of clearing out the internal storage? If I root my phone and go in to delete the file myself does anybody know where the file might be?
EDIT:
I did try the solution to 99% of problems - turning the phone off and on again.
Just in the event that this ever happens to another person, taking the battery out removed the unwanted data. I guess I should have thought of that sooner. So Blundells comment was mostly correct but didn't take in to account my pseudo-debility.

Categories

Resources