I bought this awesome baby camera called Lollipop to monitor my baby, however what I find to be very irritating is - I can’t access the rtsp steam of the camera, and I want that so I can record 24/7 videos of what’s going on.

So of course they provide a cloud service I can subscribe to called Lollipop care but… it’s quite expensive and it goes trough a cloud, I don’t want to send any of this video stream publically. The camera allows you to access it via an internal IP, and I have done some magic there as well to be able to access it from the internet on my home public IP without going trough their cloud, but that’s another topic.

So I needed to access the RTSP stream of the camera, of course simply oging to rtsp://IP/<some_path> didn’t work, returned 403:

ffplay rtsp://
Server returned 401 Unauthorized (authorization failed)

So now I am on the search for those credentials (and paths). So because I’ve blocked the app to access their cloud servers and it still worked, I now know that the app keeps the credentials somewhere stored on the device. I am using an old Samsung tablet to look at the stream while at home, but to get to the credentials I would need to root it, and it’s quite old, so I don’t want to play with it and brick it.

I found this cool Android emulator called Waydroid, installed it on my Linux box and went trough some steps to install the Lollipop app.

Of course the app didn’t support X11.. so I had to go with weston, which is a Wayland display server, simply

After I installed it, had to get google play as well, so init like this:

sudo waydroid init -s GAPPS -f

Then to fix the ‘Your device is not certified for Google Play Protect’ bullshit, ran:

sudo waydroid shell
ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"

Went here: https://www.google.com/android/uncertified and added the UUID, waited a couple of minutes and voilla, I can access google play. Signed in, installed Lolliop, which resulted in Waydroid getting rotated on my screen so I had to fix this with:

sudo waydroid prop set persist.waydroid.multi_windows true

Then managed to login in the camera and I had the stream working in my emulated Android! Next.. the search for credentials.

Waydroid keeps it’s data in .local/share/waydroid/data/data/ and there it is the com.aoitek.lollipop folder, having a conveniently a databases folder containing several sqlite *.dbs.

Opened the LollipopProvider.db (had to first move it out of there, chown it):

sqlite3 LollipopProvider.db .tables
account           baby_camera       cam_setting       shared_user     
android_metadata  baby_photo        event           
baby              baby_video        sensor_rawdata 

sqlite3 LollipopProvider.db "PRAGMA table_info(baby_camera);"

sqlite3 LollipopProvider.db "select internal_live_url from baby_camera;"

Then simply running to check if it works:

ffplay rtsp://...

I got my stream!

Then I just started ffmpeg process to dump the stream into a file:

ffmpeg -i rtsp://... -vcodec copy -acodec copy -f mp4 -y baby-camera.mp4