*** Piece_Maker <Piece_Maker!~Acou_Bass@host-89-241-252-213.as13285.net> has joined #sfdroid | 02:05 | |
*** Acou_Bass <Acou_Bass!~Acou_Bass@host-89-241-254-54.as13285.net> has quit IRC (Ping timeout: 258 seconds) | 02:06 | |
*** Piece_Maker is now known as Acou_Bass | 02:06 | |
*** pseudodev <pseudodev!uid205973@gateway/web/irccloud.com/x-kvkklcftvlrgoixf> has joined #sfdroid | 03:51 | |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 06:35 | |
*** TheKit <TheKit!~nekit@85-95-186-128.saransk.ru> has joined #sfdroid | 06:37 | |
*** NeKit <NeKit!~nekit@95-83-33-28.saransk.ru> has quit IRC (Ping timeout: 258 seconds) | 06:40 | |
*** piggz_ <piggz_!~piggz@95.151.121.219> has joined #sfdroid | 08:22 | |
*** nh1402 <nh1402!~nh1402@host81-133-137-69.in-addr.btopenworld.com> has joined #sfdroid | 08:27 | |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 240 seconds) | 08:52 | |
nh1402 | saidinesh5: how did it go? | 10:27 |
---|---|---|
*** locusf <locusf!locusfdisr@gateway/shell/matrix.org/x-reaaabnntnohgndq> has left #sfdroid ("Kicked by @appservice-irc:matrix.org") | 11:17 | |
*** locusf <locusf!locusfdisr@gateway/shell/matrix.org/x-drafswyfuxwlxntx> has joined #sfdroid | 11:36 | |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 12:20 | |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 240 seconds) | 12:35 | |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 12:46 | |
neerad | Any luck saidinesh5 ? | 12:50 |
neerad | krnlyng__ Did you make your own base? | 12:51 |
saidinesh5 | nh1402: neerad. kind of .i am almost back to square 1 it seems. init wasn't crashing anymore, vold, healthd, netd, zygote, mediaserver were running.. but for some reason surfaceflinger wasnt working. | 12:51 |
saidinesh5 | [03:29:52] <saidinesh5> I/Adreno-EGL( 4425): Reconstruct Branch: AU_LINUX_ANDROID_LA.BF.1.1.1_RB1.05.01.00.042.030 + 6151be1 + NOTHING | 12:51 |
saidinesh5 | [03:29:52] <saidinesh5> E/SurfaceFlinger( 4425): ERROR: failed to open framebuffer (Permission denied), aborting | 12:51 |
saidinesh5 | [03:29:52] <saidinesh5> F/libc ( 4425): Fatal signal 6 (SIGABRT), code -6 in tid 4425 (surfaceflinger) | 12:51 |
saidinesh5 | will look into surfaceflinger issue now | 12:52 |
neerad | saidinesh5 Okay I have made the whole sfdroid sources thanks to your patches | 12:52 |
saidinesh5 | Ah.. if you're testing out with the whole sfdroid sources, it could also be worth it to try the chroot approach | 12:52 |
saidinesh5 | do give it a shot | 12:53 |
neerad | Surfaceflinger I have seen that, restart your device and killall servicemanager zygote main system_server surfaceflinger | 12:53 |
neerad | How to make it run it as chroot ? | 12:53 |
saidinesh5 | https://paste.kde.org/pefcimgkn is my init.rc, https://paste.kde.org/pu8r8ub9p#line-29 is my sfdroid-cancro.spec file | 12:55 |
saidinesh5 | https://paste.kde.org/pr0gbab1h is my start-sfdroid.sh | 12:56 |
neerad | Hmmm. So i make a rpm replace my init.rc with stripped init.rc or is it for init.sfdroid.rc? | 12:57 |
saidinesh5 | one missing bit is you need to compile and patch and use https://github.com/absabs/init this init to start the init.rc | 12:58 |
saidinesh5 | (this is what i am using as sfdroid-init) | 12:58 |
saidinesh5 | well my init.rc is now basically init.sfdroid.rc + creates missing paths in /data | 12:58 |
neerad | So it is still not able to run? | 12:59 |
neerad | Services are crashing? | 12:59 |
saidinesh5 | so so. since zygote was running, all it was doing was running dozens of dex2opts and filling up my RAM | 12:59 |
neerad | Same here | 12:59 |
saidinesh5 | and i am not sure if services are crashing OR something else | 12:59 |
saidinesh5 | as without surfaceflinger i dont see things | 12:59 |
saidinesh5 | so today figuring out the issue with surfaceflinger | 13:00 |
neerad | ps aux | grep surfaceflinger ? Nothing | 13:00 |
saidinesh5 | nope. surfaceflinger gets started/restarted after shutting down in the chroot | 13:00 |
saidinesh5 | so i do see logs with why it was shutting down | 13:00 |
saidinesh5 | E/SurfaceFlinger( 4425): ERROR: failed to open framebuffer (Permission denied), aborting | 13:00 |
neerad | Permission denied hmmm? | 13:01 |
saidinesh5 | but so far, with this init it looked promising | 13:02 |
neerad | saidinesh5 Is this some kind of mount error? | 13:06 |
neerad | read-only fs | 13:06 |
saidinesh5 | unlikely. because surfaceflinger was running with the other init, but the init itself was crashing remember? | 13:06 |
neerad | Ohh init crashes , so the issue is with init....Interesting>>>> | 13:07 |
saidinesh5 | the old init crashes probably because of conflicts with property service from the droid-hal-init | 13:07 |
saidinesh5 | (Android init manages the property service too) | 13:07 |
saidinesh5 | that's why i am the neutered init as sfdroid-init | 13:08 |
nh1402 | saidinesh5: maybe a permission problem with chroot gralloc? | 13:13 |
saidinesh5 | nh1402: could be. not sure why it was working in the same chroot with the other init though | 13:14 |
nh1402 | drugs | 13:16 |
neerad | jeeezzz | 13:16 |
pseudodev | nh1402: XD | 13:16 |
nh1402 | saidinesh5: maybe it didnt get far enough with the other init to give the error | 13:21 |
neerad | saidinesh5 Okay I made CM_BASE based upon sfdroid sources and flashed SFOS .... still sfdroid fails to run (non-chroot) | 13:46 |
saidinesh5 | nh1402: oh with the other init surfaceflinger didnt ever crash | 13:48 |
saidinesh5 | it was running in the background even after init crashed | 13:49 |
neerad | In non-chroot mode surfaceflinger runs but it crashes in chroot ? | 13:49 |
saidinesh5 | neerad: if you tried to use the spec for chrooted sfdroid to run sfdroid normally it wont run | 13:49 |
saidinesh5 | no. in chrooted mode, i have 2 different inits. 1 is the CM12.1 init i started patching.. the other is the very basic init i showed you | 13:50 |
saidinesh5 | the CM12.1 init crashes soon, but there surfaceflinger runs after CM12.1 init crashed | 13:50 |
saidinesh5 | in the basic sfdroid-init, init doesnt crash, surfaceflinger just doesnt work because of that permission issue | 13:50 |
saidinesh5 | both of these are running inside the chroot | 13:51 |
saidinesh5 | brb | 13:51 |
saidinesh5 | yeh | 14:03 |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 240 seconds) | 14:27 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has joined #sfdroid | 14:35 | |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 14:49 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has quit IRC (Read error: Connection reset by peer) | 14:55 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has joined #sfdroid | 14:55 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has quit IRC (Remote host closed the connection) | 15:04 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has joined #sfdroid | 15:08 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has quit IRC (Ping timeout: 255 seconds) | 15:19 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has joined #sfdroid | 15:31 | |
neerad | Okay I have tested errors it has reduced but there is one error http://paste.ubuntu.com/24040763/ | 15:32 |
*** nh1402 <nh1402!~nh1402@host81-133-137-69.in-addr.btopenworld.com> has quit IRC (Quit: Leaving) | 16:27 | |
saidinesh5 | E/art ( 6329): dlopen("libjavacore.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "__android_log_close" referenced by "libjavacore.so"... | 16:34 |
saidinesh5 | fix that | 16:35 |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 268 seconds) | 16:38 | |
*** pseudodev <pseudodev!uid205973@gateway/web/irccloud.com/x-kvkklcftvlrgoixf> has quit IRC (Quit: Connection closed for inactivity) | 16:39 | |
saidinesh5 | I/strace (16372): openat(AT_FDCWD, "/dev/graphics/fb0", O_RDWR) = -1 EACCES (Permission denied) | 16:50 |
saidinesh5 | I/strace (16372): openat(AT_FDCWD, "/dev/fb0", O_RDWR) = -1 EACCES (Permission denied) | 16:50 |
saidinesh5 | hmm.... | 16:50 |
saidinesh5 | krnlyng__: does the surfaceflinger still access these devices after being patched? | 16:51 |
saidinesh5 | also: I/strace (16372): setpriority(PRIO_PROCESS, 0, -8) = -1 EACCES (Permission denied) | 16:52 |
saidinesh5 | I/strace (16340): openat(AT_FDCWD, "/system/lib/hw/sharebuffer.default.so", O_RDONLY) = 11 | 16:53 |
*** pseudodev <pseudodev!uid205973@gateway/web/irccloud.com/x-kpeayqmnohxfbmqc> has joined #sfdroid | 16:56 | |
saidinesh5 | I think my neutered init is not exactly doing the groups thing properly | 16:58 |
saidinesh5 | crw-rw---- 1 system graphics 29, 0 Feb 21 19:42 /dev/fb0 | 16:59 |
*** piggz_ <piggz_!~piggz@95.151.121.219> has quit IRC (Read error: No route to host) | 16:59 | |
*** piggz_ <piggz_!~piggz@95.151.121.219> has joined #sfdroid | 16:59 | |
saidinesh5 | YUP: KEYWORD(group, OPTION, 0, 0) | 17:02 |
saidinesh5 | or not | 17:04 |
*** piggz_ <piggz_!~piggz@95.151.121.219> has quit IRC (Quit: Konversation terminated!) | 17:12 | |
krnlyng__ | saidinesh5, yes | 17:13 |
saidinesh5 | yeah.. trying to figure out why my init isn't starting surfaceflinger with the right permissions/groups | 17:14 |
saidinesh5 | it seems that property service is *really really* baked into the android init.. | 17:15 |
saidinesh5 | so i presume it needs access to fb0 to get it's dimensions etc.. ? | 17:16 |
krnlyng__ | saidinesh5, yep | 17:18 |
krnlyng__ | saidinesh5, but thats everything it needs, could be patched away | 17:18 |
* saidinesh5 is so tempted to just chmod 666 | 17:18 | |
saidinesh5 | krnlyng__: btw. what are the paths to the sockets it listens on? | 17:19 |
krnlyng__ | /tmp/sfdroid | 17:19 |
saidinesh5 | that is the socket? | 17:19 |
saidinesh5 | or folder? | 17:19 |
krnlyng__ | folder | 17:19 |
saidinesh5 | Ahh .. and socket paths? | 17:19 |
krnlyng__ | saidinesh5, https://github.com/sfdroid/sfdroid_renderer/blob/master/sfdroid_defs.h | 17:22 |
saidinesh5 | Ahh | 17:22 |
krnlyng__ | only the first three are sockets | 17:22 |
krnlyng__ | the ones suffixed with _handle | 17:23 |
saidinesh5 | I see | 17:23 |
saidinesh5 | also is healthd really needed? | 17:23 |
saidinesh5 | it spams logs *a lot* | 17:23 |
saidinesh5 | E/lowmemorykiller(18551): get lmkd control socket failed | 17:25 |
saidinesh5 | I/lowmemorykiller(18551): exiting | 17:25 |
saidinesh5 | okay so that's what lmkd is | 17:26 |
saidinesh5 | surfaceflinger works after i chmod 777ed /dev/fb0 | 17:26 |
saidinesh5 | netd, vold, surfaceflinger, healthd work now. need to look into lmkd now | 17:34 |
krnlyng__ | saidinesh5, well at the moment it is required because other services wait for it | 17:35 |
saidinesh5 | well surfaceflinger -- not quite. need to fix why the init isnt giving it proper groups | 17:35 |
saidinesh5 | Ahh | 17:35 |
krnlyng__ | saidinesh5, but i wouldn't mind if it was patched away | 17:35 |
krnlyng__ | saidinesh5, did you have graphics output yet? | 17:35 |
saidinesh5 | yeah .. battery stats etc.. don't seem all that important | 17:35 |
saidinesh5 | not sure krnlyng__: W/sharebuffer(20480): connecting to renderer | 17:36 |
saidinesh5 | E/sharebuffer(20480): error connecting to renderer: Permission denied | 17:36 |
saidinesh5 | V/SurfaceFlinger(20480): FPS: 1 | 17:36 |
saidinesh5 | (that's after i chmod 777 /dev/fb0) | 17:36 |
krnlyng__ | ok | 17:37 |
krnlyng__ | so it doesn't have access to /tmp/sfdroid/*_handle | 17:37 |
saidinesh5 | yep. there is no /tmp/sfdroid path either | 17:37 |
saidinesh5 | do i manually create it? | 17:37 |
saidinesh5 | okay it is created once i start sfdroid renderer | 17:39 |
saidinesh5 | I/art (22782): Explicit concurrent mark sweep GC freed 828(37KB) AllocSpace objects, 0(0B) LOS objects, 98% free, 48KB/4MB, paused 124us total 4.543ms | 17:44 |
saidinesh5 | W/Environment(22782): EXTERNAL_STORAGE undefined; falling back to default | 17:44 |
saidinesh5 | D/AndroidRuntime(22782): Shutting down VM | 17:44 |
saidinesh5 | after that zygote keeps restarting | 17:44 |
saidinesh5 | surfaceflinger, vold, mediaserver, healthd, netd are now running | 17:45 |
saidinesh5 | nothing rendering yet though | 17:46 |
saidinesh5 | usr/bin/sg graphics /usr/bin/sfdroid | 17:46 |
saidinesh5 | Can't find service: display | 17:46 |
saidinesh5 | Error type 2 | 17:46 |
saidinesh5 | after that it is just: frames: 0 | 17:46 |
saidinesh5 | failed(ignored) frames: 0 | 17:46 |
saidinesh5 | dummy frames: 0 | 17:46 |
saidinesh5 | failed(ignored) dummy frames: 0 | 17:46 |
saidinesh5 | AND it is still waiting for batterystats? ! I/ServiceManager(25089): Waiting for service batterystats... | 17:47 |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 18:09 | |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 260 seconds) | 18:16 | |
krnlyng__ | saidinesh5, are the services able to connect to servicemanager? | 18:22 |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 18:29 | |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 260 seconds) | 18:35 | |
saidinesh5 | krnlyng__: I/ServiceManager( 675): service 'media.audio_flinger' died | 18:38 |
saidinesh5 | I/ServiceManager( 675): service 'media.player' died | 18:38 |
saidinesh5 | I/ServiceManager( 675): service 'media.camera' died | 18:38 |
saidinesh5 | i think so | 18:38 |
krnlyng__ | ok | 18:39 |
saidinesh5 | i think this init needs more fixing/debugging. it wasnt giving proper permissions/groups to surfaceflinger | 18:40 |
saidinesh5 | it isnt setting up the lmkd socket either | 18:40 |
*** neerad <neerad!~neerad@112.133.229.182> has joined #sfdroid | 18:47 | |
neerad | saidinesh5 somehow runtime is not functioning properly http://paste.ubuntu.com/24041765/ | 18:54 |
saidinesh5 | i told you to fix this bug neerad | 18:54 |
saidinesh5 | E/art ( 6898): dlopen("libjavacore.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "__android_log_close" referenced by "libjavacore.so"... | 18:54 |
neerad | saidinesh5 Oh yeah those patches.... Thanks man | 18:55 |
neerad | Could you generate the diff again please brother | 18:55 |
saidinesh5 | afaik i didnt patch liblog in those patches | 18:56 |
saidinesh5 | you should look at system/core/liblog and see if you have that function | 18:56 |
krnlyng__ | TheKit, with the "new" libhybris we should be able to load libsurfaceflinger.so with android_dlopen, no need for fake_libc | 18:57 |
krnlyng__ | TheKit, this way we don't need to patch libhybris | 18:57 |
krnlyng__ | erm glibc | 18:57 |
neerad | saidinesh5 I am inside liblog now what ? | 18:57 |
krnlyng__ | TheKit, erm glibc | 18:57 |
saidinesh5 | see if you have that function | 18:57 |
saidinesh5 | __android_log_close | 18:57 |
TheKit | "new" libhybris? | 18:57 |
saidinesh5 | if you dont, google for it and add that implementation | 18:57 |
neerad | saidinesh5 where to find it... I mean which file to search for? | 18:58 |
saidinesh5 | use grep | 18:58 |
krnlyng__ | TheKit, https://github.com/krnlyng/libhybris/commit/f086e6233308dd0c5be9977a735a32aad203897b | 18:58 |
saidinesh5 | grep -rin | 18:58 |
krnlyng__ | TheKit, but this also requires a small patch to bionic libc.so | 18:58 |
krnlyng__ | TheKit, but the benefits of this method are: no need to write hooks, just leave libc.so be | 18:59 |
krnlyng__ | TheKit, only hook pthread functions | 18:59 |
TheKit | so basically you keep both libc.so and glibc | 18:59 |
krnlyng__ | yep | 18:59 |
neerad | krnlyng__ TheKit is it related to my error log? | 18:59 |
krnlyng__ | neerad, no | 18:59 |
saidinesh5 | no | 18:59 |
krnlyng__ | TheKit, but in different "namespaces" and without conflict | 19:00 |
TheKit | I wonder why the harder way was choosen initially though then if this is possible | 19:00 |
saidinesh5 | krnlyng__: so with this patch you want to merge sfdroid_renderer and surfaceflinger into 1? | 19:00 |
krnlyng__ | TheKit, i think stskeeps started it this way and people just added hook after hook because the functions broke instead of trying to find a better way | 19:01 |
krnlyng__ | TheKit, but i am not sure about the details | 19:01 |
neerad | neerad@neerad-Satellite-L850 ~/SFDROID/system/core/liblog $ grep -rin __android_log_close | 19:01 |
neerad | tests/liblog_test.cpp:130: __android_log_close(); | 19:01 |
neerad | logd_write_kern.c:218:void __android_log_close() | 19:01 |
neerad | logd_write.c:383:void __android_log_close() | 19:01 |
neerad | neerad@neerad-Satellite-L850 ~/SFDROID/system/core/liblog $ | 19:01 |
krnlyng__ | saidinesh5, yep | 19:01 |
saidinesh5 | Ah neat.. | 19:02 |
TheKit | I remember part of functions were hooked due to different float formats | 19:02 |
TheKit | isn't Android softfp and glibc hardfp? | 19:02 |
neerad | saidinesh5 now what ? | 19:02 |
krnlyng__ | TheKit, yes but thats different | 19:02 |
krnlyng__ | TheKit, actually: | 19:02 |
krnlyng__ | TheKit, if we hook the functions we need to arrange softfp / hardfp otherwise we don't. | 19:03 |
krnlyng__ | TheKit, on the top layer (gles egl and so on) we still need to translate from hardfp to softfp | 19:03 |
krnlyng__ | TheKit, but we don't need to translate from softfp to hardfp and back in the bottom layers (libc.so) | 19:03 |
TheKit | I see | 19:04 |
saidinesh5 | neerad: so make sure your liblog.so has that symbol | 19:04 |
krnlyng__ | TheKit, it works on 3/3 devices so far | 19:04 |
TheKit | read that as 373 | 19:04 |
krnlyng__ | xD | 19:05 |
saidinesh5 | neerad: the liblog.so that the app_process (i think thats the binary throwing this error) | 19:05 |
saidinesh5 | is trying to load | 19:05 |
saidinesh5 | where is it loading from, and wherever it is loading from .. does it provide this function. | 19:05 |
krnlyng__ | TheKit, well there are still hickups. but they are also there with normal libhybris. but with the new method there seem to be way less hickups | 19:05 |
neerad | saidinesh5 31: 00001ea5 64 FUNC GLOBAL DEFAULT 8 __android_log_close | 19:06 |
saidinesh5 | neerad: where did you get that from? | 19:06 |
neerad | readelf -a liblog.so | 19:06 |
saidinesh5 | no i mean where is that liblog.so locateed? | 19:06 |
saidinesh5 | and are you sure your app_process is loading that same liblog.s? | 19:06 |
krnlyng__ | TheKit, ghosalmartin had shader compilation issues, was fixed with this, then we made sure all pthread functions (even libc internal ones) go to the hybris hooks => pink screen fixed | 19:06 |
neerad | saidinesh5 /home/neerad/SFDROID/out/target/product/wt88047/obj/PACKAGING/target_files_intermediates/cm_wt88047-target_files-2825008319/SYSTEM/lib | 19:07 |
krnlyng__ | TheKit, but i actually wanted to consider possible ideas for sfdroid | 19:07 |
krnlyng__ | TheKit, we could load the whole android into one single process xD | 19:07 |
saidinesh5 | neerad: but are you sure your app_process is loading that particular liblog.so ? | 19:07 |
saidinesh5 | or could it be loading a different version from say /system/lib/ | 19:07 |
krnlyng__ | TheKit, but i am not sure how well fork would work then :D | 19:07 |
neerad | saidinesh5 how to check? | 19:08 |
saidinesh5 | or say /usr/libexec/droid-hybris/system/lib ? | 19:08 |
TheKit | fork() function? | 19:08 |
saidinesh5 | neerad: use strace | 19:08 |
krnlyng__ | TheKit, yes | 19:08 |
neerad | straace sfdroid | 19:08 |
neerad | *? | 19:08 |
krnlyng__ | because it would copy the whole process i think | 19:08 |
krnlyng__ | or is it copy on write? | 19:08 |
TheKit | if you load the whole android into one single process, what would happen if something in Android crashes? | 19:09 |
saidinesh5 | neerad: https://source.android.com/devices/tech/debug/ last point how they loaded valgrind | 19:10 |
neerad | saidinesh5 http://paste.ubuntu.com/24041861/ | 19:10 |
saidinesh5 | no. | 19:10 |
saidinesh5 | that error is not coming from sfdroid. it is probably coming from zygote or something | 19:10 |
saidinesh5 | so you need to change your init to strace properly | 19:10 |
neerad | how to do that? saidinesh5 | 19:11 |
krnlyng__ | TheKit, everything would go down | 19:11 |
krnlyng__ | TheKit, i was not serious about it | 19:11 |
saidinesh5 | see the link i gave you. it shows you how to edit your init files to valgrind services so they show up in logcat | 19:11 |
neerad | okay cool | 19:11 |
saidinesh5 | you need to strace similarly | 19:12 |
krnlyng__ | but merging sfdroid_renderer and surfaceflinger seems to be a neat option | 19:12 |
saidinesh5 | then you can grep logcat for liblog and see where it is loaded from | 19:12 |
saidinesh5 | and if it is from elsewhere, which doesnt have that method, then LD_PRELOAD your particular liblog.so | 19:13 |
saidinesh5 | "<krnlyng__> but merging sfdroid_renderer and surfaceflinger seems to be a neat option" . Amen. | 19:13 |
neerad | saidinesh5 so i need to patch init.rc or init.sfdroid.rc? | 19:13 |
saidinesh5 | whicever place you are starting zygote | 19:14 |
neerad | so i need to patch in each of the lines for each service or just for zygote? | 19:15 |
neerad | saidinesh5 Do i need to build valgrind? | 19:17 |
neerad | tell me the exact code to replace to? | 19:18 |
saidinesh5 | neerad: no. just stracce | 19:19 |
neerad | no need to patch init.sfdroid.rc? | 19:20 |
neerad | saidinesh5 ? What to do now ? | 19:23 |
saidinesh5 | you need to ppatch init.sfdroid.rc | 19:26 |
saidinesh5 | brb | 19:26 |
saidinesh5 | working on something | 19:26 |
neerad | service sfdroid_zygote /usr/bin/strace /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server | 20:25 |
neerad | from | 20:25 |
neerad | service sfdroid_zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server | 20:26 |
neerad | is this okay saidinesh5? | 20:26 |
saidinesh5 | use logwrapper | 20:26 |
neerad | logwrapper also okay... | 20:27 |
saidinesh5 | #service sfdroid_sf /system/bin/logwrapper /system/xbin/strace /system/bin/surfaceflinger | 20:27 |
saidinesh5 | that's how i debugged surfaceflinger | 20:27 |
neerad | saidinesh5 somehow that lead to sfdroid not starting at all | 20:50 |
saidinesh5 | hmm? | 20:50 |
neerad | I added this line to zygote service /system/bin/logwrapper /system/xbin/strace | 20:51 |
neerad | permission denied was all over my logcat | 20:51 |
saidinesh5 | permission denied for what? | 20:52 |
neerad | opening sfdroid | 20:52 |
saidinesh5 | hmm? | 20:52 |
saidinesh5 | not sure what you mean | 20:52 |
saidinesh5 | permission denied for opening what exactly? | 20:52 |
neerad | Here is the log message ... I fixed the logwrapper issue | 21:04 |
neerad | http://paste.ubuntu.com/24042481/ | 21:04 |
saidinesh5 | you mea E/DEBUG ( 768): ptrace attach failed: Operation not permitted ? | 21:07 |
saidinesh5 | that's when a service crashes and android isnt able to generate tombstones because you are already running strace on the process | 21:08 |
neerad | So how to stop it | 21:08 |
neerad | from crashing | 21:08 |
saidinesh5 | dunno, but you are getting your liblog.so from : : openat(AT_FDCWD, "/usr/libexec/droid-hybris/lib-dev-alog/liblog.so", O_RDONLY) = 3 | 21:08 |
saidinesh5 | that's what you needed to find out from strace, and you found out | 21:08 |
neerad | Okay so what to do next? | 21:09 |
saidinesh5 | LD_PRELOAD your prefered liblog.so to the sfdroid processes | 21:09 |
neerad | my preferred ? | 21:09 |
saidinesh5 | well the liblog.so which provides the missing function | 21:09 |
neerad | like from the sfdroid one okay | 21:10 |
saidinesh5 | https://github.com/CancroSailors/android_device_xiaomi_cancro/blob/hybris-12.1/rootdir/root/init.qcom.rc#L897 | 21:11 |
saidinesh5 | that's how you LD_PRELOAD stuff in init | 21:11 |
saidinesh5 | Although neerad dont bother LD_PRELOAD | 21:11 |
neerad | Why ? | 21:11 |
saidinesh5 | simply copy your liblog.so to the SFDroid path | 21:11 |
neerad | which path? | 21:12 |
saidinesh5 | Look at your strace: | 21:12 |
saidinesh5 | I/strace ( 5609): openat(AT_FDCWD, "/usr/libexec/sfdroid/system/lib/liblog.so", O_RDONLY) = -1 ENOENT (No such file or directory) | 21:12 |
saidinesh5 | I/strace ( 5609): openat(AT_FDCWD, "/usr/libexec/droid-hybris/lib-dev-alog/liblog.so", O_RDONLY) = 3 | 21:12 |
saidinesh5 | first it checks the first path and when it didnt find the liblog.so there it is fetching it from droid-hybris | 21:12 |
neerad | Okay | 21:12 |
saidinesh5 | mal: ^ btw. i thought we patched liblog.so for missing __android_log_close method in mer-hybris/android_system_core ? | 21:14 |
saidinesh5 | hmm apparently not.. | 21:16 |
saidinesh5 | even my local patch was wiped out on some previous repo sync | 21:16 |
saidinesh5 | odd... | 21:17 |
saidinesh5 | my CM 12.1 doesnt have that method either | 21:17 |
neerad | saidinesh5 For the first time sfdroid is working | 21:17 |
saidinesh5 | neerad: congrats | 21:17 |
neerad | Successful | 21:17 |
saidinesh5 | so things booted up? | 21:17 |
neerad | Everything I am using camera now | 21:17 |
saidinesh5 | Ah cool | 21:17 |
saidinesh5 | you have the RPMs right? | 21:18 |
neerad | only thing is I don't know how to go back | 21:18 |
saidinesh5 | go back to? | 21:18 |
neerad | Yes I do have that | 21:18 |
neerad | Like back function in android | 21:18 |
saidinesh5 | your phones' back key doesn't work? | 21:18 |
neerad | nope | 21:18 |
neerad | Camera is working | 21:19 |
saidinesh5 | there was some setting you can add in some init file to give an onscreen back button in sfdroid | 21:19 |
saidinesh5 | neerad: i dont think you can use your normal camera until a reboot after that | 21:19 |
neerad | It's sluggish though too much hanging in process | 21:19 |
saidinesh5 | normal/sailfish camera | 21:19 |
saidinesh5 | you still have the strace right? | 21:19 |
saidinesh5 | that can be a bottleneck | 21:20 |
neerad | I thing jolla-camera is working as well | 21:20 |
saidinesh5 | Ah they fixed hte issue i see | 21:20 |
saidinesh5 | remove the logwrapper and strace from your init | 21:20 |
neerad | How to fix bottleneck too much hanging | 21:20 |
neerad | Okay | 21:20 |
saidinesh5 | and reboot | 21:20 |
neerad | cool | 21:20 |
saidinesh5 | Also add liblog.so to the rpm's spec when you recompile | 21:21 |
neerad | Lastly how to do that | 21:21 |
saidinesh5 | you have the sfdroid_core-<devicename>.spec file right? | 21:21 |
neerad | Yep | 21:22 |
saidinesh5 | in there | 21:22 |
neerad | Add that okay cool | 21:22 |
neerad | Rebooting , I am happy af | 21:22 |
saidinesh5 | Although i should prbably send a patch to mer-hybris' liblog.so . this was a long overdue patch | 21:22 |
neerad | Sure | 21:23 |
neerad | Thanks a lot man | 21:23 |
saidinesh5 | heh you're welcome | 21:23 |
neerad | You would be tagged in XDA too after building a new .rpm file | 21:23 |
saidinesh5 | lol sure | 21:23 |
saidinesh5 | i hope the guys on my forum dont see that and demand an instant sfdroid for cancro | 21:24 |
neerad | They might Xiaomi brothers | 21:24 |
saidinesh5 | Also actually push your sfdroid_core-<devicename> to your personal OBS repo | 21:25 |
saidinesh5 | you didnt have to make any kernel changes for getting sfdroid working right? | 21:25 |
dr_gogeta86 | i got the ril probles | 21:25 |
dr_gogeta86 | *problems | 21:25 |
saidinesh5 | dr_gogeta86: ril inside sfdroid? | 21:25 |
dr_gogeta86 | broke the sailfish ril | 21:26 |
neerad | Here's what I did , I made CM based on sfdroid repos that solved the jolla-camera issue as well | 21:26 |
dr_gogeta86 | especially thr audio part | 21:26 |
neerad | then I made sfdroid.rpm and sfdroid_renderer.rpm | 21:26 |
neerad | and added liblog.so | 21:26 |
neerad | that's it | 21:26 |
dr_gogeta86 | i don't have too much problems on camera | 21:26 |
dr_gogeta86 | but ril is dangerous | 21:26 |
neerad | saidinesh5 It's still sluggish though | 21:27 |
saidinesh5 | see where the bottleneck is .. see the CPU usage, ram usage | 21:27 |
neerad | Inputflinger is causing some issues as well | 21:27 |
saidinesh5 | could be the issue too | 21:27 |
neerad | That is the issue touching multiple times the screen scrolls | 21:28 |
mal | neerad: good to hear sfdroid finally works for you, what were the reasons for the problems? | 21:28 |
saidinesh5 | outdated liblog from mer-hybris mal | 21:29 |
neerad | The main thing I changed is I changed my CM_BASE | 21:29 |
mal | saidinesh5: hmm | 21:29 |
saidinesh5 | and that | 21:29 |
mal | saidinesh5: what was outdated in that? | 21:29 |
neerad | no In old CM_BASE nothing was working so I made CM_BASE out of sfdroid_repos | 21:29 |
saidinesh5 | __android_log_close this method was missing mal | 21:29 |
neerad | and adding liblog.so worked | 21:30 |
mal | saidinesh5: ok, is that introduced in some newer 12.1-YOG7D? | 21:30 |
saidinesh5 | I think so. i remember manuallly adding that for my camera a while ago.. | 21:30 |
saidinesh5 | although my 12.1-YOG7D sources doesn't point to anything like that | 21:31 |
neerad | http://paste.ubuntu.com/24042591/ Full log after sfdroid working | 21:31 |
mal | saidinesh5: in which repo? | 21:31 |
saidinesh5 | system/core/liblog | 21:32 |
saidinesh5 | looking for the repo | 21:32 |
neerad | mal Somehow jolla-camera issue is solved too | 21:32 |
neerad | with the new CM_BASE | 21:32 |
neerad | saidinesh5 mal surfaceflinger has issues FPS is varying from 2 to 30 even when I am scrolling Android screen. | 21:33 |
saidinesh5 | mal: https://github.com/CyanogenMod/android_system_core/commit/10b64f5469dd158491f4e79d630ca7062287d192 | 21:34 |
neerad | sfdroid_multiwindow also operational | 21:34 |
saidinesh5 | neerad: could be an Android side issue? what happens when you tone down android settings? | 21:35 |
saidinesh5 | in Settings > developer settings | 21:35 |
saidinesh5 | force gpu there and see? | 21:35 |
neerad | Trying | 21:35 |
neerad | Inputflinger is messing when I scroll up sometimes it scrolls up sometime down | 21:38 |
saidinesh5 | but what about FPS ? after you force GPU rendering | 21:38 |
neerad | Let me see | 21:38 |
saidinesh5 | Also do take a look at htop or something and see which process is hogging the CPU/RAm | 21:39 |
neerad | A little bit of improvement | 21:39 |
saidinesh5 | if ram is full , chances are you'd get very crappy performance... and you can try https://source.android.com/devices/tech/config/low-ram.html | 21:39 |
mal | saidinesh5: ok, so after the new camera issue with latest YOG7D is properly solved I think we need to rebase it | 21:41 |
saidinesh5 | yup | 21:41 |
mal | after that sfdroid should also be easier again | 21:41 |
neerad | saidinesh5 It's not a RAM issue clearly tocuhing is causing some issues.... | 21:42 |
neerad | I have had low RAM issues in Android it's not one of them | 21:42 |
saidinesh5 | okay my chrooted init now finally gets surfaceflinger, vold, healthd, lmkd, mediaserver, netd up and running | 21:42 |
saidinesh5 | zygote seems to be the one missing from the party now | 21:42 |
mal | neerad: maybe some issue with the way sfdroid handles input? | 21:43 |
neerad | Might be mal | 21:43 |
mal | neerad: I think overall sfdroid is not quite well optimized | 21:43 |
saidinesh5 | mal: btw. what provides batterystats? I/ServiceManager( 6586): Waiting for service batterystats... | 21:43 |
neerad | I really don't know I am adding liblog.so to .rpm | 21:43 |
mal | saidinesh5: not sure, maybe healthd? | 21:44 |
neerad | Nothing it's not an issue I think... was there in mine as well | 21:44 |
saidinesh5 | healthd is up and running | 21:44 |
mal | saidinesh5: then grep source tree | 21:44 |
saidinesh5 | Ah yup | 21:44 |
neerad | How to use back button in Android ? | 21:45 |
saidinesh5 | neerad: you can activate onscreen backbutton in cyanogenmod settings | 21:45 |
neerad | Wifi is not working | 21:45 |
saidinesh5 | for now that. later on see if sfdroid_renderer is picking up the keypress events or mce is eating them up | 21:45 |
neerad | Also I didn't add frameworks_av to this | 21:45 |
neerad | from sfdroid | 21:46 |
saidinesh5 | neerad: just wifi ? or networking itself isnt working? | 21:46 |
neerad | No nothing .... This is bad | 21:46 |
saidinesh5 | hmm | 21:46 |
neerad | Okay now SYstemUI crashed | 21:47 |
neerad | Okay wifi is working .... | 21:48 |
neerad | Somehow it is not opening Wifi settings | 21:48 |
saidinesh5 | i am not sure how netd was patched there | 21:48 |
saidinesh5 | check commits to frameworks/base to see what patches went there | 21:49 |
*** piggz <piggz!~piggz@95.151.121.219> has joined #sfdroid | 21:51 | |
saidinesh5 | okay something was off | 22:04 |
saidinesh5 | 4294967295 27062 2.1 0.7 70668 14424 pts/1 Sl 23:22 0:00 /system/bin/mediaserver | 22:04 |
saidinesh5 | 4294967295 22784 0.0 0.4 34780 8492 pts/1 Sl 23:13 0:00 /system/bin/surfaceflinger | 22:04 |
saidinesh5 | the userid | 22:05 |
neerad | what's witht the user_id? | 22:05 |
saidinesh5 | yep. that's what i need to look into my patched init | 22:05 |
saidinesh5 | to me that looks like the value of -1 if it was changed to unsigned int | 22:06 |
*** krnlyng_ <krnlyng_!~liar@178.114.230.20.wireless.dyn.drei.com> has joined #sfdroid | 22:29 | |
*** krnlyng__ <krnlyng__!~liar@77.117.9.38.wireless.dyn.drei.com> has quit IRC (Ping timeout: 240 seconds) | 22:31 | |
*** Mister_Magister <Mister_Magister!~foidbgen@user-94-254-162-233.play-internet.pl> has quit IRC (Quit: Konversation terminated!) | 22:58 | |
*** neerad <neerad!~neerad@112.133.229.182> has quit IRC (Ping timeout: 240 seconds) | 23:04 | |
*** pseudodev <pseudodev!uid205973@gateway/web/irccloud.com/x-kpeayqmnohxfbmqc> has quit IRC (Quit: Connection closed for inactivity) | 23:09 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!