I'm trying to figure out if my X8 has a Cypress digitizer or not. I type in dmesg | grep cyttsp-i2c and I end up getting a syntax error, to be specific "Syntax error: redirection unexpected write: Broken pipe".
What the hell is wrong with the command I typed in? I've checked numerous times and I'm pretty damn sure I typed in the proper command. And I am rooted.
The exact commands and responses from the moment I start up Terminal Emulator.
Code:
$ export PATH=/data/local/bin:$PATH
$ su
# dmesg | grep cyttsp-i2c
Syntax error: redirection unexpected
write: Broken pipe
#
there is a .sh file in the system/etc folder on my Z1 that checks and loads the touch screen firmware - I tried running it through an adb shell (very new to this stuff) and got permission denied - my phone is rooted correctly as far as I can see with su #
can someone help me to run this manually on my rooted Z1 or offer some help in forcing a firmware load of the touchscreen FW
I have a Z1 with a replaced screen all hardware has been replaced except for the main board
surely some of you whiz kids can help me out here
@Geoffxx, u mean pre_hw_config.sh ?
Code:
#!/system/bin/sh
# pre_hw_config.sh.
# Used to set special parameters during early boot.
#KOTO hw boot
if [ -e /system/bin/snfcboot ]; then
/system/bin/snfcboot
fi
#Touch fw update
touch_path="/sys/devices/virtual/input/"
touch_vendor_id=$(/system/bin/ta_param_loader -p -t 4950 -d 0 -f "0x%02x")
if [ "$touch_vendor_id" = "0x01" ]; then
touch_module_id=0x$(/system/bin/ta_param_loader -p -t 4950 -d 3 -c 2 -f "%02x")
/system/bin/clearpad_fwloader default $touch_module_id
elif [ "$touch_vendor_id" = "0x02" ]; then
touch_chip_id=0x$(/system/bin/ta_param_loader -p -t 4950 -d 1 -c 2 -f "%02x")
touch_config_id=0x$(/system/bin/ta_param_loader -p -t 4950 -d 3 -c 2 -f "%02x")
echo 1 $touch_config_id $touch_chip_id > "$touch_path/max1187x/dflt_cfg"
echo default > "$touch_path/max1187x/fw_update"
else
if [ -a "$touch_path/clearpad" ]; then
touch_module_id=$(/system/bin/ta_param_loader -t 60221 -f "0x%02x")
if [ "$touch_module_id" = "0x00" ]; then
touch_module_id=0x$(cat $touch_path/clearpad/fwfamily)
fi
/system/bin/clearpad_fwloader default $touch_module_id
elif [ -a "$touch_path/max1187x" ]; then
touch_chip_id=$(cat $touch_path/max1187x/chip_id)
touch_config_id=$(cat $touch_path/max1187x/config_id)
echo 1 $touch_config_id $touch_chip_id > "$touch_path/max1187x/dflt_cfg"
echo default > "$touch_path/max1187x/fw_update"
fi
log "*** touch: No valid Misc TA 4950"
fi
yes sorry I was doing it from memory, the phone is in bits right now
There are about 15 different variants of touch firmware, I believe the above code checks to see which variant is present then loads the FW for it from the selection
what I don't know is if this routine runs every time or is called from another part of the boot process to run on an error condition
at present all I know is that I have a dead touchscreen and all the hardware has been replace except the motherboard - everything on the phone works 100% except the touch, so I want to make sure that touch firmware has been loaded by doing it manually
the Z1 has the synaptics touch hardware and so must be identified somewhere
So there are two checks I'd like to do
see if the hardware is being identified/read - there must be a manual way to do this through adb shell
and if the hardware is being identified then force load the Firmware for it
there was a problem with the xperia T family and here is a thread that identified a similar solution http://forum.xda-developers.com/showthread.php?t=2220290&highlight=touch+screen+not+working , unfortunately the Z family of phones/tablets are different, I suspect it's because they all use the same main firmware and have to identify hardware between all the devices and load appropriate software to drive them
Hi,
I have a nextcloud server on raspberry pi on my local network. I need to dynamically switch hosts when I connect to my wifi so my phone knows to connect to local ip from my domain(lets call it mydomain.com) which is configured in every app that uses nextcloud. So on cellurar use DNS server and on wifi use hosts' file entry.
On my previous device that ran LOS 14 I had a Tasker configuration that looked with scripts like this:
wifi_in.sh
Code:
#!/bin/sh
mount -o rw,remount,rw /system
echo "192.168.1.21 mydomain.com" >> /etc/hosts
echo "192.168.1.21 sth.mydomain.com" >> /etc/hosts
echo " " >> /etc/hosts
mount -o ro,remount,ro /system
wifi_out.sh
Code:
#!/bin/sh
mount -o rw,remount,rw /system
sed -i '/mydomain.com/d' /etc/hosts
sed -i '/^[[:space:]]*$/d' /etc/hosts
echo " " >> /etc/hosts
mount -o ro,remount,ro /system
It worked perfectly. I made it that wifi_in.sh triggers on being connected to network and wifi_out.sh when it disconnects. By adding white space to hosts file it made it so whole system read hosts file again and it was fluid.
Now I'm using systemless hosts file with AdAway. They work fine and I modified the scripts to use correct file:
BTW I'm on official LineageOS 14 with Magisk 14(point releases caused boot problems so I kinda stopped on 14)
wifi_in.sh
Code:
#!/bin/sh
echo "192.168.1.21 mydomain.com" >> /magisk/.core/hosts
echo "192.168.1.21 sth.mydomain.com" >> /magisk/.core/hosts
echo " " >> /magisk/.core/hosts
wifi_out.sh
Code:
#!/bin/sh
sed -i '/mydomain.com/d' /magisk/.core/hosts
sed -i '/^[[:space:]]*$/d' /magisk/.core/hosts
echo " " >> /magisk/.core/hosts
Well the problem is that it kinda worked once when I added hosts, but it doesn't update hosts anymore. So it stays 192.168.1.21 mydomain.com even if I delete every mydomain.com entry from hosts file.
Do you guys have any idea how to fix this?
That's interesting...
I ran your scripts and see the same thing. It works once... The hosts file in /magisk/.core updates every time, but the mirrored one in /system/etc doesn't.
Putting this one down on the "investigate" list.
Thanks for reporting this issue. However, this issue is not a Magisk bug, rather it is caused by the fact that it is mounted, the file is not actually in /system/etc
For some reason, the sed -i command works by first read stuffs to memory, delete the file, then recreate one. However the "delete the file" step is actually what causes this issue.
A workaround would change all sed -i commands:
Code:
# Change this
sed -i '<pattern>' '<file>'
# To this
sed '<pattern>' '<file>' > /dev/.tmp
mv -f /dev/.tmp '<file>'
topjohnwu said:
Thanks for reporting this issue. However, this issue is not a Magisk bug, rather it is caused by the fact that it is mounted, the file is not actually in /system/etc
For some reason, the sed -i command works by first read stuffs to memory, delete the file, then recreate one. However the "delete the file" step is actually what causes this issue.
A workaround would change all sed -i commands:
Code:
# Change this
sed -i '<pattern>' '<file>'
# To this
sed '<pattern>' '<file>' > /dev/.tmp
mv -f /dev/.tmp '<file>'
Click to expand...
Click to collapse
I modified the script and rebooted. Everything works as it should. Thank you very much for your help.
I don't even have a /magisk folder. did this path change? I'm on beta 16.4
Dears maybe now I can make double post but I hang on that step from guide from this site.
Phone is after wipe data and I need rescue data from it for that I want to make RAW image to recover data.
What I do until now:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
but in results get:
1|ASUS_I001_1:/ # /system/xbin/busybox nc -1 -p 5555 -e /system/xbin/busybox dd
5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0 <
nc: invalid option -- 1
BusyBox v1.32.0-Stericson (2020-07-18 18:33:24 EDT) multi-call binary.
Usage: nc [OPTIONS] HOST PORT - connect
nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen
-e PROG Run PROG after connect (must be last)
-l Listen mode, for inbound connects
-lk With -e, provides persistent server
-p PORT Local port
-s ADDR Local address
-w SEC Timeout for connects and final net reads
-i SEC Delay interval for lines sent
-n Don't do DNS resolution
-u UDP mode
-v Verbose
-o FILE Hex dump traffic
-z Zero-I/O mode (scanning)
1|ASUS_I001_1:/ #
Why I get that this parameter is invalid:
nc: invalid option -- 1
And to the end, if that don't work to me, next step also don't work.
Open another Cygwin terminal and type:
Code:
adb forward tcp:5555 tcp:5555
cd /path/to/store/the/backup ---> this is correct, should I creat some folder on HHD and insert here his name?
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw --> that means I should have ftp serwer?
Mod edit: @Vergiliusz Thread closed as duplicate of
Ho to back up of the whole memory block (via adb)
Dears maybe now I can make double post but I hang on that step from guide from this site. Phone is after wipe data and I need rescue data from it for that I want to make RAW image to recover data. What I do until now: adb forward tcp:5555...
forum.xda-developers.com
Please review the XDA Forum Rules with special emphasis on rule no. 5 and post only once - and such a subject not in development!
Regards
Oswald Boelcke
Dears maybe now I can make double post but I hang on that step from guide from this site.
Phone is after wipe data and I need rescue data from it for that I want to make RAW image to recover data.
What I do until now:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
but in results get:
1|ASUS_I001_1:/ # /system/xbin/busybox nc -1 -p 5555 -e /system/xbin/busybox dd
5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0 <
nc: invalid option -- 1
BusyBox v1.32.0-Stericson (2020-07-18 18:33:24 EDT) multi-call binary.
Usage: nc [OPTIONS] HOST PORT - connect
nc [OPTIONS] -l -p PORT [HOST] [PORT] - listen
-e PROG Run PROG after connect (must be last)
-l Listen mode, for inbound connects
-lk With -e, provides persistent server
-p PORT Local port
-s ADDR Local address
-w SEC Timeout for connects and final net reads
-i SEC Delay interval for lines sent
-n Don't do DNS resolution
-u UDP mode
-v Verbose
-o FILE Hex dump traffic
-z Zero-I/O mode (scanning)
1|ASUS_I001_1:/ #
Why I get that this parameter is invalid:
nc: invalid option -- 1
And to