(Use case within) Most suitable no-root packet capture app? Or should I get back into development again? - General Questions and Answers

TLDR: Got new phone, don't want to root now but still want to do things I needed root for. I need a non-root packet capture solution, or to decide if I should still root my new phone, or to get into development again. What is my best option? Use case below.
I have always rooted my phones which have always been as easy as 'fastboot oem unlock'. Not with ROG3. It needs an OEM tool and from what I read here I only get one chance.
After all the years though my uses of root fall into one of 3 categories: ad blocking, back up, and one specific case of packet capture.
I used AdAway for DNS level ad blocking. Private DNS with dns.adguard.com seems to be fine for that. Easy enough to set up.
Backup is with Titanium Backup. I am going to install all apps I ever had on my last phone (which has root and Ti) hoping that the stock transfer tool would pick them up and carry them over. Storage is not an issue; I have 512G. Apps I really don't care about anymore can be deleted later.
Next, my sticking point: Packet capture.
For that I have been running a tcpdump binary inside Terminal Emulator a week at a time. I am after the network traffic of one game, which I am not going to name for fear of ruining the fun. Its traffic has been in clear HTTP since I started playing in 2015. Through it I have gathered how units level up, enemy patterns in battles, and scripts for story scenes. I so enjoyed having these data that I kept playing, as long as it remains viable. My setup writes a pcap file to external storage that I can copy to my laptop for analysis. I configured tcpdump to capture only traffic to/from one IP to save space.
To get the same functionality I need a packet capture app to capture only the game's traffic, and save one pcap file per session. I tried 3 such apps and they all fall short in one way or another.
TPacketCapture captures all; app filter is its very expensive paid feature. Plus it stalls all traffic within 3 minutes of starting.
Greyshirts SSL Packet Capture splits capture by HTTP streams. Each must be selected manually for export with no option for a whole session export. Is a problem because every transaction of the game is its own HTTP stream. Is also a known beef among users and author seems unwilling to address. It keeps its data files to itself; I was only able to get them via root and they are not straight pcap, yet not difficult to figure out. It does decode the game traffic very nicely, to the point it becomes human-readable.
PCAPDroid does not save files; it only streams off its builtin HTTP server or UDP. I could not get useful capture out of it, but it is open source, so I could try adding that feature myself, hence the question of getting into development.

I did find a way to mass export data out of Greyshirts. I can use adb backup to back up that entire app's data. Then I found information on how to extract from it the data files it kept to itself. Then because those data is in a lighter format than pcap, it's actually easier for me to script a parser and work on them directly!
-- EDIT --
I found that some public wifi break if used with a private DNS.
Then for some time I totally lost adb backup functionality! I would get an empty backup even though everything else goes as expected. I resigned to defer moving that game over and set up Android Studio to start that development work I mentioned (in essence, attempt to modify PCAPDroid to save captures to external storage and add AdAway functionality).
Instead of using just the command line tools like I always have, I installed Android Studio. The SDK tools got updated along the way to 1.0.41 on SDK Tools 30.0.5 (I got the "ADB backup deprecated" message too, but the [email protected]% I care) . Then when I tried adb backup again I got my full backups again.
-- END EDIT --
I think there's my solution and I can now go without rooting. If I do need root in the future, adb backup should save the day.

Related

[ADMIN TOOLS] What Apps/Widgets/Shortcuts do you keep in your toolbox?

