[Q] android App path - General Questions and Answers

I have installed an Android Application which was developed by the friend of mine. It had installed on my Android phone (HTC G2, with Android 2.2). I need to locate the application forlders, and especially SQLite database which was created along with the application, because I need to copy it to my PC. I did seach on SD card but I did not found it, so I assume it must be on the device RAM, but I really don't know the structure and how the apps are organized. I might suspect the SQLites data filename, but that all I know at the moment.
Can somebody pint me to some utility which will allow to find the database, and the application path, and most of all to copy it to the PC ???
Thanks - Arthur

The database and any other "data" used by the app will be located in /data/data/ then inside a directory that corresponds to the app's package name. If we use the Kindle app as an example, the path to it's data would be: /data/data/com.amazon.kindle

unfortunately I checked this foldeor on RAM as well as SD and couldn't find it. device /data folder is empty, and SD gas some other stuff bot not this App.

aklisiewicz said:
unfortunately I checked this foldeor on RAM as well as SD and couldn't find it. device /data folder is empty, and SD gas some other stuff bot not this App.
Click to expand...
Click to collapse
I should have also said, you need to be rooted in order to see the contents of the /data directory. Without root access, it will be shown as empty because you do not have permission to view or modify. If your phone is rooted, you can use Root Explorer, Terminal Emulator, or adb to access /data and copy, modify, create, or delete files there.

