Preventing app writing to xml - Java for Android App Development

Hi, I have an app that allows downloads however, after 2 downloads, I'm required to click on an ad for a few seconds to allow more downloads. I've managed to stop the ads but want to get rid of the ad click action. I've traced it to a small xml file that simply increase a value="2". Can I simply stop the app writing to this file and will that work? I've tried changing owner and permissions but the app just changes them back on run. Thanks

HsHTCsen said:
Hi, I have an app that allows downloads however, after 2 downloads, I'm required to click on an ad for a few seconds to allow more downloads. I've managed to stop the ads but want to get rid of the ad click action. I've traced it to a small xml file that simply increase a value="2". Can I simply stop the app writing to this file and will that work? I've tried changing owner and permissions but the app just changes them back on run. Thanks
Click to expand...
Click to collapse
OK this is TOTALLY wrong on 2 counts
1. You the user should not attempt to break monetization of a developers app, thats piracy/stealing and not nice at all. Also not the right community to ask in.
2. Report the app and the developer as any influence towards forced clicks on ads is against all ad policies and google play agreements
Hope that helps

Related

First andriod phone, coming from windows!

Hello everyone. I am coming from windows mobile which I have been using since 2003. I really like Android but I had a few questions and concerns.
1. I realized that apps have access to personal data and are able to access internet and dial. Should I be concerned? How can I be assured that an app developer is not after my bank info and such?
2. Why are so many apps running in the background when I haven't opened them?
I am already using advanced task killer but when i look at the apps running there's a full list even tho I didn't open them.
3. Is there a file explorer on android?
Any tips and tricks would be appreciated.
sammyluva said:
Hello everyone. I am coming from windows mobile which I have been using since 2003. I really like Android but I had a few questions and concerns.
1. I realized that apps have access to personal data and are able to access internet and dial. Should I be concerned? How can I be assured that an app developer is not after my bank info and such?
Google confirms identities of developers. Use your best judgement. Is it possible? Yes. If an app has been out for a while and has lots of high ratings then I'm inclined to trust the developer. If Google does discover malicious software in their market they have tools to remotely remove such apps from everyones phone, kinda creepy but it's there for a good reason and it's all part of the decision you make about whether to trust the platform and the community that surrounds it.
2. Why are so many apps running in the background when I haven't opened them?
I am already using advanced task killer but when i look at the apps running there's a full list even tho I didn't open them.
That's the HTC/Sprint way. Get an app called Autostarts. You will be amazed at what runs automatically and autostarts will allow you to decide what runs and when.
3. Is there a file explorer on android?
Yes. One is not included in the stock rom but they are easy enough to find.
There are Terminal Emulators which equate to cmd in win, and there are file explorers too. Root Explorer is my personal favorite.
Any tips and tricks would be appreciated.
Click to expand...
Click to collapse
elevenchars
nebenezer said:
elevenchars
Click to expand...
Click to collapse
What do u mean?
Sent from my PC36100 using XDA App
sammyluva said:
What do u mean?
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
search "10chars"
Text in quotes doesn't count...
1. Just use common sense like was said.
2. If you use the main apps that came with the phone you are fine. It can be apps you download that run in the background that hurt the battery life.
3. Astro file manager is by far my favorite app.
sammyluva said:
1. I realized that apps have access to personal data and are able to access internet and dial. Should I be concerned? How can I be assured that an app developer is not after my bank info and such?
Click to expand...
Click to collapse
How did you prevent apps on WM from accessing this info? Answer..you didn't, the fact is that WM programs are even more scary because they don't even tell you what they are accessing.
sammyluva said:
2. Why are so many apps running in the background when I haven't opened them?
I am already using advanced task killer but when i look at the apps running there's a full list even tho I didn't open them.
Click to expand...
Click to collapse
Same answer as why are so many services running on your desktop when you have no programs running. Operating systems have all kinds of services running beside the app you are watching.
sammyluva said:
3. Is there a file explorer on android?
Click to expand...
Click to collapse
Uh...did you check the program icons?
1.) As stated, doesn't hurt to check the number of DLs an App has or checking through some of the comments. Can find out if an App is giving a specific phone issues too ... thus saving you time from bothering to check it out. Trust it or don't check it out. Understandable why some people would see that and wonder ... but then again your info is already out there ...
2.) They just do. Even some **** that might not make sense, it just does for it's own reasons. Task killing can be good and bad. Or just good. Or just bad. Depending on who you ask so think on it before you decide to start murdering Apps or leaving em running.
3.) Astro File Manager is "what's up" but there are others. But that 1 is legit though.
Thanks for all those that replied but I didn't really get a satisfying answer to the first 2 questions. It seems like some of the people on here are just confused as well but are defending android in thinking that I am against the operating system. As I said in my original post I like the OS but i had some concerns that i wanted to learn more about.
Ramiss, you asked how I knew what info WM accessed? You are right they don't disclose accessing any data which means to me they are not. If they did and I found out then I could take them to court but when a company discloses that they are accessing your personal data and you agree to it then you have no say in how that info is used since you gave them permission. Also I never had an app running that I didn't open or give it permission to run in the background during my years with WM.
I have the evo since Friday and I've downloaded a couple of apps where I saw the disclosure of the kind of access these apps have and I was just thinking whats the point of having the apps if you have to worry abt it accessing important info. Then I got an email from Marketplace telling me the activities of my friends on facebook marketplace. The email went further to tell me some of the activities of my friend's friends. The point is its accessing personal data I didn't give it access to, which is scary.
I came on here to ask the people that know the OS better but it seems like there are some confused people on here. So I did a little research and found the article below which basically concurs that there is a problem with apps on android accessing personal data.
http://www.computerworld.com/s/arti...apps_pose_privacy_threat_says_security_vendor
So my question is, are there preventive ways to protect against apps using personal data? Of course other than abstaining from downloading apps. Like an app that would block access to personal data or tell a person what each app accessed and did with it. Please if you can not give an educated answer then don't reply. Thanks.
sammyluva said:
Ramiss, you asked how I knew what info WM accessed? You are right they don't disclose accessing any data which means to me they are not. If they did and I found out then I could take them to court but when a company discloses that they are accessing your personal data and you agree to it then you have no say in how that info is used since you gave them permission. Also I never had an app running that I didn't open or give it permission to run in the background during my years with WM.
So my question is, are there preventive ways to protect against apps using personal data? Of course other than abstaining from downloading apps. Like an app that would block access to personal data or tell a person what each app accessed and did with it. Please if you can not give an educated answer then don't reply. Thanks.
Click to expand...
Click to collapse
Actually my point was that Windows Mobile programs could easily access personal information, you just weren't aware of it. For example, try downloading a windows mobile program that handles your contacts (Pocket Informant comes to mind). Does the OS give you a warning that this new program will access your contacts? Not as far as I can remember! Whereas Android apps must disclose what they access, that is a rule from Google.
The way to protect an app from not accessing something is to not use it. This is the reason the access list is disclosed - so you have a choice not to continue.
As others have said you need to make your own decision based on the popularity of the app, the comments made and perhaps a quick Google search. Trust me, if an app is malicious there is a good chance you would know about it by reading the comments.
Edit: The end of that article you posted gives you the answer:
Android's security model requires that applications declare the permissions they will be using prior to installation by the user. An informed user can use these declarations to decide if they want to install an application or not, according to SMobile. However, the fact remains that there is no means available for a user to know for sure that the application they just downloaded is doing only what the user sees it doing, it said.
Click to expand...
Click to collapse

