This is an atempt to reuse an old Android tablet instead of putting it to trash.
- Android Tablet, in this case Ainol Novo 7 Aurora II
- Syncthing
- Photo Slides
- SH Script Runner
- Nova Launcher
- AutoStart
- ADB
I have used ADB to copy, modify and test. But use what ever method works for you. This guide will not over how to install ADB, see link in requirements.
adb push *.sh /sdcard/
Either download them from Play Store or from some other place and run adb install *.apk
Remeber to setup folder to use Send & Receive, else it wont work.
Create a shortcut on your desktop/launcher.
Go through settings for timers, animations etc.
Select your camera folder (mine was: /sdcard/DCIM/Camera)
You can also run to add via sqlite.
First adb shell
, then:
dbpath="/data/data/softick.android.photoframe/databases/PhotoFrameDB"
picdir="/sdcard/DCIM/Camera"
sqlite3 $dbpath "insert into folders(foldID,folder_path,folder_check) values(1,'$picdir',1)"
Have included my Photo Slides config which are located at:
/data/data/softick.android.photoframe/shared_prefs/softick.android.photoframe_preferences.xml
Install config via adb:
adb push softick.android.photoframe_preferences.xml /data/data/softick.android.photoframe/shared_prefs/
Add local scripts Hide Bar, Hide bar when connecting charger and Show Bar.
Hide Bar when connecting charger setup:
Final setup with all scripts looks like this:
Add shortcuts to your desktop for easy access:
Set as default, hide some elements. Chose this mainly due to swipe up action for app drawer access. But not a real requirement for the setup. Here is my launcher with bar and without.
Run adb shell getevent -l
and press CTRL+C after touching the display
Look foor POSITION_X and POSITION_Y:
...
/dev/input/event4: EV_ABS ABS_Z 000000d7
/dev/input/event4: EV_SYN SYN_REPORT 00000000
/dev/input/event5: EV_ABS ABS_MT_POSITION_X 00000142
/dev/input/event5: EV_ABS ABS_MT_POSITION_Y 000000b9
/dev/input/event5: EV_ABS ABS_MT_TOUCH_MAJOR 000000c8
...
Take that value and convert from HEX to DEC. Example 142 in HEX = 322 DEC.
Change these values in framenewpictures.sh
for lines where input tap
:
input tap XXX YYY # landscape
input tap XXX YYY # portrait
Update crontab.sh according to your preference. Default for update is every 10 minutes and delete log 1th of every month.
Then run:
adb shell /sdcard/crontab.sh
Add some pictures, restart and hope for the best.
Upload pictures via Syncthing and add/edit textfile refresh.txt to contain the word yes
. The script framenewpictures.sh
should then notice that refresh.txt is yes
, reload your pictures in to the database and restart Photo Slides app. Once done also change content of refresh.txt to no
.
Some stuff that could be improved or added:
- Check screen orientation instead of sending two taps
dumpsys | grep 'SurfaceOrientation' | awk '{ print $2 }'
-
Fancier update check Instead of using refresh.txt you could fetch a value from web or other. But works and is simple.
-
OpenVPN Install openvpn client for why not? Add remove support?
-
Updater Have a script run from syncthing folder to run remote updates.
Thank you masashi-k for your info.
Created two simple shell scripts to hide system bar (navigation and notifications) as the app did not do that.
Add them to SH Script Runner with automations
Had to fix internal storage after a restore.
fdisk /dev/block/avnftli
d 1
o
w
n
p
1
w
mkfs.exfat /dev/block/avnftli1