Skip to content

Commit

Permalink
Reverted sdrs_log disable, disabled dji_upgrade, dji_ftpd and made ot…
Browse files Browse the repository at this point in the history
…her small optimizations instead
  • Loading branch information
j005u committed Jun 27, 2023
1 parent 08bdcc0 commit 97d226c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion wtfos-system/control/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: wtfos-system
Version: 0.2.4
Version: 0.2.5
Maintainer: Joonas Trussmann [email protected]
Description: wtfos startup patches
Architecture: armv7-3.2
Expand Down
14 changes: 12 additions & 2 deletions wtfos-system/control/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,22 @@ prepare_new_system () {
cp ${filename} ${filename}.orig
fi
sed -i '/# judge blackbox is formated/,/# judge cache partition/c\# judge cache partition is formated or not\. if not, format it\.' ${filename}
if grep -q "dji.sdrs_log_service 0" ${filename}; then
#revert sdrs_log kill if it's in place. causes new problems.
busybox sed -i 's/setprop dji.sdrs_log_service 0/setprop dji.sdrs_log_service 1/g' ${filename}
fi
if [ "${filename}" == "/system/bin/start_dji_system_wm150pro.sh" ] || [ "${filename}" == "/system/bin/start_dji_system.sh" ]; then
#we do this to work around memory pressure issues because sdrs_log is largely useless anyway
busybox sed -i 's/setprop dji.sdrs_log_service 1/setprop dji.sdrs_log_service 0/g' ${filename}
#we do this to conserve memory
busybox sed -i 's/setprop dji.ftpd_service 1/setprop dji.ftpd_service 0/g' ${filename}
busybox sed -i 's/setprop dji.upgrade_service 1/setprop dji.upgrade_service 0/g' ${filename}
sed -i '/# dump system\/upgrade log to a special file/,/# do kmsg collection/c\# do kmsg collection' ${filename}
fi
restorecon ${filename}
done

#disable dsp logging to save memory
#busybox sed -i 's/emmc:on/emmc:off/g' /system/etc/sdrs_offline_log.cfg
#off until we've sorted the rtos crash questions

#make our mkshrc.d work
if [[ ! -f /system/etc/mkshrc.orig ]]
Expand Down
7 changes: 1 addition & 6 deletions wtfos-system/data/blackbox/wtfos/wtfos-init.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/system/bin/sh
alias logme="tee /dev/kmsg | tee -a /blackbox/wtfos.log"

if [ "$1" != "startup" ]; then
echo "you probably don't want to run me by hand" | logme
exit 2
fi

remount_slash=false

echo "wtfos: entware starting"
Expand Down Expand Up @@ -45,7 +40,7 @@ echo "wtfos: ran dji startup script" | logme
#but otherwise we have a bad time for some reason with dinit installed?
#the dinit start script spawns with &
#needs investigation
/opt/etc/init.d/rc.unslung start 2>&1 | logme &
. /opt/etc/init.d/rc.unslung start 2>&1 >> /blackbox/wtfos.log &
echo "wtfos: started entware unslung" | logme

exit 0

0 comments on commit 97d226c

Please sign in to comment.