[App] PermissionDog

Hi just made an app with my friend ventrix.
PermissionDog lists all the applications you have installed and checks out what permissions each app is using.
Based on these permissions it sets how dangerous the application can be.
PermissionDog also supports realtime protection. Every time you launch an application
a notification pops up and shows how many permissions the app is using
and how dangerous that application is. (in case you missed reading the permissions when you downloaded the app).
You can exclude any app from Real Time Protection (RTP) or disable the RTP service.
It's like a really lightweight antivirus.
Please note that the application is in Beta stage.Is fully functional and hopefully bug free but needs some tweeks.
Serius updates will come to the next few days!
Android Market Link
Rate if you like.
Looks great. Are you planning a way to edit permissions, so we can retain an application and remove permissions we don't agree with.
weakwire said:
Hi just made an app with my friend ventrix.
PermissionDog lists all the applications you have installed and checks out what permissions each app is using.
Based on these permissions it sets how dangerous the application can be.
PermissionDog also supports realtime protection. Every time you launch an application
a notification pops up and shows how many permissions the app is using
and how dangerous that application is. (in case you missed reading the permissions when you downloaded the app).
You can exclude any app from Real Time Protection (RTP) or disable the RTP service.
It's like a really lightweight antivirus.
Click to expand...
Click to collapse
That's interesting... does it also pick up when an app requests additional permissions that wasn't requested when the app was launched?
PartTimeLegend said:
Looks great. Are you planning a way to edit permissions, so we can retain an application and remove permissions we don't agree with.
Click to expand...
Click to collapse
Permissions Denied does something similar to what you want, although it's not perfect
https://market.android.com/details?id=com.stericson.permissions&feature=search_result

