Find certain user settings on phone via adb without rooting. - Android Q&A, Help & Troubleshooting

Hey!
i have an android phone connected via USB to a PC.
problem is i need to find a way of getting info from it WITHOUT ROOTING!
i need to find out certain user settings/preferences set on the phone currently.
Several such settings like wifi, bluetooth, api version etc are available via the >ADB shell dumpsys command.
However i could locate the GPS settings only in the /data/data/com.android.settings/shared_prefs.xml file. This cant be pulled without rooting as far as i tried. Is there any way to maybe just read this xml file and get the setting?
I am not creating an app..and will mostly be doing this remotely so cant install anything on the phone.
i know the xml/database locations of all variables on a rooted device. Want the same without root permission.
i am totally new to android!

Related

Partially functional Atrix - Need Assistance or SBF File

So I as working on theming the Adeo ROM and must have messed something up. I didn't think it had to do with the framework files I had pushed so I did a factory reset to clear off all the 3rd party apps from the phone.
Well, since that reset, I can't access the phone in ADB, settings FC's, Market FC's, and I can't download/install an APK because of the security restrictions.
The phone is "functional", I can place/receive calls/sms and use the browser. USB to the PC works for everything except getting ADB access. I verified I can get it to recognize for RSDLite and for Fastbook so I figure using one of those methods should (eventually) provide me an avenue to get my phone 100% functional again.
Does anyone happen to have or know where I could find signed files for Fastboot to replace the entire /system partition or an SBF file to flash the phone back to stock? Or possibly any other solutions?
Also, before I get flamed as a n00b who broke a phone, I've worked on over a dozen different Android handsets and I was well aware I was working without a safety net. This is NOT my primary phone so if I need to I can patiently wait for an SBF to leak. I'm just checking to see if anyone knows any solutions already so I can get back to theming.
Sounds to me like a permissions issue. I had that after I fiddled with the contacts database to unrestrict pictures from third party apps. I would double check any files you modified and make sure they got chmod'ed back to what they should be.
You will have to somehow access the Settings to re-enable adb. When you did a factory reset, you disabled USB Development (aka adb).
For now the only known way to recover is through adb. No fastboot or signed update.zip for now.
navalynt said:
So I as working on theming the Adeo ROM and must have messed something up. I didn't think it had to do with the framework files I had pushed so I did a factory reset to clear off all the 3rd party apps from the phone.
Well, since that reset, I can't access the phone in ADB, settings FC's, Market FC's, and I can't download/install an APK because of the security restrictions.
The phone is "functional", I can place/receive calls/sms and use the browser. USB to the PC works for everything except getting ADB access. I verified I can get it to recognize for RSDLite and for Fastbook so I figure using one of those methods should (eventually) provide me an avenue to get my phone 100% functional again.
Does anyone happen to have or know where I could find signed files for Fastboot to replace the entire /system partition or an SBF file to flash the phone back to stock? Or possibly any other solutions?
Also, before I get flamed as a n00b who broke a phone, I've worked on over a dozen different Android handsets and I was well aware I was working without a safety net. This is NOT my primary phone so if I need to I can patiently wait for an SBF to leak. I'm just checking to see if anyone knows any solutions already so I can get back to theming.
Click to expand...
Click to collapse
When I lost ADB access because of a hard reset (I think), this is what I did to fix my issue: http://forum.xda-developers.com/showthread.php?t=974824
I never lost root after a hard reset so I went to the market and bought root explorer and sqlite editor and copied the adbd to the /sbin folder to fix adb. I then bought sqlite editor and followed this: http://forum.xda-developers.com/showthread.php?t=972760 to re-enable side loading of apps. To install apps that I had the apk's for.
I still lose adb after a reset, but I can copy the adbd file to the /sbin folder and adb works again until I reset the phone.
I made a post about losing adb access on the motorola support forums: https://supportforums.motorola.com/message/332307#332307 to see if there were any solutions, but Mark said he would get back to me after trying to reproduce my problem.
I hope this helps.
I think I'm just up **** creek without a paddle for the moment because I can't connect via ADB, the Market force closes, and the security restrictions won't let me side-load any applications via download from the browser. I can't manually add ADB because I have no way to move the files to where they need to be.
Thanks for the replies! airbillion, I'm following your thread at the Motorola Owners' Forum to!
navalynt said:
I think I'm just up **** creek without a paddle for the moment because I can't connect via ADB, the Market force closes, and the security restrictions won't let me side-load any applications via download from the browser. I can't manually add ADB because I have no way to move the files to where they need to be.
Thanks for the replies! airbillion, I'm following your thread at the Motorola Owners' Forum to!
Click to expand...
Click to collapse
No problem. That sucks, I'm not sure what you can do. Hopefully motorola or someone here will get a sbf soon so we can mess with our phones and have a way to fully recover. I hope you get it working again. Good luck!
navalynt said:
I think I'm just up **** creek without a paddle for the moment because I can't connect via ADB, the Market force closes, and the security restrictions won't let me side-load any applications via download from the browser. I can't manually add ADB because I have no way to move the files to where they need to be.
Thanks for the replies! airbillion, I'm following your thread at the Motorola Owners' Forum to!
Click to expand...
Click to collapse
Have u not tried sideload wonder machine love that thing used it alot when my wife had her backflip
Sent from my MB860 using XDA App
shadowscreation said:
Have u not tried sideload wonder machine love that thing used it alot when my wife had her backflip
Sent from my MB860 using XDA App
Click to expand...
Click to collapse
Requires USB Debugging to be enabled, but I have no access to enabled it due to Settings force closing and no ADB access in pre-boot.
Could you download Android Terminal Emulator 's apk to your sdcard, then install it using a apk install you may already have that work.
If you can get any terminal access from your phone, do a su, then launch /sbin/adbd. This should hopefully give you adb shell access. Without needing to enable USB debugging.
adlx.xda said:
Could you download Android Terminal Emulator 's apk to your sdcard, then install it using a apk install you may already have that work.
If you can get any terminal access from your phone, do a su, then launch /sbin/adbd. This should hopefully give you adb shell access. Without needing to enable USB debugging.
Click to expand...
Click to collapse
It won't let me install a downloaded APK because of the security restriction.
If you have an SD card, try booting into recovery with an update.zip on the file.
I can get into the recovery, but the update.zip file needs to be signed. I created one that will push the original copies of the framework files I was working with but it won't install because it's signed with test keys. The stock recovery 3e needs update.zip files signed with the manufacturer release-keys which only Motorola has.
https://supportforums.motorola.com/thread/46051?tstart=30
I started a thread on the official Motorola Owner's Forum in hopes I can find a full factory restore method for the OS. It's unfortunate that unlike HTC and other manufacturers who release full wipe RUU files Motorola has chosen to keep their restore files internally.
http://www.4shared.com/file/7YXo_gmO/update.html
That's the link to the update.zip file I was trying to use that fails because it's only signed with test-keys.
Retracteddd

