Home Android Arch Linux Gentoo Linux LibreELEC Github Geo

script dump via adb

nano get_fex_defines.sh


def="3g_para \
	audio_para audio0_para \
	boot_disp bt_para \
	camera_list_para can_para card_boot card_boot0_para card_boot2_para card_burn_para \
	charging_type clock compass_para cooler_table csi0_para csi1_para ctp_para \
	ctp_list_para custom \
	disp_init dram_dvfs_table dram_para dram_scene_table dvfs_table dynamic \
	emac_para external \
	force_uart_para \
	g2d_para gpio_init gpio_para gps_para gsensor_para gy_para \
	i2s_para i2s0_para i2s1_para ir_para \
	jtag_para \
	keypad_para key_detect_en \
	lcd0_para lcd1_para leds leds_para locks_para ls_para ls_list_para \
	mali_para mmc0_para mmc1_para mmc2_para mmc3_para motor_para msc_feature ms_para \
	nand_para \
	pm_para pmu_para pmu0_para pmu1_para pmu2_para power_sply product ps2_0_para \
	ps2_1_para pwm0_para pwm1_para \
	recovery_key rtp_para \
	s_uart0 s_rsb0 s_jtag0 s_powchk sata_para sdio_wifi_para smc_para spdif_para \
	spi0_para spi1_para spi2_para spi3_para spi_board0 spi_devices system \
	tabletkeys_para target ths_para tkey_para tvin_para tv_out_dac_para tvout_para \
	twi_para twi0_para twi1_para twi2_para \
	uart_para uart_para0 uart_para1 uart_para2 uart_para3 uart_para4 uart_para5 \
	uart_para6 uart_para7 usbc0 usbc1 usbc2 usb_feature usb_wifi_para \
	Vdevice \
	wakeup_src_para wifi_para"
echo $( date "+DATE: %m/%d/%y%nTIME: %H:%M:%S" ) > ${out}
echo "" >> ${out}
for d in $def; do
	echo -n "try to get some data for entry $d"
	echo $d > /sys/class/script/dump
	sleep 0.5
	a=$( cat /sys/class/script/dump )
	if [ x"$a" = x ]; then
		d=$( echo -n $d | busybox sed 's/_.*[^0-9]//' )
		echo -n " - retry with $d"
		echo $d > /sys/class/script/dump
		sleep 0.5
		a=$( cat /sys/class/script/dump )
		if [ x"$a" = x ]; then
	if [ $empty == 0 ]; then
		cat /sys/class/script/dump >> ${out}
		echo " " >> ${out}
		echo " - got some data"
		echo " - got no data"
busybox sed -i '/sysfs_dump_mainkey/d' ${out}
chown shell:shell ${out}

chmod +x get_fex_defines.sh

adb push get_fex_defines.sh /data/local/tmp

adb shell „su -c sh /data/local/tmp/get_fex_defines.sh“

adb pull /data/local/tmp/defines.txt