Skip to content

Commit

Permalink
devon: fix touch issue with fts
Browse files Browse the repository at this point in the history
  • Loading branch information
HemanthJabalpuri committed Nov 24, 2023
1 parent 4007fc1 commit 22324c5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
21 changes: 21 additions & 0 deletions recovery/root/system/bin/runatboot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/sbin/sh

# Reference: https://dumps.tadiphone.dev/dumps/motorola/devon/-/blob/2e2fbd5c0267953cd52bd917370bdaddf6a7e1fe/vendor/bin/init.mmi.touch.sh#L447-L498

touch_class_path=/sys/class/touchscreen
touch_instance=ft8726
firmware_path=/vendor/firmware
firmware_file=focaltech-txd-ft8726-02-0000-devon.bin

if [ -d $touch_class_path/$touch_instance ]; then
cd $firmware_path

touch_path=/sys$(cat $touch_class_path/$touch_instance/path)

echo "forcing firmware upgrade"
echo 1 > $touch_path/forcereflash

echo "sending reflash command"
echo 0 > $touch_path/flash_mode
echo $firmware_file > $touch_path/doreflash
fi
2 changes: 0 additions & 2 deletions recovery/root/system/etc/recovery.fstab
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ product /product ext4 ro
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,metadata_encryption=aes-256-xts:wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/4804000.ufshc,checkpoint=fs

/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults

/dev/block/bootdevice/by-name/modem /firmware ext4 ro,nosuid,nodev,context=u:object_r:firmware_file:s0 wait,slotselect
4 changes: 2 additions & 2 deletions recovery/root/system/etc/twrp.flags
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Standard AOSP partitions
/boot emmc /dev/block/bootdevice/by-name/boot flags=slotselect;backup
/vendor_boot emmc /dev/block/bootdevice/by-name/vendor_boot flags=slotselect;flashimg
/boot emmc /dev/block/bootdevice/by-name/boot flags=slotselect
/vendor_boot emmc /dev/block/bootdevice/by-name/vendor_boot flags=slotselect;flashimg;backup
/dtbo emmc /dev/block/bootdevice/by-name/dtbo flags=slotselect;backup
/vbmeta emmc /dev/block/bootdevice/by-name/vbmeta flags=slotselect;flashimg

Expand Down

0 comments on commit 22324c5

Please sign in to comment.