Thanks, good idea!
I added this line just after all the iptables rules in my shell script file:
log -t MYPROJECT $(iptables -vnL INPUT 2>&1 >/dev/null)

and the result is
iptables v1.4.20: can't initialize iptables table `filter': Permission 
denied Perhaps iptables or your kernel needs to be upgraded.

This is strange because after bood when I run my script from shell manually 
it works great. No iptables errors

Any idea?


On Friday, January 15, 2016 at 7:47:12 PM UTC+1, Channing You wrote:
>
> Hi, Alexis:
>
>     You should check logcat/dmesg to see if there have any "avc: denied" 
> log related to your service.
>
>     And also you could add log to your script, something like 【log -t 
> MYPROJECT "xxxxxxxxxxxxxx log xxxxxxxxxx"】, and then check out if it is 
> executed.
>
> 2016-01-15 5:32 GMT+08:00 Alexis LE GOFF <[email protected] 
> <javascript:>>:
>
>> Dears,
>>
>> I am developing a connected object based on Android. I'm developing on
>> Nexus7 (Tilapia) with Android 5.1. What I want to do is very basic: I
>> want to set firewall rules on the image. So I did this:
>>
>> in the `on boot` section of init.grouper.rc I added this
>> start myproject-setup
>>
>>
>> and then at the end of init.grouper.rc:
>> service myproject-setup system/etc/init.myproject.sh
>>     user root
>>     group root
>>     oneshot
>>
>>
>> in the init.myproject.sh I put all the iptables rules. this file is
>> executable (I set it in android_filesystem_config.h)
>>
>>
>>
>> Problem: this was working perfectly with Android 4.4.4 but with
>> Android 5.1 nothing happens. Iptables rules are not set. I can
>> manually set these rules by running /system/etc/init.myproject.sh but
>> I want these iptables rules set at startup automatically.
>>
>> How can I debug this? What've changed in Android 5 that could be
>> linked to my issue?
>>
>> -- 
>> -- 
>> unsubscribe: [email protected] <javascript:>
>> website: http://groups.google.com/group/android-porting
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "android-porting" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to