There are a lot of Solution in Forum. But I try All, Still Cannot Get. Return Empty.
Do Anybody Have another Solution To Get This Serial Number ?
Do Anybody Have another Solution To Get This Serial Number ?
#IF JAVA
import java.lang.reflect.Method;
public static String gMS(String K) {
String serial = "-";
try {
Class<?> c = Class.forName("android.os.SystemProperties");
Method get = c.getMethod("get", String.class, String.class);
serial = (String) get.invoke(c, K, "-");
} catch (Exception ignored) {}
return serial;
}
#End If
Dim JV As JavaObject
JV.InitializeContext
Dim Result As String
Dim alist As List
alist.Initialize
alist.AddAll(Array As String("ril.serialnumber","ro.serialno"))
Dim str,K As String
For i = 0 To alist.Size-1
K=alist.Get(i)
str = JV.RunMethod("gMS" ,Array(K))
If str.Length>4 Then
If (str <> "00000000000") And (str <> "0123456789ABCDEF") Then
Result = str
Exit
End If
End If
Next
Return(Result)
Dim sn As String
Dim r As Reflector
Dim m As Object
Dim Types(1) As String
Types(0) = "java.lang.String"
r.target = r.CreateObject("android.os.SystemProperties")
m = r.GetMethod("get", Types)
sn = r.InvokeMethod(r.Target,m,Array("ril.serialnumber"))
Return sn