Games logs? New to Android Software and Hacking - Android Q&A, Help & Troubleshooting

Hi,
I'm learning about Android development and hacking, so don't be too hard on me
I'm trying to create a bot to play a game (just for research purposes), and I need to get information about the match in realtime. I thought that maybe using logcat I would get some info, but it looks like nothing is logged. I'm using MEmu emulator by the way.
The command I'm using is:
Code:
adb logcat com.example.game:v *:S
And the only thing I'm getting is:
Code:
--------- beginning of main
--------- beginning of system
Is it normal that games don't log any message at all? Or am I doing something wrong here?
As I said, I'm new to this world, so please understand my newbie-ness.
Feel free to move this thread if it is in the wrong category.

@igonro
If an app / game doesn't produce system-wide log messages ( what are stored in a series of circular buffers ), then you of course can't retrieve any log messages via LogCat tool with regards to that app / game. Note that by default only raised runtime exceptions and errors while running an app / game are logged.

Related

[Q] Can app inventor apps write or read text to /from sd card?

I have been writing an app with app inventor, for my own use but I think it could be of use to others. It is very simple, you type in a cosmetic or a food ingredient name and it tells you all about it (for example if the ingredient has any negative health effects or contraindications).
Currently the app takes an input and essentially does an IF the user typed in "this text" then show them "this text" but that means a lot of IF THEN commands.
I only ever tried BASIC programming and I see that app inventor seems to have no equivalent to a file or write command whereby I could store the database of ingredients on the sd card and search that for information to display to the user.
As it stands the app is nearly five megabytes in size already due to having to store its data internally within the program, is there a way a newb like me could use app inventor to simply search from and display from a text file?
Dave
why don't you use a database (TinyDB) instead of all those IF.
Try looking at this tutorial
Code:
http://appinventor.googlelabs.com/learn/tutorials/textgroup2/textgroup2.html
Thank you
I looked into tinydb, I understood it had a limited entry limit and didn't see the page you linked to when searching before so will study that as it looks like what I may need.
I have one question though, I am a newb so excuse me if this is obvious.
I am writing the app using the emulator to test it. As I understand it the tinydb database is only accessible by the app that creates it and so my app will need a routine in it where I can manually enter the data, but then surely each time I test run it I shall have to re enter all that data as apparently the emulator would wipe the database on each re run?
If tinydb cannot store data unless entered from within the program accessing it doesn't that also mean that when packaged the database would be empty until someone typed in data which would defeat the object of it being a searchable database of pre stored data?
Dave
EDIT: According to google developers at googles forum "TinyDB is persistent ONLY when you've packaged and downloaded your app.
When you are developing with the phone connected, and you quit the appinventors app -- or disconnect the phone and restart -- the phone treats that as a completely new application. " which means that the only way to get my data into tinydb file is enter it when packaged and on my phone. But then every user who installed it would have an empty database, so seems canonly use those if then statements after all
I've never used app inventor, so I'm not talking from experience here, but couldn't you package an XML file with the data in it? That way, future updates to the data could simply include an enhance XML file.
Like I said - I don't know app inventor. It's just a thought.
Thanks to the replies here, along with some help and examples at the google groups coffee shop forum, I found the information I need that should enable me to set up a custom tinywebdb database and on first run of the app populate this data from there into a local tinydb database for subsequent use
Dave
If you have a link, Dave, then share it. I need some info on the tinydb too.
I'm in the same boat hear, do you happen to still have a link for any info you obtained on this Dave?
This explains everything:
http://appinventorapi.com/program-an-api-python/

[Q] How can I test for malware?

How does one go about testing APKs?
Maybe using a sandbox environment or a virtual machine. Any recommendations?
Maybe using a live-android device and placing it behind a sniffer to watch for phone home traffic?
What methods are other people using?
You could use an anti-virus app.
Theonew said:
You could use an anti-virus app.
Click to expand...
Click to collapse
Which Anti-Virus app do you like?
However; I am thinking more along the lines of how TreveE found Carrier IQ spying, or when Fnorder discovered Dolphin Browser spying.
My main concern for the Android community is when I see random forum members posting APKs. I see this happening in development threads all the time - maybe the majority of the time the APK is what it claims to be; however... I fear malicious posters using android forums as a launch pad for virus, spyware, malware, keyloggers...
A Couple Thoughts
Perhaps monitoring network traffic with an app such as 'TrafficStats Lite' would provide the start of a bit trail.
Then if suspicions continue, reviewing logs could be facilitated by something like 'Log Collector'
On a rooted phone using 'Terminal Emulator' and 'BusyBox', you can search right in the logfile from your device, such as with:
$ su
# logcat | busybox grep STRING_OF_INTEREST​
adb also supports logcat.
Hope this helps!
btw: All the entries in 'single quotes' are names of the apps on the market. I had to remove my links to them as this is my first post.

[Q] Bug Tracking System Project / Help me

