Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change user and group of android app files to replicate issue user is having

Tags:

android

shell

adb

I have an android app on the market and one of my users has reported a problem which nobody else has had (at least as far as I am aware of). They've told me what they did and what settings they had used as well as android version they are using so I am trying to replicate it as much as possible.

I install the original app before the update (when everything was working fine) and set up in the same way as the user said they had. I have then gone into the shell and gone into /data/data/com.mycompany.myapp/ and checked the databases and shared_prefs folder to check the ownership and both files were set up to be and the user and group are both set up to be app_36. I then pulled all the contents onto my development PC so that I have the database and prefs file.

I have then uninstall the original and installed the new version of the app by using adb installcom.mycompany.myappI then upload the databases and prefs file usingadb push`` and then viewed the permissions of the file using the adb shell and can see that they are now owned by root so the app can't access those file. I have then tried, from the adb shell doing the following:

adb shell
cd com.mycompany.myapp/shared_prefs
chown app_36:app_36 prefs.xml

This would work in normal linux changing the user and group to be app_36 but its saying that there is no user app_36:app_36. However, if I do chown app_36 prefs.xml it then changes the owner fine but I can't change the group.

To change the group I've use chgrp app_36 prefs.xml but it then says chgrp not found.

How can I change the user and the group so that I can copy the files over and replicate the issue my user is having.

Thanks for any help you can provide.

like image 867
Boardy Avatar asked Dec 29 '12 17:12

Boardy


1 Answers

use dot as a delimiter:

chown app_36.app_36 prefs.xml
like image 180
Alex P. Avatar answered Oct 23 '22 11:10

Alex P.