(Q) busybox - crond - problem - Android Q&A, Help & Troubleshooting

I´m trying to utilise crond, but it fails every time with the message
"crond: time disparity of xxx minutes detected"
my crond setup
init.d script
Code:
TZ="CET-1CEST-2,M3.5.0,M10.5.0"
export TZ
crond -c /system/etc/cron.d/crontabs -l 0 L /sdcard/catlog/cron.log
/cron.d/crontabs/root
Code:
45 5 * * * /etc/cron.d/flushcache.sh
30 0 * * * /etc/cron.d/multioff.sh
55 5 * * * /etc/cron.d/multion.sh
My assumption is it get´s delayed while phone is asleep, how do I make it reliable?

Related

[Q] Secret Code for MoPho

If anyone know about secret code in MoPho.
I just know 2 secret code.
*#4636# and ##3282#
Basic code
* # * # 4636 # * # * - display phone information, cell information, cell records, using statistical data, WiFi information
* # * # 7780 # * # * - reset to factory settings, do not delete the default program, and SD card files
* 2767 * 3855 # - Reset to Factory Settings, SD card will delete all files
* # * # 34971539 # * # * - displays camera camera firmware version, or update the camera firmware
* # * # 7594 # * # * - when the press off button, there will be a window to switch cell phone models, including: silent mode, flight mode and shut down, you can use the above code directly into a shutdown button
* # * # 273 283 * 255 * 663 282 *#*#* - lets you open a file where the backup media, such as photos, audio and video, etc.
* # * # 197328640 # * # * - start service mode, you can test the phone settings and change some settings
WLAN, GPS, and Bluetooth test code
* # * # 232339 # * # * or * # * # 526 # * # * or * # * # 528 # * # * - WLAN Test
* # * # 232338 # * # * - display WiFi MAC address
* # * # 1472365 # * # * - GPS test
* # * # 1575 # * # * - other GPS test
* # * # 232331 # * # * - Bluetooth test
* # * # 232337 # * # - Display the Bluetooth device address
* # * # 8255 # * # * - start GTalk Service Monitor
Phone software version of the code shown
* # * # 4986 * 2650468 # * # * - PDA, Phone, H / W, RFCallDate
* # * # 1234 # * # * - PDA and Phone
* # * # 1111 # * # * - FTA SW version
* # * # 2222 # * # * - FTA HW version
* # * # 44336 # * # * - PDA, Phone, CSC, Build Time, Changelist number
Testing the hardware
* # * # 0283 # * # * - Packet Loopback
* # * # 0 *#*#* - LCD test
* # * # 0673 # * # * or * # * # 0289 # * # * - Melody test
* # * # 0842 # * # * - device testing, such as vibration, brightness
* # * # 2663 # * # * - touch-screen version
* # * # 2664 # * # * - Touch Screen Test
* # * # 0588 # * # * - close to the sensor test
* # * # 3264 # * # * - memory version
Copied from the web..hope this is useful for you
This info should be stickied
Sent from my MB855 using xda premium
mediaon said:
Basic code
* # * # 4636 # * # * - display phone information, cell information, cell records, using statistical data, WiFi information
* # * # 7780 # * # * - reset to factory settings, do not delete the default program, and SD card files
* 2767 * 3855 # - Reset to Factory Settings, SD card will delete all files
* # * # 34971539 # * # * - displays camera camera firmware version, or update the camera firmware
* # * # 7594 # * # * - when the press off button, there will be a window to switch cell phone models, including: silent mode, flight mode and shut down, you can use the above code directly into a shutdown button
* # * # 273 283 * 255 * 663 282 *#*#* - lets you open a file where the backup media, such as photos, audio and video, etc.
* # * # 197328640 # * # * - start service mode, you can test the phone settings and change some settings
WLAN, GPS, and Bluetooth test code
* # * # 232339 # * # * or * # * # 526 # * # * or * # * # 528 # * # * - WLAN Test
* # * # 232338 # * # * - display WiFi MAC address
* # * # 1472365 # * # * - GPS test
* # * # 1575 # * # * - other GPS test
* # * # 232331 # * # * - Bluetooth test
* # * # 232337 # * # - Display the Bluetooth device address
* # * # 8255 # * # * - start GTalk Service Monitor
Phone software version of the code shown
* # * # 4986 * 2650468 # * # * - PDA, Phone, H / W, RFCallDate
* # * # 1234 # * # * - PDA and Phone
* # * # 1111 # * # * - FTA SW version
* # * # 2222 # * # * - FTA HW version
* # * # 44336 # * # * - PDA, Phone, CSC, Build Time, Changelist number
Testing the hardware
* # * # 0283 # * # * - Packet Loopback
* # * # 0 *#*#* - LCD test
* # * # 0673 # * # * or * # * # 0289 # * # * - Melody test
* # * # 0842 # * # * - device testing, such as vibration, brightness
* # * # 2663 # * # * - touch-screen version
* # * # 2664 # * # * - Touch Screen Test
* # * # 0588 # * # * - close to the sensor test
* # * # 3264 # * # * - memory version
Copied from the web..hope this is useful for you
Click to expand...
Click to collapse
Thank.
But most of it not working on MoPho.

