Jump to content
  • 0

Info device in lua


Question

Posted

Hello master..

How to display device info in lua script.?

Thank

Recommended Posts

  • 0
Posted
13 hours ago, Rofiq said:

Hello master..

How to display device info in lua script.?

Thank

I think it's free (to no avail) ,,Use gg.prompt text mode, my suggestion is simple,,

 

32 minutes ago, Enyby said:

Io.open and friends.

Lol what is friends io.open?

  • 0
Posted
3 hours ago, Enyby said:

Obviously, all those functions that are usually used after io.open - file:*

file:close
file:flush
file:lines
file:read
file:seek
file:setvbuf
file:write

https://www.lua.org/manual/5.3/contents.html#index

 

Its just programer, not all people now it.

17 hours ago, Rofiq said:

Hello master..

How to display device info in lua script.?

Thank

For simple local a = io.open("/system/build.prop", "r"):read("*a")

print(a)

Its not fix because i think no root can't read build.prop or not all firmware can allow to this, show check before read, like local b = io.open("/system/build.prop", "r") if not b then return end then you can next steep for read build.prop.

  • 0
Posted
20 hours ago, Help_Quit said:

Its just programer, not all people now it.

For simple local a = io.open("/system/build.prop", "r"):read("*a")

print(a)

Its not fix because i think no root can't read build.prop or not all firmware can allow to this, show check before read, like local b = io.open("/system/build.prop", "r") if not b then return end then you can next steep for read build.prop.

root not work.

maybe script error maybe im noob

  • 0
Posted
On 10/6/2019 at 4:33 PM, Enyby said:

Obviously, all those functions that are usually used after io.open - file:*

file:close
file:flush
file:lines
file:read
file:seek
file:setvbuf
file:write

https://www.lua.org/manual/5.3/contents.html#index

 

I can only display IMEI

and i can't display DEVICE ..

 

 maybe you can make it for me master...

I am still new to understanding the script

 

please please please........

  • 0
Posted
1 hour ago, Enyby said:

Work for me.

Code local..

Not alert or print?

  • 0
Posted
35 minutes ago, Enyby said:

What? Print in second line.

 

I'm sorry I'm still studying

  • 0
Posted
38 minutes ago, Help_Quit said:

This specific;

a = io.open("/system/build.prop", "r")

if not a then

gg.alert("Can't read build.prop")

os.exit()

else

a = a:read("*a")

end

Use match for get what you want in build.prop

read this and understand:

http://lua-users.org/wiki/PatternsTutorial

Thank you 

  • 0
Posted
Just now, Help_Quit said:

This specific;

a = io.open("/system/build.prop", "r")

if not a then

gg.alert("Can't read build.prop")

os.exit()

else

a = a:read("*a")

end

Use match for get what you want in build.prop

read this and understand:

http://lua-users.org/wiki/PatternsTutorial

This not work

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

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.