Finding packets and IP from decompiled APK? - Android Q&A, Help & Troubleshooting

So I'm working on a project on making an online android game work on PC from packet sending / receiving. Limited graphics.
Basically all packets are sent in a very unencrypted way, using very easy text and integers.
Easily picked up from packet sniffing, IP, Data etc. However, return results seems to be encrypted according to some packetscanning application for android. Unsure as packetscanning for android seems a bit meh. As I cannot get the game to launch thru bluestacks as hardware is listed as "Unsupported", I cannot find out for sure. Else I could have gotten more data and from that and could just have made the entire game based on the scanned sent/recieved packets coming from bluestacks. However the game also sends login info with each packet similar to
SendPacket(RetrieveResources,xxx,yyy,date,time,username,authid)
Username and authid is based of android hardware ID, which could easily be recoded into the java application.
But then I cannot find how it bases the authid and username of hardare id. Or how the application tells the server to create a new user.
Now, Myself I am an Java developer, however as I've never worked on Android applications previously this stuff is zzzz compared to real Java. I've managed to get about 99% source code from decompiling, deobfuscating and extracting the .dex file inside the application.
However, here's where things just go into full wtf-mode. I've extracted over 200 .class files into their correct folders and such, however, as confusing as this is. I simply cannot find how the game functions, or where it stores the IP and such, is it stored in an offsite .xml file? Storage file? Database? Resource file? Browsing through unlimited lines of scrap code, that seems irrelevant to the game, Facebook connections, Amazon, Google play purchase, Crittercism, GooglePlay classes etc. But noone of them actually seem to hold any useful data and alot of stuff actually just seems to be "Drag and Drop this into your application then call functions from it" like, "Authenticate to Facebook". I've managed to find alot of things loading .obb files, that doesnt seem to exist at all, tho the game pretty much goes "!blabla.obb" "CreateObb();" The game does not exist on facebook at all, just uses it to recieve ProfilID as an Login ID.
The game also uses UnityPlayer which seems to be the "Launch" class, which I've browsed thru but found nothing relevant. I found alot of .classes that seems similar to each other aswell containing the same stuff. I've also found alot of stuff that actually seems to be packet sends and connections, however, there is nothing that points that it is towards the game, but rather connections for i.e google play services.
Biggest .class>.java file is about ~40kb. Which for mee seems small, as projects I usually work with is well about 10mb inside the main.class then calls for unnecessary stuff from side classes.
Anyone mind pointing out on how android applications handles connections?
Is the files really no bigger than 40kb and just scrambled into tons of subclasses?
Feels like I'm missing obvious stuff that should be right there declared as a variable, but I can't find it.

Related

Barcode data transfer idea