[SOLVED] [Q] Screen capture from artas182x recovery?

Hi,
I'd tried screen capture from @artas182x 's 1.5.0.0 L9 recovery (bootstrap) with adb via monitor.bat, to no avail.
I'm on locked bootloader (rooted) and actually I don't know if it's possible.
Any help will be appreciated, with this or another method for screen capturing from that recovery.
Thanks in advance.
Good luck.
Sent from my L9 P76020h-EUR-xx
Hi,
I don't know if this could help you helping me, anyway,
here you go monitor.bat's info with normal boot (system reboot) -the first-
and from recovery (bootstrap) -the second-.
Any help will be appreciated.
Thanks a lot for reading this and trying to help me.
Cheers.
Good luck.
Any help will be appreciated.
Sent from my L9 P76020h-EUR-xx
You'd have to mount /system first and follow http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html?m=1
Hi all. I've solved it! . Now I can capture screens from recovery via adb in raw format and convert them to jpg with irfan view via PC.
Cheers. Good luck.
Sent from my LG P76020L-EUR-XX unlocked and rooted
FYI: This is the script that I've modified and used. Then opened the raw files with Irfan View with the options shown in the capture and saved as jpg or any other.
Code:
@echo off
cls
echo.
echo ******************************************************
echo * *
echo * ADB-Screenshot from Recovery *
echo * *
echo * Original idea: Kyan He *
echo * code.google.com/p/android-fb2png *
echo * *
echo * Script: Whiskey103 *
echo * forum.xda-developers.com/showthread.php?p=40260716 *
echo * *
echo * Script update: Korbeny *
echo * optimized for LG L9 by BajoPrimate *
echo * *
echo * ADB version: 1.0.31 (August 2013) *
echo * *
echo * Instructions: *
echo * - Boot into recovery *
echo * - Plug in USB cable *
echo * When ready press a key to continue *
echo * *
echo ******************************************************
echo.
pause
cls
adb devices
set number=""
goto option
:option
cls
echo.
echo.
echo.
echo 1.- Make a screenshot
echo 2.- Exit
echo.
set /p choice=Type the number of your choice
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto screenshot
if '%choice%'=='2' goto exit
cls
echo.
echo.
echo.
echo "%choice%" is not a valid option. Please try again
echo.
echo.
pause
goto option
:screenshot
cls
set number=%number%+1
adb pull /dev/graphics/fb0 Screenshot%number%.raw
echo.
echo.
echo ******************************************************
echo * *
echo * The screenshot was taken successfully *
echo * *
echo ******************************************************
echo.
echo.
echo.
echo.
echo.
echo ******************************************************
echo * *
echo * The screenshots are stored in the ADB folder *
echo * named as Screenshot*.raw *
echo * *
echo * open with Irfan View 544 X 960 16 BPP 5:6:5 *
echo * *
echo ******************************************************
echo.
echo.
pause
adb shell sync
goto option
:exit
pause
cls
exit
Good luck.
Hi all, as I was restoring a nandroid backup here you go another example:
Cheers. Good luck.
Sent from my LG P76020L-EUR-XX unlocked and rooted

Problems with cron

