After copying Sqlite3 to by /system/bin folder, the file disappears. I can successfully change the folder to rw and modify the file properties on sqlite3. However, as soon as I remount my /system as ro, the sqlite3 file disappears. I have attempted this using these instructions, from both a terminal session on the phone and adb session from my pc with the same results.
Here's what I've tried:
mount -o remount,rw /system cp /sdcard/sqlite3 /system/bin (ls confirms that the file is present) chmod 4755 /system/bin/sqlite3 (SQLite command works) mount -o remount,ro /system (file is gone)
I also tried copying SQLite from my TitaniumBackup folder, but with the same results. Although, calling SQLite from this folder seems to work.
And, I tried using File Manager with root to copy and set permissions on the files, also unsuccessfully.
And, I have also tried SQLite Installer for Root, but it hasn't worked.
My device is a Sprint HTC One M8, rooted with TWRP, Android 5.0.1.
This question is very similar to this old, unanswered one on StackOverflow.
UPDATE 2015-07-27: I have used @Izzy's suggestions and run a logcat and collected the file (actually several repetitions). After searching the files for anything related to any key terms (e.g. sqlite3, mount, chmod, remount, cp...) I can't find anything of obvious value. Of course, I've never done this before, so I don't have any experience parsing or interpreting these files. Any other thoughts/directions would be appreciated. FWIW, for the short term, I'm using the TitaniumBackup SQLite file, so my immediate problem is solved-not it's just personal between me and my OneM8!
UPDATE 2015-07-28: This problem affects any file I try to copy to /system/bin-they're all erased/removed upon a reboot. I also tried from TWRP Recovery's file manager with the same result