Annoying Ads Problem

Hi!
How do I permanently block or remove all the Ads in the apps without rooting my Galaxy S4?
Buy the paid-version of the app in question.
Turn off Internet connection.
I do not believe that is possible
there is an approach of building a custom host file that redirects adds into 127.0.0.1 but you need root for that
Other options I do not know, and most probably it's best to just buy the apps you want
DemonWareXT said:
I do not believe that is possible
there is an approach of building a custom host file that redirects adds into 127.0.0.1 but you need root for that
Other options I do not know, and most probably it's best to just buy the apps you want
Click to expand...
Click to collapse
yeh but there are some apps that you cannot buy. it that way.
ads in notifications and new link in the home page.
the ads in notification can be disabled,
is there a way to stop creating new advertistin icon on the "desktop"?
thanks
Even if you are rooted, it wont work now. Adaway used to work very well but as soon as it pulled out from playstore, it doesn't work for me. It doesn't block ad.
sohebq said:
Even if you are rooted, it wont work now. Adaway used to work very well but as soon as it pulled out from playstore, it doesn't work for me. It doesn't block ad.
Click to expand...
Click to collapse
It should still work actually, at least it does for me.
It however, does not work on apps that have the adds compiled in, or cached down.
For example, Astro File manager, without adaway, it display awful adds. With adaway it only displays adds for itself, because it already knows them.

Apk copy/extracting/backing up protection

I hope that this is not the wrong place for my post.
I am trying to protect an apk from being copied/extracted/backed up off the phone and installed later, on another phone.
I have to mention that the app is not (and will not be) for sale on PlayStore or on any web store, being sold along with the phone. This is why I can not use apk protection offered by GooglePlay, which is anyway cracked at his time.
But I want to take advantages on this situation: every single phone will pass trough my hands (I will install myself the app) before hitting users. How can I use this advantage in order to protect my app?
At this time my app is not visible in Running Apps drawer, is having a default Android icon and the name is disguised in something pretty innocent. GUI access by dialing a code. No worries, is not malware but only a security app regarding GSM connection security.
Also, is running as a system app, which make it invisible for apps like Astro file manager, thus impossible to copy/back up by such file manager apps. Unfortunately there are a bunch of system app managers, that can convert a system app on user app, and then copying the apk file is easy.
I know that security sucks big time when it comes about Android OS, but I am determined to find a way to protect my app.
I know also that even a licensing scheme based on IMEI, WiFi MAC or Bluetooth MAC addresses can be bypassed by some skilled crackers. This values can be spoofed or even null.
I have tried apk encryption. Doesn't work: some apps supposed to encrypt other Android apps are actually encrypting only app libraries, not the apk file itself. By encrypting apk file, the app obviously will not work.
Code obfuscation is not an option as long the app can be duplicated off the phone and installed later on another phone.
The last idea that I had: pulling some app resources (like drawables) from a server. What do you think?
At this time I'm in a dead end. I have no more ideas how to protect my app. That's why I need your help. Can you give me please some feasible ideas, based on your huge experience?
Thank you very much for your time.
theres a thread
http://forum.xda-developers.com/showthread.php?t=2279813
where we're discussing about methods to protect apps from piracy u can post it there
Sent from my GT-S5302 using Tapatalk 2
Thanks
Thx a lot sak-venom1997.

[ROOT][HOWTO] Disable Lockscreen Ads

