Jump to content
MarioRossi93i

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

Recommended Posts

I search ed a little bit in the forum but i found nothing. So my question is: is there a way to detect running android version with gg/lua?!
Thank you!!?

Share this post


Link to post
Share on other sites

For what?

Share this post


Link to post
Share on other sites

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??

Share this post


Link to post
Share on other sites
6 minutes ago, MarioRossi93i said:

Could you explain Please??

No, You can use choice:

Android = gg.choice({"lolipop", "Marshmallow", "Naughat", "oreo", "Pie"}, nil, "Select your Android version")

Share this post


Link to post
Share on other sites

Thank you bro, this is helpful...?

Is there a way to to this without interaction of the user?!?

Share this post


Link to post
Share on other sites
9 minutes ago, MarioRossi93i said:

without interaction

This method is not official. But maybe the future GG will be integrated with gg.androidVersion or gg.sdkVersion.

@Enyby?Maybe my idea can confirm 2 syntax for next release GG.

Share this post


Link to post
Share on other sites

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

?

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
Share on other sites
Posted (edited)
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Posted (edited)

@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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Yes but i have to search 2 values instead one that, if you are doing group search, can slow down scripts significantly

Your seems only way without user interaction and double searches. Thanks a lot!?

Share this post


Link to post
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

×
×
  • Create New...
bt365体育官bt365体育官网