[Q] Change/remove lock code with internal class or adb shell

Problem:
I'm an app developer. I have one app that let's you lock the device using Device Administration. One of my users had some conflicts with my app and another. He then removed Device Administration and uninstalled my app, rebooted his phone, and now he cannot access his phone.
He of course cannot use my app to change the password now (since it's uninstalled).
His phone is stock 2.2 LG Optimus V, Virgin Mobile, Rooted.
Question:
I'm needing to find a way that my user can now change his lock code.
I need:
1.) to know an internal class (from com.android.internal) that I could use within an app to change the lock code (just like the system settings do).
OR
2.) to know a command I can use with adb shell to remove or change the phone lock code.
OR
3.) to know the location of the file that stores the lock code information.
Any help is greatly appreciated.
I did actually manage to rewrite a couple pieces of my app, install with adb install, then start it with adb shell am start, and re-enable device admin. So I was able to make it work.
This also worked when my user tried it. Problem Solved.

[Q] HTC Flyer Data recovery - Broken screen

Hi everyone
My first post here, hopefully someone can help me.
I have (had) a HTC Flyer P510e tablet. When I got it I went through the process of rooting, unlocking, etc, and if my memory serves was running Andoid 2.3.4.
A while ago I dropped it, broke the screen and rendered it useless. Digitizer not responsive, so I cant unlock the screen, or quite frankly do anything with it.
There is some important info on there I need to get off. I have already managed to pull off the contacts, calender, documents, apk's i needed, etc. The problemis as follows:
I have been using Garmin Mechanic to record all my fuel purchases, and PhoneTrack Explorer to record mileage use, site time, etc. I have backups of these apps and the data from January, but I am needing the Feb & March data from both these apps.
I was previously using TitaniumBackup for this, and from examining the backup files I can see the databases for these apps were stored as follows:
\HTC Backup\External\data\titaniumbackup\co.uk.journeylog.android.phonetrack-20130110-124837.tar.gz\co.uk.journeylog.android.phonetrack-20130110-124837.tar\data\data\co.uk.journeylog.android.phonetrack\.\databases\
\HTC Backup\External\data\titaniumbackup\com.garmin.android.apps.mech-20130110-124624.tar.gz\com.garmin.android.apps.mech-20130110-124624.tar\data\data\com.garmin.android.apps.mech\.\databases\
I have tried various commands, sequences and other suggestions using ADB, none which have worked. Tthe failures I get on ADB commands mainly are Permission Denied when trying to issue the su or root command, read only or read errors trying to mount, browse or copy, etc, etc. I have followed about 15 suggestions from different XDA pages, other sites, and more, with no luck so far.
I have tried Moborobo, MyPhoneExplorer and APK Batch Installer, with not much luck.
Things I do have which could be of use:
I have done a full clockworkmod backup and have the current image files.
I have already downloaded the Android SDK kit.
Is there any way I can get hold of these files so I can submit my expenses? Is there an easy way to pull them using ADB?
I was considering if there was a way to use the Android SDK to create a virtual Android device, add the clockworkmod recovery to the virtual device, then use the image backups I have to restore my broken device's load, then do a backup or export of the information I am needing?
Any help or suggestions would be greatly appreciated!
Thanks very much.
Did you try to re-install the HTC drivers? What is the response if you type:
adb devices
If no device is listed, it might just be a driver problem. Or just try another USB port, or another computer (if available).
redpoint73 said:
Did you try to re-install the HTC drivers? What is the response if you type:
adb devices
If no device is listed, it might just be a driver problem. Or just try another USB port, or another computer (if available).
Click to expand...
Click to collapse
It's not a communication problem. adb devices does list the device serial number. adb shell launches the shell and I can browse around and perform various commands, but I am always getting the permission denied errors when I try to access the system protected folders, and those hidden folders.

