Hi, i want to know if it is possible to pre-define settings like mobile data (off) or account sync (off) or any other before flashing? Is there a file which i could edit?
Oor if this isn't possible, whats about to integrate DroidWall into system? Status should be enabled(requires root permission). Rules aren't important since DW blocks every activity from the start.
The thing is, every time i flash a ROM and type in my PIN, android activates mobile data automaticly and sends some bytes. I simply want to stop android from doing this.
Actually i am using the latest ICS build.
I appreciate any suggestions.
Edit: You also can find the thread here:
http://forum.xda-developers.com/showthread.php?t=1490782
Sent from my HTC HD2
redplate said:
Hi, i want to know if it is possible to pre-define settings like mobile data (off) or account sync (off) or any other before flashing? Is there a file which i could edit?
Oor if this isn't possible, whats about to integrate DroidWall into system? Status should be enabled(requires root permission). Rules aren't important since DW blocks every activity from the start.
The thing is, every time i flash a ROM and type in my PIN, android activates mobile data automaticly and sends some bytes. I simply want to stop android from doing this.
Actually i am using the latest ICS build.
I appreciate any suggestions.
Edit: You also can find the thread here:
http://forum.xda-developers.com/showthread.php?t=1490782
Sent from my HTC HD2
Click to expand...
Click to collapse
Are you wanting to completely turn off mobile data?
kylew1212 said:
Are you wanting to completely turn off mobile data?
Click to expand...
Click to collapse
For example I want to prevent android activating mobile data by typing in my pin after fresh rom install, if you know what i mean. So ofc i should be still able to switch it on if needed.
I just want to set a few system settings before flashing. Like Accounts & Sync off and GPS Satellites off.
Xylograph told me he hasnt seen any option for it yet, but if there is any it might could be stored in /data/data or /data/misc
Sent from my HTC HD2
i did a little research and found following:
for predefining Systemsettings:
/data/data/com.android.providers.settings/databases
there is a settings.db which changes in realtime if i change any systemsettings like bluetooth or wifi or gps. if you open it there are some sub entries. the systemsettings are in settings.db/secure and /system
i ll try to set up my rom now like i want, copy then the file and paste it in a romfile with the same dir location. lets see if this works after flashing. the settings.db file can also be edited.
for DroidWall integration:
also for DroidWall i will create folder for
/data/app/com.googlecode.droidwall.free-1.apk
/data/dalvik-cache/[email protected]@[email protected]
/data/data/com.googlecode.droidwall.free/and all files/folders in it
/data/user/0/com.googlecode.droidwall.free/and all files/folders in it
the only problem i think i will have is the root persmission per superuser. i need a config file for superuser but i havent found any.
i hope the dalvik-cache file will help
[email protected]@[email protected]
EDIT:
Doesnt work. None of the two.
Android just ignores the settings.db after first start and therefore all predefined settings like GPS and so on.
I am thinking about to set the permission for settings.db readonlny, before flashing.
And DroidWall have no Rootpermission. And superuser doesnt ask me for root if i restart DroidWall.
I think to get DW working i need to predefine Superuser. But i dont know how.
Related
Does anyone know how to programmatically enable the network location finding? I've read that it's not possible to do normally because of user privacy protection (i.e. you can't even request a permission that lets you do it), but I'm wondering if it's possible to do it using a rooted phone. Does anyone know? I can write apps using the normal SDK, but I've never tried to do anything using the fact that my phone is rooted or the superuser permissions app.
This would be for an HTC Hero running a (very old) Android v1.5 MoDaCo ROM.
Or, if a widget already exists that lets you do this, please let me know
Steven__ said:
Does anyone know how to programmatically enable the network location finding? I've read that it's not possible to do normally because of user privacy protection (i.e. you can't even request a permission that lets you do it), but I'm wondering if it's possible to do it using a rooted phone. Does anyone know? I can write apps using the normal SDK, but I've never tried to do anything using the fact that my phone is rooted or the superuser permissions app.
This would be for an HTC Hero running a (very old) Android v1.5 MoDaCo ROM.
Or, if a widget already exists that lets you do this, please let me know
Click to expand...
Click to collapse
Note that Settings.apk is just an app and it can change these settings. My guess is it uses some private APIs to accomplish that. You could look into Android sources and check, what is this API, then use it in your own application. You will have to use system shared user in it and sign it with testkeys.
Brut.all said:
You will have to use system shared user in it and sign it with testkeys.
Click to expand...
Click to collapse
That's the part I don't know how to do. I've found the settings calls it makes from the source code:
Code:
Settings.Secure.putString(getContentResolver(),
Settings.Secure.LOCATION_PROVIDERS_ALLOWED,
"+" + LocationManager.NETWORK_PROVIDER);
but that dies with a permission failure "java.lang.SecurityException: Cannot write secure settings table". I've tried to grant myself that permission in the manifest using:
Code:
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
but that permission doesn't seem to be granted, as a this.checkCallingPermission always returns -1.
Is there a tutorial on how to use a "system shared user", or would it be easy for you to explain?
I'm not really sure, this is knowledge of rom cookers and I'm not one of them
But... look into AndroidManifest.xml from Settings.apk:
Code:
<manifest android:sharedUserId="android.uid.system" android:versionCode="7" android:versionName="2.1-update1" package="com.android.settings"
xmlns:android="http://schemas.android.com/apk/res/android">
This apk uses android.uid.system and so it has superpowers. You must set this UID for your apk, but to do that apk must be signed with same keys as other system files. I think you must use testsigner tool and fortunately there are many threads/articles about that
Yeah, it looks like I'd have to resign the whole ROM to make sure that my app had the same key as the system files. Hmm, I've swapped tracks to investigating how to get my app to work through the Superuser app, which I can half do now. However, this is getting more complicated to solve than I had hoped for - I think for a while I might just accept that clicking on button that directly brings up the settings menu will be enough. Thanks for trying!
Hello,
I'm Andy, and I'm a little bit more active on other forums, but I've had my android device since November, and love it. Anyways, I had a couple of ?'s about an app I have in progress and I was wondering if what I want to do is even possible.
Basically, I want to develop a simple app, with just 1 activity. I have the graphics/XML stuff all taken care of already, thats easy peezy stuff.
Next, I want to install a file I include with the app to a specific location of the internal memory. By default, if you install a file included, it goes to /data/data/....., I would like my file to install, to /system/xbin/. I know you would need superuser permissions, thats fine, I was wondering if it was possible. If it is, would someone enlighten me as to how? If it isn't thats still fine, cause I can include the file in a flashable zip.
Next question,
Can I have my app run the file (ie. the equivalent to going into a terminal emulator and navigating to /system/xbin/ and typing the file name?) I ask this, cause all I've found is running files that located within your app, or creating files and editing them. I don't need that, I just want the file to be read.
Next, um, if the above is possible, how do I stop it?
So here is what the app would be:
usb tethering for senseui phones and 2.1. It may not work with all (probably not aria, i don't think that was included), but this method works with the Sprint Hero. I would like to make it idiot proof, as in creating the exploit into an app. One that installs the file onCreate() and then runs it with the first button press, and then kills it on the second button press and maybe adding a menu option to quit the app. Its not an app I would charge for, nor even attempt to distribute on the market. Any help is greatly appreciated. Thanks.
Hello. I am too having problems with the GPS fix. I googled, i have read fora, i wrote on fora, i have read even the facebook desire hd page where people from all over the world have the same problem with the GPS.
I have tried EVERYTHING, now the last chance is to change the region from the gps conf file....which i can remember being northamerica, while i live in europe. Maybe changing that to EUROPE will help me fix the gps problem.
To save changes to that file, i would need root access. I don't have root access. I don't need root access, i just want to change that file and see if the gps gets the fix faster than before....other than that, i have never wanted root access.
So, knowing my target....which is the most simple way to change that .conf file? I know that the visionary tool doesn't work anymore with froyo desire hd....so i can't root the phone...other methods look really complicated to me. there should be a way to edit the GPS file without doing a mess with roms and downgrades and everything...
please help !!!
You need root access to edit the file, there's no other solution that I know of. If you decide to root, use FasterFix from market to change the region.
Unable to use Visionary due to your build number is more than 1.3xxxxxxx?
You do not have any other option other than to root your device in order you to alter system files. Even if you download FasterFix in the market, you will need to have Superuser permission before the app can directly change system files for you.
If your build number is higher than 1.3xxxxxx, then you have to do a downgrade.
GPS performance has been affecting me in the past, but now i have found a solution(not sure yet, but it works for me until now). Now I got a fix within 5-15 seconds. At most is 30 seconds for the first fix.
Anyway, you should consider rooting. You can have full access throughout your device. My phone previous, battery life can last for a day, now at least two days. I am running different ROM and Kernel thats why.
Cheers dude. =)
It is a part of \etc, definately will need a root access to grant you access to the file.
ok could you link me to a really SIMPLE tutorial to do that? of course i think i'll have to do a hard reset? lose all my saved games and screen configurations.... sigh i just did a hard reset for the same reason (gps)....
and what about new rom and so on? do i have to use another rom in order to root the phone? what does that change ? any rom to recommend?
You don't need root access to modify gps.conf.
Use FasterFix.
Use it two times (open Fasterfix, select europe, apply, then do these steps once again).
Fasterfix will return an error both times, but if you open gps.conf from a file manager like ASTRO) you'll see that file had been changed.
After a while, Android reverts automatically gps.conf to notrh america ntp.
Didn't pay much attention to this, so i don't really know if Android reverts file on reboot or even without reboot.
giegi_dc said:
You don't need root access to modify gps.conf.
Use FasterFix.
Use it two times (open Fasterfix, select europe, apply, then do these steps once again).
Fasterfix will return an error both times, but if you open gps.conf from a file manager like ASTRO) you'll see that file had been changed.
After a while, Android reverts automatically gps.conf to notrh america ntp.
Didn't pay much attention to this, so i don't really know if Android reverts file on reboot or even without reboot.
Click to expand...
Click to collapse
i actually used faster fix, but as soon as i do anything, it says 'required root access' and doesn't do anything !! is that the error you're talking about ?
EDIT: i tried again...start faster fix: can't get root. change to europe = root access required. the gps.conf (i checked) is still on north-america.pool server ((
giegi_dc said:
You don't need root access to modify gps.conf.
Use FasterFix.
Use it two times (open Fasterfix, select europe, apply, then do these steps once again).
Fasterfix will return an error both times, but if you open gps.conf from a file manager like ASTRO) you'll see that file had been changed.
After a while, Android reverts automatically gps.conf to notrh america ntp.
Didn't pay much attention to this, so i don't really know if Android reverts file on reboot or even without reboot.
Click to expand...
Click to collapse
What are you talking about? You can't change system files without root and the app description clearly states that you need root access and busybox. It's not there to fool people is it?
@rogermorse
btw, are you using a case?
I AM using a case but even without case no difference, i tried many times.
i'm trying to root the phone...already on the first step i'm blocked: android developer kit doesn't find java SDK 64 bit....i googled and other people have this problem, i can't fix it, it just keeps saying that java was not found....OMG i had never thought rooting a phone would have been that difficult....i think i'll surrender and never use the gps in my life.
the installer of android SDK stops because it doesn't find java SDK. if i unzip the SDK, at the exit it says the same thing. I was able to make windows recognize the phone in debug mode as ADB interface....but then the
adb shell /data/local/tmp/psneuteradb shell
says 'not found'. anyway the java has something wrong with the android SDK that, as i said, keeps telling me that cannot find the java. i already entered the path in user variables...
rogermorse said:
I AM using a case but even without case no difference, i tried many times.
i'm trying to root the phone...already on the first step i'm blocked: android developer kit doesn't find java SDK 64 bit....i googled and other people have this problem, i can't fix it, it just keeps saying that java was not found....OMG i had never thought rooting a phone would have been that difficult....i think i'll surrender and never use the gps in my life.
the installer of android SDK stops because it doesn't find java SDK. if i unzip the SDK, at the exit it says the same thing. I was able to make windows recognize the phone in debug mode as ADB interface....but then the
adb shell /data/local/tmp/psneuteradb shell
says 'not found'. anyway the java has something wrong with the android SDK that, as i said, keeps telling me that cannot find the java. i already entered the path in user variables...
Click to expand...
Click to collapse
while downloading the SDK, Don't download the exe, go with zip...I think that's what I did when I faced the issue last time.....
Hi all,
I made this small update script because sometime when you try a rom and use a backup to restore the previous one the authentification get broken, so this script will just remove all locks and allow you to start your phone without any data lost.
I'm not responsible if something is going wrong.
Flash using any twrp will probably work.
great. will try
thanks!
animehq said:
Hi all,
I made this small update script because sometime when you try a rom and use a backup to restore the previous one the authentification get broken, so this script will just remove all locks and allow you to start your phone without any data lost.
I'm not responsible if something is going wrong.
Flash using any twrp will probably work.
Click to expand...
Click to collapse
well we can delete gatekeeper files manually from the TWRP file manager, and everything is fine, no data lost.
Great will try
c_/\/\_k said:
well we can delete gatekeeper files manually from the TWRP file manager, and everything is fine, no data lost.
Click to expand...
Click to collapse
Yep probably, but for most of people here it's safer to use a script than let them find the files manualy.
And maybe faster
animehq said:
Yep probably, but for most of people here it's safer to use a script than let them find the files manualy.
And maybe faster
Click to expand...
Click to collapse
you deserve compliment for your work , but it takes only one file to delete to remove passwords or lock. and its neither lengthy nor unsafe, i have seen your script, it deletes to many things.. which is not required i think. And your updater script has spelling mistakes too bro..
Does it also removes the mi account? Device locked because mi account think the device is stolen.
c_/\/\_k said:
you deserve compliment for your work , but it takes only one file to delete to remove passwords or lock. and its neither lengthy nor unsafe, i have seen your script, it deletes to many things.. which is not required i think. And your updater script has spelling mistakes too bro..
Click to expand...
Click to collapse
Which file do you think is the only one to delete?
Rohit DK said:
Does it also removes the mi account? Device locked because mi account think the device is stolen.
Click to expand...
Click to collapse
Nop sorry and there is no easy way to do it as far i know.
Bogeyof said:
Which file do you think is the only one to delete?
Click to expand...
Click to collapse
If its patternlock, then its gatekeeper.pattern.key, if its password then its gatekeeper.password.key, you can delete both.
Successful Using RX & Deletion of /data/validity/template.db
Doesn't work for me! Ran rx from recovery, wiped caches, & rebooted. Typed in backup password, unlocked (same as b4). Went to the Settings for fingerprint this time it constantly rejects any attempt saying too many incorrect pls wait. Prior it wouldn't take fingerprint or password.
Any suggestions for this?
PS: Would be nice to list what each file does /is for. I am also an advanced user...
After running This Rx use (root) X-plore/etc F. M. Then DELETE:
[*W/Rx SUCCESS*] /data/validity/template.db [*W/Rx SUCCESS*]
Reboot. Type in Previously Used BackUp Password. Go to Fingerprint Settings & setup new fingerprint & backup password!
[*MIA*] data/system/users/0/settings_fingerprint.xml [*MIA*] Could not find this file, so I assume not needed.
This was done on Stock Base Marshmallow ROM N915 (Note Edge).
BTW Thanks for RX & Could You Please add the above file to RX?
Hi All,
I've noticed in android O wifi passwords are not stored in /data/misc/wifi/wpa_supplicant.conf anymore. It's handy to back them up or recover long back saved networks.
Anyone have a clue where are them now?
Thanks a lot.
lalontra said:
Hi All,
I've noticed in android O wifi passwords are not stored in /data/misc/wifi/wpa_supplicant.conf anymore. It's handy to back them up or recover long back saved networks.
Anyone have a clue where are them now?
Thanks a lot.
Click to expand...
Click to collapse
Try searching with a file explorer for the name of one of those folders or files and see if anything shows up. Other than that, I don't know as I'm still on nougat.
DEVILOPS 007 said:
Try searching with a file explorer for the name of one of those folders or files and see if anything shows up. Other than that, I don't know as I'm still on nougat.
Click to expand...
Click to collapse
Nougat is still as it was from ics or even before I think.
Also in O the file is there at the same path, and it contains the same header as it does in android 7.* and before (some configuration stuff). What is not in the file is the list of all known networks and their password.
lalontra said:
Nougat is still as it was from ics or even before I think.
Also in O the file is there at the same path, and it contains the same header as it does in android 7.* and before (some configuration stuff). What is not in the file is the list of all known networks and their password.
Click to expand...
Click to collapse
Have you tried forgetting your WiFi network and connecting again with the psk?
DEVILOPS 007 said:
Have you tried forgetting your WiFi network and connecting again with the psk?
Click to expand...
Click to collapse
If I hit known network in android wifi options I can see all my previously stored wifi. Everything works perfectly. If I add new networks they will be added with no issues and remembered for ever and ever. (and obviously will not be added to the file). It is like this list is just somewhere else now on the phone.
I am waiting to see any apps that use the new location but I haven't found any. I have notified the developer of the app I use of the change but he has yet to release an update.
Essentially if you upgrade your phone to Android Oreo it will migrate the wpa_supplicant.conf to /data/misc/wifi/WifiConfigStore.xml.
That is the new file. The Wifi Password apps read the wpa_supplicant.conf which will still exist, however, any new connections made will be stored in the WifiConfigStore.xml file meaning that the Wifi Password apps won't "see" the new connections.
Worse yet, If you did a reset of your phone and you are starting from scratch you will only be able to get that information from the WifiConfigStore.xml file.
All is not lost, since you most likely have root for the apps to get that data in a nice gui, it means that you access that file directly (via a root explorer file manager) to see your connections and passwords.
Hey guys,
so I created an app that should help.
Please try it out at this thread, and leave feedback...
https://forum.xda-developers.com/android/apps-games/app-oreo-wifi-passwords-t3708043
dechronic said:
I am waiting to see any apps that use the new location but I haven't found any. I have notified the developer of the app I use of the change but he has yet to release an update.
Essentially if you upgrade your phone to Android Oreo it will migrate the wpa_supplicant.conf to /data/misc/wifi/WifiConfigStore.xml.
That is the new file. The Wifi Password apps read the wpa_supplicant.conf which will still exist, however, any new connections made will be stored in the WifiConfigStore.xml file meaning that the Wifi Password apps won't "see" the new connections.
Worse yet, If you did a reset of your phone and you are starting from scratch you will only be able to get that information from the WifiConfigStore.xml file.
All is not lost, since you most likely have root for the apps to get that data in a nice gui, it means that you access that file directly (via a root explorer file manager) to see your connections and passwords.
Click to expand...
Click to collapse
I have created an app that supports both devices below and over the android Orio, give it a try from this thread -
https://forum.xda-developers.com/android/apps-games/app-wifi-password-view-saved-wifi-t3852668
Hotfingers said:
Hey guys,
so I created an app that should help.
Please try it out at this thread, and leave feedback...
https://forum.xda-developers.com/android/apps-games/app-oreo-wifi-passwords-t3708043
Click to expand...
Click to collapse
Great App!
They are now stored in:
/data/misc/wifi/WifiConfigStore.xml