Zombah sandbox

Материал из Toshiba AC100 wiki
Перейти к навигации Перейти к поиску

ac100 sound

cat /proc/asound/cards                                          
 0 [tegraalc5632   ]: tegra-alc5632 - tegra-alc5632
                                   tegra-alc5632

cat /proc/asound/pcm                                            
00-00: ALC5632 PCM alc5632-hifi-0 :  : playback 1 : capture 1
00-01: SPDIF PCM dit-hifi-1 :  : playback 1 : capture 1

grouper sound

shell@grouper:/ $ cat /proc/asound/cards
cat /proc/asound/cards
 0 [Tegra          ]: HDA-Intel - HDA NVIDIA Tegra
                      HDA NVIDIA Tegra at 0x70038000 irq 113
 1 [tegrart5640    ]: tegra-rt5640 - tegra-rt5640
                      tegra-rt5640
shell@grouper:/ $ cat /proc/asound/pcm
cat /proc/asound/pcm
00-03: HDMI 0 : HDMI 0 : playback 1
01-00: RT5640 PCM rt5640-aif1-0 :  : playback 1 : capture 1
01-01: SPDIF PCM dit-hifi-1 :  : playback 1 : capture 1
01-02: BT SCO PCM dit-hifi-2 :  : playback 1 : capture 1

ubuntu cmdline

  • Kernel buildin
CONFIG_CMDLINE="mem=512M@0 root=/dev/mmcblk1p1 console=ttyS0,115200n8 quite silent earlyprintk rootwait"
  • Bootimage buildin
Command line: mem=512M@0 tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800 console=tty0 root=/dev/mmcblk0p7 quiet splash

adb error

$./adb shell
error: device offline

New android require adb authorization upon first connect, authorized pc's file live in /data/misc/adb/adb_keys

So if you have error that device offline either you have old adb version or not authorized.


Make android code support old and current android api

/* comment this line if Android OS is ICS and prior */
#define ANDROID_VERSION_JB      (1)

#ifdef ANDROID_VERSION_JB
#define LOGV            ALOGV
#define LOGV_IF         ALOGV_IF
#define LOGD            ALOGD
#define LOGD_IF         ALOGD_IF
#define LOGI            ALOGI
#define LOGI_IF         ALOGI_IF
#define LOGW            ALOGW
#define LOGW_IF         ALOGW_IF
#define LOGE            ALOGE
#define LOGE_IF         ALOGE_IF
#define IF_LOGV         IF_ALOGV
#define IF_LOGD         IF_ALOGD
#define IF_LOGI         IF_ALOGI
#define IF_LOGW         IF_ALOGW
#define IF_LOGE         IF_ALOGE
#define LOG_ASSERT      ALOG_ASSERT
#define LOG             ALOG
#define IF_LOG          IF_ALOG
#endif

shell@android:/dev/bus/usb $ ls -la
drwxr-xr-x root     root              2013-02-24 01:09 001
drwxr-xr-x root     root              2013-02-24 01:09 002
shell@android:/ $ cd /dev/bus/usb/001/                                         
shell@android:/dev/bus/usb/001 $ ls -la
crw-rw---- root     usb      189,   0 2013-02-24 01:09 001
crw-rw---- root     usb      189,   1 2013-02-24 01:09 002
crw-rw---- root     usb      189,   2 2013-02-24 01:09 003
crw-rw---- root     usb      189,   3 2013-02-24 01:09 004
shell@android:/dev/bus/usb/001 $ cd ../002/                                    
shell@android:/dev/bus/usb/002 $ ls -la
crw-rw---- root     usb      189, 128 2013-02-24 01:09 001
crw-rw---- root     usb      189, 129 2013-02-24 01:09 002
crw-rw---- root     usb      189, 130 2013-02-24 01:09 003
lsusb
        Bus 001 Device 001: ID 1d6b:0002 !Linux Foundation 2.0 root hub
        Bus 002 Device 001: ID 1d6b:0002 !Linux Foundation 2.0 root hub
        Bus 001 Device 002: ID 0424:2512 ?Standard Microsystems Corp.
        Bus 002 Device 002: ID 0424:2513 ?Standard Microsystems Corp.
wifi    Bus 001 Device 003: ID 0db0:3871 ?Micro Star International (Device name unknown)
bt      Bus 001 Device 004: ID 0db0:a871 ?Micro Star International (Device name unknown)
3g      Bus 002 Device 003: ID 0bdb:190a !Ericsson Business Mobile Networks BV, f3307
ext-usb Bus 002 Device 004: ID 046d:c024

ac100 ubuntu kernel repo

ubuntu repo


rfkill mystic

rfkill устройства оказывается гуляют туда сюда между rfkill0 и rfkill1 для gpio и bt, это создает всякие странности в работе обоих когда ставятся не правильные права, т.к. в андроиде прописано жестко на какое устройство какие права ставить (юид и гид)