To stop Tethering data being differentiated and tracked by phone supplier.

Hello,
I asked a question over here; http://forum.xda-developers.com/xpe...erentiated-t3497412/post69551882#post69551882
[quote[Sony Xperia Z2 D6503 Marshmallow (6.0.1) Build 23.5.A.1.291 - Unlocked using This solution.
I am quite new to flashing phones. I have done it in the past but it was a great deal easier back when I last did it at the dawn of Android.
My issue is simply, I want to stop my supplier (Three) from being able to differentiate between my phone downloading data and when I tether it to something. I had unlimited data but a limitation on tethering which I thought was a bit sneaky and crap. So, after rooting my phone successfully, what else will I need to do in order to stop Three from snooping and differentiating my traffic?
Thank you all in advance for your help.[/quote]
@Knutselmaaster suggested this http://nexus5.wonderhowto.com/how-to...owing-0155546/ but when I navigate to that folder there is no database file.
This is purely and only to prevent my provider snooping traffic, this is not to get around any paywall system.
I suppose flashing the phone with a custom ROM would also solve this issue?
Would just adding a custom ROM resolve this?
I have found a solution.
Open a command prompt
Run ABD (Browse to folder, by default cd c:\abd\ and then type ABD shell)
At the prompt type: settings put global tether_dun_required 0
hit enter.
Type exit and hit enter.
This was you don't have to edit database files you use the shell to make the change which is a far safer way forward anyway.
Restart your phone. Viola.
Solution found here; http://www.lukecjdavis.com/fix-inter...droid-devices/

Tasker 'Secure Settings' ADB access - How 'safe' is it ??

Ok lets first explain the situation
I've been dabbling with Tasker (Paid for version)- getting some automation depending on certain situations (mainly stuff like 'If I'm @ {location} get volumes set high' or ' If Unread msg then vibrate my Amazefit bip watch' - Nothing too complicated using variables / javascript etc)
One situation I want to attempt though is 'If Gpay app is started - turn on NFC, but when I leave the app - turn NFC off'
Now I already know there are 2 'main' ways I can turn on/off NFC in Tasker.. either use 'AutoInput plugin' or use 'Secure Settings'
- I've tried with Autoinput plugin but the problem is that with the free option, you need to watch an Ad every day to use it but of course I can pay for it (its only a couple of quid)
However you can't Install it & pay for it directly from within the plugin - you need to install yet another App (AutoApps) first - & although this one is free - I just don't like adding more bloat to my phone than necessary. Adding both the plugin & this additional App adds (although only a 'minor' amount) up to 20Mb
The other method is give Tasker 'Secure settings' permission
- So I read the 'What to do to give 'Write Secure Settings Permission' to Tasker' (enable Developer mode > Usb Debugging > Install ADB on PC etc etc) & it looks simple enough,
But (a loooong time ago) I tried other 'hacks' & it ended up disastrously (probably I did something wrong with missing a step or something) & I just want to make sure that it IS as simple as it seems and also ask how safe is it
for example
* If I type in the command in ADB - could something go wrong & could it crash/brick the phone ?
* Is this permanent - ie if I turn off/on phone or if I get an OTA update & phone restarts - will it stay, or will I have to repeat the ADB command each time ?
* Will this 'break' official OTA updates (whether security &/or Android firmware) - I once did a firmware update with a step that used ADB (IIRC) & it broke something that prevented any updates from happening
- official OR manual firmware updates
Any help/advice would be appreciated
Cannon_Foddr said:
* If I type in the command in ADB - could something go wrong & could it crash/brick the phone ?
* Is this permanent - ie if I turn off/on phone or if I get an OTA update & phone restarts - will it stay, or will I have to repeat the ADB command each time ?
* Will this 'break' official OTA updates (whether security &/or Android firmware) - I once did a firmware update with a step that used ADB (IIRC) & it broke something that prevented any updates from happening
- official OR manual firmware updates
Click to expand...
Click to collapse
ADB is the door to your phone's Android. It's a tool not meant to be used by John Doe. Wrongly used you can brick your phone. Hence it's by default disabled.
1. Yes, using ADB you can render your phone absolutely useless. If you e.g. enter
Code:
adb shell rm -rf /
then phone gets totally wiped ( really all gets destroyed, it gets naked ) - you can throw it into electric waste.
2. ADB commands aren't persistent, but their results may be.
3. ADB itself breaks nothing: it's a driver installed on your computer that let you access Android's files and launch Android executables.
Thanks for the reply
I doubt I'll use THAT command.
I forgot to mention what tasker's command is
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
Not 100% sure about your last comment though.
ADB allows access to android files so changing android files could break things, which I'm worried about especially with OTA updates etc. (my last phone stopped getting OTA updates when I rooted it despite using official firmware)
However IF I understand the above command all this does is tell the android operating system ('android') to only give the tasker app (which 'Real' name is 'net.dinglisch.android.taskerm') the rights ('permission') to access the required settings ('WRITE_SECURE_SETTINGS') which the NFC on/off toggle is part of (settings >connected devices > connection preferences> nfc) & 'shouldn' t' affect any other files such as OTA (unless OTA is also part of secure setting?)
@Cannon_Foddr
As I can see you until now haven't understood what ADB is, how it works.
Same probably your understanding of what an OTA is.
Personally never would allow 3rd-party apps ( like Tasker ) to modify sensible system settings: Tasker isn't an open-source app, so you can't control what it does in the last run.
It's simply on you to decide whether Tasker is given that right, or not ...
Can't see why 'open-source' has to do with this
IMHO if Open-source - anyone can release similar apps with added extra hidden code that could spy's on you/steal info etc, but a 'closed sourced' app from a long running developer (tasker been around for 10yrs with over 1mil downloads) must mean people seem to trust him/them & if he was 'dodgy' surely he would've been caught out by now
Anyway the Bottom line seems to be
Safe route: pay for plugin & live with extra bloatware
Or
Risky route: give access to secure system resources, see what happens & keep fingers cross nothing does
Thanks for your replies.. I think I may have to sit down & have a long hard think which route I feel more comfortable with
I have been using Automate for about 4 months now. I granted it WRITE_SECURE_SETTINGS and I have not noticed any modifications in my system. Granted I may have not looked specifically for them but as far as braking the system or disruption of OTAs no issues so far
DennisHarrows said:
I have been using Automate for about 4 months now. I granted it WRITE_SECURE_SETTINGS and I have not noticed any modifications in my system. Granted I may have not looked specifically for them but as far as braking the system or disruption of OTAs no issues so far
Click to expand...
Click to collapse
I assume you had to do something like Taskers command then to grant the secure settings
( "adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS" )
Cannon_Foddr said:
I assume you had to do something like Taskers command then to grant the secure settings
( "adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS" )
Click to expand...
Click to collapse
Automate is straight forward, there is a toggle for "modify system settings" needed for some tasks to run and one you run the ADB command, it's done

Categories

Resources