Hi, I have made cron work on my 7" china tablet, it runs almost like I'd like it to..
I've made a passwd file in /etc with the following contents:
Code:
root:x:0:0::/data/cron:/system/bin/bash
I've made a symlink from /system/bin to /bin
And I've made a crontab file with the following line in it:
Code:
* * * * * /system/xbin/cat /sys/class/power_supply/battery/capacity > /dev/ttyACM0
Now the problem.. Cron runs fine, running the small bash code every minute, but..
ttyACM0 is a serial line to a microController - but the problem is that nothing is received on the controller, despite the cron running the script.
now if I LS /dev/tty* I get the following:
Code:
[email protected]:/ # ls /dev/ttyA* -l
ls /dev/ttyA* -l
crw------- root root 166, 0 2013-09-07 13:11 ttyACM0
-rw-rw-rw- root root 3 2013-09-07 13:14 ttyACM0
[email protected]:/ #
The cron creates an identical file in /dev and write it's data to this file, and not the *real* ttyACM0 serial..
I start the crond service in init.rc like this:
Code:
service crond /system/xbin/crond -c /data/cron
user root
disabled
oneshot
on property:dev.bootcomplete=1
.
.
start crond
If I change the cronscript to output to a flat file somewhere else (like /data/test_output), I can see the file with LS, but I'm not able to delete it nor cat it.
What's going on?
I need this to work in order to trigger a charger once the battery goes too low, and turn it off again once it has reached a given threshold. Not being able to send a simple command via serial really offsides this project.
Please help
Could it be that the cron job starts before the /dev/ttyACM0 is created?
hmm, I'll try and delay it a bit..
Made a simple check for if the device exists or not. if [ -c /dev/ttyACM0 ]This solves the problem.

[Q] System changes are cancelled when I restart

Hello
I try to use Link2SD on my HTC Desire 610 (rooted and with unlocked bootloader), but the app is not able to mount the SD card partition because the init.d is not present on the stock ROM.
So, I have installed busy-box and tried the term-init script of Ryuinferno. The script seems to works well (no error), but I noticed it had no effect on the system files.
So I tried some manipulations with adb, and I managed to create the init.d file with these commands:
Code:
>adb kill-server
>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]_a3qhdul:/ $ su
su
[email protected]_a3qhdul:/ # mount -o remount,rw -t auto /system
mount -o remount,rw -t auto /system
[email protected]_a3qhdul:/ # mkdir /system/etc/init.d
mkdir /system/etc/init.d
[email protected]_a3qhdul:/ # cd /system/etc/init.d
cd /system/etc/init.d
[email protected]_a3qhdul:/system/etc/init.d # cd /
cd /
[email protected]_a3qhdul:/ # mount -o remount,ro -t auto /system
mount -o remount,ro -t auto /system
[email protected]_a3qhdul:/ # reboot
reboot
>
After the phone restarts, I tested these commands:
Code:
>adb kill-server
>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]_a3qhdul:/ $ su
su
[email protected]_a3qhdul:/ # cd /system/etc/init.d
cd /system/etc/init.d
tmp-mksh: cd: /system/etc/init.d: No such file or directory
2|[email protected]_a3qhdul:/ #
I tried to create files in the system folder, but they are deleted after every reboot.
Have you ever encountered this problem?
I am a novice regarding the linux operating systems, so I have no idea what could cause this.
Hoping you will find a solution, and sorry for my bad english..
EDIT :
After long search on the forum, I found what I needed for solve my problem
The problem was due to the HTC's system write protection (see here).
For the HTC Desire 610, it seems that the protection allow you to add files in the /system directory but cancels all modifications after a reboot.
To disable this protection, I installed the Jmz's A3UL Kernel V1 and it works fine !
Now the Term-init script works, and I was able to install Link2SD and configure it for mount the ext2 partition on my sd card at boot.
Thank you to the community of xda-developers !

error: only position independent executables (PIE) are supported. andriod 6.0

helloo greetings i have a problem with adb i want to connect with IDA pro but i got error
Code:
C:\adb>adb kill-server
C:\adb>adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
C:\adb>adb shell
[email protected]:/ $ su
2|[email protected]:/ # cd data/tmp/files
[email protected]:/data/tmp/files # ls
android_server
armlinux_server
armuclinux_server
linux_server
linux_serverx64
[email protected]:/data/tmp/files # ./android_server
error: only position independent executables (PIE) are supported.
Thanks in advance sorry for bad english

Categories

Resources