Open radare opened 9 years ago
Seems like we have to stop to rely on b2g-info and implement the logic from b2g-info in firewatch. Would you provide a starting pull request?
Then maybe it's a bug in b2g-info because this is a core command from b2g, and shouldnt report that error.
130|root@flame:/ # b2g-ps
APPLICATION SEC USER PID PPID VSIZE RSS WCHAN PC NAME
b2g 0 root 210 1 257776 99732 ffffffff b6ebc8ac S /system/b2g/b2g
(Nuwa) 0 root 519 210 59772 14252 ffffffff b6ebc8ac S /system/b2g/b2g
Homescreen 2 u0_a961 961 519 77408 31536 ffffffff b6ebc8ac S /system/b2g/b2g
Built-in Keyboa 2 u0_a1167 1167 210 79284 34332 ffffffff b6f488ac S /system/b2g/plugin-container
Smart Collectio 2 u0_a1311 1311 519 75120 28876 ffffffff b6ebc8ac S /system/b2g/b2g
Find My Device 2 u0_a1371 1371 519 69388 23496 ffffffff b6ebc8ac S /system/b2g/b2g
Usage 2 u0_a1431 1431 519 70044 25200 ffffffff b6ebc8ac S /system/b2g/b2g
Telegram 2 u0_a1739 1739 519 138892 61416 ffffffff b6ebc8ac S /system/b2g/b2g
Gallery 2 u0_a1948 1948 519 80300 29212 ffffffff b6ebc8ac S /system/b2g/b2g
Settings 2 u0_a3105 3105 519 92392 34460 ffffffff b6ebc8ac S /system/b2g/b2g
(Preallocated a 2 u0_a7321 7321 519 68032 20820 ffffffff b6ebc8ac S /system/b2g/b2g
root@flame:/ # b2g-info
Fatal error: Two B2G main processes found (pids 210 and 519)
2|root@flame:/ #
Btw, b2g-info works fine in my Keon, but fails in the Flame. it would be good for firewatch not to depend on those tools, but those tools should be working fine on the reference device at least..
@lightsofapollo is working on a fix for the Flame.
I tested on 2.0 and it yields Fatal error: B2G main process not found.
while 2.2 shows an empty list with This program needs to run as the root user in order to query pids.
I am also looking into using the new memory logs that landed in 2.1: https://bugzilla.mozilla.org/show_bug.cgi?id=1078870 , which give much higher fidelity.
Maybe the problem is related to b2g-info on kitkat based images
On 08 Dec 2014, at 20:08, Harald Kirschner notifications@github.com wrote:
@lightsofapollo is working on a fix for the Flame.
I tested on 2.0 and it yields Fatal error: B2G main process not found. while 2.2 shows an empty list with This program needs to run as the root user in order to query pids.
I am also looking into using the new memory logs that landed in 2.1: https://bugzilla.mozilla.org/show_bug.cgi?id=1078870 , which give much higher fidelity.
— Reply to this email directly or view it on GitHub.
In the latest firmware ps reports all apps to be "b2g", there's no different name for them so it cant be identified to be an app. and firewatch reports multiple b2g running error.
The way to get all apps running is "ps |grep ^u" .
You can get the PIDs from there and get the name of the app by reading in /proc/pid/status and grep for ^Name.