Skip to content

Instantly share code, notes, and snippets.

View 0312birdzhang's full-sized avatar
🎯
Focusing

BirdZhang 0312birdzhang

🎯
Focusing
View GitHub Profile
on ubports:
[ 428.506368] tas2557 2-004c: tas2557_startup
[ 428.506569] tas2557 2-004c: tas2557_hw_params
[ 428.506575] tas2557_hw_params
[ 428.506583] tas2557 2-004c: tas2557_setup_clocks: nSamplingRate = 48000 [Hz]
[ 428.506591] tas2557 2-004c: Firmware not loaded
[ 428.512351] afe_get_cal_topology_id: [AFE_TOPOLOGY_CAL] not initialized for this port 4119
[ 428.519676] send_afe_cal_type cal_block not found!!
[ 428.535115] tas2557 2-004c: tas2557_prepare
@0312birdzhang
0312birdzhang / gist:a7074c8a1bb6b3a3d65596ff61585ee4
Last active March 7, 2019 13:35
ubports on vince first init
sudo -i
insmod /system/lib/modules/wlan.ko
mount -o remount rw /
mkdir /run/user/32011 && sudo chown phablet /run/user/32011 && sudo chmod 0700 /run/user/32011
adduser --force-badname --system --home /nonexistent --no-create-home --quiet _apt
chmod 4777 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
chown root:messagebus /usr/lib/dbus-1.0/dbus-daemon-launch-helper
chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper
@0312birdzhang
0312birdzhang / gist:c1d28e3ae451247c286c301744782f49
Created February 28, 2019 06:25
SailfishOS goto settings page
import Nemo.DBus 2.0
DBusInterface {
id: settingsApp
service: "com.jolla.settings"
path: "/com/jolla/settings/ui"
iface: "com.jolla.settings.ui"
}
[root@Sailfish flatpak-1.0.5]# ./configure --disable-xauth
appstream-glib-0.5.19
https://build.opensuse.org/package/view_file/openSUSE:Factory/appstream-glib/appstream-glib.spec?expand=0
https://build.opensuse.org/package/view_file/GNOME:Factory/appstream-glib/appstream-glib.spec?expand=1&rev=56219ca03e8473cca86205ae6aa01d31
intltool
gdk-pixbuf-devel
libyaml-devel
@0312birdzhang
0312birdzhang / faq-hadk.txt
Created September 26, 2018 03:53
SFOS HADK Backup
https://public.etherpad-mozilla.org/p/faq-hadk
Please, do not use browser-in-place translation tools (right-click translate-this) or similar. They overwrite the content on this page.
---------------------------------------------------------------------------------------------------------------------
So you booted your Sailfish OS? Congrats! No GUI? Oh dear :)
both usb0 and rndis0 interfaces might be up, remove usb0 from init-script and rebuild kernel image with make hybris-boot or make hybris-recovery
@0312birdzhang
0312birdzhang / monitor_sfos_new_version.sh
Last active September 5, 2018 02:28
Check new sfos version
#!/bin/bash
work_path=$(dirname $(readlink -f $0))
cd $work_path
URL="https://releases.jolla.com/releases/"
ARCH="/jolla/armv7hl/"
VERSION="2.2.2."
if [ -f "sfos_new" ]; then
exit 0;
fi
for i in {1..30}; do
import io, sys, time, re, os
import winreg
#表项路径
xpath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
#设定代理,enable:是否开启,proxyIp:代理服务器ip及端口,IgnoreIp:忽略代理的ip或网址
def setProxy(enable,proxyIp,IgnoreIp):
try:
key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, xpath, 0, winreg.KEY_WRITE)
winreg.SetValueEx(key, "ProxyEnable", 0, winreg.REG_DWORD, enable)
```lua
local headers = ngx.req.get_headers()
local reqUri = ngx.var.request_uri
local uri = ngx.var.uri
local userAgent = headers["user-agent"]
local codePath = "/data/fiche/code"
if uri == "/" then
ngx.say("Welcome to p.qiyuos.cn")
ngx.exit(200)
@0312birdzhang
0312birdzhang / faq-hadk
Last active May 18, 2018 06:11
faq-hadk backup
https://public.etherpad-mozilla.org/p/faq-hadk
Please, do not use browser-in-place translation tools (right-click translate-this) or similar. They overwrite the content on this page.
---------------------------------------------------------------------------------------------------------------------
So you booted your Sailfish OS? Congrats! No GUI? Oh dear :)
both usb0 and rndis0 interfaces might be up, remove usb0 from init-script and rebuild kernel image with make hybris-boot or make hybris-recovery
selinux and user session masking are now in HADK v1.1.1 section 9.2.1
@0312birdzhang
0312birdzhang / hot-hadk
Last active May 18, 2018 06:10
hot-hadk backup
Please, do not use browser-in-place translation tools (right-click translate-this) or similar. They overwrite the content on this page.
---------------------------------------------------------------------------------------------------------------------
2018-03-20: libminisf
There's a new library to be built by droidmedia - libminisf. It's invoked from the qt-hwcomposer plugin in lipstick to create the MiniSurfaceFlinger service if it's not already running, and start the binder thread pool. The latter is important on some adaptations that create services from inside hwcomposer, that would previously hang when starting recording. Include 'libminisf_32' in your make command to build it.
2018-03-14: Hardware video codecs in Android 7