I am doing a project for my class and I am quite confused with how to start this "bug tracking" system. I've done some research and looked at diagrams but still a little confused. I really want to learn how to start it and to know how to actually build it and not just get it done for an assignment. So any help that will get me started will do! Thanks.
I would prefer some tips and guidance, and NOT looking for answers that will get my project done fast.
So far I have only written some tables such as:
Account Type (Knowing which role of management is having the bugs)
Employee (To where the bug will be assigned to)
Bugs (Or what applications are having the error)
Bug Logs? (
Status (The status of a bug if it has been opened, assigned, closed, etc. I have no clue how i can fit this in to work)
The system should have no more then 7 tables.
I am going to do this table in MySQL workbench.

Serve http URI locally

I have an idea to integrate the S-Note app with the rest of my Note 3 (Android 5.0 rooted) file system using its undocumented feature of auto-converting URL-like text into clickable links. In a nutshell, I want to click such a link (it recognizes http:// and ftp://) pointing to a local file on my device and have that file displayed in one of the apps supporting it. The obvious way to do that is installing a local http server.
That worked to some extent as expected. However, the webserver app I've found on the Play is in java, have a lot of advanced features I don't need, and thus consuming too much of resources to keep online 24/7...
My question is: what would be the best modern way to achieve what I want? E.g. a small native code single threaded daemon I can autostart on the system's restart to serve my files?
I saw the Native Android Web Server 1.1 but it's not working anymore (see that thread for details).

How to find Info/Errs from an Android App Crash to steer toward App's bad Settings?

I'm a long time developer but brand new to Android, with my having past experience developing in Unix systems as well as a lot using Cygwin in Windows. I have a newly-installed App that seems popular called 'C Locker'. So far, I've just got the Free version because I'm trying it out to see if it does what I need. Unfortunately, it's now crashing with the Settings that I've enabled, and as a general developer, I'm interested in seeing if I can glean information from the Bugreport (or whatever else I can use...perhaps even gdb on the device itself?) to help me know what specific Settings might be the problem being that there are so many of them and I would prefer to gain some type of help from my phone in figuring out what the bad settings might be that I've enabled that are causing the problem rather than to spend all day flipping them around. I've already scanned through the Bugreport after uploading it to my computer, examining all of the references it makes in there to "com.ccs.lockscreen" with this apparently being the process name for the C-Locker program. I've seen indications in there where it indeed shows that it has crashed, but I couldn't yet discern if it is able to give me pointers as to what the cause of the crashes might have been. Is that possible to gain such information out of these Bugreport files? Or is there a way to run it directly in gdb on my device to perhaps see the stack at the time that it crashes, for which the names provided might help to discern what specifically it was trying but failing to do at the time? If it helps, as an intended future Android developer, I've already gotten Android SDK set up on my computer, although I haven't yet really used it much to speak of for anything. I also have adb working from my computer to the smartphone and even have rooted it using a rare method being that I have an older phone purchased years ago via Amazon that I didn't activate until about a month ago. (It's an LG G4 VS986 version 13B so I couldn't use the popular rooting method for version 11A but instead had to use the "Injection" method which took me FOREVER although I finally got it to work!) And just in case it helps perhaps even to bypass a direct answer to this question (although it will still of course be appreciated), my Settings within C Locker involve having set it to be a Device Admin and to bring it up as the first App upon Reboot as well as I've selected within the Root category to make it a System App as well as my then having Disabled ALL things that typically show on the screen (such as 9-1-1, camera, Etc). I had left it set to the default "Gesture" Unlock method, but whenever I bring up the App again and go into "Unlock Methods", it now immediately crashes each time (as well as upon Restarting the phone!). So this covers the majority of the most significant of the Settings that I've made on it so far to the best of my recollection. And I feel that if I could get some indications from the system as to what the specific errors may be when its crashing (or from a stack trace or whatever else), then it might help me to discern what specific Settings are creating the problem being that perhaps I just have an odd (rare) combination of Settings on it that I can tweak to get it working. My goal is to ultimately get a lockscreen App that I can use a Pattern type Unlock with that allows an UNLIMITED number of Failed Attempts (so that it won't ever Factory Reset my phone after the 10th or ANY number of failures!!!). I also--as mentioned above--don't want ANY shortcuts whatsoever being accessible BEFORE the phone is unlocked...not even 9-1-1. Anyway, so if there's a way to glean information from the Bugreport (or from whatever other methods available) to find the specific cause (involved errors) of this or any other App that's crashing that I do NOT have the source code for (being that I of course am not its developer) then it will be greatly appreciated to know how to best find this information. (And I promise that I've already searched extensively on Google but couldn't filter out its replies all being based on the idea that I'm the developer of the App that's crashing, with my even trying adding phrases such as "not my app" and "not the developer of" Etc to no avail...lol). Thanks.
By the way, if I shouldn't have combined the 'C Locker' Settings details into this post, then please just let me know because I'm new to posting here. Also, unfortunately, if I don't receive any help with this right away, then I'll be forced to start testing different Setting combinations anyway, which would then of course solve this problem but without knowing truly what exactly was causing the issue. Even if so, it will still be helpful in the long run with other potential App crashes to get the answer to this general question.
Unless not disabled by user, all runtime activities in Android are logged, so app crashes and their reason also. You can view this log by means of Android's logcat command-line tool or by means of a LogCat Viewer app. My POV: logcat is essential for determining what an app and the Android OS are doing while the app is running on a device.
BTW: Android's log can be filtered per package, too.
Thanks!
jwoegerbauer said:
Unless not disabled by user, all runtime activities in Android are logged, so app crashes and their reason also. You can view this log by means of Android's logcat command-line tool or by means of a LogCat Viewer app. My POV: logcat is essential for determining what an app and the Android OS are doing while the app is running on a device.
BTW: Android's log can be filtered per package, too.
Click to expand...
Click to collapse
Thank you, and since posting this, I've been learning more about Android Studio and have used it to actually see the stack trace within the "Android Monitor" pane there in order to find the instant reason why the/ANY (meaning 3rd party as well) App is crashing at the time! Thanks again for the help!

Categories

Resources