trananh1992 / auto-update-apk-client

Automatically exported from code.google.com/p/auto-update-apk-client
0 stars 0 forks source link

Silent updater still triggers notification #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Even when the silent update happens successfully super.raise_notification(); is 
still called and the user is notified that an update is available.

Original issue reported on code.google.com by d...@codesushi.com on 15 May 2012 at 3:48

GoogleCodeExporter commented 9 years ago
this is not supposed to happen, could you please provide phone model and 
versions of android and superuser installed?

Original comment by lenik.terenin on 15 May 2012 at 5:31

GoogleCodeExporter commented 9 years ago
make sure you don't have the old component declared and instantiated

Original comment by bric...@gmail.com on 16 May 2012 at 2:03

GoogleCodeExporter commented 9 years ago
I'm still investigating.. but it appears that the problem is that there was a 
segfault durring the execution of su.. perhaps even before any commands are 
streamed... I'll follow up once i troubleshoot some more.

Original comment by d...@codesushi.com on 16 May 2012 at 3:48

GoogleCodeExporter commented 9 years ago
Ok, I finally got this working perfectly in my environment. The only change 
required adding LD_LIBRARY_PATH to the env of the commands (ICS 4.0.3):

            String[] commands = {
                    "LD_LIBRARY_PATH=/vendor/lib:/system/lib pm install -r " + context.getFilesDir().getAbsolutePath() + "/" + update_file,
                    "LD_LIBRARY_PATH=/vendor/lib:/system/lib am start -n " + context.getPackageName() + "/" + get_main_activity()
            };

I discovered this fix here:

https://github.com/ChainsDD/su-binary/issues/6

This issue is resolved for me... but maybe you could adjust the user manual to 
mention this fix if anyone is seeing segfaults in silent mode.

Thanks! 
dan

Original comment by d...@codesushi.com on 16 May 2012 at 4:58

GoogleCodeExporter commented 9 years ago
Dan,

Thank you a lot for your help!

I've included your fix into the source. Tried it with Froyo (2.2), seems to 
work just fine. If someone will report any problems on the old devices, I'll 
make conditional inclusion of library path into the commands.

Original comment by lenik.terenin on 16 May 2012 at 8:26

GoogleCodeExporter commented 9 years ago
which permissions are required to use your SilentUpdater commands of 'pm' and 
'am'?

if .apk file is installed to sdcard, it will be possible without root? 
thanks

Original comment by ole.stub...@gmail.com on 4 Aug 2013 at 4:08

GoogleCodeExporter commented 9 years ago
ole.stubberud,

it does not matter where your .apk is installed, 'pm' and 'am' commands still 
require root permissions.

Original comment by lenik.terenin on 4 Aug 2013 at 5:27

GoogleCodeExporter commented 9 years ago
ah, thanks for replying so quickly. is it in your opinion impossible to 
silently install/upgrade a non-market application without root? 

i have heard about apps that have this feature, but i am not sure which is the 
best approach without root permissions or if its even possible.

Original comment by ole.stub...@gmail.com on 5 Aug 2013 at 4:49