Programmatically enabling network-location - Android Software Development

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!

Related

Hello, New to android programming and got ?'s

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.

gps conf ... HELP !!!

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.....

Pre-define System Settings Before Flashing and/or integrate DroidWall

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.

WP8 SYSTEM registry files from FFU

I found where the system registry files are stored inside the ffus. This is from my Lumia 928 factory ffu.
Code:
\Windows\System32\config - DEFAULT, DRIVERS, FP, ProvisionStore, SAM, SECURITY, SOFTWARE, SYSTEM
\Windows\System32\config\MOUNTMGR - SYSTEM
\Windows\System32\config\unmodified - BCD, DEFAULT, DRIVERS, NTUSER.DAT, SAM, SECURITY, SOFTWARE, and SYSTEM
\EFIESP(Different Partition)\Windows\System32\config\unmodified - BCD, DEFAULT, DRIVERS, NTUSER.DAT, SAM, SECURITY, SOFTWARE, and SYSTEM
BCD, DEFAULT, DRIVERS, NTUSER.DAT, SAM, SECURITY, SOFTWARE, and SYSTEM
All of these files contain regf as the first few characters in hex. Beyond that, the files are mostly garbage looking at them in Notepad++.
I haven't been able to find any registry editors yet that can edit them, including ones built for Windows CE/Mobile or even Win7/8.
Anyone know of something that can display it in a normal fashion? (without needing a WP8 device to attempt to edit it on.)
EDIT: The files from \Windows\System32\config have been zipped for simplicity reasons (for those of you who don't have a ffu handy)
EDIT2 (August 22): The files from the GDR2/Amber update from my phone's rom have been added.
WalkingCat said:
OK, this is a reply to this thread, but apparently I can't post in that forum yet.
So, you've found registry file inside \Windows\System32\config, and this is the way to open and edit it.
No third-party tools needed, just use regedit.exe in your Windows system
1. Run regedit.exe
2. Click on any root key, like HKEY_LOCAL_MACHINE
3. Open File menu, select Load Hive
4. Select a file in your mounted ROM \Windows\System32\config, like SOFTWARE or SYSTEM, open it
5. In the dialog asking for a name, input any text, like WP8Software
6. Registry is now loaded under HKEY_LOCAL_MACHINE\WP8Software, you can edit it.
7. Open File menu, select Unload Hive, then its written back to disk.
reference: http://technet.microsoft.com/en-us/library/cc732157.aspx
Click to expand...
Click to collapse
Check this post : http://forum.xda-developers.com/showpost.php?p=44312736&postcount=41
I used 7zip to extract the file
vivekkalady said:
Check this post : http://forum.xda-developers.com/showpost.php?p=44312736&postcount=41
I used 7zip to extract the file
Click to expand...
Click to collapse
That works fine for .wim or a .zip, but these files are the complete registry store that's same format that Windows 2000, XP, Vista, ect. uses to store the settings for hardware/drivers, windows itself, and other apps that have that kind of access (e.x. Tier3 Applications)
If it's same format as XP/Vista type it should be easy openable, look for the application on the internet.
GodlikePL said:
If it's same format as XP/Vista type it should be easy openable, look for the application on the internet.
Click to expand...
Click to collapse
Apparently it isn't. I used RegistryEditorPE, that's supposed to work with offline registries for 2000 to 7, but it kept erroring out.
Sent from my RM-860 (Lumia 928) using the OFFICIAL Tapatalk app.
This is good stuff to know. Something that should be good to note is that while I decompiled the .NET for a few of the Verizon Xaps from the 928 ROM, I discovered some Nokia-specific COM Interop that interfaces with the registry. I'm hoping I can try something out and put up a test program within the next few days and make some registry changes.
Hi
I found a registry key
[HKEY_LOCAL_MACHINE\Software\Microsoft\Office Mobile\SPMC\Action\doc]
"Application"=dword:00000005
"ApplicationCommand"="app://5B04B775-356B-4AA0-AAF8-6491FFEA5617/Default?CmdLine=-url %s"
"Action"=dword:00000003
this is for Microsoft office Word
I think we can open word using the link i guess (app://5B04B775-356B-4AA0-AAF8-6491FFEA5617/)
so is this part useful?
can external commands executable through this part (CmdLine=-url %s) ??
something like this
http://dotnet.dzone.com/articles/windows-phone-7-tip-day-know
@snickler: Let me know if you succeed with that. I managed to sideload an app using one of those libraries (after removing nearly all the interesting capabilities...), but immediately got an error about the component not being registered. I didn't try running regsvr or anything, though...
GoodDayToDie said:
@snickler: Let me know if you succeed with that. I managed to sideload an app using one of those libraries (after removing nearly all the interesting capabilities...), but immediately got an error about the component not being registered. I didn't try running regsvr or anything, though...
Click to expand...
Click to collapse
Hmmm, which phone do you have?
Edit: I tried to deploy just a sample app with one of the .winmds referenced, and got the 0x81030120 error
Holy fuzzle.. ANOTHER EDIT: I was able to do it. I had to remove all the damn Capabilities that I added from the Nokia Maps xap though.
I referenced the NokiaRegistryUtils.winmd and just ran this sample code
MessageBox.Show(NokiaRegistryUtils.Registry.IsChinaFirmware().ToString());
It returned "false" as expected.
I'm going to try something else now.
Something to note, in the WMAppManifest.xml, the following needs added after the <Tokens> declaration
<ActivatableClasses>
<InProcessServer>
<Path>NokiaRegistryUtils.dll</Path> <-- or whatever dll you're adding
<ActivatableClass ActivatableClassId="NokiaRegistryUtils.Registry" ThreadingModel="both" />
</InProcessServer>
</ActivatableClasses>
vivekkalady said:
Hi
I found a registry key
[HKEY_LOCAL_MACHINE\Software\Microsoft\Office Mobile\SPMC\Action\doc]
"Application"=dword:00000005
"ApplicationCommand"="app://5B04B775-356B-4AA0-AAF8-6491FFEA5617/Default?CmdLine=-url %s"
"Action"=dword:00000003
this is for Microsoft office Word
I think we can open word using the link i guess (app://5B04B775-356B-4AA0-AAF8-6491FFEA5617/)
so is this part useful?
can external commands executable through this part (CmdLine=-url %s) ??
something like this
http://dotnet.dzone.com/articles/windows-phone-7-tip-day-know
Click to expand...
Click to collapse
Where did you find that key?
in ffu file
location <ffu mount>\Windows\Packages\RegistryFiles\Microsoft.Office.Word.reg
Perfect. That's what I'm doing now, but just from my 920 ROM dump. I can access the registry sections that Nokia provides in their app, but I can't from the one you provided me. I'm going to do more tests to see if this is using HKCU rather than HKLM. It could also be that the registry keys have permissions placed on them.
Hmm,
I'm able to get the value of SOFTWARE\Classes\MIME\Database\Codepage\1254 -> BodyCharset
I may write a simple app that reads registry from Lumia devices... I think that's going to happen today.
found these things dont know it is of any use
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Providers\Trust\Usages\1.3.6.1.4.1.311.10.3.3]
"$DLL"="C:\\Windows\\System32\\WINTRUST.DLL"
"CallbackAllocFunction"="SoftpubLoadDefUsageCallData"
"CallbackFreeFunction"="SoftpubFreeDefUsageCallData"
"DefaultId"="{573E31F8-AABA-11D0-8CCB-00C04FC295EE}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Providers\Trust\Usages\1.3.6.1.5.5.7.3.1]
"$DLL"="C:\\Windows\\System32\\WINTRUST.DLL"
"CallbackAllocFunction"="SoftpubLoadDefUsageCallData"
"CallbackFreeFunction"="SoftpubFreeDefUsageCallData"
"DefaultId"="{573E31F8-AABA-11D0-8CCB-00C04FC295EE}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Providers\Trust\Usages\1.3.6.1.5.5.7.3.2]
"$DLL"="C:\\Windows\\System32\\WINTRUST.DLL"
"CallbackAllocFunction"="SoftpubLoadDefUsageCallData"
"CallbackFreeFunction"="SoftpubFreeDefUsageCallData"
"DefaultId"="{573E31F8-AABA-11D0-8CCB-00C04FC295EE}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Providers\Trust\Usages\1.3.6.1.5.5.7.3.3]
"DefaultId"="{00AAC56B-CD44-11D0-8CC2-00C04FC295EE}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\Providers\Trust\Usages\2.16.840.1.113730.4.1]
"$DLL"="C:\\Windows\\System32\\WINTRUST.DLL"
"CallbackAllocFunction"="SoftpubLoadDefUsageCallData"
"CallbackFreeFunction"="SoftpubFreeDefUsageCallData"
"DefaultId"="{573E31F8-AABA-11D0-8CCB-00C04FC295EE}"
Click to expand...
Click to collapse
http://support.microsoft.com/kb/287547
vivekkalady said:
found these things dont know it is of any use
http://support.microsoft.com/kb/287547
Click to expand...
Click to collapse
I did find THIS..
Code:
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\Install]
"MaxUnsignedApp"=dword:7FFFFFFF"
That translates to the value of InterOp unlock by default which means we should be able to sideload more than 10 apps at a time.
I also found these within policy xml files
Code:
Microsoft.BaseOS.SecurityModel.policy.xml
<Capability ElementID="2EF45E94A01864DE3387212D6E73AEA885E709AD0F24FB97FE2E84728CB09D14" AttributeHash="49B8EC80A54998B68D7F65A44A340FD28B535494B7A41D650FD94851E38A6B6B" Id="ID_CAP_DEVELOPERUNLOCK" AppCapSID="S-1-15-3-1024-2489250862-3731101856-757172019-2830005102-2903107461-2549818383-1921265406-345878668" SvcCapSID="S-1-5-21-2702878673-795188819-444038987-1443" FriendlyName="Enable bearing chamber to load unsigned modules" Visibility="Internal" />
<Capability ElementID="BAFBED1970753822A266C1985F4A2CA2BA7A97CCE149F874743D00F678643C26" AttributeHash="54A2744DE064E139FD4403623C2AB9F1E130BC5C0786F56C1CE39AC814DC3F03" Id="ID_CAP_DEVELOPERUNLOCK_API" AppCapSID="S-1-15-3-1024-435026874-574125424-2562811554-2720811615-3432479418-1962428897-4127210868-641492088" SvcCapSID="S-1-5-21-2702878673-795188819-444038987-1450" FriendlyName="Enable setting of registry key protecting developer unlock mode." Visibility="Internal">
<CapabilityRules>
<Rules>
<RegKey ElementID="F0921CC3ADB2FEE5B7DC90F9F2BBDDB6E4D7BFAF9CE189C1585A90CD71E36882" DACL="(A;CI;KRKW;;;S-1-15-3-1024-435026874-574125424-2562811554-2720811615-3432479418-1962428897-4127210868-641492088)(A;CI;KRKW;;;S-1-5-21-2702878673-795188819-444038987-1030)(A;CI;KRKW;;;S-1-5-21-2702878673-795188819-444038987-1450)" Flags="515" Path="HKEY_LOCAL_MACHINE\Software\Microsoft\SecurityManager" />
</Rules>
</CapabilityRules>
</Capability>
<Capability ElementID="BAFBED1970753822A266C1985F4A2CA2BA7A97CCE149F874743D00F678643C26" AttributeHash="54A2744DE064E139FD4403623C2AB9F1E130BC5C0786F56C1CE39AC814DC3F03" Id="ID_CAP_DEVELOPERUNLOCK_API" AppCapSID="S-1-15-3-1024-435026874-574125424-2562811554-2720811615-3432479418-1962428897-4127210868-641492088" SvcCapSID="S-1-5-21-2702878673-795188819-444038987-1450" FriendlyName="Enable setting of registry key protecting developer unlock mode." Visibility="Internal">
<CapabilityRules>
<Rules>
<RegKey ElementID="F0921CC3ADB2FEE5B7DC90F9F2BBDDB6E4D7BFAF9CE189C1585A90CD71E36882" DACL="(A;CI;KRKW;;;S-1-15-3-1024-435026874-574125424-2562811554-2720811615-3432479418-1962428897-4127210868-641492088)(A;CI;KRKW;;;S-1-5-21-2702878673-795188819-444038987-1030)(A;CI;KRKW;;;S-1-5-21-2702878673-795188819-444038987-1450)" Flags="515" Path="HKEY_LOCAL_MACHINE\Software\Microsoft\SecurityManager" />
</Rules>
</CapabilityRules>
</Capability>
Need a Nokia Device?
snickler said:
I may write a simple app that reads registry from Lumia devices... I think that's going to happen today.
Click to expand...
Click to collapse
Thats great! If anyone needs a Nokia device to test on, Nokia has Remote Device Access to those who need it. Its a free service to anyone who has a Nokia DEVELOPER account, which is separate but free as well. The devices they mostly have are Lumia 820s, but the have a few others (620, 720, 920 and the 928.) The great thing about them, you can deploy an xap and run the apps. Some of those phones have sims in them and some of them have a "Nokia On-Device Diagnostic Tool". The only drawback, is that the connection can be SLOW.
Huh, you had to add the InProcServer manually? That may be the problem, then. I'm not sure why they're using COM - it works just fine to simply use the native Win32 APIs (add references to ADVAPI32LEGACY.LIB and/or KERNELBASE.LIB; that's what my NativeAccess library does and it works fine) - but it's good to know that COM is, in fact, usable.
Yeah, I already found those policy files. As I've said in other posts, if you can find a way to sideload an app that uses them, we can do a lot more than is currently possible - the internal and private capabilities (and some of the so-called public ones, most of which still won't install) have all kinds of cool potential.
One advantage of the WP8 app model, as opposed to the WP7 model that used ID_CAP_INTEROPSERVICES for everything, is that an app like you're making may well work on other devices. The fact that you got the interop-lock error means that the app did have ID_CAP_INTEROPSERVICES specified, so it may use it for some things, but the registry access is probably not one of them.
GoodDayToDie said:
Yeah, I already found those policy files. As I've said in other posts, if you can find a way to sideload an app that uses them, we can do a lot more than is currently possible - the internal and private capabilities (and some of the so-called public ones, most of which still won't install) have all kinds of cool potential.
One advantage of the WP8 app model, as opposed to the WP7 model that used ID_CAP_INTEROPSERVICES for everything, is that an app like you're making may well work on other devices. The fact that you got the interop-lock error means that the app did have ID_CAP_INTEROPSERVICES specified, so it may use it for some things, but the registry access is probably not one of them.
Click to expand...
Click to collapse
The best part is that the Nokia CityLens uses ID_CAP_INTEROPSERVICES, but I can't find anything that references it.
The winmds use System.Runtime.InteropServices though.
The Nokia app I got the RegistryRT from didn't use the INTEROP Capability at all, but I did notice that I had to add that extra stuff in the AppManifest.