Hello XDA-Developers!
I had an idea this morning.
Current Transfer Tech:
Bluetooth - Requires the user of both devices to enable their bluetooth devices, then they have to go about pairing the devices to allow file tansfer (this is not always the case though). then the, shall we call him "sender" has to select a file and attempt to bluetooth the file to the, shall we say "reciever", who in turn has to accept the data and then the transfer starts.
Wifi - not used very often but files can be transferred through an app or through an ftp server etc from one device to another. this however requires a little, if not more, skill to complete and can be fustrating looking for ip addresses etc.
NFC - this is an emerging technology that is being implemented in more and more devices such as the Galaxy Nexus. This is a very efficient and fast way to transfer data from one NFC enabled device to another NFC enabled device, however like most of the android community, my phone does not have this capability.
My Idea:
This is just an idea and you may say what you like about it but i thought i would write it down here, the first place that came into my mind where i thought that someone could take this idea further.
Now my friend uses a blackberry, and i know that that word is almost taboo on this forum but hear me out. He uses his blackberry for a service called BBM (Blackberry Messenger), i am sure you are all familiar, and to add a friend of his so that he can contact them using the service, he simply uses his blackberrys camera to scan a 2D Barcode on his friends device and all his BBM Pin and other data is transfered through the phones camera so that they can communicate on the service.
I though that this could be used more on android devices. This could be used to transfer small files from one device to another such as contact information, websites (already a reality), even larger files such as word documents and other reletavely small documents. Now i know that these files cannot be displayed on a single 2D barcode but maybe they can be send using not one barode but a series, the barcodes could be in an animation on the device screen, showing one barcode after another all and the "reciever" could simply hold his device's camera over the animation and it could read the series of barcodes and then compile all of the data to create a single document.
Now i realise that this could be a silly idea as the ammount of data that can be transferred through a 2D barcode is not huge, al lot of barcodes would be needed to transfer a larger file than someones contact details.
Let me know what you think, and you are free to do what you want with my idea, i wont hold it against you
hazzahex
Hello
I know it's a little late (only 3 years lol), but I just wanted you to know that I've implemented a system similar to the one you describe
It was my college's final project
hazzahex said:
Hello XDA-Developers!
I had an idea this morning.
Current Transfer Tech:
Bluetooth - Requires the user of both devices to enable their bluetooth devices, then they have to go about pairing the devices to allow file tansfer (this is not always the case though). then the, shall we call him "sender" has to select a file and attempt to bluetooth the file to the, shall we say "reciever", who in turn has to accept the data and then the transfer starts.
Wifi - not used very often but files can be transferred through an app or through an ftp server etc from one device to another. this however requires a little, if not more, skill to complete and can be fustrating looking for ip addresses etc.
NFC - this is an emerging technology that is being implemented in more and more devices such as the Galaxy Nexus. This is a very efficient and fast way to transfer data from one NFC enabled device to another NFC enabled device, however like most of the android community, my phone does not have this capability.
My Idea:
This is just an idea and you may say what you like about it but i thought i would write it down here, the first place that came into my mind where i thought that someone could take this idea further.
Now my friend uses a blackberry, and i know that that word is almost taboo on this forum but hear me out. He uses his blackberry for a service called BBM (Blackberry Messenger), i am sure you are all familiar, and to add a friend of his so that he can contact them using the service, he simply uses his blackberrys camera to scan a 2D Barcode on his friends device and all his BBM Pin and other data is transfered through the phones camera so that they can communicate on the service.
I though that this could be used more on android devices. This could be used to transfer small files from one device to another such as contact information, websites (already a reality), even larger files such as word documents and other reletavely small documents. Now i know that these files cannot be displayed on a single 2D barcode but maybe they can be send using not one barode but a series, the barcodes could be in an animation on the device screen, showing one barcode after another all and the "reciever" could simply hold his device's camera over the animation and it could read the series of barcodes and then compile all of the data to create a single document.
Now i realise that this could be a silly idea as the ammount of data that can be transferred through a 2D barcode is not huge, al lot of barcodes would be needed to transfer a larger file than someones contact details.
Let me know what you think, and you are free to do what you want with my idea, i wont hold it against you
hazzahex
Click to expand...
Click to collapse

Extracting Android geolocation cache from NAND memory dump / vizualization

Hello all,
I am a newbie to Android just like I am a newbie to that forum. I'd just like to share something I did recently, it might be interesting to some of you.
To start with, I am not at all a mobile guy. My hobbies are related to big and noisy machines, password security and GPU cracking.
I have an old HTC Wildfire though and I recently had to analyze an Android application (LastPass) so that I can perform offline GPU password recovery against its local database. Which in turn made my life more interesting
Until that point I never bothered to play with my phone as I only used it for calls, messaging and occasional browsing. My job is related to embedded development (mostly infotainment systems) so that at least I have some knowledge about that stuff...not exactly Android though, more like linux-based systems.
So while playing with LastPass, I quickly get accustomed to adb then it turned out LastPass stores its database on /data/data which apparently I had no access too. Reading some stuff about rooting my phone lead me to the impression it is going to be a problematic thing to do (disabling S-ON, updating bootloader, flashing other images and I have no experience with this). Well, I quickly found out there is a local exploit for Android <2.3 which had a funny starcraft name, so I tried it. To my surprise it worked and I was able to acquire the needed data.
Then after some time I decided to look at that /data filesystem again and I was surprised to find out quite a lot of stuff (contacts, messages, browsing history, all in sqlite3 databases). But I was really like struck when I discovered cache.wifi and cache.cell. I couldn't believe my eyes, then I googled it and it turned out this is all old news. But basically it's quite nice way to know where the phone owner was located some time ago. Then of course, Android limits that to last 200 wifi access points and last 50 GSM BTS'es.
Then suddenly I remembered the fact that this data is kept on NAND memory with a filesystem (yaffs2) that does software wear-leveling. Which means, we are likely to have several versions of the logical block split over several physical blocks.
So out of curiousity, I quickly coded some quick'n'dirty scripts to nanddump the device, then some ugly C code to carve the dump, looking for geocache data. Using the data recovered that way, we create a simple HTML file with some javascript to display all the GPS poistions over google maps. The end result was fun, I was able to remember where I was say one year ago (and my memory is bad).
The PoC code is attached. It's rather ugly and coarse, but it works (for me ). It runs on linux only (sorry). Feel free to experiment with it.
Regards,
Milen