WARNING: I am not responsible for any bricked devices caused by attempting this howto. If you haven't read this how to twice, and fully understand the requirements, then please don't attempt it.
Introduction (not important):
First, this may not be the best way to do this, and if someone knows a better way, I'll be happy to listen.
I kinda stumbled across this solution after trying the many other ways to solve the problem, but all the other ways seemed to have something incomplete with them and ended with no ADS, but no something else, like rotating lock screens or something.
I started with the assumption that the ADS program (dtcp) can be disabled through a flag somewhere on the system, for if you pay the extra $20 you get a kindle with no ADS, but same Android build. After looking through lots of sqlite databases I found it in the com.android.providers.settings/settings.db file.
Prerequisites:
Basic knowledge of databases
SQLite Editor Pro (Free on 1Mobile Market)
DroidWall
Steps:
Open SQLite Editor
Open "Settings Storage" (com.android.providers.settings)
Open settings.db
open "global" table
Highlight entry "IS_DTCP_ENABLED"
Click the Edit Record button at the top
Change the value from a 1 to a 0
Click Save
Go back
Make same change on the "secure" table
Reboot kindle for new options to take effect.
Other Thoughts:
This just changes the value temporarily until the device checks back in with Amazon and then the value will get overridden again with the correct value. To prevent that install DroidWall and whitelist only the applications you need to access the internet. DroidWall requires root, which is why root is in the subject. But you should be doing this anyways to prevent OTA updates.
cool
Does this mean that you will now get the rotating native wallpapers that you would have if you paid for the dismissal of the ads? Currently I use adaway on my s4 hotspot and the only one I blacklist is (spectrum.s3.amazonaws.com) this has blocked updates because I am still on old software with no other blocking in place and I have noticed it also has blocked rotateing ads accept I have the same 1 at all times.
Edit: YAY !!!! and yes I now have rotating native wallpapers
Btw thank you for sharing and it is quite refreshing to see a new member join to share useful information in a well thought out and presented OP and not just join to start a thread with a question that is the heading of so many other threads that has been beat to death already..burying perfectly good information..thank you for joining us at XDA!
Awesome!!!! have been looking for a way to do this without factory reset for a while! You da man! Gonna spam that thanks button for a while lol
Thanks so much, that was easy!
Mind after a few days .2 went straight black lock screen
Anyone know what exactly I need to enable in droidwall to have internet but no ota updates or Amazon changing the lock screen back to ads?
Uhg
This mod works fine. No ads, rotating wallpapers appear every time. No reversion to black screen. No need for Droidwall. Use of Droidwall is impractical for this purpose. Who knows what not to include in some giant white list?
It appears that the wallpapers will continue to appear without reversion if you have blocked updates using the root kit.
earlgrey_44 said:
This mod works fine. No ads, rotating wallpapers appear every time. No reversion to black screen. No need for Droidwall. Use of Droidwall is impractical for this purpose. Who knows what not to include in some giant white list?
It appears that the wallpapers will continue to appear without reversion if you have blocked updates using the root kit.
Click to expand...
Click to collapse
Sorry, what's the root kit?
dras99 said:
Sorry, what's the root kit?
Click to expand...
Click to collapse
First link in this post:
http://forum.xda-developers.com/showpost.php?p=53451623&postcount=3
I assume the block update action from the rootkit is responsible for the lack of reversion to ads since I haven't done anything else except the steps I outlined in the post and the data base tweaks explained above. My kindle has been running for 5 days now without ads and with the startup wallpaper.
earlgrey_44 said:
First link in this post:
http://forum.xda-developers.com/showpost.php?p=53451623&postcount=3
I assume the block update action from the rootkit is responsible for the lack of reversion to ads since I haven't done anything else except the steps I outlined in the post and the data base tweaks explained above. My kindle has been running for 5 days now without ads and with the startup wallpaper.
Click to expand...
Click to collapse
I also blocked updates with the root kit. Then I followed this tutorial and it worked great however it did revert back to adds after a reboot or 2.
conan1600 said:
I also blocked updates with the root kit. Then I followed this tutorial and it worked great however it did revert back to adds after a reboot or 2.
Click to expand...
Click to collapse
Strange! What's different about my install I wonder?
earlgrey_44 said:
Strange! What's different about my install I wonder?
Click to expand...
Click to collapse
I'm left scratching my head over that as well. Tomorrow I will re run the ota block script as I'm now concerned that it perhaps did not do something correctly. I did check for updates and it says last update failed but better safe than sorry. I DO NOT want to end up getting updated again. I finally have this tablet running rather nicely and am quite satisfied with most aspects. Still need much more customization options but it's serviceable now. And this tablet has always had the best touch input response of any I've ever used. I'd hate to have to throw it back in the closet.
I am getting now BLACK SCREENS. Any way to change this?
Script
For anyone who wants to run this from command line (e.g. on reboot or network change event) you can create a script like below and use SManager to run it periodically. You will first need to install sqlite3 binary (google "SQLite Installer for Root").
Here is the script that needs to be executed as root:
Code:
#!/system/bin/sh
sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update global SET value='0' where name='IS_DTCP_ENABLED'";
sqlite3 -batch /data/data/com.android.providers.settings/databases/settings.db "update secure SET value='0' where name='IS_DTCP_ENABLED'";

Categories

Resources