There's plenty enough threads discussing the best twitter clients or which SMS app is best...But except for the odd tidbit mentioned in a post by someone, I don't see any particular discussion (if I've about what folks have in their "toolbox" for doing things like capturing logs, running test, etc...
Here are some of the things I've found, please feel free to share any gems you may have found.
Antennas: Monitor GSM/CDMA cellular network http://www.cyrket.com/p/android/com.technolatry.antennas/
Any Cut: Any Cut allows you to create Home shortcuts to anything http://www.cyrket.com/p/android/com.appdroid.anycut/
aLogcat: View color-coded, scrolling (tailed) Android device logs directly from your phone http://www.cyrket.com/p/android/org.jtb.alogcat/
Dev Tools: With the Dev Tools application, you can enable a number of settings on your device that will make it easier to test and debug your applications http://developer.android.com/guide/developing/debug-tasks.html#additionaldebugging
GPS Test: GPS Test shows basic GPS signal (SNR) and satellite information
http://www.cyrket.com/p/android/com.chartcross.gpstest/
BASH: drop it in /system/bin and you're off http://android.modaco.com/content/software/301932/bash-4-1-native-app-for-android/
Wifi Analyzer: Turns your android phone into a Wi-Fi analyzer http://www.cyrket.com/p/android/com.farproc.wifi.analyzer/
Titanium Backup: The ONLY tool that can backup/restore/analyze your apps + data + Market links http://www.cyrket.com/p/android/com.keramidas.TitaniumBackup/
I'm not sure if this is along the lines of what you were saying, but I use the 'url monitor' widget from the marketplace. It's free, and it monitors a list of URL's to check their status. I host several websites as well as my own exchange server so this is very useful. It's always good to be working on a problem before people tell you about it.
Thanks for mentioning titanium backup! I've never heard of it before so I decided to check it out. I liked it so much I bought a license.
Few more for the list...
Apps Organizer: Create labels/categories for all your apps...Titanium Backup uses the categories from this app for filtered views! http://www.cyrket.com/p/android/com.google.code.appsorganizer/
MyIP: MyIP displays your current IP address, name and connection type http://www.cyrket.com/p/android/radonsoft.net.myip/
Just wondering, whats the need for a bash shell? While useful in many cases, I fail to see how its helpful on the N1
Does Titanium Backup only backup your apps+data? I mean...it doesn't reorganize the desktop to it's previous state...right...or is that function only in the paid version? I would have gotten the license already, but I thought that it would re-organize the desktop as well. Maybe I'm missing a step?
Namuna said:
Few more for the list...
Apps Organizer: Create labels/categories for all your apps...Titanium Backup uses the categories from this app for filtered views! http://www.cyrket.com/p/android/com.google.code.appsorganizer/
MyIP: MyIP displays your current IP address, name and connection type http://www.cyrket.com/p/android/radonsoft.net.myip/
Click to expand...
Click to collapse
Wait...titanium backup supports apps organizer? I was about to wipe my phone and was wondering how this was going to work. I exported my categories anyway but if that is a step i don't have to fuss about...fantastic.
Just wondering, whats the need for a bash shell? While useful in many cases, I fail to see how its helpful on the N1
Click to expand...
Click to collapse
For me, I use it when I SSH into my N1. Working in BASH is a part of what I do at work, so I've got lots of shortcuts/aliases/scripts that can be dropped directly to my N1 and used.
I mean...it doesn't reorganize the desktop to it's previous state...right
Click to expand...
Click to collapse
TB can indeed restore your home screens! You have to manually find the backup with 'launcher' or 'home' in the name and manually reload it though (which is confusing since TB has a 'restore all apps +all system data' batch option)...But yes, it does restore the desktop
Wait...titanium backup supports apps organizer?
Click to expand...
Click to collapse
Yup. Create your labels in AO, then assign your apps to those labels...Then when you go into TB->Filter, you'll see that you can now filter your apps by those labels! VERY convenient. Attached are some pics of the dynamic-duo in action.
For more goodies to add...
FCC Test: The Federal Communications Commission (FCC) Broadband Test application provides consumers with information about the quality and speed of their mobile data connection http://www.cyrket.com/p/android/com.ookla.fccbroadband/
root explorer: The ultimate file manager for root users. Access the whole of android's file system (including the elusive data folder!). http://www.cyrket.com/p/android/com.speedsoftware.rootexplorer/
MountUSB: (Included with the DesireROM) MountUSB is a one-click tool which allows you to mount or unmout your SD card as an USB mass storage device. http://www.cyrket.com/p/android/at.abraxas.mountusb/

Good For Enterprise

Has anyone been able to get this working with Root? I install fine, enter my pin and it goes through but since I have root it doesnt sync. Im running liberty, any suggestions
matt1313 said:
Has anyone been able to get this working with Root? I install fine, enter my pin and it goes through but since I have root it doesnt sync. Im running liberty, any suggestions
Click to expand...
Click to collapse
Checking for root is configurable by your IT area. My account is not setup to check for root but I have had other problems. Can you easily unroot and reroot your device so Good would work except for the rare times that you actually need root? One problem I have had is the initial setup would never complete (stops at retrieving policies) unless I go back to stock eclair, get it working and back it up via Titanium backup, then upgrade to Froyo or GB, and then restore it. Mine continues to work via root though. The other problem I have had is if I ever restore to an earlier state (using the same PIN), it will stop syncing. I need a new PIN issued to get it working again.
I'm reading that IT admins can lock your phone camera, wipe SD card, etc.
What other kinds of things can they do once "Good for Enterprise" is installed on your personal phone?
Nate2 said:
I'm reading that IT admins can lock your phone camera, wipe SD card, etc.
What other kinds of things can they do once "Good for Enterprise" is installed on your personal phone?
Click to expand...
Click to collapse
I was involved in piloting "Good for Enterprise" for my company. I do know that the possible "controls" vary depending on the platform. Good for Enterprise on the IPhone will have much more control because the devices (hardware) and OS are very limited compared to Android. Keep that in mind as you read some of these items if they don't mention which platform. Also, the Good application would have to be granted root access to your phone "I believe" in order to do any of the items you mentioned. If you are running a custom ROM and have the "SuperUser" app, you would see if it had that access. I "think" it will be very hard for Good to implement some of those controls unless the Android OS provides an API for it because the underlying hardware can vary so much. I'm not a developer but I think that is correct.
Also, if you work for any decent sized company, they will be very concerned about the legal aspects of company provided software deleting (or even reading) personal information outside the "Good container". I mention the word container because Good provides encryption of everything within the app so it can not be read by anything outside the app (such as root explorer). I have successfully backed up and restored the encrypted data to another ROM but it is just bits to Titanium Backup or anything else. Feel free to PM me if you have any other questions on it that I might be able to answer. I know the admin for Good for our company that I could ask other questions.
I'm reading that the installation can detect jailbroken iPhones and rooted Android devices, and if the IT admins decide, they can configure it to refuse installation on such devices to prevent compromising Good's security/integrity of its resources.
(I'm not rooted, and don't plan to root my DroidX, so it is a moot point for me)
I heard from Verizon that IT admins can remotely control hardware components, including cameras, Bluetooth and IR ports, SD Cards, and more.
Things I'd like to know... can IT admins:
Track/monitor internet usage on the device?
Track/monitor GPS usage?
Copy non-Good related resources (e.g. files) from the device or SD card?
Lock the device?
Locate the device?
Wipe non-Good related resources?
Does the Good app send device System Logs to the IT folks?
Phone call logs?
App Permissions:
YOUR ACCOUNTS
ACT AS AN ACCOUNT AUTHENTICATOR Allows an application to use the account authenticator capabilities of the AccountManager, including creating accounts and getting and setting their passwords.
MANAGE THE ACCOUNTS LIST Allows an application to perform operations like adding, and removing accounts and deleting their password.
SERVICES THAT COST YOU MONEY
DIRECTLY CALL PHONE NUMBERS Allows the application to call phone numbers without your intervention. Malicious applications may cause unexpected calls on your phone bill. Note that this does not allow the application to call emergency numbers.
NETWORK COMMUNICATION
FULL INTERNET ACCESS Allows an application to create network sockets.
YOUR PERSONAL INFORMATION
READ CONTACT DATA Allows an application to read all of the contact (address) data stored on your device. Malicious applications can use this to send your data to other people.
READ SENSITIVE LOG DATA Allows an application to read from the system's various log files. This allows it to discover general information about what you are doing with the device, potentially including personal or private information.
WRITE CONTACT DATA Allows an application to modify the contact (address) data stored on your device. Malicious applications can use this to erase or modify your contact data.
PHONE CALLS
READ PHONE STATE AND IDENTITY Allows the application to access the phone features of the device. An application with this permission can determine the phone number and serial number of this phone, whether a call is active, the number that call is connected to and the like.
STORAGE
MODIFY/DELETE USB STORAGE CONTENTS
MODIFY/DELETE SD CARD CONTENTS Allows an application to write to the USB storage. Allows an application to write to the SD card.
SYSTEM TOOLS
RETRIEVE RUNNING APPLICATIONS Allows application to retrieve information about currently and recently running tasks. May allow malicious applications to discover private information about other applications.
PREVENT DEVICE FROM SLEEPING Allows an application to prevent the device from going to sleep.
YOUR ACCOUNTS
DISCOVER KNOWN ACCOUNTS Allows an application to get the list of accounts known by the device.
HARDWARE CONTROLS
CONTROL VIBRATOR Allows the application to control the vibrator.
NETWORK COMMUNICATION
VIEW NETWORK STATE Allows an application to view the state of all networks.
VIEW WI-FI STATE Allows an application to view the information about the state of Wi-Fi.
SYSTEM TOOLS
READ SYNC STATISTICS Allows an application to read the sync stats; e.g., the history of syncs that have occurred.
AUTOMATICALLY START AT BOOT Allows an application to have itself started as soon as the system has finished booting. This can make it take longer to start the device and allow the application to slow down the overall device by always running.
KILL BACKGROUND PROCESSES Allows an application to kill background processes of other applications, even if memory isn't low.
Sent from my unrooted DroidX using XDA App
I've been using EVO CM7 nightlies for quite a while now and never had issues with Good for Enterprise. With last 3 versions of nightlies, Good hasn't worked. When trying to reinstall Good, it says there is no phone network when trying to register. When looking at Device Info in Good setup screen, it doesn't have a phone number. Tried clearing, data, all cache, etc.
Is anyone else having this issue? It's like CM7 is not sending the phone string to Good when calling it.
A coworker also uses CM7 (not nightlies) and has no issues with Good on EVO. The phone number shows up in Good device info on his EVO.
I had the same problem, but I'm luckily an admin at our company on the good software. After messing around with it... this is what I had to do.
1. Uninstall Good from your phone on CM7 (Must be uninstalled at first for this to work....)
2. Reboot into Recovery and make a Nandroid Backup
3. Wipe the both Caches and Data, Install a Sense Rom
4. Install Good Mobile and have you admin resend you the email to enroll your phone
5. After entering the code and entering a password.. the Good will try to pull emails... kill the good app before this.
6. With Titinium Backup, backup Good and its Data.
7. Reboot into recovery.
8. Wipe the both Caches and the Data... Recover your previous CM7 Nandroid backup.
9. In CM7 launch Titanium backup and restore Good Mobile and its Data.
Worked after that... this way Good would communicate with the phone during the enrollment... which for some reason with CM7 it doesn't work... and just complains about not being connected to your mobile network.
Coincidentally I've just put up another post relating to IMSI numbers which was prompted by Good refusing to activate as some devices are reporting the same 1st 6 digits of their IMSI rather than the full 15 that Good uses to authenticate the license relative to the specific SIM card the license is for. Has anyone else come across this issue with Good?
matt1313 said:
Has anyone been able to get this working with Root? I install fine, enter my pin and it goes through but since I have root it doesnt sync. Im running liberty, any suggestions
Click to expand...
Click to collapse
Mine quit syncing after the first day. I had to upgrade my personal unlimited data plan to a corporate/enterprise data plan for an additional $15/month with Verizon, and reinstall Good.
Sent from my unrooted DroidX using XDA App
Sievers said:
I had the same problem, but I'm luckily an admin at our company on the good software. After messing around with it... this is what I had to do.
1. Uninstall Good from your phone on CM7 (Must be uninstalled at first for this to work....)
2. Reboot into Recovery and make a Nandroid Backup
3. Wipe the both Caches and Data, Install a Sense Rom
4. Install Good Mobile and have you admin resend you the email to enroll your phone
5. After entering the code and entering a password.. the Good will try to pull emails... kill the good app before this.
6. With Titinium Backup, backup Good and its Data.
7. Reboot into recovery.
8. Wipe the both Caches and the Data... Recover your previous CM7 Nandroid backup.
9. In CM7 launch Titanium backup and restore Good Mobile and its Data.
Worked after that... this way Good would communicate with the phone during the enrollment... which for some reason with CM7 it doesn't work... and just complains about not being connected to your mobile network.
Click to expand...
Click to collapse
I previously had a similar problem that I mentioned above - on custom FROYO ROMs it would stop at retrieving policies but flashing to stock eclair, I could finish the setup (and let all current emails come in) and then backup via TB, flash to custom FROYO, then restore and it would be all set. However, when I recently reinstalled Good on Continuum 5.5, I decided to try to let it complete the setup and it did with no problem. I only tried that since my IT admin setup "self-service" for me. I can access a link where I can send a new PIN for my account since it can easily stop syncing. The PIN goes to your corporate email so it is safe to allow.
@Nate2 - sorry I didn't see your post previously. Yes, there are Good policies that can be setup to detect "jailbroken" IPhones, etc. At my company, Good on Android is still not a standard offering because corporate policies are limited to what they can do on Android due to the numerous OS and hardware combinations. However, I have been pushing simply putting trust in the Good encryption (AES 256 if I remember right). Looking at the permissions of the app makes it look at first glance like it can do anything. However, I don't think it is as extensive as it seems. The only "data" outside the Good container that can be read by the app "to my knowledge" is the contact info. This is because your IT administrator can allow Good to sync corporate contact info (in Good) to your phone's contact info. This allows you to easily see who is calling (rather than a phone #) if it is one of your corporate contacts. Although it can access (modify/delete) SD contents, it doesn't say "Read". I don't think I am "reading" too much into that... For internet access, I know Good is working on adding in internet access (from inside the Good container) so browser access is allowed. I am "guessing" this is mostly for IPhones, etc. where the IT admin could stop internet access outside the Good container. That way they could control internet access on a "corporate" device. This is speculation on my part, though. I do think it can send device logs which is required "I think" to detect root access. Look over all the permissions listed keeping in mind READ access to system logs and contact info only and it seems to fit. Therefore, I think they probably can detect that you enabled/disabled GPS but I "doubt" they can detect where you went since I don't "think" that goes in system logs that they pull. If you still have any question, send me a PM since I don't frequently check this thread.
Thanks RichMD.
I once worked in a large company where a sysadmin was fired for accessing the corporate e-mail of an employee (his ex-girlfriend). She reported the incident to HR. Possible access to additional sensitive resources on the phone makes these kinds of incidents worse, and that's why we should be cautious.
Sent from my unrooted DroidX using XDA App

Fix for GB getting mobile version of website despte desktop UA string

I've noticed since upgrading my Droid X to Gingerbread that many websites that were previously fooled by setting the User Agent (in Dolphin HD) to "desktop" are no longer fooled and can now detect that I'm on a mobile device. This can be quite irritating as the mobile version of many sites is horrible.
To see if this article pertains to you, if you're set for a desktop user agent string, go to http://www.bbc.co.uk and see if you get the mobile version of the page or the desktop version. If you get the mobile version despite your user agent setting, this hack may help you.
When this first happened to me I decided to find out how the sites were detecting the fact that I'm on a mobile device. Generally a website only knows what you tell it about yourself, and what you tell it about yourself is 100% in the HTTP headers your browser sends (or that get added by a proxy server if you use one). So the first logical place to look was to see what all headers the browser was sending. Note: for any who might object that it also knows things about you by your cookies, your cookies are actually sent as HTTP headers as well.
I have a CGI script on one of my web servers that I use to see what all headers my browser is passing. There are plenty such scripts/sites on the web -- here is a decent one (it's not mine) if you want to see what your browser sends. Examining the headers, one stuck out like a sore thumb:
Code:
HTTP_X_WAP_PROFILE='http://uaprof.vtext/com/mot/mb810/mb810.xml'
Geez, that's a pretty dead giveaway isn't it? I checked a phone running FroYo and it does not send that header, so that further confirms this is the header these sites use to detect me as a mobile (since they don't detect me as a mobile under FroYo and do under Gingerbread).
I then Googled HTTP_X_WAP_PROFILE and found numerous coding resources where they suggest looking to see if that header exists and/or is set to anything in order to detect mobile browsers. Bingo.
Great - so how to get rid of it? My first thought is that since the header is clearly identifying me as a Droid X (MB810), there has to be something in the phone that is providing the data. Since I observed that the header is present whether I access the net via WiFi or via 3G, that further confirmed that this is all happening in the phone and not being added by Verizon in transit.
The first sensible place to look was /system/build.prop. Turns out that the first sensible place to look was the right place to look as I found this line:
Code:
ro.mot.hw.uaprof='http://uaprof.vtext/com/mot/mb810/mb810.xml'
Well, that's about as perfect as you could ask for. Not knowing if the phone might be touchy about completely removing this setting, my first attempt was to change the line to read like this:
Code:
ro.mot.hw.uaprof=''
I found that you must reboot the phone for the setting to take effect (no real surprise there). Unfortunately, afterward, when I examined the headers being sent by the browser, they now contained this:
Code:
HTTP_X_WAP_PROFILE=''
With that setting, the various websites still detected me as a mobile browser (which you would expect). Next I tried changing the build.prop to this:
Code:
ro.mot.hw.uaprof=
* Note - there is nothing after the equal sign - not a space or anything, just a carrriage return.
This (pleasantly) resulted in the HTTP_X_WAP_PROFILE header being completely absent -- the ideal outcome. Happily, the various websites that were detecting me as a mobile no longer did. Success!
In the interest of being thorough, I tested just removing the ro.mot.hw.uaprof setting altogether (by commenting out the line). I figured that probably was not the best plan, but I wanted to see what would happen. When I did that, the following header was the result:
Code:
ro.mot.hw.uaprof='http://uaprof.motorola.com/phoneconfig/MotoMB200/profile/MotoMB200.rdf'
Interesting default value -- and of course I was again identifiable as a mobile device.
So, the fix for this is pretty simple. The exact property that needs to be modified in your build.prop would of course vary if you're not running a Motorola build, but I'd expect it to be readily identifiable. Of course you have to be rooted to do this, and of course you should make a backup copy of your build.prop before you modify it, and of course you should think about what your fallback recovery is going to be if you foul up your build.prop and end up in a boot loop or something. Can you boot into Recovery and then fix the file with ADB, etc. -- it all depends on how your phone is set up.
For those that like step-by-step, here's precisely what I did:
Open Root Explorer (or other "root aware" editor)
Navigate to /system
Mount system as R/W
Open build.prop in text editor
Find the ro.mot.hw.uaprof line
Put a # at the beginning of the existing line (to make it into a comment)
Insert a new line below the existing line that says "ro.mot.hw.uaprof=" (without the double quotes -- no characters after the equal sign)
Save and exit editor
Mount system as R/O
Reboot phone
By doing it this way I end up with a backup copy of the original string in case I want to easily put it back. Root explorer automatically saves the original build.prop as build.prop.bak, but if you're really cautious you might want to actually make a copy of the file to your SD card or something.
At this point, in Dolphin HD, with my user agent string set to Desktop, all of the web sites that had begun seeing me as a mobile device now serve the normal desktop page (as desired). If I want to see the mobile version (for some reason) I can just switch Dolphin HD back to Android mode (user agent string) and then I get the mobile version.
Hope this helps someone. Sorry it was so long -- almost everything I write up is.
P.S. If you do this successfully on a non-Motorola phone, post here and let others know.
firstly,, BIG THANKS
I am running a GB2.3.3build.596 P3D 2file root DroidX..
when i open ROOT EXPLORER in r/w mount and open the build.prop i can not type anything..and this mobile site only crap was the reason i took 2 days of forum reading at 3 forums before i went ahead and sbf'd back to froyo from a stock Verz 2.3.3GB to then root ,and then to install the 2 P3D files to have a .596 build GB rooted phone
any suggestions, maybe another editor ware? total newb

[Q] Here's a quesiton on WP7.5 dev using SQL CE....

Alright so here's the deal:
I'm working on this app (let my raise my "nerd" level to a new maximum, by stressing that it is a Magic: The Gathering app for the WP7. Nerd level raised.)
So - at any rate - I start out with a wonderously fluid Silverlight front-end. Works like a charm. Keeping it simple at first, I get the ball rolling with a simple life counter function, using local variables only. Flawless. Then I figure I'll raise the bar of challenge a little, and import a simple dbusing SQL CE loaded from Wizards of the Coast official online card database. My app has a "fairly" quick search engine that goes through the entire set of cards and displays a list of the cards with text. Again, pretty damn flawless. Now here's the pickle. Because my SQL CE DB of the cards is pre-built into the app, it is, by default and no way to change it: read-only. I want to load and create a new DB on the fly, by reading a simple .txt file, and parsing out prices. Ideally, this DB would be created once, and everytime afterwards, simply updated. Now I can read and modify the Database easily, however, when i try to read the .txt file from the online source, it fails with epic certainty. Even more bothersome, I can't get the bloody thing to run efficiently in the background.
So to the question at hand: Does anyone know of a quality way to read a .txt file from an online source, parse successfully into a database, and do so as a background task?
Thanks
Could you elaborate on how exactly does it fail? Also, by "on background", do you mean that you are trying to update the database on a background agent (which I would not suggest in your case) ?
edit: Looks like it's a bit old thread. Are you still having this issue?
Well, by fail - I mean it either doesn't update the database at all - or it crashes and the program terminates.
And why would a background agent not be recommended? I like the idea of BG agent simply because i'm assuming the average user is going to be impatient and close out the app before the db actually updates the prices...at which point, it would be ideal if this were running as a background agent because otherwise i've discovered that just stopping DB search/edit halfway through sometimes hangs or crashes when you try to get back into the db.
Ideally, i'd like this thing to be pretty glitch free. I suppose i could do like every other app out there and only grab a price when a single card is selected, but ideally i would like the entire price database to be accessible in an "offline" mode. Its only a single text file updated weekly.
I see you're point on using a BG agent, but are you familiar with the limitations? You probably don't want to limit the sync to the moments when the phone is plugged into a power source, so periodic task would be your only choise. However, those are memory, cpu and clock time (25 seconds) constrained, run approximately every half an hour (can not be changed) and you can't start them instantly. Also, they need to be rescheduled every two weeks and there's a limit of how many BG agents can be scheduled for a device on total (can be as low as 6). So, you can only schedule the BG agent in your app, you can't start it immediately, if the completely sync process takes more than 25 seconds the agent would get killed and if the text file is somewhat huge you could run into the memory constraints of the agent.
I don't think there's anything you can do to make the sync succeed if user choses to close or suspend the app while it's syncing. I thought of an another option though: maybe you could just load the data for a card when it's drawn and store it to the database together with the last update time. Then in future you could first check if the database has up to date info on the card and use that instead of loading it from the web. Or maybe you could load the data for all the cards in the decks when the game starts.
Yeah. my solution for the time being is to see if there is an updated pricing text file online, and updating the silverlight accordingly (ie a "New prices available" button that appears if there are new prices) and a big ass warning box that warns users to not exit the app during an update.
however, i'm still having issues with parsing the bloody the txt file in-code. its a pipe-dil txt file so, it shouldn't be this complex to parse into a new table. i'll post up what some of the code looks like tonight for my parsing engine.
Sure, post ahead and I'll see if I can help you with that.

Backup and Restore ALL Accounts on android

GOAL - a universal backup and restore solution that can take ALL device accounts and ALL their related passwords - back them up - and restore them to ANY version of android - including Phones, Tablets, and Emulators such as bluestacks, memu, nox etc. even from different android versions.
This is primarily to get all EMAILS - google - outlook - etc loaded into a new device *This is NOT for apps as there are plenty of solutions for apps already but none for ACCOUNTS
This software should basically have a database, preferably in an easy to edit CSV format - which would never need to change as it would always have ACCOUNT_TYPE,USERNAME,PASSWORD,RANDOM_DATA
-you could manually populate this via your computer or you could have the android software export it via coding magic. Maybe use a different format and have it load a spreadsheet or a different database type...
Importing would be trickier- you'd have to have a drop down asking questions like - What android version are you importing to- so that the code could be properly inserted...
I intend to ask for advice here and see what solutions you all have; I will edit this first topic to help others if a solution exists.
Some people spend 50 hours of labor installing hundreds of apps on their phone; each needing custom configured, many require having an Account to access data through the app.
What if you have to load 50+ emails into the phone; each of them having huge complicated passwords.
What if you are always buying new devices, changing roms and having to set this all up again?
=Some Solutions exist but none have worked for me.
1. Built in google 'set up new device' -
This only seems to work when you have reset your phone.. once the phone is active and you've actually used it -- there appears to be no way to turn this on and attempt to bring new accounts over...
q. How can you activate this after the fact?
If you have more than a few accounts on the device, say.. 4... maybe you have 20 or 40 email accounts loaded.. it is almost guaranteed to fail.
q. What causes it to fail? Is there any work around.
If you are on android versions too far apart its also likely to fail
q. Why? is there any work around.
*Here is a site with code related to the account transfer API; I'm not sure how accurate it is:
Account Transfer API | Android Developers
developer.android.com
2. Samsung Smart switch
This only copies ONE account - but it also does a fine job of moving text messages, SOME apps and other info over.
*Is there any way to get it to copy all email accounts; and other random app accounts to the new device?
3. Titanium backup - for non root and root.
I've played with this numerous times over the past 10 years and never successfully. I dont think it is capable of taking all accounts and backing up / restoring to different devices.
More to be added later.
Reserved for random info so I can update later;
One month later and no replies...
Anyone?
1. Is there any app on the planet that can do this - or close? ((samsung smart switch - sometimes - though it mostly fails -- Googles built in set up - which fails 95% of the time) - I know of no other solutions.
2. Is there any desire for this? have any of you been annoyed with the menial task of setting this stuff up again and again?
another month goes by.. now I have a new android tablet.. and guess what?
Samsung smart switch wont copy my accounts...
I cant seem to get the built in google 'set up device' to start == and I'm not looking forward to adding 50 email accounts and various other accounts into this manually.. thats gonna take ages...
Buying a new device every couple months.. is a grueling task when it comes to account transfers...
Nobody has any suggestions on a solution for this? I'm searching around randomly again and finding Nothing.
what is your concern?? reading your thread give me headache
I have the same issue. I am "bored" in getting another mobile because i have to setup from beggining soooo many things
IIRC then account details are stored in SQLite database named accounts.db, its location depends on Android version.
Wi-Fi passwords are stored in file named wpa supplicant.conf.
@jwoegerbauer thanks for the tip. using your filename I found a tutorial that listed the location as follows:
/data/system_de/0/accounts_de.db
I've verified this on Nox; my bluestacks still isnt rooted and it seems the phones I have with all email accounts loaded == are not rooted either== I'm going to need to find a workaround for that or make time to root bluestacks to get the account data out of it...
Problem is;
1 there are no passwords included here. Where are they? mine are all crazy long and I have no clue what they are... its very time consuming to manually input them via my password managing tool.
2 Once I export; and change the CSV into a spreadsheet to include all the other missing email /google accounts; how do I replace the accounts_de.db file on each device
3. Why isnt there an app that can do this already; lol?
EDIT
Titanium backup does have an 'accounts' export option that -sorta - works... problem is how picky the app is about using root plus super SU and refuses to work with Magisk (sometimes) or will constantly crash on (some) devices - or will fail to export/import unless you try (5 different file managers that can eventually figure out how to import their file type) - or is otherwise NEEDING root access to function...
Would be nice if a solution existed via ADB or simply in an un rooted device to do this; sorta like how google ''set up nearby device'' was supposed to work (and will; if you use only 5 or less accounts... but its also buggy and fails)
Any ideas on how we can export/import accounts?
Still no successful solution.
1. Notes regarding Titanium:
I've tried about 15 versions of bluestacks using android 4.4.2 and have had mild success with titanium to backup/restore =
however it seems to randomly restore less than all the accounts (missing a few different ones each time)
it also seems to randomly miss the google password tokens randomly =forcing me to log into 10% of the imported accounts with each restore.
It also seems to fail 100% when trying to restore a bluestacks 4.4.2 accounts file on to android 7 bluestacks; or nox / or memu
It has limited success importing into a proper non emulated tablet (again missing about 60% of the accounts randomly)
all in all Titanium doesn't appear to be a good solution.
2. Perhaps a direct edit of the Accounts DB file would be wiser;
I've attempted to export it a few times and am not sure yet how to edit it ...
HeidiSQL has errors when accessing the file
Oracle's sql developer is WORSE; most of the text is gibberish.
*Any ideas on how to edit this?
3. Other xda searches lead me to:
The google password isn't a real password. After first successful authentication, an Auth Token is downloaded to device which is stored in accounts.db.
From the Auth Token is impossible to guess the password.
So I guess I answered my own question on that... I was hoping the passwords were stored on the device database so I could import/export them via a text editor.
4.
*File manager for super users allows one to explore and edit (to a point) a sql database - but one can not add new entries; only edit existing entries.
one can only export to csv; not import.
so this is only a partial solution.
5. an open source XDA solution looks promising but will not work.
Each OnAndBackup version uses different file extensions that are not compatible between versions... so yuo can't backup one android version and restore to another.
OAndBackupX is a fork of the popular open source backup app for Android
Looking for an open source solution to backup individual apps and their data? OAndBackupX is a handy Android app for the job. Check it out!
www.xda-developers.com
Blombardo said:
2. Perhaps a direct edit of the Accounts DB file would be wiser;
I've attempted to export it a few times and am not sure yet how to edit it ...
HeidiSQL has errors when accessing the file
Oracle's sql developer is WORSE; most of the text is gibberish.
*Any ideas on how to edit this?
Click to expand...
Click to collapse
In post #7 you were told it's a SQLite database. Hence use a SQLite browser.
Downloads - DB Browser for SQLite
sqlitebrowser.org
It appears that the art of editing the database file on this is more complicated than it should be...
1. Taking the old DB file from 4.4.2 with a million accounts loaded... -- Export the 'accounts' table into csv
2. taking the new DB file from 7.1.1 with one account loaded - delete existing and then import the old 'accounts' table -
Swap original .db file with new edited one...
and congrats you too have a bootloop...
Anyone know how to PROPERLY export / import the accounts information ?
The sql table otherwise appears the same.. but I'm by no means an expert on these databases so perhaps I missed something simple.
Can't wait to see what happens from nox to bluestacks to memu to real versions of android on multiple devices with multiple android versions...
There HAS to be a better way to do this.?
Edit: 20 plus hours and many weeks into this problem
delving deeper into Titaniums site they have a suggestion for use on emulators that I did not notice; I will try and report back.
12. I have an Android device that is x86 based, and rooted. Can I use Titanium Backup ?​
YES. Please ensure that you have a working BusyBox on your device and make the following changes in TB preferences:
enable the “Force use external BusyBox” option (under Troubleshooting) then hit MENU -> Reload application.
1. I've noticed there are two places for saved account info; I still have no success in getting my edited database to properly recognize in the emulator.
system DE on older 4.4.2
and
system CE on 7.1 (also has the DE folder)
2. No luck on titanium either.
a. I've tried making busy box work on the emulator; it pretends to install successfully but when running shell commands it doesnt seem to work; therefore the number 12 from Titanium FAQ is something I can't seem to accomplish either... so Titanium will not work yet; maybe due to the busybox fail.
Blombardo said:
@jwoegerbauer thanks for the tip. using your filename I found a tutorial that listed the location as follows:
/data/system_de/0/accounts_de.db
I've verified this on Nox; my bluestacks still isnt rooted and it seems the phones I have with all email accounts loaded == are not rooted either== I'm going to need to find a workaround for that or make time to root bluestacks to get the account data out of it...
Problem is;
1 there are no passwords included here. Where are they? mine are all crazy long and I have no clue what they are... its very time consuming to manually input them via my password managing tool.
2 Once I export; and change the CSV into a spreadsheet to include all the other missing email /google accounts; how do I replace the accounts_de.db file on each device
3. Why isnt there an app that can do this already; lol?
EDIT
Titanium backup does have an 'accounts' export option that -sorta - works... problem is how picky the app is about using root plus super SU and refuses to work with Magisk (sometimes) or will constantly crash on (some) devices - or will fail to export/import unless you try (5 different file managers that can eventually figure out how to import their file type) - or is otherwise NEEDING root access to function...
Would be nice if a solution existed via ADB or simply in an un rooted device to do this; sorta like how google ''set up nearby device'' was supposed to work (and will; if you use only 5 or less accounts... but its also buggy and fails)
Click to expand...
Click to collapse
Thanks for the tip just used Titanium Backup to transfer accounts backup generated from one phone to another (using the generated backup files) both N916K rooted with Magisk version 23.0 (23000) without issues!
So is there any Progress or Solutions found yet?
A good thing would be to see all the accounts and then retype them manually if needed.
Else it would be much better to have something like Smart Switch.
Problem I noticed with SmartSwitch, when you try to transfer the Accounts. Samsung trys to grab and upload all the accounts to their server!! Why? I don't know, but it always asks for Internetconnection etc. ONLY when you want to transfer accounts, everything else works more or less.. some appdata not included sadly anyway.
Swift Backup doesn't seem to or did someone manage it to work with it?
Tipps and possible Solutions would be greatly appriciated.
It seems to be especially problematic with Android 12...
Hello, I'm having the same problem. I'm "bored" with obtaining a new phone because I have to set up so many things from scratch. real estate istanbul
A shame there still doesn't seem to be a good solution for this. TB only tries to backup the non-existent location, while the correct is /data/system_de/0/accounts_de.db
Manually moving just puts me into a bootloop, even after setting the correct permissions.
I dont know if this works, someone should test it.
GitHub - cluk33/android-multiuser-backup: A set of scripts to backup and restore apps and data of multiuser android devices.
A set of scripts to backup and restore apps and data of multiuser android devices. - GitHub - cluk33/android-multiuser-backup: A set of scripts to backup and restore apps and data of multiuser andr...
github.com
akhilkhan said:
I dont know if this works, someone should test it.
GitHub - cluk33/android-multiuser-backup: A set of scripts to backup and restore apps and data of multiuser android devices.
A set of scripts to backup and restore apps and data of multiuser android devices. - GitHub - cluk33/android-multiuser-backup: A set of scripts to backup and restore apps and data of multiuser andr...
github.com
Click to expand...
Click to collapse
I spent hours trying to get the script to work, but it will not backup anything in A13. I even disabled DFE on the device and started it over to test.

Categories

Resources