Hi,
Anybody seen any actual implementations of a more secure permissions model for Android? That is, patched and compiled a kernel, used it in a custom ROM or anything like that?
A little background information:
The very first time, I tried to install an app from the Market, I was stunned to find the lack of options, in regard to which permissions I wanted to grant a certain app, when installed. It is all or nothing - "That can't be true?!", I said to myself, so I went looking for a way to control, which permissions were granted to an app, only to find out, that it's simply not possible (yes, I know you can hack the .apk, but that's besides the point here, and not very user friendly).
The solution (to be?):
While searching the net on this issue, I came across a paper written by a couple of Software Engineers, which seems quite interesting, and just about the perfect solution for my problem. However, I can't find any actual implementations on this - whether the authors didn't make any, or just didn't release it, I cannot say.
The paper I'm referring to, can be found here:
http://recluze.files.wordpress.com/2007/06/and-usage-nauman10.pdf
And another paper here:
http://www.list.gmu.edu/zhang/pub/asiaccs10-apex.pdf
After reading the papers, I went "OMG, that's freaking awesome! Where can I get that?" - So does anyone know something about this? Anything? Work-in-progress perhaps?
I'm very attracted to Android, being the number one open source mobile operating system, but the lack of security features is holding me back somewhat.
There's already posted an issue about this on Google Code - I urge everyone to go and put up a vote for this issue (login, and scroll to the bottom), in order to put some focus on it.
http://code.google.com/p/android/issues/detail?id=6266
In the meantime - anybody know of any patches?
Best regards,
Michael
I've seen a couple posts regarding getting Google Wallet to work (and hopefully I'm not being redundant with this post). I've had Google Wallet working on my own 2.3.5 source ROM for quite some time now and I figured I'd share what got it working for me. As a matter of disclosure, I do have the 4G, but I haven't seen anything in the code that would give reason for why this wouldn't work.
While I'm able to build a ROM, I for some reason, don't know how to put together a flashable update. Maybe somebody with a little more know-how can piece this together and try it out, or at least tell me I'm wrong.
Files needed from the GWK74 ROM:
system/etc/permissions/com.google.android.nfc_extras.xml
(I just added the permission entry to the existing com.android.nfc_extras.xml file instead to keep the clutter down).
system/framework/com.android.nfc_extras.jar
The version in the GWK74 ROM contains code that has yet to be released, since korg is down and all. The extra file has something to do with NFC emulation, but I've only glanced at it, so I really couldn't tell you what it does.
system/app/Wallet.apk
Obviously.
Here's the catch: The Wallet app requires permissions from Nfc.apk (NFCEE_ADMIN). By default, the Nfc.apk is signed with the "platform" key, but as long as these two files are signed with the same key, it will grant it the proper permissions to Wallet.apk no matter what key that may happen to be. Considering that Nfc.apk also requests other permissions from "platform" as well, certificate consistency would be advisable.
Hope this works out or at the very least, gets the ball rolling.
Hopefully, someone can make like a flashable zip for CM7 or at least let us know which files need to be copied to our GSM phones so we can extract those files and copy it to system
do you mind zipping up the files used and posting them here?
They're basically the stock files from GWK74 with Wallet.apk and Nfc.apk signed with the same key. My only concern is that since I've used a private key on my own ROM for a while now, I don't remember/know how many or which non-stock ROMs are signed with anything other than the testkeys or which key would be the best for (most) everyone. If the testkeys work universally, I could do that, but I'd hate for someone with differing platform keys getting upset that it's still doing the same FC as before.
For those familiar with using the Android Kitchen, it can do the signing and packaging with testkeys if you're willing to reflash. Might be an easier step for some to take if the command line method seems overwhelming.
As far as Google Wallet working on a GSM Nexus S. I believe there is more protection than it appears. I firmly believe Google has not only modified the NFC drivers and added NFC security to both the drivers and the Firmware. But I also think they added security to the rils and network checks.
How did I get to these conclusions? Well I actually ported the whole NS4G rom over to the GSM. The only things I really had to change were ril libs and the build.prop. Everything else is pretty similar between the two phones. NFC worked and I was able to start up Google Wallet, however, when attempting to add a card to Google Wallet, it kept loading for like 10 minutes until it gave an error. No real description of the error and logcats revealing nothing. Taking out my sim card, I was greeted with a message in Google Wallet that I should check my sim card and insert it if its not inserted. Why would Google Wallet even have anything to do with carriers even connected to wifi? There must be some other things added.
Then I went ahead and decided to revert to a backup of my CM7. I noticed NFC no longer would turn on, it kept giving me an error. Looking at a logcat it looked like it was trying to download and install firmware but failed. Other NS4G users have experienced this same error. Logcats show that it is downloading firmware but failing to be able to install it. My theory: Google added extra security to the firmware located directly onto the NFC chip itself. So now no ROMs (including the new 2.3.6) give me working NFC except for that 2.3.7 rom. I'm still working on trying to fix.
Now I am happy you posted this thread, because maybe if I backport these additions to a GSM rom I might be able to fix NFC. I'm not sure as of yet. I am going to attempt Odin next, but I can already guarantee Formatting System, Boot, Cache, Data did not resolve the issue.
They definitely added something to the firmware. After flashing GWK74 nfc no longer works on 2.3.5. If I flash back to GWK74 it works no problem.
Sent from my Nexus S 4G using xda premium
U could test that driver theory with a chip that hasnt gotten the 2.3.7 update.
apreichner said:
As far as Google Wallet working on a GSM Nexus S. I believe there is more protection than it appears. I firmly believe Google has not only modified the NFC drivers and added NFC security to both the drivers and the Firmware. But I also think they added security to the rils and network checks.
How did I get to these conclusions? Well I actually ported the whole NS4G rom over to the GSM. The only things I really had to change were ril libs and the build.prop. Everything else is pretty similar between the two phones. NFC worked and I was able to start up Google Wallet, however, when attempting to add a card to Google Wallet, it kept loading for like 10 minutes until it gave an error. No real description of the error and logcats revealing nothing. Taking out my sim card, I was greeted with a message in Google Wallet that I should check my sim card and insert it if its not inserted. Why would Google Wallet even have anything to do with carriers even connected to wifi? There must be some other things added.
Then I went ahead and decided to revert to a backup of my CM7. I noticed NFC no longer would turn on, it kept giving me an error. Looking at a logcat it looked like it was trying to download and install firmware but failed. Other NS4G users have experienced this same error. Logcats show that it is downloading firmware but failing to be able to install it. My theory: Google added extra security to the firmware located directly onto the NFC chip itself. So now no ROMs (including the new 2.3.6) give me working NFC except for that 2.3.7 rom. I'm still working on trying to fix.
Now I am happy you posted this thread, because maybe if I backport these additions to a GSM rom I might be able to fix NFC. I'm not sure as of yet. I am going to attempt Odin next, but I can already guarantee Formatting System, Boot, Cache, Data did not resolve the issue.
Click to expand...
Click to collapse
Thanks for chiming in. Appreciate the info
Hmm, that's odd because aside from those three files and the vendor binaries, everything else on my ROM is from the 2.3.5 source files (since I don't have a choice for source files, really). The first thing I tried when Wallet was giving me fits was to poke around the APKs to see if they were holding any additional files, but I didn't locate any in Wallet and the NFC app file is too small to hold any additional files (and doesn't, since I checked anyway). The 2.3.7 nfc_extras JAR file only contains three java files (compared to the two from 2.3.5) so I don't suspect anything warranting investigation.
It's hard to imagine Google going through so much trouble to block their own product on their own phone. Unfortunately, I don't have access to a non-Sprint Nexus S, so I cannot account for the SIM message you experienced, but the hardware vendor for the NFC component appears to be the same (NXP) for both phones and it just doesn't make sense for them to use two different components for the same model of nearly identical phones. I'll try using the libpn544_fw.so binary from the standard crespo and see what kind of (ill) effects I experience.
I did notice during my trial-and-error period that the error messages and the manner in which they would show up seemed to vary slightly. Adding the JAR file alleviated the persistent com.google.android.apps.walletnfcrel FC during startup and use. After that, the signing took care of the persistent 'insufficient system privileges' (or something to that effect) on startup.
I'd be interested in what is in your log readout. Personally, logcat gets visually overwhelming to me, so I just use ddms to filter out the other processes and error messages from obfuscating what I'm looking for. The thing that Wallet is trying to access is NFC permissions, which Nfc.apk appears to have sole (or at least primary) responsibility for. All of the protests coming from Wallet that I observed were related to its inability to be granted permissions from Nfc for NFCEE_ADMIN, which is specified in its AndroidManifest file as being under protectionLevel="signature", of which it is assigned to "platform" by default. That would explain why people with the stock ROM can get it to work, since it still retains the Google signature keys structure. I suspect most of the alternative ROMs are running some varying key structure, but that is just speculation on my part. I suppose modifying the AndroidManifest file to explicitly give permission to Wallet would also address that, but at the time, I considered that unnecessarily tedious.
I'm still betting on certificate-connected privileges being the primary culprit, but I'll give the NFC binary file a run and see what happens.
Update:
Ran with the libpn544_fw.so from crespo and Wallet initially FCed. I pulled the file through ADB first to make sure it was the one installed and it was, but after the FC, I pulled the file again and it was the regular one for crespo4g. So, unless I misread it or made a mistake somewhere, something is replacing the file. I pushed the original file back, ran it, and pulled it again and it seemed to stick, but I suspect it's running from cache. So basically, it appears that the binary from crespo is insufficient, as I got numerous errors in ddms as a result. I don't know if it has the same effect both ways though. Has anybody tried the crespo4g NXP binary yet with any luck?
Also, I do apologize for some misinformation earlier. The 2.3.7 NfcGoogle.apk does contain a libnfc_jni.so file, but it's already in system/lib, so I don't know if that has to do with anything relevant.
Need some help i get this error message when i push the files to newest Cm7 nightly based on 2.3.7. Any ideas?
XK72 said:
It's hard to imagine Google going through so much trouble to block their own product on their own phone.
Click to expand...
Click to collapse
Well keep in mind it's not just Google that's involved, but MasterCard, Citi, MoneyNet or whatever that service is that processes the transactions... they may have mandated that some extra security measures be taken to keep the initial rollout limited to a relatively small specific group.
david279 said:
Need some help i get this error message when i push the files to newest Cm7 nightly based on 2.3.7. Any ideas?
Click to expand...
Click to collapse
I encountered the same issue a while back. It's related to the signature keys on Wallet, which is signed with Google's key out of the box. If the rest of your build is signed with testkeys (which appears to be the case), you can resolve that by signing Wallet.apk with testkeys as well.
tobiasly said:
Well keep in mind it's not just Google that's involved, but MasterCard, Citi, MoneyNet or whatever that service is that processes the transactions... they may have mandated that some extra security measures be taken to keep the initial rollout limited to a relatively small specific group.
Click to expand...
Click to collapse
While Google Wallet is a proprietary application, and as such, Google or the forces that be could possibly be responsible for what's occurring and I wouldn't be able to discern whether or not that is true, I personally don't believe that is the reason behind what is happening.
(This is just as I understand it). There certainly are security measures in place for NFC, which the Android system is responsible for handling. The Wallet app is essentially an interface that is PIN secured on the user end and requests relevant permission from Nfc.apk that manages interaction with the NFC-related subset on its behalf. If anything, the credit card companies are concerned with unauthorized transmissions that could result in financial liability on their end. The fact that Wallet requires signature-protected permission authorization from Nfc to access the NFC element shows that Android is not leaving security duties up to the Wallet app alone.
I think the hindrances in getting this to work for everyone is that the people who could develop a fix probably don't have access to the Nexus S hardware variants. I started with the same or similar issues that people faced when trying to incorporate Wallet into their build and eventually got it to work on a 2.3.5 sourced build was the steps above, but I also don't own a standard Nexus S for me to test with, so I couldn't proclaim that it was a definitive fix. I was hoping, at the very least, that it might be contributive towards finding a fix for everyone.
XK72 said:
I encountered the same issue a while back. It's related to the signature keys on Wallet, which is signed with Google's key out of the box. If the rest of your build is signed with testkeys (which appears to be the case), you can resolve that by signing Wallet.apk with testkeys as well.
Click to expand...
Click to collapse
How do I sign apks? Can you send me a wallet apk signed with test keys?
Sent from my Nexus S 4G using xda premium
---------- Post added at 06:03 PM ---------- Previous post was at 05:39 PM ----------
Ok i found a app in the market for signing apks, zips, etc. but im getting the same error.
XK72 said:
While Google Wallet is a proprietary application, and as such, Google or the forces that be could possibly be responsible for what's occurring and I wouldn't be able to discern whether or not that is true, I personally don't believe that is the reason behind what is happening.
(This is just as I understand it). There certainly are security measures in place for NFC, which the Android system is responsible for handling. The Wallet app is essentially an interface that is PIN secured on the user end and requests relevant permission from Nfc.apk that manages interaction with the NFC-related subset on its behalf. If anything, the credit card companies are concerned with unauthorized transmissions that could result in financial liability on their end. The fact that Wallet requires signature-protected permission authorization from Nfc to access the NFC element shows that Android is not leaving security duties up to the Wallet app alone.
I think the hindrances in getting this to work for everyone is that the people who could develop a fix probably don't have access to the Nexus S hardware variants. I started with the same or similar issues that people faced when trying to incorporate Wallet into their build and eventually got it to work on a 2.3.5 sourced build was the steps above, but I also don't own a standard Nexus S for me to test with, so I couldn't proclaim that it was a definitive fix. I was hoping, at the very least, that it might be contributive towards finding a fix for everyone.
Click to expand...
Click to collapse
I will attempt to port it over. Good news is there's some 2.3.7 source available now to build with. I don't have much hope though because a full port didn't even work on a GSM device. Although newer libs might help.
Sent from my Nexus S using xda premium
apreichner said:
I will attempt to port it over. Good news is there's some 2.3.7 source available now to build with. I don't have much hope though because a full port didn't even work on a GSM device. Although newer libs might help.
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
Do you know where they're hosting the 2.3.7 source? I just realized that they released the 2.3.7 binaries for both crespo and crespo4g, so between those two, there really shouldn't be anything else getting in the way of making this work.
Here: http://forum.xda-developers.com/showthread.php?t=1284517
People are reporting that Wallet works just fine on I902x phones and stock rooted 2.3.6. I'm only one there unable to add prepaid card. Guess it's because my IMEI is generic, and i'm pretty sure that google is using IMEIs for authentication and similar processes...
One factor may be branch of code. In build numbers, the letters have meanings. First letter is Android version (G for Gingerbread). Second letter is branch. Usually this is R for Release. The build for NS4G is W. I don't know what this W branch is. Maybe special "Wallet" branch.
http://source.android.com/source/build-numbers.html
Sent from my Nexus S using XDA App
I finally got the OTA update to upgrade my Republic Wireless Moto G from 4.4.2 to 4.4.4. Thought to save the package for whoever wants it. Just for verification, I received it today, 1/26/15, and copied it directly from my /cache folder. No modifications were made (not even the file name).
I don't know what anyone could use it for but it's all yours. It's currently hosted on my Google Drive but feel free to let me know if there's a better place to host it or if the account's bandwidth is used up.
Things I imagine it being useful for things such as trying to port Republic Wireless to Sprint or other Moto G's, figuring out how Republic Wireless sets up the whole system, a fresh start for users who killed their phones, etc.
Of course, it might not even be able to be manually installed, though I'd think using the stock bootloader would be the best bet.
It might just be good etiquette, but I'd also appreciate you referring to this thread if/when you share the .zip with someone or work with it, as it seems like I'm the only one who's done this and I'd appreciate just a smudge of recognition if it leads to anything important.
Zip file:
https://drive.google.com/file/d/0B9AzIzZ3983SUXdQVFhhaVFHV0E/view?usp=sharing
Edit: Also, if someone happens to have a Sprint Moto G lying around and doesn't care what happens to it, I think it would be in a lot of people's interests for you to try and flash the update, and then report back on it.
rino757 said:
I finally got the OTA update to upgrade my Republic Wireless Moto G from 4.4.2 to 4.4.4. Thought to save the package for whoever wants it. Just for verification, I received it today, 1/26/15, and copied it directly from my /cache folder. No modifications were made (not even the file name).
I don't know what anyone could use it for but it's all yours. It's currently hosted on my Google Drive but feel free to let me know if there's a better place to host it or if the account's bandwidth is used up.
Things I imagine it being useful for things such as trying to port Republic Wireless to Sprint or other Moto G's, figuring out how Republic Wireless sets up the whole system, a fresh start for users who killed their phones, etc.
Of course, it might not even be able to be manually installed, though I'd think using the stock bootloader would be the best bet.
It might just be good etiquette, but I'd also appreciate you referring to this thread if/when you share the .zip with someone or work with it, as it seems like I'm the only one who's done this and I'd appreciate just a smudge of recognition if it leads to anything important.
Zip file:
https://drive.google.com/file/d/0B9AzIzZ3983SUXdQVFhhaVFHV0E/view?usp=sharing
Edit: Also, if someone happens to have a Sprint Moto G lying around and doesn't care what happens to it, I think it would be in a lot of people's interests for you to try and flash the update, and then report back on it.
Click to expand...
Click to collapse
Did anyone try flashing this on a non RW phone?
rino757 said:
I finally got the OTA update to upgrade my Republic Wireless Moto G from 4.4.2 to 4.4.4. Thought to save the package for whoever wants it. Just for verification, I received it today, 1/26/15, and copied it directly from my /cache folder. No modifications were made (not even the file name).
I don't know what anyone could use it for but it's all yours. It's currently hosted on my Google Drive but feel free to let me know if there's a better place to host it or if the account's bandwidth is used up.
Things I imagine it being useful for things such as trying to port Republic Wireless to Sprint or other Moto G's, figuring out how Republic Wireless sets up the whole system, a fresh start for users who killed their phones, etc.
Of course, it might not even be able to be manually installed, though I'd think using the stock bootloader would be the best bet.
It might just be good etiquette, but I'd also appreciate you referring to this thread if/when you share the .zip with someone or work with it, as it seems like I'm the only one who's done this and I'd appreciate just a smudge of recognition if it leads to anything important.
Zip file:
https://drive.google.com/file/d/0B9AzIzZ3983SUXdQVFhhaVFHV0E/view?usp=sharing
Edit: Also, if someone happens to have a Sprint Moto G lying around and doesn't care what happens to it, I think it would be in a lot of people's interests for you to try and flash the update, and then report back on it.
Click to expand...
Click to collapse
File was removed... Do u still have that file? I wanted to use it with a port tool I found...
So just got my hands on one of these. One thing I noticed/realized that would be a big deal for my intended usage is being able to enable multi-user functionality so each person that uses it can log in to their own profile.
So far on researching I have seen very little discussion on this matter. At best I see no option in the stock rom and no mentions in third party roms. If this is indeed available in third party roms I would not be averse to giving them a shot. I have also seen build.prop edits to enable that and they seem to be the same edit across devices so I'm assuming it is a standard android thing. I haven't had a chance yet to root my Player but is there a chance adding these build.prop options could also work on the stock rom?
Thoughts? Btw, I have already updated to Marshmallow however I did find a post around here that seems to indicate it is still relatively easy to root so once I get time today I am going to go down that route regardless.
I've seen a workaround that has you side-load gmail apk onto the nexus player, which in turn lets you add an account. Then, there are some apps that check for multiple accounts. Haven't tried yet, I think it might no longer work with YouTube like it used to.
Let's get this escalated to google - star this issue to get it some attention.
https://code.google.com/p/android/issues/detail?id=170121
I would really like some info on this! cr08 if you are going to mention builprop edits please at least consider linking the info you refer to haha thanks!
I don't know if you've heard and/or even know what I might be talking about, but apparently Google is going to be releasing some impressive updates to their apps within the next couple of months; called "Feature Drop(s)". You can find out more about it either by Google searching it or here like I did: source (https://www.theverge.com/2019/12/9/...bocall-screening-portrait-mode-duo-video-call)
Now, I’m practically drooling over some of the planned updates; but no more so than for the automatic robocall screening! I even apply it whenever I can when any number that’s not in my phonebook calls. It has always been my gripe that this wasn’t automatic and anyone that talks to the “screener” are the only ones that get through! But, apparently the great minds at Google figured things out…! Now, if only it were possible to get it to our Ol’ Faithful or our taimen/walleye, sooner than later…..
I know there had been ways of getting something from the newer Pixels (dark mode, camera, Assistant, etc.) and it might’ve been as easy as installing the .apk…
I highly doubt it were to be as easy as merely installing an .apk that’s from a Pixel 4, but……
In any case, any and all are free to chime in…
And, in any case, I guess you can also consider this a plea to anyone that can make this happen – whether it’s offering their stock .apk and/or a modified one and/or a method to obtain this app/feature…
Thanks in advanced!
UPDATE
Well...for those who might be interested....apparently it's already in the works from Google -- source: Pixel's Automatic Call Screen comes to older models soon - 9to5Google -- so I guess I'm calling out to anyone that might be able to get it to our taimen/walleye even before the official "rollout"...