Jump to content
  • 1

Is there a way to detect android version in lua script?


MarioRossi93i
 Share

Question

Recommended Posts

  • 0

In real Racing the value to search the fame points (and others) changes if you re running android 10 or earlier. I don t want perform double search because it is slow nor write 2 scripts. So if i can detect android version i can select right value to search directly... 

[added 1 minute later]
4 hours ago, HEROGAMEOfficial said:

Is there a way to detect android version in lua script?

Can.

Could you explain Please? 

Link to comment
Share on other sites

  • 0

The solution was in documentation... 

There's no need to add new syntax , just 

print('GET 1: ', gg.makeRequest('http://httpbin.org/headers').content) -- simple GET request

 

Link to comment
Share on other sites

  • 0
22 minutes ago, ItsSC said:

The solution was in documentation... 

There's no need to add new syntax , just 


print('GET 1: ', gg.makeRequest('http://httpbin.org/headers').content) -- simple GET request

 

Nice but not all user agree for acces to internet.

Edited by HEROGAMEOfficial
Link to comment
Share on other sites

  • 0
1 minute ago, HEROGAMEOfficial said:

Nice but not all user agree for acces internet (in my head).

Short answer : Don't use the script if they don't trust it. Just code, they don't want use then let them be.

 

There is no point to think so much for them. If some script writer really want to do something malicious, disagree access internet wouldn't stop them. 

Edited by ItsSC
Link to comment
Share on other sites

  • 0
  • Administrators
1 hour ago, MarioRossi93i said:

if you re running android 10 or earlier

All android now is 10 or earlier.

You need detect behavior, not some flags.

So find simple way to detect difference in memory layout and use it.

Link to comment
Share on other sites

  • 0

@Enyby thanks for the answer i m going to do an example:


to find fame points in android 10 i have to search, eg: -1500000100, then knowing the offsets i change my values

to find the same pointer ( with same offsets) in earliers android versions i have to search, eg: -1700000500

searching both values slows down the script, so i would like avoid double searches...

to find a memory layout like your suggestion i have to do additional searches and i slow down the script anyway, or i m wrong?

I saw that there are few ways to bypass the problem, but a built in function would be a good thing😁

Regards

Edited by MarioRossi93i
Link to comment
Share on other sites

  • 0
1 minute ago, MarioRossi93i said:

@Enyby thanks for the answer i m going to do an example:


to find fame points in android 10 i have to search, eg: -1500000100, then knowing the offsets i change my values

to find the same pointer ( with same offsets) in earliers android versions i have to search, eg: -1700000500

searching both values slows down the script, so i would like avoid double searches...

to find a memory layout like your suggestion i have to do additional searches and i slow down the script anyway, or i m wrong?

I saw that there are few ways to bypass the problem, but a built in function would be a good thing😁

Regards

I guess what Enyby means is 

You can search "-1500000100" then do the offset, if you didn't get any result from "-1500000100". That's mean this phone is not android 10. Then do -170000500

 

So in this case, I prefer using my way can help in reducing time on guessing the android version of user.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.