Soli availability how will that be enforced?

Looks like Soli is only available in certain countries. Short of disabling the hardware in countries which it's not available, I wonder how Google is going to stop it
If you're roaming to a country that does not support it, it possible Google will use GPS to determine your location and stop the capability. Then of that is the case then buying a phone say in the US and trying to use somewhere else might not work.
lchiu7 said:
If you're roaming to a country that does not support it, it possible Google will use GPS to determine your location and stop the capability
Click to expand...
Click to collapse
according to androidpolice.com, cellular triangulation is used to determine the phone's location and disable motion sense in unsupported regions
source: <ap.c>/2019/10/15/pixel-4s-motion-sense-will-disable-itself-in-unsupported-regions/ (sorry, I may not post links)
You mean this?
https://www.androidpolice.com/2019/...e-will-disable-itself-in-unsupported-regions/
I could live without gesture controls but what other functions might not work without Soli (facial unlock?)
lchiu7 said:
what other functions might not work without Soli (facial unlock?)
Click to expand...
Click to collapse
afaik facial unlock works without Soli, it will just be slower and may require you to tap the screen for login, rather than just reaching for the phone.
But Soli is also used to turn on battery saving features, e.g. turn off the screen when nobody is near the phone, which might be a problem, considering the small battery capacity of the smaller Pixel 4
Disassempled and looked into MotionSense APK from apkmirror. MotionSense determines country by phone number: it looks for android.telephony.extra.NETWORK_COUNTRY param to detect allowed country code. I think that can be bypassed by modifying apk but seems root needed to replace it because it looks like system app.
It's not hard to make it available in unsupported country, I'll try to unlock Soli when I get my phone and will upload here if it works
Eugnis said:
Disassempled and looked into MotionSense APK from apkmirror. MotionSense determines country by phone number: it looks for android.telephony.extra.NETWORK_COUNTRY param to detect allowed country code. I think that can be bypassed by modifying apk but seems root needed to replace it because it looks like system app.
It's not hard to make it available in unsupported country, I'll try to unlock Soli when I get my phone and will upload here if it works
Click to expand...
Click to collapse
That's encouraging. My Pixel 4XL is on back order so I have time to cancel it. Not sure about not hard to make it available if it needs root though. Then you need a working Magisk if you want NFC payments, some baning apps and for me, corporate apps like Outlook.
Eugnis said:
Disassempled and looked into MotionSense APK from apkmirror. MotionSense determines country by phone number: it looks for android.telephony.extra.NETWORK_COUNTRY param to detect allowed country code. I think that can be bypassed by modifying apk but seems root needed to replace it because it looks like system app.
It's not hard to make it available in unsupported country, I'll try to unlock Soli when I get my phone and will upload here if it works
Click to expand...
Click to collapse
Soli is disabled for now in Japan, but I was hoping that as long as I set it up without SIM it might not bother detecting the country. No go. So either trilateration or the phones sold here have this already disabled in software.
Eugnis said:
Disassempled and looked into MotionSense APK from apkmirror. MotionSense determines country by phone number: it looks for android.telephony.extra.NETWORK_COUNTRY param to detect allowed country code. I think that can be bypassed by modifying apk but seems root needed to replace it because it looks like system app.
It's not hard to make it available in unsupported country, I'll try to unlock Soli when I get my phone and will upload here if it works
Click to expand...
Click to collapse
I know how to make it works on every country, but can't build apk back (install, build is successful)
Maybe you have a secret knowledge?)
Fix is in two lines
In this article we can find function name https://www.xda-developers.com/google-pixel-4-motion-sense-list-countries-supported-apps/amp/
All what we need is change goto in default case
Xsikor said:
I know how to make it works on every country, but can't build apk back (install, build is successful)
Maybe you have a secret knowledge?)
Fix is in two lines
In this article we can find function name https://www.xda-developers.com/google-pixel-4-motion-sense-list-countries-supported-apps/amp/
All what we need is change goto in default case
Click to expand...
Click to collapse
Have you tried fixing yours ? Can you possibly make a tutorial for this ? I would really appreciate that as I will receive mine in two weeks and my country is not supported
---------- Post added at 01:01 AM ---------- Previous post was at 01:00 AM ----------
Eugnis said:
Disassempled and looked into MotionSense APK from apkmirror. MotionSense determines country by phone number: it looks for android.telephony.extra.NETWORK_COUNTRY param to detect allowed country code. I think that can be bypassed by modifying apk but seems root needed to replace it because it looks like system app.
It's not hard to make it available in unsupported country, I'll try to unlock Soli when I get my phone and will upload here if it works
Click to expand...
Click to collapse
Yes please do...we would all appreciate that
Xsikor said:
I know how to make it works on every country, but can't build apk back (install, build is successful)
Maybe you have a secret knowledge?)
Fix is in two lines
In this article we can find function name https://www.xda-developers.com/google-pixel-4-motion-sense-list-countries-supported-apps/amp/
All what we need is change goto in default case
Click to expand...
Click to collapse
Yep, and nothing secret here. Same for modified apps: After building APK, bump it's build number, sign it with your certificate and install with adb. Also you need root if this is system app (remove original motion sense apk and then install your modded). Look on xda for instructions to install modded google play store - they'll be same.
Eugnis said:
Yep, and nothing secret here. Same for modified apps: After building APK, bump it's build number, sign it with your certificate and install with adb. Also you need root if this is system app (remove original motion sense apk and then install your modded). Look on xda for instructions to install modded google play store - they'll be same.
Click to expand...
Click to collapse
It's possible to install motion sense over default system like a update without root. I try to decompile and then compile apk back by apktool, but after this can't sign apk because I don't know how.
Error when I try install by ADB is adb install dist/com.google.oslo.apk
adb: failed to install dist/com.google.oslo.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl1077585388.tmp/base.apk: Attempt to get length of null array]
This is my first time when I try to modify apk, so I don't have experience on this
Xsikor said:
It's possible to install motion sense over default system like a update without root. I try to decompile and then compile apk back by apktool, but after this can't sign apk because I don't know how.
Error when I try install by ADB is adb install dist/com.google.oslo.apk
adb: failed to install dist/com.google.oslo.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl1077585388.tmp/base.apk: Attempt to get length of null array]
This is my first time when I try to modify apk, so I don't have experience on this
Click to expand...
Click to collapse
Look here for instruction how to sign APK https://stackoverflow.com/a/40064149/3042448
Xsikor said:
It's possible to install motion sense over default system like a update without root
Click to expand...
Click to collapse
Maybe, can you try this?
AFAIK It should compare certificate of previous app with updated app (with same package name) and will show error if they're not same.
Eugnis said:
Maybe, can you try this?
AFAIK It should compare certificate of previous app with updated app (with same package name) and will show error if they're not same.
Click to expand...
Click to collapse
Nope =( can't install. So need root for first step
Code:
adb: failed to install com.google.oslo-aligned-debugSigned.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.google.oslo signatures do not match previously installed version; ignoring!]
adb uninstall do not help, it's delete only last update of motion sens
Really hoping there's a way to enable soli in all countries. Not having it making me feel left out ?
Looked one more time in MotionSense APK and looks like its developers left setting to disable country checks at all. TO do that, you just need to change android setting 'pixel.oslo.allowed_override' to '1' or 'true', modifying APK not needed.
I can't try this right now but if you want to check, then connect Pixel 4 with developer mode and execute command in adb shell:
Code:
adb shell "setprop persist.pixel.oslo.allowed_override true; setprop ctl.restart zygote"
or edit system/build.prop with some app
You still need root to do this.

Categories

Resources