Like the title says why are apps allowed to read the contents of files on the SD card without asking permission? Apps have to ask to read SMS, Calendar, and everything else. It seems like a huge security hole to me. Thoughts?
Anybody? No thoughts or reasons at all?
I believe that there's nothing secure that can be read from the SD card without explicit permissions. You need WRITE_SECURE_SETTINGS to read secure settings... all your calendar data and so forth are either outside the handset or stored securely... etc.
However, I'm not an Android developer --
SD card functions as a storage device. So writing files on it should not require permissions. Only access to certain files/apps have to require permissions.
Have you tried fixing permissions? Don't know if it will work but its worth a try I guess.
To me it just seems like a security risk but then I guess Windows software allows the same thing and nothing can stop from reading contents of the hard drive. Still seems unsecure though that any platform, mobile or non-mobile would allow this behavior.
Related
I have just purchased an X10mini pro and have been playing around with it today. I was wondering if apps are always installed on the card, or are they sometimes installed on the phones memory? How do I change the default location of where apps are installed?
From what I gather Linux based distros are different in that they don't have a registry etc. When an app is run is it purely from the .apk location or are different files from the app copied to different locations when the app is installed?
They're pretty much universally installed to the phones memory though some software will install additional data to sd. It's an unfortunate limitation of Android 1.6, if an when we get 2.2 this'll change. On a rooted phone there should be ways around this but I haven't looked into it personally.
Ok thanks for clearing that up. I have now rooted my phone and see that the default location for apps is /system/app/. Does everything to do with the program just reside there (like a portable app) or are program libraries etc copied to other locations within the phone? For things like email programs where do they store the individual emails?
/system/app/ contains all the "system" applications (i.e. the stuff that's pre-installed on the phone) - you can't usually change these, unless you've got root access
/data/ is the user writeable section of the phone's memory - /data/app/ is where the stuff you install goes, along with the data any running apps save (unless they're specifically programmed to save stuff to the sd card instead)
So the email program at /system/app/ Email.apk where does that store it's emails? Does it store the emails in /data/ or somewhere else? What about browser cache, where is that stored?
Does anyone know where I can download a guide on file structure to try and understand what exactly does what?
I would like to know what is stored on the NT when you register with BN and where it is stored. I have tried several of the rooting procedures and mods. I have bricked three times and registered numerous times. I feel there will be a flag at some point that I am registering over and over.
This information does not seem to be included in the CWM backups. Any help?
Thanks for listening
(yes; I searched but no love) - flame on!
The reason I care is I was given the NT and several books and can't access the books without registering. DRM daemon!
If you are looking for a way to bypass registration on stock, there is a youtube video for that (by albert wertz I believe, but you might want to check me on that). However, there is no way to register later, but one of the devs might know the answer to where that info is stored so you can edit it manually. I think ypur best bet is a custom rom like cm7 or cm9.
Sent from my TARDIS.
Thanks for the info. I know how to skip registration but can't access the books that way.
I want to capture the stored info and apply when I wish.
Check the mentioned videos and you will find a way to register after having skipped.
I believe it was anycut shortcut to obo.
I am 95% that what you're looking for is the data stored in /data/system/accounts.db, which has entries for device and user of type com.bn.authentication device and user respectively as well as for com.google.
My memory is that on the NC, restoring the accounts.db file after skipping OOBE permitted me to access my library via the BN apps without reregistering the device.
And I know that if you make the mistake of issuing an erase and deregister command on the NC followed by a reinstall from a nandroid backup, you wind up with a device that will, a few minutes after connecting to wifi, erase and deregister itself automagically.
I finally realized that what was happening was that I'd told BN I wanted to reset my registration flag via the deregister command, but that I'd then restored an active registration token; the mismatch meant that my NC needed to be wiped.
Later on, I realized that if I skipped OOBE I could use Titanium to do a restore and after reboot I had access to my library, without reregistration.
I think I actually tested simply restoring the database on a freshly imaged (from stock) device at one point and was able to access my stuff.
Thank you very much for that advice. That is exactly what I was looking for.
Using anycut and trial and error you can register if you skipped it. anycut new activity and scroll down to oobe-there are a lot of them the one you want its about ten down. Pick anover try it, rinse repeat until you get to the original out of box screen. Then you can proceed and register.
Hi
I will be passing on my company phone for someone else to use for couple of weeks, and I am having some privacy concerns about it. I have already transferred all images/videos from the phone's ext SD card, but now I am worried of how I can securely erase the data. I don't wanna buy a new SD card just for this, so I was wondering if there is any way to safely erase/destroy those data.
For starters, I got my self 'secure file deletion' from play store, which allows to wipe off selected data off the phone memory and the external card. Which I did. Images/videos are stored under:
/storage/extSdCard/DCIM/Camera
But after wiping those off, I realised that not all image/video data is cleaned off. The OS also stores thumbnails for those media. Surprisingly, those are stored in phone memory and location can't be changed:
/storage/sdcard0/DCIM/.thumbnails
In there, there are .JPGs (thumbnails) and a strange '.thumbdataXXXX' file. So, I use 'secure file deletion' to remove those as well. Funny thing is that even after erasing those, I can still see the thumbnails of the corresponding video/image (but when I select it, it says 'file not found' - which is expected, because its already been wiped). Nevertheless, my guess is that the thumbnails of those videos/images are also cached elsewhere. But where?
My question is - is that all there is to it? Is the OS storing any more related data in regard to images/videos that I need to wipe? Are those actions I have taken enough to give me peace of mind that my media are safely wiped off beyond recovery?
I found that the secure deletion apps are very few, most of them require root and most even don't work properly (e.g. files reappearing after wipe etc). There are some good ones like 'ishredder 3 pro' and 'clean master' that offer secure wipe options - but only for wiping off entire phone/card memory - which is not what I want here. Any more suggestions?
The phone is a non-rooted Samsung with 4.1.2 Android OS on it. I don't wanna root the phone and I don't want to wipe entire ext card - so any suggestions, please bear that in mind.
Makes me wondering why there isn't any build-in function to the OS for secure deletion of files? Sure it would be slower and not everyone would applaud it, but it could be enabled on demand e.g. via Developer Options...
ta!
I have also noticed, that ever since I started using 'secure file deletion', when I connect via USB to copy files from the extSD to the PC, I get "device not connected" errors every few files I copy. Then, I have to use 'enable usb debugging' (from Dev Options) in order to get the device to show up again.
Any thoughts on my initial queries will be most appreciated. Someone must have noticed those issues. Perhaps they are not specific to 4.1.2 but maybe other versions of the OS...
jstoner said:
Funny thing is that even after erasing those, I can still see the thumbnails of the corresponding video/image (but when I select it, it says 'file not found' - which is expected, because its already been wiped)
Click to expand...
Click to collapse
Just another observation regarding this. If I go into File Manager and nagivate to "/storage/extSdCard/DCIM/Camera" and then go back to Gallery, then the thumbs of videos that are already deleted don't show up. That's a workaround for refreshing the cache (without having to do a full restart).
Anyone noticed those issues, or is it just me???
NOTE:
This is a very basic guide only for newbies like me.
I'm not a developer or something even near to that. All information provided here is copied from different sources and according to the best of my knowledge. I'll not be responsible for any harm to you or your device. Try it on your own risk.
Any additions or corrections are welcomed.
Note: Unlocking Bootloader and Rooting breaks "Verified Boot". It can be dangerous.
Unlocking bootloader:
Disables signature checking of boot image and recovery image
Allows all fastboot commands to be executed
Zeros out /data partition i.e. filesystem is erased and then regenerated on next boot
To know further: BOOT PROCESS: ANDROID vs. LINUX
As compared to iOS, Android is considered less secure OS because it's an open source project and a large number of developers are involved contrary to iOS where things are kept secret. We can face two types of threats regarding mobile security:
Data theft or loss when using mobile phone.
Different types of malware (spyware, adware, bloatware, ransomware, worms, trojans, virus, cookies) or a hacker can directly attack your device to gain access to your personal data like contacts, pictures, credit card information or even can note your habits and then forcefully show you ads etc. Sometimes the purpose is just to harm you, rather than having some benefit. To avoid this:
Keep your phone as simple as possible. Avoid installing apps from unknown sources particularly KeyGens and cracked / pirated / hacked apps and MODs offered free of cost. Use an app store like PlayStore to install apps which provide security somewhat.
Some stock ROMs (manufacturer's operating systems) contain bloatware (unnecessary and suspicious apps) running as an app or in background. Try removing as much of these as possible by uninstalling or freezing or at least restrict their permissions and internet access.
In Android 6 and above, apps ask for permissions from user when run first time. Allow for these permissions carefully. Check your list of apps auto-starting up and running in background as well as accessing storage and phone / sms etc.
Permission regarded as "Normal" by Android cannot be revoked by simple means e.g. you can restrict an app's INTERNET permission. Either use a third party trustworthy permission manager or at least review the list of permissions requested by an app at install time.
Use some firewall app like AFWall+ to block hidden internet access of apps to internet.
If your phone is rooted, try to avoid granting root access to as less apps as possible particularly those from uncertain sources.
Use some anti-malware or commonly known antivirus app in mobile phone which can scan and filter apps, attachments, links, emails, sms and webpages etc. There are numerous paid and free apps available for the purpose, though most of them are themselves promoting some kind of malware for business purpose. av-test.org is a good place to start with selection.
Data theft or loss when phone is lost or stolen
In this thread I'm focussing this part and giving here a few technical tips and measures you should always take that can help you keep your data, device and yourself safe in case if your device is LOST or in case of THEFT. Otherwise your device and your data can be accessed and misused.
The very first vulnerability of our data to theft and misuse starts with the Unlocking of BootLoader which is locked by default for security on most of the new devices. Unlocking BL makes it easy to flash custom recoveries, kernels and ROMs. That's why, the internal storage can be accessed from any custom recovery or device is factory reset or new OS can be installed for a fresh use. Therefore vendors are making it harder and harder to unlock BL without proper authorization. Personal data is also prone to wrong hands due to insufficient security measures on device as explained below:
DATA PRIVACY
Always keep Screen Lock enabled (with PIN or Password or Pattern).
But keep in mind, this option alone is of no use. It takes only a minute or two to remove screen lock protection if a custom recovery is installed or BL is unlocked / unlockable.
Always use Internal Memory of Phone to store personal data like pictures, contacts etc.
External memory (SD cards) can be removed from device and easily accessed from computer or other devices. They aren't erased usually in case an app tries to erase data in case of theft. Also, Android doesn't offer encryption of SD cards by default. A few custom ROMs offer this feature or you have to use a third part app for encryption. Built-in kernel module dm-crypt is used by AOSP for full disk encryption (FDE). A similar service is needed which auto-mounts your memory card at OS boot. Good examples of encryption at filesystem level are EncFS and CryFS which offer a stackable transparent encryption with virtual filesystem. An easy way to implement EncFS on Android 5- is explained here.
However, in Android 6.0 and above, external memory swapping with internal memory is offered called adoptable storage. That's relatively more secure because it makes SD card not readable by other devices (at least not easily).
Old Devices with Low Internal Memory - in this case instead of putting personal data on SD card, try using SD card's 2nd partition to link apps & their data to SD card by Link2SD and keep your personal data on internal memory.
However, Link2SD may slow down your device or can be a battery hog. In this case, use Third Party Encryption apps to encrypt your targeted data instead of encrypting whole /data partition. There are numerous apps like KeepSafe which is more useful if you combine encryption with cloud backup or online synchronization. However, be careful while selecting app. The app can fail to protect your data online or it can itself misuse your data. Otherwise, any app like ES Explorer or Solid Explorer can be used to keep data encrypted.
In case of third party encryption software, you must be extra conscious of your data. Sometimes sensitive data is hidden (apps data or due to .nomedia) like WhatsApp Sent folders. You have to take care of all this manually. It's really a hectic job.
Encrypt Internal Memory (particularly if BL is unlocked).
It's because and attempt to unlock BL erases all personal data on internal memory (not external SD card). However, it may not always be true. So keeping Internal Memory Encrypted always promises more security. An un-encrypted internal memory can be easily accessed from custom recovery.
Performing these steps makes your data quite secure and not vulnerable to easy access.
DATA PROTECTION
Data Recoverable - use local / online backup of your data. Read here how to do that.
Wiping Data
Bootloader Locked - so that there is no chance of flashing custom recovery and then accessing data from there or through ADB. As stated above, unlocking BL will erase data but it's not always true. So, this option alone cannot be relied on.
There are chances of wiping data if you use some anti-theft app. Android Device Manager (ADM) is a built-in app on all Android devices that suffices the basic needs of an anti-theft app. A Google account on device is mandatory and ADM must be enabled from settings i.e. Device Administrator. You can use Google Find My Device anytime to Locate (Location services should be enabled on device), Play Sound, Lock or Erase your device. Obviously, device should be connected to internet for ADM to work.
However, you may use any third party app with rich features (also SMS based).
Rendering Data Useless - as stated above, using Encrypted Internal Memory only for personal data makes it secure and hard to read by others, even useless.
DEVICE SECURITY
Device Recoverable
As stated above, there are chances of device recovery if you use some anti-theft app.
Keep your phone's IMEI number safe. Your Mobile Network Operator along with the help of police can trace your device whenever it's switched on unless its IMEI is tempered.
Rendering Device Useless
Bootloader Locked - so that there is no chance of flashing custom recovery and then flashing new ROM.
OEM Unlocking disabled - so that Bootloader can't be unlocked without proper authorization.
It can be disabled from ROM settings menu on Android 5.0 and higher devices (if found).
Factory Reset Protection (FRP) - so that after resetting device from recovery, device can't be logged in without already linked Google account. This is implemented by a separate partition named FRP or CONFIG or PDB (on Intel devices) or something else which saves information of last logged in Google (or OEM) accounts. This partition is not reset on factory data reset by stock recovery. So, if bootloader is locked and set unlockable in Developer Options, one can't flash custom recovery to erase FRP partition. He will be stuck at login screen permanently.
So a working Google account on device is mandatory. It works on some Android devices with Lollipop 5.1 and higher. However all vendors don't implement this security feature in their devices. Some use their own similar feature e.g. XIAOMI links your device to MI account.
Additionally some OEM's don't allow unlocking of bootloader without permission from OEM to ensure more security i.e. contents of partition[/URL] "devinfo" are signed by the OEM and can't be modified without their approval. After having permission, an official method is provided to unlock BL using PC.
(Im new to XDA and initially posted this in the wrong place and do not know how to delete the last one. If admin deletes one because of multi posting, please keep this one up) my phone is infected with a virus that has imbedded itself in my system settings, any anti malware apps used do not detect it. when plugging my phone into my computer (for developer access) it began to install the device driver. once the "device driver" installed it took all administrative use away from me and locked all drives. I do not have ABD access or any computer access at this point. this phone has killed 3 laptops and a desktop. the only way ive been able to partially stop the virus is using a firewall to block it. since my phone is NOT rooted I cannot delete system files containing the virus. I noticed the virus will edit apps and system functions to try and hide itself (Google play services) for example. someone is using a form of remote access to control things and change settings. it is possible that someone (close family or friend) may have gotten their hands on it to install the virus. factory reset does nothing as the virus is stored in system settings. phone cannot be hooked to Pc without severe repercussions. I cannot gain root access through any rooting apps for some reason. only tried to access system settings. I HAVE TRIED EVERYTHING.
Defeated01 said:
(Im new to XDA and initially posted this in the wrong place and do not know how to delete the last one. If admin deletes one because of multi posting, please keep this one up) my phone is infected with a virus that has imbedded itself in my system settings, any anti malware apps used do not detect it. when plugging my phone into my computer (for developer access) it began to install the device driver. once the "device driver" installed it took all administrative use away from me and locked all drives. I do not have ABD access or any computer access at this point. this phone has killed 3 laptops and a desktop. the only way ive been able to partially stop the virus is using a firewall to block it. since my phone is NOT rooted I cannot delete system files containing the virus. I noticed the virus will edit apps and system functions to try and hide itself (Google play services) for example. someone is using a form of remote access to control things and change settings. it is possible that someone (close family or friend) may have gotten their hands on it to install the virus. factory reset does nothing as the virus is stored in system settings. phone cannot be hooked to Pc without severe repercussions. I cannot gain root access through any rooting apps for some reason. only tried to access system settings. I HAVE TRIED EVERYTHING.
Click to expand...
Click to collapse
First of all, you should disable autostart on your laptop/PC ( on Windows 10 press [WINDOWS] + "Setup"). There you can config autostart/actions for sd-card, mobile memory and your phone (scroll down on this page). No auto play or sync (fotos/media) for ALL devices is recommend. Don't log in your PC as admin, use a non-admin-account for testing with your phone.
Take a fresh sd card, copy the virustotal scanner on it (take it from the attachment at that post: https://forum.xda-developers.com/showpost.php?p=77053739&postcount=11), switch the sd-card to "read only" (https://www.youtube.com/watch?v=SgguVeKWCTw), put it in your phone, install the virustotal app from the sd-card, go online and let it run. So we figure (hopefull) out, which malware it is and where it is located. Write down the findings (name, location, how much scanner find it) and post it here...
Are you shure, that your ADB-SW/Drivers for the PC/Laptop are okay and clean? Plz post additional Infos about your phone...
I think, someone may have taken my phone, rooted it, and installed or is possibly using Samsung KNOX? If this were the case is there a way to break Knox without a PC? I don't want access to anything in it, just to destroy it. If this is part of the problem, just a quick theory and question I will get back to you with more information. Thank you
Defeated01 said:
I think, someone may have taken my phone, rooted it, and installed or is possibly using Samsung KNOX? If this were the case is there a way to break Knox without a PC? I don't want access to anything in it, just to destroy it. If this is part of the problem, just a quick theory and question I will get back to you with more information. Thank you
Click to expand...
Click to collapse
There are malware in the wild, which can root you phone (like "Dvmap"). In this case you only have one chance about the complete flashing of the device with a clean rom. This type of malware also infects system files, so it cannot be quarantined and removed. At the moment I don't understand why the computers you used for flashing don't work anymore. if the drivers / software are OK (do you have the right versions for windows7/8/10 and e.g. 32/64 Bit) this should not happen? Does this work with other smartphones? Normally the phone is switched off for flashing, so Android is not running. Also autostart should not work then.... that would be completely new behavior.....
"
Every device this phone plugs into, dies after Bluetooth randomly coming on