Bug 7904

Summary: Special problem with ash of busybox in Android
Product: Busybox Reporter: Karsten <forum+busybox>
Component: Standard ComplianceAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Host: Target:
Build:

Description Karsten 2015-03-02 18:39:53 UTC
Hello,

this is more a question than a bug request.

Original i opened a bug here for the problem:
https://jira.cyanogenmod.org/browse/CYAN-6348
All is basing on this:
http://sven-ola.dyndns.org/repo/debian-kit-en.html

Please have a look at the bootdeb script in deb.zip
https://jira.cyanogenmod.org/secure/attachment/28703/deb.zip

In the time between i could find out that the error is based in the ash shell.
The complete Debian script is shipped with a busybox for Atmel V 1.19.4
This seems not to work together with the newer Android system in Cynogenmod.

I already tried out to use an actual busybox for Atmel V 1.23.1, but i have the same problem.

First i want to ask if something has changed in the ash between this versions?

Maybe you have an idea what is going wrong here?
Any idea or help would be wonderful.

Cheers
Karsten
Comment 1 Karsten 2015-03-02 18:45:07 UTC
I enhanced the bootdeb script with some debug statements to find out where the error occurs.

It is exact this line:
   DNS=$(${ANDROID_ROOT:-/system}/bin/getprop net.dns1)

But when i type "getprop net.dns1" as root in a shell directly i get the IP of my gateway in the LAN.
So it works - i don't know why it does not work in the script.

The problem obvious occurs using the ash of busybox.
Comment 2 Denys Vlasenko 2015-03-02 19:42:56 UTC
Try stracing it:

DNS=$(strace -oLOGFILE ${ANDROID_ROOT:-/system}/bin/getprop net.dns1)

and see what's in LOGFILE
Comment 3 Karsten 2015-03-03 18:57:34 UTC
Thanks for the Tip!

I tried to do it, but at this time i have some problems to execute the shellscript bootdeb.
Somehow it will not enter the ash shell in the script.
This will take some time to find and fix the errors.

But when i type in the Android shell directly
 busybox ash -c "getprop net.dns1"
then this works.

I think there is no problem with the busybox itself.
This shellscript is somehow programmed bad.