Catch notes is going bye bye

So catch is being discontinued.. I need a legit solid comparable application, keep sometimes doesn't save photos.
Any personal experiences with evernote or spring pad?
I mainly use it to save photos I find on fb or Internet.
Thanks!
Sent from my SCH-I535 using Tapatalk 2
I am in a similar dilemma.
I don't like evernote, mainly because they are way too expensive (about 5$ a month is unreasonable in my opinion).
Evernote does not have a true offline option in the free version!
Here are the features that a good note app/service should have (catch notes had all these options):
Web interface and backup/synch (dropbox and web storage services do not count)
Offline editing and full access
Search everything (preferably as you type)
Categories/tags
Password options (preferred)
Reasonable export options is a must so you are not locked in to the app.
No monthly fees for above service (onetime fee only, or atleast a more reasonable month fee than 5$/month)
I looked briefly at the following apps/services and those are the issues I found which do not match my needs:
ColorNote: no web interface
MobisleNotes: web interface without search, no import/export option
Inkpad/notepad: no import/export option on web interface
Note Everything: no sync or export function
I figured I use catch regardless, and just use it for its internal storage options just sucks there aren't any real comparable services.
Catch stores data on android/data/com.threenbananas
Sent from my Nexus 7 using Tapatalk 2
masri1987 said:
Catch stores data on android/data/com.threenbananas
Click to expand...
Click to collapse
i have 3000+ notes and im looking at simplenote as a host, syncing with NValt on desktop, and there are a few android clients.
evernote is very reliable but too heavy. also i dont like that everything must have a title, and i you have to pay to store everything local. most of my notes are short and plaintext anyway.
however im having a lot of trouble importing them to simplenote. they have a tool but its super finicky and inconsistent. i think it will be easier to hack the notes into a client db, and then sync them up to simplenote. however this too is proving difficult because i want to keep the create and modify dates intact as well as the tags.
please let me know if anyone finds a soln.
in the meantime, id like to find the datafile on my phone. at the directory above i have hidden files turned on, but still see only media in ./media and one zero byte file in ./cache. where is the text data?
No luck yet
gnormal said:
i have 3000+ notes and im looking at simplenote as a host, syncing with NValt on desktop, and there are a few android clients.
evernote is very reliable but too heavy. also i dont like that everything must have a title, and i you have to pay to store everything local. most of my notes are short and plaintext anyway.
however im having a lot of trouble importing them to simplenote. they have a tool but its super finicky and inconsistent. i think it will be easier to hack the notes into a client db, and then sync them up to simplenote. however this too is proving difficult because i want to keep the create and modify dates intact as well as the tags.
please let me know if anyone finds a soln.
in the meantime, id like to find the datafile on my phone. at the directory above i have hidden files turned on, but still see only media in ./media and one zero byte file in ./cache. where is the text data?
Click to expand...
Click to collapse
It appears the support pages are still up, abet slow at loading
Code:
http : / / support . catch . com/customer/portal/articles/1020076-i-can-t-see-my-notes-in-global-search-on-android
I can't see my notes in Global Search on Android
Last Updated: Apr 16, 2013 12:25PM PDT
We have made a decision to not allow for a Global Search based on security reasons. With the option to set a passcode on your notes, we feel that Global Search would navigate around this and violate the notes security.
For example: If you have a passcode set on your notes, yet we allowed for Global Search, any term you search for may return a result, thereby indicating that the searched for text is part of a note's content.
Click to expand...
Click to collapse
Im currently looking for a way around this as im trying to use dropbox (storage) and dropsync (to sync particular folders)
If this fails it appears ill have to learn how to create apps and create my own with the Catch API
Failing that decompiling and rebuilding it to my specs is prob the final method
lets hope it doesent come to that
As you can see I haven't been converted to the dark side of other apps yet
Me too. I'm still using catch but locally.
Sent from my SCH-I535 using Tapatalk 2
Did anyone actually get an email regarding this shutdown? I had a bunch of notes stored in AK notepad which are basically lost forever, and I don't have any emails from catch.com notifying me of the termination - I'm just finding out today.
Maybe they ended up in my spam :/