root@android:/sys/class/rfkill # ls
rfkill0
rfkill1
rfkill2
root@android:/sys/class/rfkill # cat rfkill0/name                              
hci0
root@android:/sys/class/rfkill # cat rfkill1/name                              
wifi_rfkill
root@android:/sys/class/rfkill # cat rfkill2/name                              
phy0
root@android:/sys/class/rfkill #
root@android:/sys # find . -name "rfkill*"
./devices/platform/rfkill_gpio
./devices/platform/rfkill_gpio/rfkill
./devices/platform/rfkill_gpio/rfkill/rfkill1
./devices/platform/tegra-ehci.1/usb1/1-1/1-1.1/1-1.1:1.0/ieee80211/phy0/rfkill2
./devices/platform/tegra-ehci.1/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/rfkill0
./devices/virtual/misc/rfkill
./bus/platform/devices/rfkill_gpio
./bus/platform/drivers/rfkill_gpio
./bus/platform/drivers/rfkill_gpio/rfkill_gpio
./class/misc/rfkill
./class/rfkill
./class/rfkill/rfkill0
./class/rfkill/rfkill1
./class/rfkill/rfkill2
./module/rfkill


Марвин в курсе, что такое может быть, но пока не знает как пофиксить

[01:22] <zombah> marvin24: hello, i noticed that sometimes rfkill0 and rfkill1 change their names between hci0 and wifi_rfkill and in rare cases rfkill2 appear with name phy0, is this ok or im missing something?
[01:36] <zombah> marvin24: i mean, now i just rebooted and wifi_rfkill is rfkill1, but how this happen because i thought it always must be rfkill0
[01:39] <-- ojn покинул(а) сервер (Remote host closed the connection).
[01:44] <marvin24> zombah: could be
[01:44] <marvin24> I didn't looked for a better way to connect rfkill to thier devices
[01:44] <marvin24> and I don't have a bt model
[01:44] <zombah> marvin24: ohh is it possible to always bind to rfkill0? android need to set specific permissions adn they differ for bt and wifi
[01:45] <marvin24> there must be some method
[01:45] <marvin24> but again, I didn't looked into it yet
[01:45] <woglinde> he marvin24
[01:45] <zombah> i see, i will search other examples, thanx
[01:46] --> styopah вошел на канал ([email protected]).
[01:47] <marvin24> we have a similar problem for rtc
[01:48] <woglinde> hm?
[01:48] <marvin24> because the regulator and the tegra soc supplies a rtc device and it is just random which one get which
[01:48] <woglinde> oh
[01:48] <woglinde> damn
[01:48] <marvin24> and system seems to use rtc0 as a clock source by default
[01:48] <marvin24> so sometimes date works, and sometimes not
[01:48] <woglinde> I thought we wanted to use the one from the tps
[01:48] <marvin24> you can only force module load in the right order
[01:48] <woglinde> and disable the other
[01:49] <marvin24> you should be able to enable all supported hw
[01:49] <woglinde> ?
[01:49] <-- styopah покинул(а) сервер (Client Quit).
[01:49] <marvin24> I think this is a common problem for many device, so there must be a simple solution
[01:49] <marvin24> maybe udev or so
[01:49] <woglinde> if the tegra rtc is not usefull why not disable it
[01:49] <marvin24> it is useful
[01:50] <woglinde> hm
[01:50] <marvin24> it just starts art 1.1.1970 at every system start
[01:50] <zombah> andoroid lack udev support
[01:50] <marvin24> maybe there is some other method
[01:50] <woglinde> how is that usefull if the tps rtc has the right date
[01:54] <marvin24> if you only need relative time chances
[01:55] <marvin24> and I guess the tegra rtc is more accurate in short term
[01:57] <marvin24> often some other device properties are use to define the device id
[01:57] <marvin24> e.g. mac address or serial number
[01:58] <marvin24> but this doesn't work for a gpio only ...

Брутальный способ увидеть кто пишет/читает с диска

echo 1 > /proc/sys/vm/block_dump

начинаются приличные тормоза но в лог ядра валит какой процесс почитал или пописал


Описание хардварных фич андроида

Нашел корректное описание фич http://developer.android.com/guide/topics/manifest/uses-feature-element.html#hw-features


Linaro Disablesuspend.sh

Скрипт работает, отрубает сон с концами и навсегда.

попробовать прописать в init.paz00.rc, а то disablesuspend.sh слишком брутален

# Do not suspend
write /sys/power/wake_lock nosuspend

Google Now crash fix

Найден в этом треде http://productforums.google.com/forum/#!msg/mobile/fnwmbw7XYzQ/-7iO_NcRUOUJ

Достаточно перейти в настройках Input Language с English (US) на например English (UK)


Добавляем вывод в сишную функцию где нет дебага

printk("PRINTK: %s called\n", __func__);

Странный вывод avp при nvflash'нии с установленным u-boot бутлоадером

**********Aos DebugSemiHosting Initialized*******
---------------------------------------------------
ADJUSTED CLOCKS:
MC clock is set to 333000 KHz
EMC clock is set to 666000 KHz (DDR clock is at 333000 KHz)
PLLX0 clock is set to 1000000 KHz
PLLC0 clock is set to 600000 KHz
CPU clock is set to 1000000 KHz
System and AVP clock is set to 240000 KHz
GraphicsHost clock is set to 108000 KHz
3D clock is set to 111000 KHz
2D clock is set to 111000 KHz
Epp clock is set to 111000 KHz
Mpe clock is set to 111000 KHz
Vde clock is set to 240000 KHz
Entering NvFlash recovery mode / Nv3p Server
I2C Slave is *New*Checking for android ota recovery 
Checking for RCK.. press <Enter> in 5 sec to enter RCK
OS will cold boot in 10 seconds if no input is detected
Press <Enter> to select, Arrow key (Left, Right) for selection move

Debug app start in wine

WINEDEBUG=+tid,+seh,+relay,+server wine ./brb.exe >>log.txt 2>&1

Adb vendor keys

This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.