Try to decode random #Variant string from an android studio emulator - android

Just a quick question ig. I am currently trying something with android studio's virtual devices and i need to edit a parameter in one of the emulator files.
The path to this file is normaly {HomeDir}\.android\avd\name_of_virtual_device.avd\AVD.conf
The content of the file looks like this:
[perAvd]
battery\charge_level=100
loc\latitude=37.422
virtualscene\posters=#Variant(\0\0\0\b\0\0\0\x2\0\0\0\b\0w\0\x61\0l\0l\0\0\0\n\0\0\0\xa0\0\x43\0:\0/\0U\0s\0\x65\0r\0s\0/\0M\0\x61\0x\0i\0m\0i\0l\0i\0\x61\0n\0\x42\0r\0\x61\0u\0n\0/\0P\0i\0\x63\0t\0u\0r\0\x65\0s\0/\0{\0\x36\0\x44\0\x37\0\x43\0\x30\0\x33\0\x37\0\x42\0-\0\x39\0\x34\0\x37\0\x43\0-\0\x34\0\x37\0\x33\0\x37\0-\0\x41\0\x44\0\x30\0\x41\0-\0\x45\0\x36\0\x41\0\x45\0\x43\0\x37\0\x37\0\x37\0\x43\0\x44\0\x34\0\x43\0}\0.\0p\0n\0g\0.\0j\0p\0g\0\0\0\n\0t\0\x61\0\x62\0l\0\x65\0\0\0\n\xff\xff\xff\xff)
virtualscene\tv_animation=false
loc\longitude=-122.084
loc\altitude=5
loc\velocity=0
loc\heading=0
If you know your way arround the avd manager of android studio and emulated devices you should note pretty quickly that this file contains some of the advanced settings that you normaly can set via the menu of your emulated device. Now my question is since i need to edit the virtualscene\posters param which encoding is this. I mean it looks like hex but it isn't. It also contains like png/jpg at the end of the string looking like this .\0p\0n\0g\0.\0j\0p\0g. But i cant figure out which encoding this is
Hope someone can help

That looks like it is probably a QSettings configuration file. This class saves a program's settings to a .conf or .ini file and encodes data like that. It allows it to later read the data back in using QVariant

Related

Change mode of the getDefaultPreference file in Android

I am using a PreferenceActivity to save some user preferences.
I want to access the default Preference file from outside the app for debugging purposes.
How can I change the defaultSharedPreferences file from private to public mode?
And also what is the default name of that defaultSharedPreference file?
[EDIT]
One negative vote that means something is wrong with the question.
At least, do let me know whats wrong!
That would be less cruel and not discouraging for a newbie like me :)
In the DDMS (or its equivalent, in Android Studio), the path to your preference file is /data/data/your.app.name/shared_prefs/your.app.name_preferences.xml.
You can export it, modify it, and even reimport it (at your own risk!).
EDIT
The path is correct, the file name might vary.
Sorry, I wasn't pointing the xml file, while taking the screen shot.
But it's there.

Firefox for Android: can't modify anything on about:config

TLDR: firefox for android does not show expected about:config screen.
Firefox: 39.0
Phone: Nexus 5
I am trying to install and configure an extension on firefox for Android.
I've been following these instructions, which work fine until I have to alter the filepath in about:config.
At this stage, I need to modify the settings to show firefox where a certain .txt file is. I can easily find the setting I wish to modify, but cannot find a way modify it.
The expected menu (with Modify) never shows up, and instead the only options I can get are "copy name" and "copy value".
Images of the expected interface, and actual interface:
Expected interface (from walk-through):
Actual interface (screenshot):
After searching, trying to find the modify option:
Eventually, with a lot of trial and error, got it fixed. The about:config interface has changed since the guide I was following was pasted, but it ended up being a very good step by step anyway.
Solution:
The new interface has an area where there is nothing written, which you need to over-write with the desired path (in my case it ended up being /storage/sdcard0/silent_block_directory).
Two pieces of advice to avoid making the same mistakes as I did:
1. Don't point the path at the .txt file, but rather at the parent directory
2. Don't look for the modify button, it does not exist any more.

Android OCRSample using tesseract in Android

I want to make an application in that text is extracted and converted into another language like below app at time of camera is viewing like below screen shot of below app in play store CamDictionary
Below is the screen shot
Look in this camera is scanning and translating is done at real time can anybody suggest me example like this
I googled and find out one library
https://github.com/komamitsu/Android-OCRSample
but in that it suggested that
checkout http://code.google.com/p/tesseract-ocr/ and copy traineddata file(s) into "/mnt/sdcard/ocrsample/tessdata/" on your Android like this:
adb push ~/src/tesseract-ocr-read-only/tessdata/eng.traineddata /mnt/sdcard/ocrsample/tessdata/
I have searched out whole thing but there is no any file that should i have to put in /mnt/sdcard/ocrsample/tessdata/ can any body suggest me what is that file because i have checkout following link
svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr-read-only
but it contain so many source code for windows app also and there is like more than 700 MB
i want just andorid files that should i have to put in SDCARD please any body help me
is there any other solution than also please suggest me

PreferenceScreen themed with honeycomb theme

i want to make to make an PreferenceActivity with the same style that can be found on the image below.
Image of Preference Screen Android 3.2 http://img600.imageshack.us/img600/5120/device20120320173903.png
http://imageshack.us/photo/my-images/600/device20120320173903.png
There any way to make a close match of it or do i need to program the behaviour?
I can think of two ways you can do. One is to download the source code, but I think that layout is custom for galaxy tablets.
The other option would be to use the Hierarchy View Perspective in Eclipse to determine the structure and details of the interface and from there replicate the interface.
Good luck!
Udapte:
Ok, if what you want is the drawables you can actually get them from the tablet. With a file manager in the tablet copy the file /System/app/System.apk to the SD card and from there to your computer. There change the extension to .zip and extract the contents. This way you can access only the drawables. The xml files are compiled so you can't see their content.
I think you can use this if you want more data out (like the xml layouts): http://code.google.com/p/android-apktool/
Although as I said in the comments I am not sure about the legality of this given this is Samsung's own IP.

Android SDK sample app question:

If you go into the standard Note pad accessory application, the first available note menu entry is going to be...
<untitled>
My question is this: Where is "<untitled>" coming from in the code? The code is in the NotePad sample in the SDK if you want to built a project from existing source real fast. I just can't find where "<untitled>" is spelled out anywhere in the source or resources.
(Else, is this instead some kind of ultra low level string that Android's API hands to the GUI if there's nothing specified for a title? Which can't be changed?)
In the NotePadProvider.java appears that this string cames from android.R.string. To find that file you need to go here: SDKpath/platforms/version_you_are_programming/data/res/values. There is the string.xml file and that file is internal to the OS, I doubt you can change it.

Categories

Resources