Torque Pro OBD app and data logging

So i got myself an OBD bluetooth scanner and the Torque app...bloody brilliant.
So much information!
anyway, i cant seem to get it to upload data logs to the web viewer?
i have my account created and setup correctly but nothing in the web viewer when i log in.
Does anyone use the app and have any ideas on how to get this to work?
Secondary i have e-mailed myself some data logs and cant get them to open properly?
I cant seem to get Track Recorder to work with Torque Sync software, it stucks at Searching for Torque
Valiceemo said:
So i got myself an OBD bluetooth scanner and the Torque app...bloody brilliant.
So much information!
anyway, i cant seem to get it to upload data logs to the web viewer?
i have my account created and setup correctly but nothing in the web viewer when i log in.
Does anyone use the app and have any ideas on how to get this to work?
Secondary i have e-mailed myself some data logs and cant get them to open properly?
Click to expand...
Click to collapse
I imagine the particular posters have found answers to their problems seeing as this thread
dates from 2014 but I thought it might be worthwhile answering all the same as I ran in to the same niggles when I began using this app so if anyone searching these issues subsequently may find some worth from my reply.
First of all as a far as experience and knowledge is concerned. Firstly with cars;fixing,modifying, engine management tuning, obd2, diagnostics. Basically my auto knowledge is extremely wide and extensive from approx 35 years of obsession and getting stuck in an the deep end whereas my knowledge and experience of computers and smart phone tech is on much, much shakier ground
In fact, for those of my vintage. i.e late 30s,early 40s remember when we were kids. and programmable VCRs were the height of cutting edga technology. Well I'm like the way our parents and grand parents were then. i.e pretty much baffled by it and even following the instructions it was hit and miss whether you actually managed to record that film rhat was on at 4am lol.
So for the second issue brought up by the OP it doesn't matter whether you email yourself the log file or not (I found the few times i tried it that the file wouldn't attach and when it did the problem was the same anyway) you need Microsoft Office or any other type of office suite to view the files. On the pc i have Microsoft office but had to download an app to my phone to view. csv files. Again an office suite that not only displays. csv files but puts them into a spreadsheet format is required.
As for the first issue it's preferable in every way to view the site. on a pc because on the phone display the actual box to sign into is off screen and takes a little bit of zooming out and seaching to find, the same goes after you have signed in when another box appears with a list of the logs files recorded and the tab to choose it. This is where my lack of fundamental computer/web knowledge comes in. I can't tell you why it doesn't sit nicely inti an easily accessible mobile format but it doesn't. Once you've found the first sign in box/pop up it becomes simple, annoying but simple.
As for there being nothing after signing into the webview site successfully all I can assume is either you've no log files to view which you should have if it's all been set up correctly, including choosing which PIDs to send to logfile or the pop up/window where you click on your logfiles is right off screen and has to be looked for. Of course you don't get that problem if accessed using your desktop.

Tip for Code Editor on Android

I search a good Code Editor for Android. Since there are many Texteditors available, i didn't want to try out all of them, to find the right one. So maybe someone here can please suggest a good editor for me? In the first line, the Editor should be load fast, also with huge Textfiles with 500Kb or more. The App should also find the correct encoding for the File automatically, since i would like to use it with Windows and Unix/Linux Files. Brace Matching is needed, Syntax Highlighting for files like PHP, HTML, CSS, Apache Config and so on are welcome, but not a real must have. Also, if there would be code folding support, this would be a great thing. Its not important, if it is a paid or free app. I would purchase the app, if it is good enough. I have tried QuickEdit, which seems to be really fast, but i doesn't have brace matching. DroidEdit seems to have all features, but it was very slow on a Galaxy S7, compared to QuickEdit. With Quoda i miss Syntax Highlightning but the App crashes with large files. TurboEdit doas not load my Files either, i don't know why. So the closest things are Quoda and QuickEdit.
Maybe someone here have other suggestions? Maybe with additional feature where i could use this App also as fast Viewer for large Logfile?
May be this one be comfort for you
I use Dcoder, Mobile Compiler IDE - play.google.com/store/apps/details?id=com.paprbit.dcoder&hl=ru (sorry, I can't post outside links)
It's fast and supports many languages. But i didn't test it with a big files.
It's free, but have ads, that don't work without internet connection. =)
what is a code editor?

Categories

Resources