Code Monkey home page Code Monkey logo

Comments (3)

lfjking avatar lfjking commented on July 23, 2024

I get the info for each packet form remote:

setting connection_state to CS_DEVICE
Connect_to_remote call RS(100)'shell'
Connect_to_remote call RS(101)'forward'
Command connect:100!'shell connect'
Server connect! 'forward connect'
Command id:100
buffer: Starting service: Intent { act=jp.co.cyberagent.stf.ACTION_START cmp=jp.co.cyberagent.stf/.Service }
Command Close:100!  `the shell close,but forward is not stop`
forward get un_know buffer(100):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\8@9Hxffffffe1\zx14\xffffffae\Gx11\@x12\x10\x0f\x1a\x0e\x08\x01\x12\x04\WIFIx1a\x00\ x00\(x00\x16\x10\x10\x1a\x12\x0a\x0e\out_of_servicex10\x00\x06\x10\x11\x1a\x02\x08\Zx06\x10\x0d\x1a\x02\x08\x00\
forward get un_know buffer(62):
=x10\x12\x1a\9x08\x01\x12\5x0a\x09\xffffffe6\xffffffb5\xffffff8f\xffffffe8\xffffffa7\xffffff88\xffffffe5\xffffff99\xffffffa8\x12\$com.android.browser/.BrowserActivityx18\x01\ x01\
forward get un_know buffer(1):
x07\
Event Type:EVENT_ROTATION(17) 
Device Rotation:270
forward get un_know buffer(51):
2x10\x0e\x1a\.x0a\x0b\dischargingx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\8@9xffffffc3\xfffffff5\(\xffffff8f\Bx11\@
forward get un_know buffer(1):
x06\
Event Type:EVENT_ROTATION(17) 
Device Rotation:0
forward get un_know buffer(1):
x06\
Event Type:EVENT_ROTATION(17) 
Device Rotation:90
forward get un_know buffer(51):
2x10\x0e\x1a\.x0a\x0b\dischargingx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\8@9X9xffffffb4\xffffffc8\v>x11\@
forward get un_know buffer(1):
x06\
Event Type:EVENT_ROTATION(17) 
Device Rotation:0
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\8@9Hxffffffe1\zx14\xffffffae\Gx11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\8@9-xffffffb2\xffffff9d\xffffffef\xffffffa7\Fx11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\8@9Hxffffffe1\zx14\xffffffae\Gx11\@
forward get un_know buffer(51):
2x10\x0e\x1a\.x0a\x0b\dischargingx12\x04\goodx1a\x03\usb d(d13333338@9Hxffffffe1\zx14\xffffffae\Gx11\@

I don't know why......
I use the fun :ParseFromArray to parse the packet.
There is no operation on my phone, why do I keep receiving this message?

from stfservice.apk.

lfjking avatar lfjking commented on July 23, 2024

Now, I changed my code like it:

	Envelope &lope = mEnvelope;
		bool isok = false;
		io::CodedInputStream stream(data, len);
		while (!stream.ConsumedEntireMessage())
		{
			if (lope.MergeFromCodedStream(&stream)){
				ParseMessage(lope);
				isok = true;
			}
		}
		if (!isok){
			Dg("forward get un_know buffer(%d):\n", len);
			for (size_t i = 0; i < len; i++){
				char c = data[i];
				if (c > 31 && c < 127){
					Dg("%c", c);
				}
				else{
					Dg("x%02x\\", c);
				}
			}
			Dg("\n");
		}

---------------the output here:--------------------------

setting connection_state to CS_DEVICE
Connect_to_remote call RS(100)
Connect_to_remote call RS(101)
Command connect:100!
Server connect!
Command id:100
buffer: Starting service: Intent { act=jp.co.cyberagent.stf.ACTION_START cmp=jp.co.cyberagent.stf/.Service }
Command Close:100!

Event Type:EVENT_AIRPLANE_MODE(13) 
Air plane is Open:false

forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d13333336@9X9xffffffb4\xffffffc8\v>x11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d13333336@9shxffffff91\xffffffed\|?x11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d13333336@9X9xffffffb4\xffffffc8\v>x11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\x19\6@9X9xffffffb4\xffffffc8\v>x11\@

forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1x00\x00\x00\x00\x00\x00\6@9X9xffffffb4\xffffffc8\v>x11\@

forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1fffffxffffffe6\5@9X9xffffffb4\xffffffc8\v>x11\@

Event Type:EVENT_AIRPLANE_MODE(13) 
Air plane is Open:false
Event Type:EVENT_CONNECTIVITY(15) 
ConnectivityEvent:connected:true
ConnectivityEvent:type:WIFI
ConnectivityEvent:subtype:
ConnectivityEvent:failover:false
ConnectivityEvent:roaming:false
Event Type:EVENT_CONNECTIVITY(15) 
ConnectivityEvent:connected:true
ConnectivityEvent:type:WIFI
ConnectivityEvent:subtype:
ConnectivityEvent:failover:false
ConnectivityEvent:roaming:false
Event Type:EVENT_CONNECTIVITY(15) 
ConnectivityEvent:connected:true
ConnectivityEvent:type:WIFI
ConnectivityEvent:subtype:
ConnectivityEvent:failover:false
ConnectivityEvent:roaming:false
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffffcd\xffffffcc\xffffffcc\xffffffcc\xffffffcc\xffffffcc\5@9X9xffffffb4\xffffffc8\v>x11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d133333xffffffb3\5@9=x0a\xffffffd7\xffffffa3\p=x11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1xffffff9a\xffffff99\xffffff99\xffffff99\xffffff99\xffffff99\5@9=x0a\xffffffd7\xffffffa3\p=x11\@
forward get un_know buffer(44):
+x10\x0e\x1a\'x0a\x04\fullx12\x04\goodx1a\x03\usb d(d1x00\x00\x00\x00\x00\xffffff80\5@9=x0a\xffffffd7\xffffffa3\p=x11\@

I use the MergeFromCodedStream.
It can parse more data from the received to the data.
But there are still parts of the data that cannot be parsed.
All data has to go through here, so there is no data loss.

As you can see from the wire message, the data information that cannot be parsed should be: EVENT_BATTERY

from stfservice.apk.

lfjking avatar lfjking commented on July 23, 2024

It's exploding!
After r rebooting my phone, I was able to parse the EVENT_BATTERY data.

Event Type:EVENT_BATTERY(14) 
Battery:health:good
Battery:level:100
Battery:scale:100
Battery:source:usb
Battery:status:charging

What an experience!

from stfservice.apk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.