Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:06:03+00:00 2026-06-05T15:06:03+00:00

I’m using AESObfuscator in the ServerManagedPolicy for android licensing. Until now, I’ve created the

  • 0

I’m using AESObfuscator in the ServerManagedPolicy for android licensing. Until now, I’ve created the deviceId like this:

String deviceId = Secure.getString( getContentResolver(), Secure.ANDROID_ID );

In all the examples on the internet it is done like this, but sometimes it is stated that it isn’t very safe, but no other way is described. I have read that ANDROID_ID can be easily changed or can even be null, so I really want to have another way to get a unique id.
The licensing failed more than once for someone who has bought my app and I’m quite sure that it has to do with this, otherwise it can only be a problem with google, what I really doubt.

So how can I do this? Just create a random hash and add it to the deviceId (and of course store it somewhere..?)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:06:04+00:00Added an answer on June 5, 2026 at 3:06 pm

    What do you mean by ‘safe’? It’s just a matter of obfuscating your preferences to make it harder to edit on a rooted device. The ANDROID_ID can change if you reset your device (delete all data), or if someone edits it on a rooted device. The first case is not really a problem, in the second, you won’t be able to decrypt(de-obfuscate) the stored preferences, so you just treat this as an error. If it is really null, you should think of some sort of a fallback value.

    The point here is not to have a unique ID, but to use some device-specific data to obfuscate the preferences, so that you cannot just copy them to another device. You could use a hash of the IMEI, the WiFi adapter MAC address or anything else device specific, but you have to handle the case of the particular property not being available (e.g., WiFi-only tablets don’t have an IMEI, etc.)

    Use an error reporting library such as ACRA or BugSense to track the actual errors and understand the real cause behind licensing failing. Sometimes it’s the Google infrastructure’s fault, so you should try to handle this as well (cache licensing status, etc.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.