Thank you for your time. That would explain why I do not see it.
OK, I have HTC G2 from T-Mobile, I think it has Android 2.2
Nothing was changed or updated on this phone since I bough it last fall. I'm not with T-Mobile anymore so I do not wat to mess up with the phone unless I'm really sure what am I doing. The only nice thing is that the phone is unlocked now. The reason I ask those questions is because I am working on some tool, which is a desktop program wchich supposed to sync SQLite data from device to the PC.
What I want to do is to connect the device through USB cable, then have it mapped is it normally does (i.e. drive H. Then access the SQLite file from the desktop application by opening the database through that link and syncing the records. Not sure but I hope this approach would work. If it cannot work that way then eventually I want to copy the SQLite dB file to the PC sync database and then copy it back to the device. I already have a desktop App which work on SQLite localy so now I want to access the device, having the same dB file residing on my android phone instead on my local HD.
What could be the reason that the installed APP doesn't want to move to SD ???
I would appreciate any suggestions...
What is required to root the phone? I've herd there are some risks. Besides I probably have to find some other solutions as none of the App users would want to root their devices (or have a knowledge how to do it).

aklisiewicz said:
Thank you for your time. That would explain why I do not see it.
OK, I have HTC G2 from T-Mobile, I think it has Android 2.2
Nothing was changed or updated on this phone since I bough it last fall. I'm not with T-Mobile anymore so I do not wat to mess up with the phone unless I'm really sure what am I doing. The only nice thing is that the phone is unlocked now. The reason I ask those questions is because I am working on some tool, which is a desktop program wchich supposed to sync SQLite data from device to the PC.
What I want to do is to connect the device through USB cable, then have it mapped is it normally does (i.e. drive H. Then access the SQLite file from the desktop application by opening the database through that link and syncing the records. Not sure but I hope this approach would work. If it cannot work that way then eventually I want to copy the SQLite dB file to the PC sync database and then copy it back to the device. I already have a desktop App which work on SQLite localy so now I want to access the device, having the same dB file residing on my android phone instead on my local HD.
What could be the reason that the installed APP doesn't want to move to SD ???
I would appreciate any suggestions...
What is required to root the phone? I've herd there are some risks. Besides I probably have to find some other solutions as none of the App users would want to root their devices (or have a knowledge how to do it).
Click to expand...
Click to collapse
Took me a bit to get back to you but figure better late than never...
Here is a good FAQ on rooting among other things specific to the G2(the US variant of the Desire Z). In order to root your G2, this guide looks to be good as he's simplified and automated a good bit of the process, should be safe, and seems to work. You'll need to install the two apps he mentions in step 1 and download the zip file he mentions in step 2 which is attached at the bottom of the post then just follow the instructions.
As for the database stuff, if you end up needing to access the /data directory you'll have to be rooted. Also, moving the app to the sdcard won't really help you with having access to the app's files. Froyo built-in App2SD just moves the apk file to a hidden directory on /sdcard (.android_secure) but the app data, cache and all that stuff will still be on internal memory. But to answer why the app won't move to the sd card, I'm guessing it's because the app itself must allow for it to be moved since by default, an app doesn't have this enabled unless the app dev gives it that ability.
To communicate with the phone, even with root access, you'll probably have to do so through adb commands or use an adb shell to be able to run shell commands on the phone. This would require adb be set up on the user's computer. If you want to play around with adb, there's a nice guide called ADB for Noobs that goes through setting it up and starting out using it. I can't say I've really done anything with SQLite databases on Android and certainly not then syncing it to a computer so I could be off-base or overlooking a workaround.

Thank you for your valuable information. You guys are really great help, and I appreciate your time. I will study the links provided.
In the meantime my main concern is to access SQLite database, as I need to get to the records, or at least be able to copy it back and forth between device an PC. I guess the database file would be something like MyDatabase.db , but I have no cule how to find it and copy it. As you have said it might be in some system protected directory. The main issue is that I will ne a solution which would work on every standard device (no the rooted one), so I need something very easy for the user to setup and follow. I have seen a utility that allow to manipulate SQLite records directly on device, but again thsi tools requires to root the phone (which I'm reluctant to do) because ot the above reasons. If you could help my to resove this I would be very graceful!
Arthur

aklisiewicz said:
Thank you for your valuable information. You guys are really great help, and I appreciate your time. I will study the links provided.
In the meantime my main concern is to access SQLite database, as I need to get to the records, or at least be able to copy it back and forth between device an PC. I guess the database file would be something like MyDatabase.db , but I have no cule how to find it and copy it. As you have said it might be in some system protected directory. The main issue is that I will ne a solution which would work on every standard device (no the rooted one), so I need something very easy for the user to setup and follow. I have seen a utility that allow to manipulate SQLite records directly on device, but again thsi tools requires to root the phone (which I'm reluctant to do) because ot the above reasons. If you could help my to resove this I would be very graceful!
Arthur
Click to expand...
Click to collapse
Unless there is some trick I don't know about you are going to have to be rooted to get access to the database. I found a couple links discussing this: here and here. The second link does mention that the app with the database you want to access could be written to store the database on the sdcard where it would then be accessible but that would be unsecure since anything could read/modify it there.

Thanks, looks like I have to do more research on my own. It is hard to believe for me that Google would not allow to access the same database from different Apps. I've seen there is a Java class ContentProvider which seems to allow that, so I will study this, perhaps it will help. Thank for you help.
Arthur

Related

[Q] Disabling Android 2.2 DropBoxManager

Good Day Folks.
I'm a Noob in need of help and i'm hoping the more experienced among us might be able to assist. I have an issue with disappearing phone storage. Over the course of a week I realized that I was losing about 1MB a day. My phone would basically be dormant and I would still see my storage space dropping by this amount everyday.
Cache cleaning didn't work. Later I realized that Android creates a bunch of log files in Data/System/Dropbox that was responsible for the disappearing phone storage trick I've been seeing for a while now.
I know now that Google has incorporated into Android as of the 2.2 iteration, a DropBox Manager that's responsible for logging all of the events that take place during the course of a running Android session. Everything from what took place at boot to force close details.
I understand that this is used for debugging purposes but I'm no developer . So my question is.... Can this DropBox Manager be disabled....somehow.
I really don't need all these files (and its A LOT OF THEM) being created as they serve no practical purpose for me. Not sure if anyone else might have noticed this but I'm hoping to receive some help. Even if it means pointing me in the right direction so I can work on it myself.
I really don't have a clue on how to start. Any help will be appreciated....Seriously...
Currently using G1 with CM6 Magpie running on EZTERRY's 2.6.34.7 kernel.
Its perfect except for this annoying problem.......
Hm what happens if you rename the directory. It might throw some errors in the logger, but probably won't create anymore files.
I just deleted the content of my dropbox folder, the DropboxManagerService was throwing some errors that he could not open files, but the phone was fine, no FCs or anything.
Renaming the directory just results in a random reboot. My guess is that when Android tries to create a new log, its unable to find the directory and then it just freezes and after a while it reboots. Once restarted it just reappears... I've tried that too.
And its true.. Its ok to delete the files. Its what I do currently. All of those files in Data/System/Dropbox as well as the ones located in Data/Tombstones are ok to delete. As I said, its just used for debugging purposes. Whats really annoying though is that, no matter how many times you delete anything, they just get repopulated just as fast as they're deleted. I'm ok with micro-managing my memory and phone storage (its a G1 after all) but this is ridiculous. It just creates too many of these log files too quickly.
If there was a way to turn the DropBoxManager service off then that would be the end of it all.
What's unusual about it too is that in my particular case, the contents of these text files just have two things listed in them. Pertaining to my online accounts associated with the phone: My Google account and My Whatsapp account...
It just repeats the same thing over and over again. I'm starting to think that the event data might actually be synchronization data or at least synchronization attempts made at regular intervals. But ultimately i'm guessing....
I really don't have a clue... Have you ever heard of anything like this on XDA......possible resolutions of this issue?
epolaris said:
I really don't have a clue... Have you ever heard of anything like this on XDA......possible resolutions of this issue?
Click to expand...
Click to collapse
Not yet .
What about replacing the folder by a symlink to /dev/null ?
You could also try to change permission on the folder.
Ok... I'm a real Noob but I'll take a shot.. When you say symlink what do you mean.
I'm not really familiar with Android at that level yet its really just flashing and such.
But I know a symlink is really just a reference to a location that the OS would interpret and follow (like a pointer i think). So, is it that you're suggesting some sort of redirection where the Data/System/Dropbox directory is pointed to another arbitrary location. Kind of like a creating a dead link that Android is unable to follow up on. Or maybe, redirecting the folder to an entirely new location that Android would then follow. I'm not sure... How do you perform a symlink in Android... I'm willing to try.
You can do it with a console on the phone it self or using adb shell. You need root of course.
You could make a link to another location where you have more space?
Or you change to permissions of that directory to write only.
Or you can mount a different file system to that directory that is read only.
On how to do that just google a bit for linux tutorials on that topic.
I have just googled a bit and it seems you can't symlink directories to /dev/null.
If all that doesnt help post again, there might be an option to make an app delete the files automaticly, first time they get created.
If that would be an option too let me know, im in the mood to program something intresting .
Disabling Android 2.2 DropboxManager [RESOLVED]
I took your advice and did the research you suggested and it worked.
The first thing I tried was changing the permissions on the "Data/System/Dropbox" directory and it worked. But I didn't use CHMOD and console command line to do it.
I have a program called Root Explorer that allows me to permanently change the permissions on any file or folder I select. I set all of the offending folders to read only and the log files stopped being written to those folders.
These are the directories I set to read only:
1. "Data/System/Dropbox"
2. "Data/System/UsageStats"
3. "Data/Tombstones"
Since changing the permissions on these folders my phone storage has stopped dwindling out of control. No additional programming necessary
Disabling the DropBoxMangerService itself is not necessary which is good.
I'm going to take your advice and read up some more on Linux commands (specifically Ubuntu as its what I currently use).
You have been very helpful, thanks for the advice. If you have any ideas about Froyo ROMS (Maybe even Gingerbread ) I should try let me know.
Thanks again....
I have also found these files. They can take MUCH space in memory and nothing seems to delete them. I made the dropbox system folder RO but I think this is a bug. It should be reported to the dropbox team. Is there a bug report form somewhere? I did not find it... Just found the forum, QA,...
[edit]I reported it in the forum... Just see http://forums.dropbox.com/topic.php?id=41227 [/edit]
vax said:
I have also found these files. They can take MUCH space in memory and nothing seems to delete them. I made the dropbox system folder RO but I think this is a bug. It should be reported to the dropbox team. Is there a bug report form somewhere? I did not find it... Just found the forum, QA,...
[edit]I reported it in the forum... Just see http://forums.dropbox.com/topic.php?id=41227 [/edit]
Click to expand...
Click to collapse
You are mistaken: /data/system/dropbox, has NOTHING todo with www.dropbox.com !
See http://developer.android.com/reference/android/os/DropBoxManager.html
Dark3n said:
You are mistaken: /data/system/dropbox, has NOTHING todo with www.dropbox.com !
See http://developer.android.com/reference/android/os/DropBoxManager.html
Click to expand...
Click to collapse
Hey, just looked at your SD Maid app (looks cool).
So what do you know about /data/system/dropbox? I just read that htc uses the dir to store phone events which is then sent to the htc cloud of spying-on-your-ass. But since non-htc phones have this dir, is htc merely misusing the directory and it has other legit uses, or is this a directory we should try to keep cleaned out?
(I like the idea of changing perms so nothing writes to it if that's the case.)
600 MB additional free storage
Hi all
Just found a smart way to increase your Dropbox account with 600 MB:
1 Sign into your existing Dropbox account (or create a new account)
2 Goto https://www.dropbox.com/free
3 Follow instructions ... and voila 600 MB additional free storage
Mittaa said:
Hi all
Just found a smart way to increase your Dropbox account with 600 MB:
1 Sign into your existing Dropbox account (or create a new account)
2 Goto https://www.dropbox.com/free
3 Follow instructions ... and voila 600 MB additional free storage
Click to expand...
Click to collapse
Yay, nice to see you didn't read the thread at all.
This has nothing todo with dropbox.com
Yea other day I got the SD Maid, and the Pro version after I saw how handy it was. I too on my G1 (with 2.2) see that dropbox folder.. and lately Ive been thinking its causing my G1 to constantly reboot. When I look, it has 300+ files in it. So I clear that folder and seems to stop rebooting for a lil while.
Not sure what the deal is here however, been trying to find out. HOWEVER it only seems to reboot once its connected to the internet, so I am wondering if this is where it tries to upload and so. Not really sure. That and its hard to tell in logcat whats going on before it reboots.
Thanks
Excellent information. This works on my Sony Ericsson Xperia Pro MK16a, Rooted. Thank you so much. My best regards.
Try to change the permisions of the folder, I'm not sure if it would work but you could try ^^
Sent from my GT-I9001 using xda premium
All is ok
All was fine. The permissions :laugh:changed with root explorer. Thank you so much
Note completely disabled but only 1 file in the /data/system/dropbox folder with these Android shell commands (or use Sqlite3 editor):
content insert --uri content://settings/secure --bind name:s:dropbox_max_files --bind value:i:1
Or for Android 4.2+
content insert --uri content://settings/global --bind name:s:dropbox_max_files --bind value:i:1
settings put global dropbox_max_files 1
Reboot.
more dropboxmanager settings:
dropbox_age_seconds
dropbox_max_files
dropbox_quota_kb
dropbox_quota_percent
dropbox_reserve_percent
I've been using the advice from this thread to control this "dropbox" data collection directory for several years now until I updated to 9.0 and found that the folder and default permissions were restored after every reboot. Was irritating bc I can use root to modify /system but no longer have control over my own data partition Something is over-riding my root-user!!!
I tried different apps, TWRP's FM, adb, and almost gave up when init.d scripts wouldn't work either. init.d will work tho. A simple script to run
Code:
#!/system/xbin/sh
busybox rm -f /data/system/dropbox
at boot. You can probably chown and chmod if you want but I just deleted it. Just put it in your init.d folder and make sure you give it the correct permissions (root:shell -755), then immediately perform a soft reboot. Use hardware keys if you have to. You want the phone to go immediately OFF, no spinny wheels or "powering off" notifications. That's the only way I could get rid of the damn thing.
Anyway, I came across this thread while searching for a solution and thought I would add this in case any other paranoids like me are concerned about this mysterious "dropbox" directory. This will probably break any ability for google to troubleshoot your phone but I don't think that's real anyway. It's just spyware as far as I'm concerned.
p.s. (off-topic) Thanks @Dark3n I'm also a frequent SD Maid user btw and in case you happen to read this, I thought I might mention I intended to send a donation via your app the other day (i like to show love when ppl share badass works) but balked at the only available option for "pizza," not bc I don't appreciate it that much but I can afford a little every now and then. If you add a smaller option, "coffee" or beer or whatever, maybe even an outside of googlePlay option, BTC perhaps. I'd be happy to shoot a few dollars at you.

making an app for small file transfer to specific device

I tried to make the subject as small as possible while still stating my point.
Basically I work with a device a lot that runs some machinery. There is a file that is sometimes updated to run the machinery better, we usually update the file on the device when some aspects of the equipment are changed. The file is pushed onto the device using software on my laptop. The software on the laptop is written in C++. I want to make a light version to run on my android phone.
My idea is to create a simple program to run on my android phone that will push the file onto the device after it's edited for changes to the equipment. I opened the C++ exe program in a decompiler (rec4) and I started trying to dig through the code, there are soooo many lines of code in this program, and I don't even know what string to look for. I'm trying to find the exact string that pushes the file to the string so I will know how to write the exact thing in an android program language for my phone only to push the file to the device after I plug it in through the USB connection. That way I have a simplified version of the program running on my phone solely for pushing the file to the device, instead of carrying my laptop around all the time to push a little file.
In a nutshell, after I have described why I need this, I'll simplify everything. A program I have is written in C++ and it pushes a simple file to the flash memory of a device that runs some equipment. I want to be able to push the file from my phone instead of my laptop. So I want to know the string to look for that would push a file onto flash memory.
How the program works. If I have the program already running when I plug in the USB, I have to select "file", then "establish connection" so that it connects, The program appears on my laptop to reconfigure it. I search for the new file to replace the old one and send it to the device. By default the program tries over COM1. It has to be changed for my laptop because it's new and doesn't have the com1 connection, I have a USB adapter that I use.
I hope I explained this well enough, it's really not as complicated as I'm making it out to be.
So does anyone know where I can look up the C++ command arguments to push the file onto the device? And also what the command arguments would be for android to push the file onto the device via USB?
Hello,
If you are a developer you might want to look at this link:
http://developer.android.com/reference/android/hardware/usb/package-summary.html
If you aren't, I am afraid this isn't going to be as simple as looking for strings in a decompiled program and translating the code to different languages. You might want to get a developer to make this application for you.
If possible can you also give more info on this device? Is it like you plug in the device to your laptop and you can access it like any USB memory drive? Or the device can only be accessed using that program?
Edit:
The android.hardware.usb was apparently introduced in Android 3.1. So you won't be able to use that to make an application that you described for your phone...
The device basically controls an advanced machine with multiple inputs sensors and output and switches. It has it's own power supply, it just needs updating every now and then to refine/change the cycles and rotations. I contacted the company that makes the device, and they said they haven't made any software to run on android. They couldn't give me any information on how the laptop program communicates with the device. It seems like the file that needs editing is just stored back on the device in flash memory. When the laptop is plugged in and a connection is established, the information that makes up the configuration file appears on the laptop program from the device. I don't know if the program pulls and reads the file, or if the device copies it to the laptop. It's probably the laptop that reads it.
I'm not a developer, I know a little about programming from college, and I have enough patience to sit and read or watch videos until I know how to make something that works. I know a guy that talks a lot about making android programs, maybe I can ask him for pointers.
My android phone has a mini USB port, what's the new thing that's in android 3.1 that's not in my 2.2 regarding USB? Is the USB on the android 2.2 limited in what it can do? I know mine can tether and transfer files, but is that something that the computer does instead of the phone?
I'm trying to find another HTC HD2, I sold mine and I shouldn't have. I've heard a little about people putting android 3.1 on the HD2, I'm not sure if that's true, but I'll look more into it.
If its a file that the device is reading the data from, you'd also have to find out how the data is exactly being stored in the file. I guess this could be figured out through the decompiled program or maybe if you can access the file yourself somehow.
The thing is that the package(android.hardware.usb) that allows you to write applications in which your phone can act as a USB host(I guess this is what you want your phone to behave like in this case) was introduced in Android 3.1 and its not present in Android 2.2.
That doesn't necessarily mean that you cannot have such an application on your phone. It just means that you cannot use the Android Java API to make something like this. I am not too sure how it can be done but I guess it is possible to make an application like the one you want that runs on a rooted phone maybe?
I am sure anyone can learn to write programs/applications but its just that you'd have to put in a lot of time and effort to make something like this. If you are in no rush to have the application ready then its fine if you learn to make it yourself. And since its a custom made application and the people who made it aren't willing to help you by giving info on it just makes it that much harder for you.
yeah, when I get another HD2 it's getting rooted with android, I just have to find one. Since I sold mine they have made it to where you can run android off of internal memory, so I'm itching to get it back.
The laptop program also has the option to save the configuration file locally, I haven't thought about looking through that. I didn't think it would tell me much.
So theoretically, if I were to write a program for the android phone with usb transfer capability to the device in question would it work? It doesn't bother me if I have to root my phone.
If the device is reading data in from the file, and you wish to write a program that creates this file, you will have to take care that the program you are making writes the file in very same format and saves the file back in the same location on the device where it will look for this file later.
If you made this application for an android device that has USB Hosting capabilities, it should work (as far as I know).
The question is: How can you get your phone to have USB Hosting capability? I don't know if rooting your phone would do it. You'll have to find out about this.
I'm not creating the file..I just want to make a program to push the file.

Save WhatsApp Conversation

Hello!
I have a question regarding WhatsApp. Is there a possibility to save WhatsApp conversations/history? Through any homebrew-App?
I searched through Google and XDA, didn't find anything useful, unfortunately.
Thanks in advance.
Greetings,
Crash1k
You need to copy out the Isolated Storage for the app. There are a few tools that can do this, including any filesystem browser (such as WP7 Root Tools). An easy way to get the file(s) from your phone to the PC would be my Root Webserver app; find the App GUID of WhatsApp and go to http://<PHONE_IP>/FileSystem/Applications/Data/<APP_GUID>/Data on the PC while the phone runs the webserver app.
Thanks for your fast answer.
Since I'm pretty new to this homebrew-and-phoneHacking thing I don't have much of a clue how to work with those programs. I have downloaded "HtcRootWebServer_231.zip" and the ".xap" file, but I don't know how to get started. Are there any instructions online, perhaps on your homepage, if you have one?
Thanks again.
Oh boy... okay, I assumed you'd already be familiar with dev-unlock at least, so this is going to be a bit complicated. First of all, what phone do you have? On some phones, you won't even be able to run the app because of restrictions that we don't know how to get past.
The summary:
To install an app to the phone from a XAP file, your phone needs to be developer-unlocked. There are a few ways to do this, including an official one from Microsoft (though that costs money unless you're a student). To deploy the apps, you'll probably want to download the Windows Phone SDK from Microsoft as it has all the tools.
To use high-privilege apps, you'll need your phone to be "interop-unlocked" which you can read about on XDA-Devs. Not all phones can currently be interop-unlocked, though many can.
Once your phone is IUed, install the webserver and also WP7 Root Tools v0.9. Use the Root Tools to mark the Webserver app as "Trusted"; this will give it the permissions it needs (it has its own permission elevation code, but I'm almost sure your phone isn't compatible).
if your phone is unlocked:
install wmdc by ultrashot, then, connect it to wmdc, then browse <YOUR WP NAME>\\Applications\Data\218A0EBB-1585-4C7E-A9EC-054CF4569A79 then copy everything from it
GoodDayToDie said:
Oh boy... okay, I assumed you'd already be familiar with dev-unlock at least, so this is going to be a bit complicated. First of all, what phone do you have? On some phones, you won't even be able to run the app because of restrictions that we don't know how to get past.
The summary:
To install an app to the phone from a XAP file, your phone needs to be developer-unlocked. There are a few ways to do this, including an official one from Microsoft (though that costs money unless you're a student). To deploy the apps, you'll probably want to download the Windows Phone SDK from Microsoft as it has all the tools.
To use high-privilege apps, you'll need your phone to be "interop-unlocked" which you can read about on XDA-Devs. Not all phones can currently be interop-unlocked, though many can.
Once your phone is IUed, install the webserver and also WP7 Root Tools v0.9. Use the Root Tools to mark the Webserver app as "Trusted"; this will give it the permissions it needs (it has its own permission elevation code, but I'm almost sure your phone isn't compatible).
Click to expand...
Click to collapse
Thanks a lot for your help, and I'm sorry you had to write this much. I already know how to deploy .xap's and these things, but I have no clue when it comes to the Webserver and how to find the conversations with that. I'll try this for now. I appreciate your help and effort.
aramadsanar said:
if your phone is unlocked:
install wmdc by ultrashot, then, connect it to wmdc, then browse <YOUR WP NAME>\\Applications\Data\218A0EBB-1585-4C7E-A9EC-054CF4569A79 then copy everything from it
Click to expand...
Click to collapse
Is this the same method as the one GoodDayToDie explained?
Thanks for your answer!
//Edit:
I tried it like you, GoodDayToDie, told me. I downloaded your HtcRootWebServer_231.xap and HtcRootWebServer_231.zip. (even though I have a Samsung Omnia 7 with windowbreak unlock (I think that's interop unlock, don't know for sure though)). Then I deployed the .xap, opened the App in the phone but didn't know what to do with the numbers and text fields (like what kind of Admin name and password I should fill in...). After I gave up on the phone-part, I tried to work with the .zip file, but I don't know what to do next. There are 2 folders, one is called "Homebrew" the other "WebServer", I tried to open the programs which are placed in the subfolders (I opened both with Microsoft Visual Studio Solution) but I only get an error and it won't show anything.
Do you know where the problem is? (aside from my lack of knowledge of course :/ )
Thanks for your help.
Crash1k said:
Thanks a lot for your help, and I'm sorry you had to write this much. I already know how to deploy .xap's and these things, but I have no clue when it comes to the Webserver and how to find the conversations with that. I'll try this for now. I appreciate your help and effort.
Is this the same method as the one GoodDayToDie explained?
Thanks for your answer!
//Edit:
I tried it like you, GoodDayToDie, told me. I downloaded your HtcRootWebServer_231.xap and HtcRootWebServer_231.zip. (even though I have a Samsung Omnia 7 with windowbreak unlock (I think that's interop unlock, don't know for sure though)). Then I deployed the .xap, opened the App in the phone but didn't know what to do with the numbers and text fields (like what kind of Admin name and password I should fill in...). After I gave up on the phone-part, I tried to work with the .zip file, but I don't know what to do next. There are 2 folders, one is called "Homebrew" the other "WebServer", I tried to open the programs which are placed in the subfolders (I opened both with Microsoft Visual Studio Solution) but I only get an error and it won't show anything.
Do you know where the problem is? (aside from my lack of knowledge of course :/ )
Thanks for your help.
Click to expand...
Click to collapse
yes, it goes to one objective, but in a simpler method
Eh, WebServer doesn't require installing anything on the PC, WPDM doesn't (directly) require installing anything on the phone. In both cases, you'll need to have WP7 Root Tools installed.
For WPDM + TouchXperience:
Install Windows Phone Device Manager from TouchXperience.com.
Start Zune and connect your phone.
Start WPDM and wait for it to install the TouchXperience app on the phone.
Open WP7 Root Tools v0.9 and go to the Policy pivot.
Mark TouchXperience as "Trusted" and exit Root Tools.
Open TouchXperience (and WPDM on the PC, if you closed it) and connect them.
Either do what @aramadsanar suggested, or use the Installed Apps feature of WPDM to make a backup.
For Root Webserver:
Install Root Webserver (the XAP; the ZIP file is the source code); you already did this.
Open WP7 Root Tools v0.9 and go to the Policy pivot.
Mark "Webserver (HtcRoot)" as Trusted and close Root Tools.
Connect the phone to WiFi (on the same network as your PC) and launch the webserver app.
Set a username and password you can remember ("admin" and "root" for example, though that's insecure).
On the PC, open a web browser and go to the phone's IP address, then drill down into the FileSystem like I said (aramadsanar gave you the app's GUID).
Download the files from the Isolated Storage to your PC, and save them somewhere.
Thanks a LOT for those great instructions, GoodDayToDie! That's really nice, thanks for your effort.
I tried the WebServer method since I didn't want to install Windows Phone SDK 7.1, but I didn't manage to get into my phone through the browser (by typing the I.P. of the phone, which is listed on the Webserver App, just as you said), that's why I was forced to use the other way. Well, who cares, it worked! I have my messages file, but the next problem shows up. I can open the file with the Editor, but it shows weird symbols and you can't read the messages actually. I tried many other programs but none work. Do you guys know how to open those files? The ending is ".sdf". I google'd it for nearly two hours, couldn't find anything useful.
Thanks for the help so far.
You used the WiFi address of the phone, right? The WWAN (cellular) connection is almost certainly firewalled. For example, on my home network the router usually gives my phone IP address 192.168.0.73 on WiFi, so I type in "http://192.168.0.73" into the browser on my PC. It'll ask for username and password; give it what you put on the phone.
As for the file contents, I can't help there. They might be encrypted, in which case the crypto key is somewhere but might be hard to find. Or they might be compressed, in which case you need to find a decoder for that compression. Either one would produce files that appear to be meaningless binary to a casual glance.
One thing you could try for the compressed file possibility is tell 7-Zip to open the file. It's usually very good at recognizing compressed formats. If it's encrypted, you'll probably need to decompile WhatsApp to figure out how. If WhatsApp is obfuscated, you're going to be in a tough spot.
By the way, I assume you downloaded the messages file directly, rather than using the data backup function of WPDM, right?
Hmm... what do you need these files for? If it's just for backup, what you have is *probably* sufficient, so long as you grabbed *all* the files from the IsolatedStorage.
Yeah, I used the WiFi address which is listed on the WebServer App, and I typed that IP Address just like you said into my browser, with "http://" etc., but it still didn't work. It doesn't even ask me for any password or username.
I don't think they are compressed, because I already tried to open/extract them with 7zip, all I got was an error because of the incompatibility. The other thing is, that when I open the files with the "Editor", I can see my messages there, but there are many many other symbols there, which makes it impossible to read the messages. They are too wide spread and you can't tell which messages belong together etc.
Even though I have no idea how to "decompile" WhatsApp, I won't ask you to tell me, since it sounds pretty complicated. I hope there is another way to solve this problem.
Yes, I simply saved the file on my Desktop, didn't use the BackUp function.
That's right, they're "just" for backup, and I didn't grab just the IsolatedStorage folder, I took the whole "Data" folder, just like aramadsanar told me to.
Thanks again for your fast and detailed answer.
If the wifi address didn't work, either your phone was not on WiFi (did the address start with 169.254.?) or your PC was not on WiFi or even connected to the same WiFi network. You can (in theory; I've never tried) also connect to the phone over wired Ethernet by plugging in the phone to the PC with its USB cable, and running Zune on the PC. That will add an ethernet entry to the phone IP list, but I don't know if it can be used for server ports from the PC.
There are a number of free apps for decompiling managed (.NET) code. The latest version of .NET RAIN, distributed right here on XDA-Devs, can do it, for example. Decompiling turns the intermediate-language binary code in a managed DLL or EXE file into C# or VB.NET or whatever. It's not a perfect reversal; the decompiler has to guess what the original source code looked like, and of course comments are missing. It's good enough to read pretty easily, though.
It sounds like what you have is probably a database file of some kind. There are only a few database formats available for WP7 apps (a few more can be accessed using native code).

[Q] Custom Device driver / KernelLibrary

Good day,
I am new to the forum so please forgive me if this is not the right place to ask.
I have been reading through some of the threads on the forum and is curious to know if there is a way to load custom kernel libraries or device drivers onto the phone.
If there is a way, is there a correct procedure? For example to load a custom device driver / kernel library, do I also have to have an entry in the registry? Does the dll file have to be in /Windows?
Thanks in advance.
Good questions. There's been only a little research on this so far. I can tell you waht I've found, though:
For a stock ROM, nobody has managed it yet, but it might be possible. You'll need to have your DLL signed, and the certificate added to the Code Integrity store on the phone (just mailing yourself the .cer is insufficient! That will put it in the wrong store). You'll probalby want the DLL to be in \Windows, although I'm not sure it's needed. You almost certainly will need to add registry entries; the current drivers seem to have them.
Good day,
thanks for your reply. And thanks for all the good research you have done.
So at the moment, the software approach is not working but for custom roms, is it possible to include custom device drivers / kernel libraries in them?
Thank you.
mousefish321 said:
Good day,
thanks for your reply. And thanks for all the good research you have done.
So at the moment, the software approach is not working but for custom roms, is it possible to include custom device drivers / kernel libraries in them?
Thank you.
Click to expand...
Click to collapse
Well, it's possible. The HD2 Multitouch driver is an example that its somehow possible. Should be the same for the other devices (espacially HTC first gens)...
But don't know what you're getting at? Why would you need a custom driver?
Good day,
well, I just think that having a driver that acts like HTCUtility would make things convenient.
As for file operations, besides the application that Heathcliff has created (WP7RootTool), are there other applications that can do write operations to the /Windows folder?
What are the things that needs to be done before we can write to that folder?
Thank you.
Any app with Elevated or TCB privileges can write to \Windows, I think. Using HtcRoot project or WP7 Root Tools works (both elevate apps to TCB permissions, though using different methods). Also, using an OEM driver, such as HtcProvisionDrv or HtcFileUtility, works (although those two particular drivers were crippled in the 4.x firmware).
Good day,
thanks for the information. I tried the HtcRoot tool and it works. Thanks for the tool and the source that allows me to know how it works.
Can I assume that I would be able to have write access to the Certificate and Code Integrity store also?
I am also curious as to the workings of HTCFileUtility. A quick search on this turns up little information on its workings.
Furthermore, is there a guide to inserting custom certificates to the root Certificate and Code Integrity store? I have tried downloading the Certificates.zip file in http://forum.xda-developers.com/showthread.php?t=1236027 and test rom files in http://forum.xda-developers.com/showthread.php?t=1248799 hoping that they will shed some light but is unable to download them.
Any help is appreciated. Thank you.
Yes, installing your own cert into Code Integrity is possible (in several ways, actually, but I did it using HtcRoot just as an exercise). The certificates are actually stored in the registry, so any tool that can write to HKLM can add them. I believe that WP7 Root Tools will also let you choose the store for adding a certificate if you "open" the cert from the Root Tools filebrowser.
Although I don't know exactly how HtcFileUtility works, here's the basics. It's a software driver that exposes an interface - probably an IOCTL - which apps can use to perform filesystem operations. Since it runs with TCB permissions (it's probably kernel mode, though I haven't actually checked, but it's definitely in TCB) it can perform any operation that the filesystem supports. Of course, that doesn't mean that it exposes all those operations through the IOCTL... but it exposes enough of them for a pretty solid filebrowser implementation (that's how TouchXplorer and Advanced Explorer worked, although they used an OEM COM DLL that called into the driver rather than doing the IOCTL themselves).
The new version of it has very limited operations permitted; it will only list files in a few folders and so forth. It does still "work" within those limitations - Connection Setup, for example, uses it to check the folder that we use for interop-unlock on HTC - but it isn't useful for a general-purpose browser anymore.
It would be great to even figure out how to roll back the OEM drivers to earlier versions. For example, I've got WP7 Root Tools installed on my HD7, but I don't want to install HTC updates because they'll break my drivers such that if something ever goes wrong I won't be able to re-install Root Tools, or if a new hack is found (or developed; I'm working on some stuff with HtcRoot still) I won't be able to run it on my phone. Being able to use the advantages of the new firmware (Internet Sharing, compass in managed apps, hopefully an end to the damn music player freezing between songs...) while still having hackable OEM drivers would be reallllly nice...
Good day,
thanks for the information.
I noticed in the HTCRoot project thread where you mentioned that "It is not a true handle (no handle table, no handle data) but everything that checks for tokens also checks for this const value, and appears to pretty much skip all remaining permissions checks if it finds it".
Would you mind sharing some of the function names so that I could take a look at the code where the checking occurs?
Thanks.

Accessing system folder without root access

Hi all.
I'm after quite specific need but would like to know more general answer / solution if possible at all.
I know that wihtout being rooted there's not much one can do with system folders, but still, there are some ways and tricks to get to them, one of them being Backup option provided by android, using ADB shell.
I'm after specific file, that is /data/data/com.android.mms/shared_prefs/com.android.mms.categoryInfo.xml
Using Htc One M8, stock rom, I've tried to do adb backup of com.android.mms application, but all I got was 1kb (actually 41 bytes) sized file, which contains nothing.
I wonder, is there any other way to get to the specific system app folder, if you're NOT rooted?
Any help would be highly appreciated.
Additional info: I'm after that file because it has stored Secure message box password in Plain text. My phone is about to go to the service due to several issues, including battery getting way overheated when used, and not charging over 25% at all, and the only thing left to make a backup is the secure box storage, which I used as an "Other inbox" folder in order to have the main Inbox a bit more "clean", and I know I've set it to something stupid and short, and I've accessed them not long ago, but for the f's sake I can't get in the folder anymore (and I'm highly betting that after several attempts even the real password is no longer accepted, and that being the reason I can't figure out the pass by trying, but there's nowhere info it thats true, and if so, how long to wait before real one would be accepted etc...)
Big thanks if anyone could help out, if not - not gonna be the end of the world. But would kinda like to store some of the messages that are newer than my latest backup...
Cheers!
cucolino said:
Hi all.
I'm after quite specific need but would like to know more general answer / solution if possible at all.
I know that wihtout being rooted there's not much one can do with system folders, but still, there are some ways and tricks to get to them, one of them being Backup option provided by android, using ADB shell.
I'm after specific file, that is /data/data/com.android.mms/shared_prefs/com.android.mms.categoryInfo.xml
Using Htc One M8, stock rom, I've tried to do adb backup of com.android.mms application, but all I got was 1kb (actually 41 bytes) sized file, which contains nothing.
I wonder, is there any other way to get to the specific system app folder, if you're NOT rooted?
Any help would be highly appreciated.
Additional info: I'm after that file because it has stored Secure message box password in Plain text. My phone is about to go to the service due to several issues, including battery getting way overheated when used, and not charging over 25% at all, and the only thing left to make a backup is the secure box storage, which I used as an "Other inbox" folder in order to have the main Inbox a bit more "clean", and I know I've set it to something stupid and short, and I've accessed them not long ago, but for the f's sake I can't get in the folder anymore (and I'm highly betting that after several attempts even the real password is no longer accepted, and that being the reason I can't figure out the pass by trying, but there's nowhere info it thats true, and if so, how long to wait before real one would be accepted etc...)
Big thanks if anyone could help out, if not - not gonna be the end of the world. But would kinda like to store some of the messages that are newer than my latest backup...
Cheers!
Click to expand...
Click to collapse
Yes and not.
if you don't have root access, you can not copy an application from the system folder, to make this the ADB would need root permissions. but....
You can download the stock rom, and copy/extract/edit the app you need it.
xdedeone said:
Yes and not.
if you don't have root access, you can not copy an application from the system folder, to make this the ADB would need root permissions. but....
You can download the stock rom, and copy/extract/edit the app you need it.
Click to expand...
Click to collapse
Actually no, if the file is user specific, as in my case, the help of stock rom's file is not gonna help.
Anyway, SOLVED now.
As per this post: http://forum.xda-developers.com/showthread.php?t=2054401
The backup of the app was made and got the file. I've done the same thing without success, because on HTC, the messaging app is com.htc.sense.mms and NOT com.android.mms.
Therefore creating backup of the com.htc.sense.mms did result kin getting exactly what I needed.
In the extraction of the tar .ab archive using dd in linux, I got folder app, within there is a folder com.htc.sense.mms, wihtin there's a folder sp, and there is com.htc.sense.mms.categoryInfo.xml which has the secure box password stored in plaintext.
Voila! )

Categories

Resources