Storing credentials

by Glenn » Thu, 05 Mar 2009 18:05:40 GMT


Sponsored Links
 Hi,

What's the best way of securely storing user credentials in android?

Thanks

Glenn
--~--~---------~--~----~------------~-------~--~----~



Storing credentials

by MrSnowflake » Sat, 07 Mar 2009 23:01:48 GMT


 I think preferences (with the private option) are safe enough, as for
one, the phone is probably only used by one person, and second, no
other application can read from private files of an app. Though if
some one has root access to it's phone, some one could use that to
read the private data. But normally this shouldn't happen and if this
happens, well, though luck :).



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. external/elfcopy/elfcopy.c(1097): gelf_update_phdr(): invalid data

external/elfcopy/elfcopy.c(1097): gelf_update_phdr(): invalid data

This post discuss fix to this issue. Patch also posted.

The issue may cause prelink or strip fail.

What does it do?
When some pieces of code/data is removed, there will be hole in image.
Code/data after hole will be move forward to eliminate hole. Program
header needs update accordingly. Error happens in this phase.
The logic:
Iterate program headers. To a pecific program header, find the first
section that belongs to it. Take the offset of first section as the
new program header offset. delta = new_offset - old_offset. Update
program header entry with delta.
section_to_header_mapping() will get first section offset.  -1 means
no section found belongs to the program header. So, there is no need
to update it. Unfortunately, this condition was not cauptured. Update
will always happen.

The fix is simple. Check return value of section_to_header_mapping().
Do not update when -1

diff --git a/elfcopy.c b/elfcopy.c
old mode 100644
new mode 100755
index ec8d0f3..c6f671d
--- a/elfcopy.c
+++ b/elfcopy.c
@@ -1053,6 +1053,8 @@ void adjust_elf(Elf *elf, const char *elf_name,
                                                   &file_end,
                                                   &mem_end);

+                    if(new_phdr_offset != (Elf64_Off)-1)
+                    {
                     /* Alignments of 0 and 1 mean nothing.  Higher
alignments are
                        interpreted as powers of 2. */
                     if (phdr_info[pi].p_align > 1) {
@@ -1091,6 +1093,7 @@ void adjust_elf(Elf *elf, const char *elf_name,
                          phdr_info[pi].p_filesz);
                     //phdr_info[pi].p_filesz = file_end -
new_phdr_offset;
                     phdr_info[pi].p_filesz = file_end - phdr_info
[pi].p_offset;
+                    }
                 }

                 FAILIF_LIBELF(gelf_update_phdr (newelf, pi, &phdr_info
[pi]) == 0,

I neglect the indent intentionally to make it more understandable in
post:)

After applying this patch, following modules needs rebuild:
  external/elfcopy
  build/tools/apriori
  build/tools/soslim

The fix has not been commit.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. InstrumentationTestRunner not specified ??

You need to add <uses-library android:name="android.test.runner" />
inside the activity tag.

example:
http://developer.android.com/guide/samples/ApiDemos/tests/AndroidManifest.html

-- Urs








--~--~---------~--~----~------------~-------~--~----~

3. Controlling of wireless hardware

4. Never getting onLocationChanged (in emulator)

5. Clickable Desktop Widget

6. Is it possible to load multiple shared library in Android using NDK

7. How can implement EditText on android app widget