How to secure your phone (encryption thread) - Galaxy S 4 Q&A, Help & Troubleshooting

I use phone for business, also banking.
As of now, only knox seems to have container in android, but in my case, I don't/can't use it, as it is not for my phone, since I flashed it with custom rom.
Even if it would, it seems that only specific apps can be added into knox container.
Any suggestions about some applications, which can decrypt sensitive data on your device. Default android encryption doesn't do the job, since for some reason I can't encrypt it, since I flashed custom rom.
Any program, which would make seperate container on internal memory/sd card, where one could put sensitive data, like banking apps.

Related

Titanium Backup question

With Titanium Backup, when you backup your apps and other files it creates a folder full of files that only it can read. When I flashed Jasmine, I copied those files to my computer and then flashed, then redownloaded Titanium Backup and moved those files as well as the license back into the correct folders. Is this the correct way to use TB, or is there a route that I am missing? It worked fine, just not sure if it is the recommended way of use or not.
More or less.
The folder is usually in the /sdcard area which is NOT wiped by custom recovery (default) "factory reset", so I'm not sure there is any reason to back it up and restore it. If you are using the default wiping method in TWRP, the (internal, psuedo-) /sdcard folder is not wiped.
But there's no harm in a PC backup. A backup that goes unused can just be deleted some time down the road; disk space is cheap & it's there in a disaster. The same can not be said for not making backups.
Warning: since you are newish to this stuff this behavior is VERY different in stock recoveries - the stock recovery version of "factory reset" wipes out EVERYTHING. In that case it would be mandatory that you backup the entire /sdcard if you want to save things. It's a little bit unfortunate that Android named this type of procedure "Factory Reset" instead of something more accurate, which would be something like "User Data Wipe", as it leads new rooters to erroneously conclude that random modifications to the /system and boot partitions can be un-done using something called "factory reset". NOT TRUE AT ALL; IT'S JUST FOR WIPING USER DATA.
Different apps use different strategies for "Pro" version licensing. If they stick with the Google Play ("market") best-practice recommendations, there shouldn't be any need to manipulate license files, so long as the app is downloaded from the Play Store with the same google login that was used to originally purchase the app. But I can't say for sure if that's the mechanism with TiBu.
I use TiBu kind of sparingly - typically only for market apps I am interested in, and even in those cases I usually download the app from the market and restore only the data from TiBu (to avoid missing market registration bugs, etc). Folks on small data plans might have different ideas about it because of data usage issues (and timeliness of restore procedures). I don't use TiBu for things like backup of data stores for launcher apps, ROM frameworks (e.g. "Settings"). There probably is some degree of compatibility from ROM to ROM with those items, but it is certainly not guaranteed. (Things like word dictionaries & dialer blacklists fall into this category - it would be nice if they were guaranteed to be compatible, but there is no way to know in advance. You sort of have to experimentally determine whether you have broken anything.)
Alternatively, you could keep a copy of the TiBu .apk file in your SD card somewhere. That would allow you to do whatever restores you like without connecting to the Google Play market. Just copy it to /data/app using TWRP after flashing/wiping and then on first boot it will be ready to do your restores.*
* in TWRP via Advanced -> Terminal
This requires getting comfortable with a minimum number of Unix command line commands, e.g. "cd", "cp", "ls", "pwd", etc.
I did download it from the store, but had previously read that the license would need to be moved in a thread not on this website. When I redownloaded it from the store, it automatically added the license back, so I ended up not needing it.
I only use TB to backup things like my offline games I want my scores saved, or apps that it logs me back into when it loads it back (Facebook, Reddit, Messenger, Twitch, Twitter, etc).
What I was looking to do was just keep the files for the backups of those apps on my SD card (or whatever is the recommended method), rather than stored to the phones internal memory since it gets wiped during the reset.
Your internal /sdcard should not be getting wiped by TWRP's default wipe method (which is used for installing ROMs for instance). You would have to go into the Advanced Wipe submenu for that to happen. A stock recovery "factory reset" would nuke the "internal" /sdcard though.
That said, there is nothing wrong with having backups off the device - especially for people that remain on a locked bootloader and do not have a (independent boot) custom recovery.
TiBu has a place in its settings where you can choose to place it's backups on the external sdcard if you want to do that. Then they would be safe from any type of factory reset, and could be retrieved if the phone suddenly died.

