Hi,
I've searched a lot and nothing found as solution for my Superpad device so below something like solution.
In example below I'm using Superpad Chinese pad, sure some of this action could be applied to any other android devices.
If you experienced with silent mic problem in android system, you can perform fix in few ways (sure only for rooted device):
1. Way to fix through alsa. Launch terminal and type:
Code:
$ su
- find your input device, for that execute next command
Code:
# alsa_amixer cget numid=3
try numid value from 1 till you will see your input device or message that device doesn't exist
for example my respond:
Code:
numid=3,iface=MIXER,name='Input Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=512,step=0
; values=488,488
- if values is less than max (in example 488<512) then you can continue, type next in console
Code:
# alsa_amixer cset numid=3 512,512
Code:
numid=3,iface=MIXER,name='Input Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=512,step=0
; values=512,512
Settings will be applied till next reboot, after reboot you will execute it by hands again (I found no way to start it automatically at system boot).
So before reboot you can perform:
Code:
# alsa_ctl store
After reboot you can restore:
Code:
# alsa_ctl restore
2. Another way through audio device registers. This way is different for each audio device and should performed accordingly to chip documentation. For example for chip WM8987 (which is used in Superpad).
Microphone boost configuration are stored in the 5,4 bits of 0x20 register (left channel, 0x21 right channel in my device unusable). Configuration of input lines stored in 7,6 bits the same register.
Code:
$ su
- to see current settings perform next
Code:
# cat /proc/driver/audregs
in response you will see current settings;
- from chip datasheet:
Code:
5:4 bit | boost | hex
00 | off | c0
01 | 13dB | d
10 | 20dB | e0
11 | 29dB | f0
- write this registers into devices, for example for 29dB (mix will be little bit noisy so you can try 20dB) boost:
Code:
# echo 0x20 0xf0 > /proc/driver/audregs
- for autostart create XXmicfix (where XX - any unique number) file inside /etc/init.d with next text inside:
Code:
#!/system/bin/sh
echo 0x20 0xf0 > /proc/driver/audregs
Hope this will be helpful,
That's all.
As title ;
I've managed to use the wvdial to dial to the 3G network successfully.
(wvdial is shiped from Botbrew-basil)
The ssh connection , telnet , even the w3m in terminal emulator are working properly.
"ifconfig" shows that ppp0 is up and everything seems to be well-settled.
But unfortunately ...... the system status bar said that "there is no available connection" .
And all the browsers and other applications in GUI failed to connect to the Internet.
So......
Is there anyway to tell the android system that "Hey ! The connection is available !!! " ?
Command line solutions are Okay for me , too.
P.S.PPP widget is not suitable for me because its behavior.
(I'll explain in device background.)
=============================
device background :
I flashed my ASUS TF101g from its stock ROM (Honeycomb)
to the REVOLVER 4 ROM (ICS) , which is available from this thread.
Most of things works fine except that 3G seemed not to be detected by the system.
APN settings and any config toward Mobile Network is not responding.
PPP widget is a solution provided and it works well.
However , my tab also plays a role as an access point for my laptops .
After dialing , PPP widget will "wrap" the connection to be "WIFI",
and the hot-spot sharing function will be forced to shutdown by the system immediately.
The wifi card just cannot serve others while it's acting as a client ......
Here are some logs :
System Information:
Code:
# uname -a
Linux localhost 2.6.39.4 #1 SMP PREEMPT Fri May 25 22:47:02 CST 2012 armv7l GNU/Linux
3G module :
Huawei EM820W
Dial Message:
Code:
# wvdial
--> Ignoring malformed input line: ";[Dialer Defaults]"
--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E0 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E0 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1, "IP","Internet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
CONNECT 21600000
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sat Nov 23 13:57:23 2013
--> Pid of pppd: 8178
--> Using interface ppp0
--> pppd: �"@��u
--> pppd: �"@��u
--> pppd: �"@��u
--> pppd: �"@��u
--> pppd: �"@��u
--> local IP address 100.81.xxx.xx
--> pppd: �"@��u
--> remote IP address 10.64.64.64
--> pppd: �"@��u
--> primary DNS address 61.31.233.1
--> pppd: �"@��u
--> secondary DNS address 168.95.1.1
--> pppd: �"@��u
^C
Caught signal 2: Attempting to exit gracefully...
--> Terminating on signal 15
--> pppd: �"@��u
--> Connect time 1.0 minutes.
--> pppd: �"@��u
--> pppd: �"@��u
--> pppd: �"@��u
--> Disconnecting at Sat Nov 23 13:58:27 2013
I don't know why there is so escape character , the locale is set to be zh_TW.utf8. I tried us_EN.utf8 and POSIX , the problem remains.
Misery Kernel error log:
Code:
[19706.535004] fxz-option_resume entered
[19706.535299] option_open()+
[19706.536024] Wake28 for irq=326
[19706.536749] option_open()-
[19706.540709] option_close()+
[19706.541428] option_close()-
[19709.007449] fxz-option_suspend entered
[19709.008544] option: option_instat_callback: error -2
[19709.008917] fxz-option_suspend entered
[19709.009278] fxz-option_suspend entered
[19709.009936] fxz-option_suspend entered
[19709.010310] fxz-option_suspend entered
[19709.010677] fxz-option_suspend entered
[19709.011732] option: option_instat_callback: error -2
[19709.554349] usb_wwan: version magic '2.6.36.3-00005-g5dff38c SMP preempt mod_unload ARMv7 ' should be '2.6.39.4 SMP preempt mod_unload ARMv7 '
[19709.556632] usb_wwan: Unknown symbol _test_and_set_bit_le (err 0)
[19709.557757] usb_wwan: Unknown symbol _clear_bit_le (err 0)
[19709.564941] option: version magic '2.6.36.3-00005-g5dff38c SMP preempt mod_unload ARMv7 ' should be '2.6.39.4 SMP preempt mod_unload ARMv7 '
[19709.569786] option: module is already loaded
I did some probing and found the UART pins on the board. Connecting to it on reboot dumps out the bootloader messages, but goes quiet as soon as the kernel boots. Has anyone been able to get the kernel to output? I feel like I'm missing something simple.
It boots fine into the OS using stock CM12.1 nightlies, but my current modifications to the kernel is causing it to hang mid-boot without panic. Gettings the kernel to output to the UART console would be super helpful for debugging.
Code:
Format: Log Type - Time(microsec) - Message
Log type: B - since boot(excluding boot rom). D - delta
B - 62098 - SBL1, Start
B - 67374 - scatterload_region && ram_init, Start
D - 0 - scatterload_region && ram_init, Delta
B - 84363 - pm_device_init, Start
D - 26474 - pm_device_init, Delta
B - 110928 - boot_flash_init, Start
D - 11407 - boot_flash_init, Delta
B - 122701 - boot_config_data_table_init, Start
D - 0 - boot_config_data_table_init, Delta
B - 128893 - sbl1_ddr_set_params, Start
B - 133651 - Pre_DDR_clock_init, Start
D - 274 - Pre_DDR_clock_init, Delta
D - 0 - sbl1_ddr_set_params, Delta
B - 147284 - pm_driver_init, Start
D - 16500 - pm_driver_init, Delta
B - 163815 - clock_init, Start
D - 183 - clock_init, Delta
B - 166896 - Image Load, Start
B - 185714 - Tz Execution, Start
D - 183610 - Tz Execution, Delta
B - 377407 - Image Load, Start
B - 387075 - Signal PBL to Jump to RPM FW
B - 387350 - sbl1_wait_for_ddr_training, Start
D - 31689 - sbl1_wait_for_ddr_training, Delta
B - 426298 - Image Load, Start
B - 427000 - WDT Execution, Start
D - 213 - WDT Execution, Delta
B - 429623 - Image Load, Start
B - 447648 - sbl1_efs_handle_cookies, Start
D - 244 - sbl1_efs_handle_cookies, Delta
B - 449631 - RPM sync cookie updated
B - 453931 - SBL1, End
Android Bootloader - UART_DM Initialized!!!
[0] welcome to lk
[10] platform_init()
[10] target_init()
[210] hw version voltage value=3
[210] ddr version value=1,14
[210] rf version voltage value=37
[290] Done initialization of the card
[310] Display Init: Start
[310] detect pannel ID=:0x0
[310] JDI panel, panel_id=1
[560] MDP GDSC already enabled
[560] msm_fb_alloc enter:fb->width=1080,fb->height=1920,fb->bpp=24
[570] fbcon_setup enter.
[570] Config MIPI_CMD_PANEL.
[690] Neal board_hardware_id = 8!
[700] partition_get_index : name=reserve3
[700] partition_get_index : name=reserve3, n=25
[710] get_gamma_index : -48
[710] msm_display_on enter.
[710] Turn on MIPI_CMD_PANEL.
[710] Display Init: Done
[720] vbatt_low_shutdown_handle enter.
[720] lfc Configure gpios for QUP instance: 0
[720] bq27541_init:eek:K
[730] partition_get_index : name=aboot
[730] partition_get_index : name=aboot, n=4
[740] after msm_boot_mode_init, boot mode is=0
[740] reboot mode is=2003195137
[740] sxh set_msm_boot_mode_by_gpio goto normal mode power on!
# [800] command not found
# # [900] wwx reboot mode =2003195137
[900] partition_get_index : name=LOGO
[900] partition_get_index : name=LOGO, n=21
[910] splash_screen_mmc:MAGIC: SPLASH!!, width: 1080, height: 1919
[930] splash_screen_mmc 4101 YXQ first_read_flag=1
[940] msm_display_on enter.
[940] Turn on MIPI_CMD_PANEL.
YXQ backlight level 200
[950] lm3630_enable-----lm3630_enable: !
[950] yanghai Configure gpios for QUP instance: 1
[960] QUP IN:bl:8, ff:32, OUT:bl:8, ff:32
[960] gpio_ap_switch_config
[960] lfc Configure gpios for QUP instance: 5
[970] bq24196_init:eek:K
[980] QUP IN:bl:8, ff:32, OUT:bl:8, ff:32
[990] partition_get_index : name=misc
[990] partition_get_index : name=misc, n=20
[990] ERROR: Partition table not found
[1000] partition_get_index : name=bootselect
[1000] Unable to locate /bootselect partition
[1000] Boot Select Partition do not exists
[1010] partition_get_index : name=misc
[1010] partition_get_index : name=misc, n=20
[1020] wwx read_misc:
[1020] partition_get_index : name=misc
[1020] partition_get_index : name=misc, n=20
[1030] partition_get_index : name=boot
[1030] partition_get_index : name=boot, n=6
[1030] use_signed_kernel=0, is_unlocked=1, is_tampered=1.
[1040] Loading boot image (6385664): start
[1080] Loading boot image (6385664): done
[1090] Using DTB entry 194/00010000/8/0 for device 194/00010001/8/0
[1090] ddr info: ddr_manufacture_info=Samsung ddr_row0_info=14,len:47,version:1
[1100] LCD_id 0 yxr
[1100] cmdline: console=ttyHSL0,115200,n8 androidboot.hardware=bacon user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 console=ttyHSL0,115200,n8 androidboot.emmc=true androidboot.serialno= androidboot.baseband=msm mdss_m[1130] pm8x41_get_is_cold_boot: Warm boot
[1130] WARM: power_on_reason is KPADPWR_N [0x80]
[1130] The power_on_reason is androidboot.startupmode=pwrkey
[1140] cmdline = console=ttyHSL0,115200,n8 androidboot.hardware=bacon user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 console=ttyHSL0,115200,n8 androidboot.emmc=true androidboot.serialno= androidboot.baseband=msm mdss_[1160] Updating device tree: start
[1180] Updating device tree: done
[1190] Turn off MIPI_CMD_PANEL.
[1190] Continuous splash enabled, keeping panel alive.
[1190] booting linux @ 0x8000, ramdisk @ 0x2000000 (873073), tags/device tree @ 0x1e00000
Perhaps try and pass console=ttyHSL0,112500 n8 as the command line for the kernel.
This is the cmd line from the boot.img
Code:
cmd_line="console=ttyHSL0,115200,n8 androidboot.hardware=bacon user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1"
It also shows up in the bootloader console output:
Code:
[1140] cmdline = console=ttyHSL0,115200,n8 androidboot.hardware=bacon user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 console=ttyHSL0,115200,n8 androidboot.emmc=true androidboot.serialno= androidboot.baseband=msm mdss_[1160] Updating device tree: start
It's old though, did you manage to get kernel log on UART? This link says to get kernel messages on UART, kernel needs to be compiled with serial port driver enabled: CONFIG_SERIAL_MSM and CONFIG_SERIAL_MSM_CONSOLE.
Hi,
sshd won't work on my Moto G (Falcon) with CM13
Can anyone help me?
Logcat:
Code:
07-17 00:42:25.618 24464 24464 I /system/bin/sshd: Server listening on :: port 22.
07-17 00:42:25.618 24464 24464 I /system/bin/sshd: Server listening on 0.0.0.0 port 22.
07-17 00:42:28.787 24492 24492 E /system/bin/sshd: error: Could not load host key: /data/ssh/ssh_host_dsa_key
07-17 00:42:28.792 24492 24492 I /system/bin/sshd: WARNING: /data/ssh/moduli does not exist, using fixed modulus
07-17 00:42:28.901 218 218 F DEBUG : pid: 24493, tid: 24493, name: sshd >>> /system/bin/sshd: [net] <<<
07-17 00:42:28.938 218 218 F DEBUG : #10 pc 0000cdc9 /system/bin/sshd
07-17 00:42:28.938 218 218 F DEBUG : #13 pc 00020d6f /system/bin/sshd
07-17 00:42:28.938 218 218 F DEBUG : #15 pc 000073e4 /system/bin/sshd
07-17 00:42:28.989 24492 24492 E /system/bin/sshd: error: mm_request_receive: socket closed
/data/ssh:
Code:
drw------- 2 root shell 4096 1970-01-01 05:49 empty
-rw------- 1 root root 672 2016-07-17 01:01 ssh_host_dsa_key
-rw-r--r-- 1 root root 604 2016-07-17 01:01 ssh_host_dsa_key.pub
-rw------- 1 root root 1675 2016-07-17 01:01 ssh_host_rsa_key
-rw-r--r-- 1 root root 396 2016-07-17 01:01 ssh_host_rsa_key.pub
-rw------- 1 root root 5 2016-07-17 01:11 sshd.pid
-rw------- 1 root root 3330 2016-07-17 00:00 sshd_config
sshd_config:
Code:
# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
# The default requires explicit activation of protocol 1
Protocol 2
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /data/ssh/ssh_host_rsa_key
HostKey /data/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#RSAAuthentication yes
PubkeyAuthentication yes
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile /data/ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no
# Change to no to disable s/key passwords
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
PidFile /data/ssh/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none
# no default banner path
Banner /data/ssh/banner
# override default of no subsystems
Subsystem sftp internal-sftp
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
/data/local/userinit.d/99sshd:
Code:
#!/system/bin/sh
umask 077
# DEBUG=1
DSA_KEY=/data/ssh/ssh_host_dsa_key
DSA_PUB_KEY=/data/ssh/ssh_host_dsa_key.pub
RSA_KEY=/data/ssh/ssh_host_rsa_key
RSA_PUB_KEY=/data/ssh/ssh_host_rsa_key.pub
AUTHORIZED_KEYS=/data/ssh/authorized_keys
DEFAULT_AUTHORIZED_KEYS=/system/etc/security/authorized_keys.default
if [ ! -f $DSA_KEY ]; then
/system/bin/ssh-keygen -t dsa -f $DSA_KEY -N ""
chmod 600 /$DSA_KEY
chmod 644 $DSA_PUB_KEY
fi
if [ ! -f $RSA_KEY ]; then
/system/bin/ssh-keygen -t rsa -f $RSA_KEY -N ""
chmod 600 /$RSA_KEY
chmod 644 $RSA_PUB_KEY
fi
if [[ ! -f $AUTHORIZED_KEYS && -f $DEFAULT_AUTHORIZED_KEYS ]]; then
cat $DEFAULT_AUTHORIZED_KEYS > $AUTHORIZED_KEYS
fi
if [ "1" == "$DEBUG" ] ; then
# run sshd in debug mode and capture output to logcat
/system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config -D -d
else
# don't daemonize - otherwise we can't stop the sshd service
/system/bin/sshd -f /data/ssh/sshd_config -D
fi
Thanks in advance
Post on cyanogenmod forum:
https://forum.cyanogenmod.org/topic/127039-sshd-problem-cm13/#comment-603490
Hi,
I followed this tutorial: https://www.xda-developers.com/customize-battery-saver-mode-android-8-0/
And I have set my Battery Saver Mode settings as follows:
Code:
settings put global battery_saver_constants "animation_disabled=true,vibration_disabled=true,adjust_brightness_disabled=true,soundtrigger_disabled=true"
And this works perfectly.
Also I have found that those settings are stored in the file:
Code:
OnePlus6:/ # cat /data/system/users/0/settings_global.xml | grep '"battery_saver_constants"'
<setting id="528" name="battery_saver_constants" value="animation_disabled=true,vibration_disabled=true,adjust_brightness_disabled=true,soundtrigger_disabled=true" package="root" />
Unfortunately at some point those settings are being reset (maybe when phone battery percentage reaches 100%?).
How can I make those settings permanent? I have rooted my phone.
Update:
I have checked settings in the file at 22:01
Code:
OnePlus6:/ # ll /data/system/users/0/settings_global.xml
-rw------- 1 system system 15752 2018-07-09 22:01 /data/system/users/0/settings_global.xml
And the values were there. Two hours later, they are gone:
Code:
OnePlus6:/ # ll /data/system/users/0/settings_global.xml
-rw------- 1 system system 15655 2018-07-09 23:52 /data/system/users/0/settings_global.xml
OnePlus6:/ # cat /data/system/users/0/settings_global.xml | grep '"battery_saver_constants"'
<setting id="533" name="battery_saver_constants" package="com.google.android.gms" />