Backup before Root

I am completely new to rooting and, if I understand correctly, the process of rooting (specifically unlocking the boatloader) will wipe your apps and their data. What can I do, pre-root, to backup my app data? I have Google's backup on, but from what I can tell, it really doesn't do jack sneezle (I assume that's because Google doesn't require app developers to make their app data (settings, login, etc.) compliant with their backup system). Reinstalling the apps isn't a huge deal to me, but having to recustomize ALL my settings and login to everything again is a pain in the keister. Any suggestions? Is there any apps out there to facilitate this transition period? Let me know what you guys think. If possible, give multiple methods, and let me know which one you find the best. Thanks!
I don't know of any way to back up your apps and data without being rooted. I think you are just going to have to bite the bullet. You need root access before you can even access the folders that app data is stored in.
you havent unlocked the bootloader yet..
so probably no way to back up the data beforehand..
[edit]
you can use adb backup & restore commands to back up and restore, but im not sure if its possible to just restore the app data without overwrite the whole device..
Try Helium. Requires a PC.
There aren't many methods to backup on an unrooted phone.

How to Recover From a BK Disabler-induced Boot Loop

Note: To skip the following lengthy background information, skip down to the numbered steps below.
Package disablers from a Vietnamese developer "Kunkunsoft" have popped up in the Play Store under various names as this poor (and clearly very bright) guy plays "whack-a-mole" with Google and Samsung. Neither company is happy about Kunkunsoft's "Swiss Army Knife" ability to efficiently disable individual services associated with system apps and to thus selectively limit telemetry while maintaining app functionality, especially without root. The routine is that a newly-named Kunkunsoft package disabler appears in the Play Store, sometimes with a plugin listed with a covert developer name that is not Kunkunsoft, becomes popular, and the developer is harrassed by the big guns until they finally force him to modify his app/plugin to delete the capability of disabling individual services and/or they take his app down. Its a sad situation.
The last no-root incarnation of the Kunkunsoft app ("BK Disabler for Samsung" with "BK Plugin v2") disappeared about 6 weeks or so ago. It is now replaced by "Service Disabler" which requires root. I am writing this "how-to" mainly for any users of BK Disabler for Samsung (no root) who may disable some boot-critical system package or service like I did and be stuck with the spectre of data and cofiguration loss. I spent way too much time trying to figure out how Kunkunksoft disables packages and services without root, in order to try to recover my phone by undoing his magic from a custom recovery. To his credit the dev responded to my email for assistance. However, he merely insisted that I would need to factory reset and lose my data and would provide no clue about how his app operates.
After much trial and tribulation I figured out how the app works and why it cannot be undone. BK Disabler implements its services control magic without root by skillfully exploiting a subset of Samsung's home-grown security system, Knox. Specifically, the app operates as a Samsung Enterprise Mobile Device Management ("MDM") manager. Normally an MDM manager sits on a corporate server and allows IT personnnel to create and distribute device policies to Samsung phones. But BK Disabler is an Android app that is also an MDM manager, both running on the phone and controlling the phone! Pretty clever, huh? More specifically, BK Disabler creates a protected Knox MDM container, turns on Kiosk-mode in the phone, and allows only apps/services that have not been disabled to run in that Kiosk environment! This is all done in real time, so the user is unaware that every time he/she disables or re-enables an app or service, BK Disabler actually goes into MDM management mode and modifies the Knox Kiosk mode container! As you can see, the dev is very clever and engages in substantial recursive thinking to pull this off! He also had to purchase a Knox MDM Management license from Samsung. That is why the app is called "BK Disabler for Samsung." It only works on Samsung devices because Samsung, in an effort to capture the corporate market, has placed this powerful control mechanism in the hands of the corporate world, giving corporations the power to implement controls that are otherwise unavailable without root. You can also see why it would likely be near-impossible to undo BK Disabler's freezes from a recovery environment. You would need to break into Ft. Knox... (I was actually surprised to find that I could read an SqLite database containing signed lists of the packages that I had disabled. I thought about editing the unencrypted database but finally gave up after realizing that it was a Knox MDM setup. The disabled system apps/services preventing boot were protected in a Knox container and boot would have failed before my edited database could have been read by BK Disabler, if at all.
With that way-too-lengthy background in place, this is the way to recover should you become too aggressive with BK Disabler for Samsung or any other package disabler for that matter:
Notes:
(a) I tested the method described only on my ancient Samsung Galaxy S5 running "Marshmallow" (Android 6.0.1). The BK Disabler (Samsung) app will only install on Samsung models which include the older Samsung Knox security system and Enterprise MDM included in the stock ROMs. That said, this recovery procedure is generalized to recover data from any phone that is flashable using Odin, which can accept a flash a version of TWRP applicable to the phone and which can be rooted.
(b) Its a good idea to have the back cover of the phone loose because you will need to pull the battery during this procedure. If you have a phone without a removable battery, I'm not sure how you can turn the phone off following an Odin flash, as I have no experience with a phone without a removable battery. Turning the phone off after flashing TWRP is necessary to prevent TWRP from being removed by an automatic boot to the OS after the TWRP flash. The first boot following a TWRP flash must be to recovery and not to system in order to make TWRP "stick."
(1) Note that flashing TWRP in this step will set the warranty bit on Samsung phones, which allegedly voids the Samsung warranty. Whether or not doing so actually legally voids the warranty varies according to consumer protection and contract laws of various jurisdictions. Boot into download mode (hold volume down and home button while pressing power button.) Using Odin (I used v3.13.1), flash TWRP 3.2.1-0 KLTE. Make sure that Odin recognizes your phone. It will show up in the upper-left window "ID:COM." Press the middle tab and unselect "automatic reboot." The reason is that your initial boot following the flash must be into recovery; otherwise TWRP will be deleted by the normal system boot process. TWRP fixes this problem when you first boot into TWRP recovery. Press the "PDA" button and navigate to the TWRP flash file. After the TWRP flash loads into Odin ("ready"), press start. You will see a message in the upper left window that the flash completed successfully. Pull the battery to turn the phone off. Re-insert battery.
(2) Boot into recovery (hold volume up and the home button while pressing the power button); you will see the TWRP recovery screen. TWRP recovery is a work of art!
(3) TWRP recovery will mount both the internal and external SD cards as MTP devices, allowing you to see all of your user folders and files on both SD cards in Windows Explorer.
Note: FYI for noobs, the "internal SD card" is a portion of internal flash memory within the Android Linux /data partition that is allocated for user storage. The "external SD card" is an actual microSD card plugged into the slot above the SIM card and just above the top edge of the battery. Generally speaking, when Android refers to "SD card" it is referring to the internal SD card and not to a microSD card that you plug into the phone above the battery.
(4) In Windows Explorer, copy and paste all folders from both internal and external SD cards to a safe place on your desktop PC, laptop, etc. Note that you do not even need TWRP to perform this operation for the external SD card because you can take the microSD card out of the phone and transfer the files from an external microSD card reader.
(5) Now we will create a nandroid backup of the entire system, all Android Linux partitions. The reason that we copied the SD card data using Windows Explorer is that a TWRP nandroid backup does NOT include either internal or external SD card data. All bits of all other partitions are included in the TWRP nandroid backup. The TWRP folks consider us to be smart enough to copy our photos, videos documents, etc. from both internal and external SD cards using Windows Explorer. However that still leaves lots of our data, like our contacts, calendars, text messages, emails, phone call logs, etc. buried in the nandroid backup.
(6) In TWRP, select the external SD card as the backup destination (if you don't have an external SD card, go buy one before doing anything else. Format it to fat32 in a USB card reader plugged into a Windows system (separate from the phone). Then insert the microSD card into the phone above the SIM card.
(7) In TWRP, select all partitions to back up, with the external SD card selected as the destination to write the nandroid backup to.
(8) Swipe the indicated TWRP screen area to the right (as indicated by the arrows) to start the backup. It will take awhile to create a nandroid of 6-8 GB.
(9) Make sure that you have a good nandroid backup created. If you want to be extra cautious, reboot into TWRP and restore the nandroid backup that you just created. TWRP should indicate if it was able to successfully restore the nandroid backup. Note that we are not going to use the TWRP restore function in this recovery process; we just want to make sure that the nandroid backup is good.
(10) TWRP will create an entire directory structure on the external SD card, top-level being "TWRP." Copy this entire directory stucture to a safe place on your PC.
(11) Now take a deep breath and, using the TWRP wipe function, wipe all partitions except EFS. TWRP has a screen showing all partitons to be wiped, with check marks beside all of them. Uncheck the EFS partition. That partition should not have been affected by BK Disabler and every write into EFS is somewhat risky. (Keeping in mind that restoring the nandroid backup or re-flashing to stock will both re-write the EFS partition; but those functions presumably know what they are doing.)
Also note: Wiping the /data partition by itself is equivalent to a factory data reset and should delete all of the BK Disabler Enterprise MDM/Kiosk-mode setup (as well as all of your non-system apps, data, settings, etc.) However, we are going to make sure that the phone is in completely factory stock pristine shape by re-flashing the stock ROM. Doing so will flash all partitions except /data, which we just wiped.
(12) Download the factory stock firmware from Sammobile that corresponds to your phone model, your version of Android and your carrier. It will download as a .zip file and will unzip to a file name reflecting your stock image and ending in _HOME.tar.md5. Don't change the file name or further decompress. Open Odin, press the "PDA" button and navigate to the _HOME.tar.md5 image. The other three file slots are left blank. Odin knows to extract all partitions from the image file in "PDA." By default, Odin is set to reboot the phone normally when the flash completes. Press the middle tab and uncheck that so that you can observe that the flashing operation terminated normally and completely. Do not select any other option. DO NOT select "repartition." Make sure that Odin recognizes your phone in the upper left box "ID:COM." Press "Start" and you will see the Odin log file populate on the Odin screen and you will see a flash progress bar on the phone. You will see a green "success" notification at the upper left of the Odin screen when the flashing operation completes successfully. Pull the battery to power the phone off and then re-insert battery.
(13) Next we will boot normally into the newly-flashed system. Before powering on, though, give this some thought. You will be faced with the "new phone" setup dialog and so should know your Google email address and password, name you want to use for the phone, etc. Also keep in mind that while you are fiddling with the setup, Google is busy getting your location, defaulting all of the settings to its best advantage, etc. And your carrier is busy downloading OTA Android and security updates to your phone. E.g., the big boys are infecting your phone as fast as they can and any controls that you previously set in place (e.g., via settings, freezing apps, firewall settings, etc.) to hold off the hoardes are no longer in place. It might be a good idea to put the phone into airplane mode immediately, pull the SIM card, turn off your wireless router, or whatever, to slow things down while you go through the new phone setup and adjust some of your settings. Just a thought...
(14) Now root your phone using your favorite rooting method. (This is necessary because the next (recovery) step uses the Titanium Backup app, which requires root.) For example, download Chainfire's SuperSu v2.82-SR5 zip file from here: https://download.chainfire.eu/1220/SuperSU/SR5-SuperSU-v2.82-SR5-20171001224502.zip Do not unzip. Move the SuperSu zip file to the internal or external SD card (to the top directory or any other directory is fine.) Use the Install function from within TWRP to navigate to the SuperSu zip file, highlight the zip file and swipe the TWRP action strip to install SuperSu. Now boot the phone normall (into the Android system) and you will be greeted by the SuperSu app. You may be given a choice whether to install SuperSu as "systemless" or to install it in the system partition. I prefer "systemless" because flashing a ROM (which overwrites the /system partition) does not wipe out root if SuperSu is installed as "systemless."
(15) Now download Titanium backup from the Play Store (paid Pro edition to be able to complete these steps). Also download and install any apps from which you need to recover data that are not system apps. (For example, if you use the stock messaging app, no need to download any other app to recover messages. However, if you use a non-stock messaging app, download and install that app now.)
(16) Now plug phone into PC USB and transfer the entire TWRP nandroid directory structure from whereever you copied it to on your PC to the internal SD card (Titanium will not recognize the nandroid file on the external SD card and will likely not recognize the nandroid file by itself without the TWRP directory structure).
(17) Now the amazing magical coordination between the TWRP team and the Titanium dev will become clear. Fire up Titanium and hit "Menu..." "Import/Export..." "Extract from Nandroid backup." Give Titanium awile to look into the Nandroid backup file and analyze it. When finished, Titanium will present all the apps and app data that it could find in a list for you to select from via checkmarks. Note that at the top of the screen you can select to restore apps only, data only, or apps + data. Also, the Titanium legend (font colors and icons) is quite extensive. You can study it under "Menu..." "Help/Licensing." Suffice it to say, though, the legend will indicate that few if any apps are available to restore. Why? Because, remember, the apps were hid away in a secure Knox container by the BK Disabler MDM app! So, logically TWRP was not able to include the apps in the nandroid backup. That's ok, because system apps were restored via re-flashing the stock ROM and you downloaded other apps that you needed to recover data for from the Play Store. I believe that its best just to choose "restore data" to avoid any problems with Titanium attempting to find apps in the nandroid when they don't exist there. However, if that is unsuccessful you could try restoring "apps + data." I would suggest restoring one app's data at a time. After each such restore, start up the app to make sure that its data is restored, then restore the next, etc.
(18) I was able to successfully recover all data, including contacts, calendar, SMS/MMS, phone log, K-9 email, etc. That said, going forward I will not go even one week without doing a full Titanium backup of all apps + data and less frequent TWRP nandroid backups, copying each to safe backup folders on my Windows PC. Of course, you could just enable Google Cloud sync. After all, why make Google work to get your data, why not just hand it to them?!
(19) Also, I am not too bitter about the Kunkunsoft BK Disabler for Samsung time-wasting experience. I did it to avoid burning time with the whole "rooting" scenario. But in the end I wasted much more time than would have been the case by just "doing it right" with TWRP and Titanium in the first place. I might even consider using Kunkunsoft's new whack-a-mole Play Store pop-up "Service Disabler," because Titanium does not freeze an app's individual services. But I would only do that if I can confirm that Service Disabler does not come anywhere near the "Samsung Knox Enterprise MDM/Kiosk Mode" area. What a nightmare!!
Update... I just read on a Kunkunsoft blog that his latest "no root" disabler "Package Disabler (All Android)" uses Google's Android SELinux "Device Owner" Enterprise Management "Device Policy Controller" functionality. This is the same old bad-boy unrecoverable "lock yourself out of your device" scenario as described above except even worse because it is probably even more secure than Knox and applies to all SELinux Android on any device after Kit-kat 4.4 or so. Basically the app takes over your phone as though it were a company-owned and managed phone. I would not touch it with a ten-foot pole and suggest that you just root your phone to avoid problems. I plan to contact Kunkunsoft to ask how his root version, "Service Disabler" works. If it works via Package Manager, like Titanium, then I will use it to re-acquire the ability to disable individual services. Otherwise I will just live without that luxury.

Helium and App-Data backups

I've been using Helium (in conjunction with SmartSwitch) for some time to cater for my backups for my now ageing S5.
One thing I've noticed is that the list of apps' app-data that Helium will back-up - has been decreasing over time.
Apparently this is due to the apps themselves blocking backup (or so the app suggests).
If I were to root my S5, would this allow me to back-up all app-data using Helium?
(I handle backups of SMS/MMS/Calls/etc separately and am only concerned about app-data in regards to Helium)
Are there any recommended apps that I should use instead that would still back-up app-data without requiring rooting of the handset? (I'd want the backup to store locally, which I then transfer to PC)
I do use the 'Backup and reset' functionality of the phone to back-up data to Google, but this doesn't say exactly what this backs up, or when - so I'd not want to rely upon it grabbing everything I consider important.
It's a S5 G900F - all up-to-date in as much as it uses the latest available firmware from Samsung (Android 6.0.1 as of writing) and is not customised with any custom ROMs/bootloaders etc in any way.
It's also not a new handset (it's > 2-3 years old) and peace of mind regarding my phone data is more important than having any issues with warranty as the device is already out of warranty.
Any advice would be appreciated.

[ROOT] Need help rooting my S8 SM-G950U please!

Hello, I have been looking for a way to root my device without flashing (deleting data on my phone) because I have a lot of data that can not be retrieved through a backup such as chat data that is saved on an app's server or only gives you access to back it up within the app. I cannot open my apps right now due to a malicious APK. My apps constantly crash until I reinstall them from the app store, but upon reinstalling them I lose all my data since I deleted the app without backing up first, I still have all the apps that I want to back up, but as stated they cannot be opened. The Google Play store, Samsung, and app developers cannot do anything to help, I've already been in contact with them numerous times. I want to root my phone so that I can create a Google Drive backup of the information in the apps or be able to copy the data to paste it over a newly reinstalled app. I know something like this exists for KIK.
I have heard that towelroot and framaroot don't delete data on my device when used to root, but I wanted to come here to know for sure. So if anyone can point me in the right direction or even walk me through it I would seriously appreciate it because this has frustrated me for a month now and I want to root it so bad.
Here's my device info;
-Model: S8 SM-G950U
-One ui version: 1.0
-Android 9.0
-Baseband version: G950USQU8DUA2
-Android security patch level: December 1, 2020
-Carrier: Sprint
Thank you for your time and assistance.
have heard that towelroot and framaroot don't delete data on my device when used to root, but I wanted to come here to know for sure.
Click to expand...
Click to collapse
Apps like this often install adware on your phone afterwards, so make sure to reflash ROM afterwards.
You don`t need root to copy non-system-related files. So make a backup of folder of your apps and after you will reflash ROM, install these apps and swap data.
Also, I don`t know any app that wouldn`t restore your messages after you reinstall it. Can you name me your messenger so I can try it myself to be sure?
Another option is to install antivirus.
0purple said:
Apps like this often install adware on your phone afterwards, so make sure to reflash ROM afterwards.
You don`t need root to copy non-system-related files. So make a backup of folder of your apps and after you will reflash ROM, install these apps and swap data.
Also, I don`t know any app that wouldn`t restore your messages after you reinstall it. Can you name me your messenger so I can try it myself to be sure?
Another option is to install antivirus.
Click to expand...
Click to collapse
I created a backup with Smart Switch, but I am not that confident in that backup. From what I've seen it backs up most of the data, but I don't know how chat data from messaging apps are handled with backups. Is there a more precise backup that copies over all data exactly as it was on my phone in this current state with all accounts logged into as I am now?
The apps I am concerned for their data are LINE, HelloTalk, KIK, and songs I saved with Shazam since I never linked an account to it. WhatsApp used to be on this list, but a friend told me that WhatsApp locally saves its data to the device's storage so I was able to backup the data just by reinstalling WhatsApp and restoring from internal storage.
It was directly stated that LINE data would not be backed up through Samsung Switch. If you could make an account on these apps, send some messages, and do a backup and restore to see if the messages transfer I would be grateful. I also have no idea if Shazam songs that were found without an account can be transferred as well.
I am sorry, I don't have a Samsung device. What you can do is go to your file manager and copy all folders you see to external storage. Then, after reflashing ROM, get data of wanted messaging apps back by pasting it to internal storage.
What about antivirus?

Categories

Resources