{"id":472102,"date":"2025-08-25T21:00:30","date_gmt":"2025-08-25T21:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=472102"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=472102","title":{"rendered":"<span>Android. Starting Kivy App and Service on bootup. API 35<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u043e \u043c\u0438\u043d\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043a \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/694906\/\" rel=\"noopener noreferrer nofollow\">Android. Starting Kivy App and Service on bootup<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c kivy \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 API 22 <strong>Android 5<\/strong>. \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Android. C API 26 <strong>Android 8<\/strong> \u0438 \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 API 35 <strong>Android 15<\/strong> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f, \u043f\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 API 22&#8230;35, \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b: Highscreen power five, Nokia 8, Xiaomi Redmi Note 14.<\/p>\n<p>C Android 8 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<pre><code class=\"java\">    public void service_start(Context context, Intent intent) {         String package_root = context.getFilesDir().getAbsolutePath();         String app_root =  package_root + \"\/app\";         Intent ix = new Intent(context, ServiceTest.class);         ix.putExtra(\"androidPrivate\", package_root);         ix.putExtra(\"androidArgument\", app_root);         ix.putExtra(\"serviceEntrypoint\", \"service.py\");         ix.putExtra(\"pythonName\", \"test\");         ix.putExtra(\"pythonHome\", app_root);         ix.putExtra(\"pythonPath\", package_root);         ix.putExtra(\"serviceStartAsForeground\", \"true\");         ix.putExtra(\"serviceTitle\", \"ServiceTest\");         ix.putExtra(\"serviceDescription\", \"ServiceTest\");         ix.putExtra(\"pythonServiceArgument\", app_root + \":\" + app_root + \"\/lib\");         ix.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {             context.startForegroundService(ix);         } else {             context.startService(ix);         }     } <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <strong>startForegroundService<\/strong>.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android 14 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/developer.android.com\/develop\/background-work\/services\/fgs\/restrictions-bg-start?hl=ru#background-start-restriction-exemptions\" rel=\"noopener noreferrer nofollow\">\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435<\/a> \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431 \u0438\u0437 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u0430 <strong>BOOT_COMPLETED<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c <strong>AndroidManifest.xml<\/strong>, \u0432 kivy \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 <strong>AndroidManifest.tmpl.xml<\/strong>. \u041d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u0430. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u0430, \u0442.\u043a. \u043e\u043d\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<pre><code class=\"bash\">.\/kivy_service_test\/.buildozer\/android\/platform\/python-for-android\/pythonforandroid\/bootstraps\/sdl2\/build\/templates\/AndroidManifest.tmpl.xml <\/code><\/pre>\n<pre><code class=\"bash\">.\/kivy_service_test\/.buildozer\/android\/platform\/build-arm64-v8a\/dists\/kivy_service_test\/templates\/AndroidManifest.tmpl.xml <\/code><\/pre>\n<blockquote>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0434\u0435\u043c \u043f\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439.<\/p>\n<\/blockquote>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u0441\u0435\u043a\u0446\u0438\u044f\u0445 <strong>service<\/strong> \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <strong>android:foregroundServiceType<\/strong>, \u0442.\u043a. \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041d\u0435 \u043e\u0441\u043e\u0431\u043e \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u043b\u0441\u044f \u0432 \u044d\u0442\u0438 \u0442\u0438\u043f\u044b, \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0430\u043b \u043c\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443: <strong>location<\/strong>. \u041e\u043d \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0435 <strong>BOOT_COMPLETED<\/strong>. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e <strong>android:exported<\/strong>, \u043e\u043d \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"xml\">        {% if service or args.launcher %}         &lt;service android:name=\"{{ args.service_class_name }}\"                  android:process=\":pythonservice\"                  android:foregroundServiceType=\"location\"                   android:exported=\"false\"\/&gt;         {% endif %}         {% for name in service_names %}         &lt;service android:name=\"{{ args.package }}.Service{{ name|capitalize }}\"                  android:process=\":service_{{ name }}\"                   android:foregroundServiceType=\"location\"                   android:exported=\"false\" \/&gt;         {% endfor %}         {% for name in native_services %}         &lt;service android:name=\"{{ name }}\"                   android:foregroundServiceType=\"location\"                  android:exported=\"false\" \/&gt;         {% endfor %}          {% if args.billing_pubkey %}         &lt;service android:name=\"org.kivy.android.billing.BillingReceiver\"                  android:process=\":pythonbilling\"                   android:foregroundServiceType=\"location\"                  android:exported=\"false\"\/&gt; <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0442\u0435\u0433\u0430 <strong>application<\/strong> \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e:<\/p>\n<pre><code class=\"xml\">receiver android:name=\".MyBroadcastReceiver\" android:enabled=\"true\" android:exported=\"true\"&gt;             &lt;intent-filter&gt;                 &lt;action android:name=\"android.intent.action.BOOT_COMPLETED\" \/&gt;                 &lt;action android:name=\"android.intent.action.QUICKBOOT_POWERON\" \/&gt;                 &lt;action android:name=\"com.htc.intent.action.QUICKBOOT_POWERON\" \/&gt;                 &lt;action android:name=\"service_start\" \/&gt;                 &lt;action android:name=\"android.intent.action.MAIN\" \/&gt;                 &lt;action android:name=\"android.intent.action.DELETE\" \/&gt;             &lt;\/intent-filter&gt;         &lt;\/receiver&gt;  <\/code><\/pre>\n<p><strong>service_start<\/strong> \u043c\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0442\u043e \u043d\u0438 \u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442.<\/p>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. \u0418 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b:<\/p>\n<pre><code class=\"python\">    def service_send_start(*args):         \"\"\"         \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f MyBroadcastReceiver. \u0412 recivers.xml \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435.         \"\"\"          intent = Intent('service_start')         intent.setPackage(Context.getPackageName())         Context.sendBroadcast(intent) <\/code><\/pre>\n<p>\u0412 <strong>buildozer.spec<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 <strong>FOREGROUND_SERVICE_LOCATION<\/strong><\/p>\n<pre><code>android.permissions = FOREGROUND_SERVICE,                       RECEIVE_BOOT_COMPLETED,                       QUICKBOOT_POWERON,                       ACCESS_COARSE_LOCATION,                       ACCESS_FINE_LOCATION,                       READ_EXTERNAL_STORAGE,                       WRITE_EXTERNAL_STORAGE,                       FOREGROUND_SERVICE_LOCATION <\/code><\/pre>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043a \u041f\u041a. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d:<\/p>\n<pre><code class=\"bash\">buildozer android debug &amp;&amp; adb install -r -d `ls .\/bin\/kivy_service_*.apk | tail -1` <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u043c: <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/3f\/dv\/kf\/3fdvkfnuumgsoe3e3h9qv6ljf2u.jpeg\" width=\"300\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/3f\/dv\/kf\/3fdvkfnuumgsoe3e3h9qv6ljf2u.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/3f\/dv\/kf\/3fdvkfnuumgsoe3e3h9qv6ljf2u.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ru\/3a\/tt\/ru3atts46qckuaa1etpjklhvjju.jpeg\" width=\"300\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/ru\/3a\/tt\/ru3atts46qckuaa1etpjklhvjju.jpeg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/ru\/3a\/tt\/ru3atts46qckuaa1etpjklhvjju.jpeg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041e\u0442\u043b\u0430\u0434\u043a\u0430<\/h3>\n<p>\u0416\u0434\u0435\u043c \u043f\u0435\u0447\u0430\u0442\u0438 <strong>python service running&#8230;.. com.heattheatr.kivy_service_test<\/strong><\/p>\n<pre><code class=\"bash\">adb logcat | egrep \"python |Test \" <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code>08-25 14:54:14.652 21092 21112 I Test    : Android kivy bootstrap done. __name__ is __main__ 08-25 14:54:14.652 21092 21112 I python  : AND: Ran string 08-25 14:54:14.652 21092 21112 I python  : Run user program, change dir and execute entrypoint 08-25 14:54:14.791 21092 21112 I Test    : [INFO   ] [Logger      ] Record log in \/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/.kivy\/logs\/kivy_25-08-25_1.txt 08-25 14:54:14.791 21092 21112 I Test    : [INFO   ] [Kivy        ] v2.3.1 08-25 14:54:14.791 21092 21112 I Test    : [INFO   ] [Kivy        ] Installed at \"\/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/_python_bundle\/site-packages\/kivy\/__init__.pyc\" 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Python      ] v3.11.5 (main, Aug 18 2025, 22:24:06) [Clang 14.0.6 (https:\/\/android.googlesource.com\/toolchain\/llvm-project 4c603efb0 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Python      ] Interpreter at \"\" 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Logger      ] Purge log fired. Processing... 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Logger      ] Purge finished! 08-25 14:54:15.473 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 08-25 14:54:25.474 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 08-25 14:54:35.474 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 08-25 14:54:45.475 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0441\u043c\u043e\u0442\u0440\u0438\u043c adb:<\/p>\n<pre><code class=\"bash\">08-25 15:17:33.023 12012 12012 I System.out: python Context: android.app.ReceiverRestrictedContext@2829109, Intent: android.intent.action.BOOT_COMPLETED 08-25 15:17:33.023 12012 12012 I System.out: python Build.VERSION.SDK_INT 35 08-25 15:17:33.047  1737  1755 I ActivityManager: Background started FGS: Allowed [callingPackage: com.heattheatr.kivy_service_test; callingUid: 10350; uidState: RCVR; uidBFSL: n\/a; intent: Intent { flg=0x10000000 cmp=com.heattheatr.kivy_service_test\/.ServiceTest (has extras) }; code:BOOT_COMPLETED; tempAllowListReason:&lt;ad20de6 android.intent.action.BOOT_COMPLETED\/u0,reasonCode:BOOT_COMPLETED,duration:20000,callingUid:1000&gt;; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null: isBindService:false] 08-25 15:17:33.333 12281 12281 D ActivityThread: setEmbeddedParam packageName=com.heattheatr.kivy_service_test processName=com.heattheatr.kivy_service_test:service_Test isEmbedded=false isIsolated=false 08-25 15:17:34.028 12281 12435 I python  : Initializing Python for Android 08-25 15:17:34.028 12281 12435 I python  : Setting additional env vars from p4a_env_vars.txt 08-25 15:17:34.029 12281 12435 I python  : Changing directory to the one provided by ANDROID_ARGUMENT 08-25 15:17:34.029 12281 12435 I python  : \/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app 08-25 15:17:34.031 12281 12435 I python  : Preparing to initialize python 08-25 15:17:34.032 12281 12435 I python  : _python_bundle dir exists 08-25 15:17:34.032 12281 12435 I python  : calculated paths to be... 08-25 15:17:34.032 12281 12435 I python  : \/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/_python_bundle\/stdlib.zip:\/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/_python_bundle\/modules 08-25 15:17:34.032 12281 12435 I python  : set wchar paths... 08-25 15:17:34.077 12281 12435 I python  : Initialized python 08-25 15:17:34.077 12281 12435 I python  : AND: Init threads 08-25 15:17:34.078 12281 12435 I test    : testing python print redirection 08-25 15:17:34.079 12281 12435 I python  : AND: Ran string 08-25 15:17:34.079 12281 12435 I python  : Run user program, change dir and execute entrypoint 08-25 15:17:35.399 12281 12435 I test    : python service running..... com.heattheatr.kivy_service_test 12281 08-25 15:17:36.659 12885 12971 I python  : Initializing Python for Android 08-25 15:17:36.659 12885 12971 I python  : Setting additional env vars from p4a_env_vars.txt 08-25 15:17:36.661 12885 12971 I python  : Changing directory to the one provided by ANDROID_ARGUMENT 08-25 15:17:36.661 12885 12971 I python  : \/data\/user\/0\/com.intercom.intercom\/files\/app 08-25 15:17:36.662 12885 12971 I python  : Preparing to initialize python 08-25 15:17:36.663 12885 12971 I python  : _python_bundle dir exists 08-25 15:17:36.663 12885 12971 I python  : calculated paths to be... 08-25 15:17:36.663 12885 12971 I python  : \/data\/user\/0\/com.intercom.intercom\/files\/app\/_python_bundle\/stdlib.zip:\/data\/user\/0\/com.intercom.intercom\/files\/app\/_python_bundle\/modules 08-25 15:17:36.663 12885 12971 I python  : set wchar paths... 08-25 15:17:36.826 12885 12971 I python  : Initialized python 08-25 15:17:36.826 12885 12971 I python  : AND: Init threads 08-25 15:17:36.826 12885 12971 I intercom: testing python print redirection 08-25 15:17:36.827 12885 12971 I python  : AND: Ran string 08-25 15:17:36.827 12885 12971 I python  : Run user program, change dir and execute entrypoint 08-25 15:17:45.400 12281 12435 I test    : python service running..... com.heattheatr.kivy_service_test 12281 08-25 15:17:55.408 12281 12435 I test    : python service running..... com.heattheatr.kivy_service_test 12281 08-25 15:18:05.408 12281 12435 I test    : python service running..... com.heattheatr.kivy_service_test 12281 <\/code><\/pre>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/dvjdjvu\/kivy_service_test\" rel=\"noopener noreferrer nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/habr.com\/ru\/articles\/694906\/\" rel=\"noopener noreferrer nofollow\">Android. Starting Kivy App and Service on bootup<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/940534\/\"> https:\/\/habr.com\/ru\/articles\/940534\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u043e \u043c\u0438\u043d\u0438 \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u043a \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/694906\/\" rel=\"noopener noreferrer nofollow\">Android. Starting Kivy App and Service on bootup<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c kivy \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 API 22 <strong>Android 5<\/strong>. \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Android. C API 26 <strong>Android 8<\/strong> \u0438 \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 API 35 <strong>Android 15<\/strong> \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f, \u043f\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 API 22&#8230;35, \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b: Highscreen power five, Nokia 8, Xiaomi Redmi Note 14.<\/p>\n<p>C Android 8 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u0430:<\/p>\n<pre><code class=\"java\">    public void service_start(Context context, Intent intent) {         String package_root = context.getFilesDir().getAbsolutePath();         String app_root =  package_root + \"\/app\";         Intent ix = new Intent(context, ServiceTest.class);         ix.putExtra(\"androidPrivate\", package_root);         ix.putExtra(\"androidArgument\", app_root);         ix.putExtra(\"serviceEntrypoint\", \"service.py\");         ix.putExtra(\"pythonName\", \"test\");         ix.putExtra(\"pythonHome\", app_root);         ix.putExtra(\"pythonPath\", package_root);         ix.putExtra(\"serviceStartAsForeground\", \"true\");         ix.putExtra(\"serviceTitle\", \"ServiceTest\");         ix.putExtra(\"serviceDescription\", \"ServiceTest\");         ix.putExtra(\"pythonServiceArgument\", app_root + \":\" + app_root + \"\/lib\");         ix.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);          if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.O) {             context.startForegroundService(ix);         } else {             context.startService(ix);         }     } <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c <strong>startForegroundService<\/strong>.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android 14 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/developer.android.com\/develop\/background-work\/services\/fgs\/restrictions-bg-start?hl=ru#background-start-restriction-exemptions\" rel=\"noopener noreferrer nofollow\">\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435<\/a> \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043b\u0443\u0436\u0431 \u0438\u0437 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u0430 <strong>BOOT_COMPLETED<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c <strong>AndroidManifest.xml<\/strong>, \u0432 kivy \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 <strong>AndroidManifest.tmpl.xml<\/strong>. \u041d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u0430. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0431\u0430, \u0442.\u043a. \u043e\u043d\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430 \u0434\u0440\u0443\u0433\u043e\u0433\u043e.<\/p>\n<pre><code class=\"bash\">.\/kivy_service_test\/.buildozer\/android\/platform\/python-for-android\/pythonforandroid\/bootstraps\/sdl2\/build\/templates\/AndroidManifest.tmpl.xml <\/code><\/pre>\n<pre><code class=\"bash\">.\/kivy_service_test\/.buildozer\/android\/platform\/build-arm64-v8a\/dists\/kivy_service_test\/templates\/AndroidManifest.tmpl.xml <\/code><\/pre>\n<blockquote>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0434\u0435\u043c \u043f\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439.<\/p>\n<\/blockquote>\n<p>\u0412\u043e \u0432\u0441\u0435\u0445 \u0441\u0435\u043a\u0446\u0438\u044f\u0445 <strong>service<\/strong> \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c <strong>android:foregroundServiceType<\/strong>, \u0442.\u043a. \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0438\u0441\u0430. \u041d\u0435 \u043e\u0441\u043e\u0431\u043e \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u043b\u0441\u044f \u0432 \u044d\u0442\u0438 \u0442\u0438\u043f\u044b, \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0448\u0430\u043b \u043c\u043e\u044e \u0437\u0430\u0434\u0430\u0447\u0443: <strong>location<\/strong>. \u041e\u043d \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u0435 <strong>BOOT_COMPLETED<\/strong>. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e <strong>android:exported<\/strong>, \u043e\u043d \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"xml\">        {% if service or args.launcher %}         &lt;service android:name=\"{{ args.service_class_name }}\"                  android:process=\":pythonservice\"                  android:foregroundServiceType=\"location\"                   android:exported=\"false\"\/&gt;         {% endif %}         {% for name in service_names %}         &lt;service android:name=\"{{ args.package }}.Service{{ name|capitalize }}\"                  android:process=\":service_{{ name }}\"                   android:foregroundServiceType=\"location\"                   android:exported=\"false\" \/&gt;         {% endfor %}         {% for name in native_services %}         &lt;service android:name=\"{{ name }}\"                   android:foregroundServiceType=\"location\"                  android:exported=\"false\" \/&gt;         {% endfor %}          {% if args.billing_pubkey %}         &lt;service android:name=\"org.kivy.android.billing.BillingReceiver\"                  android:process=\":pythonbilling\"                   android:foregroundServiceType=\"location\"                  android:exported=\"false\"\/&gt; <\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0442\u0435\u0433\u0430 <strong>application<\/strong> \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e:<\/p>\n<pre><code class=\"xml\">receiver android:name=\".MyBroadcastReceiver\" android:enabled=\"true\" android:exported=\"true\"&gt;             &lt;intent-filter&gt;                 &lt;action android:name=\"android.intent.action.BOOT_COMPLETED\" \/&gt;                 &lt;action android:name=\"android.intent.action.QUICKBOOT_POWERON\" \/&gt;                 &lt;action android:name=\"com.htc.intent.action.QUICKBOOT_POWERON\" \/&gt;                 &lt;action android:name=\"service_start\" \/&gt;                 &lt;action android:name=\"android.intent.action.MAIN\" \/&gt;                 &lt;action android:name=\"android.intent.action.DELETE\" \/&gt;             &lt;\/intent-filter&gt;         &lt;\/receiver&gt;  <\/code><\/pre>\n<p><strong>service_start<\/strong> \u043c\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441 \u0443\u0436\u0435 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0442\u043e \u043d\u0438 \u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442.<\/p>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438. \u0418 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0447\u0438\u0441\u0442\u043a\u0438, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b:<\/p>\n<pre><code class=\"python\">    def service_send_start(*args):         \"\"\"         \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f MyBroadcastReceiver. \u0412 recivers.xml \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435.         \"\"\"          intent = Intent('service_start')         intent.setPackage(Context.getPackageName())         Context.sendBroadcast(intent) <\/code><\/pre>\n<p>\u0412 <strong>buildozer.spec<\/strong> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 <strong>FOREGROUND_SERVICE_LOCATION<\/strong><\/p>\n<pre><code>android.permissions = FOREGROUND_SERVICE,                       RECEIVE_BOOT_COMPLETED,                       QUICKBOOT_POWERON,                       ACCESS_COARSE_LOCATION,                       ACCESS_FINE_LOCATION,                       READ_EXTERNAL_STORAGE,                       WRITE_EXTERNAL_STORAGE,                       FOREGROUND_SERVICE_LOCATION <\/code><\/pre>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0441\u044f.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043a \u041f\u041a. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d:<\/p>\n<pre><code class=\"bash\">buildozer android debug &amp;&amp; adb install -r -d `ls .\/bin\/kivy_service_*.apk | tail -1` <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u043c: <\/p>\n<figure class=\"\"><\/figure>\n<figure class=\"\"><\/figure>\n<h3>\u041e\u0442\u043b\u0430\u0434\u043a\u0430<\/h3>\n<p>\u0416\u0434\u0435\u043c \u043f\u0435\u0447\u0430\u0442\u0438 <strong>python service running&#8230;.. com.heattheatr.kivy_service_test<\/strong><\/p>\n<pre><code class=\"bash\">adb logcat | egrep \"python |Test \" <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code>08-25 14:54:14.652 21092 21112 I Test    : Android kivy bootstrap done. __name__ is __main__ 08-25 14:54:14.652 21092 21112 I python  : AND: Ran string 08-25 14:54:14.652 21092 21112 I python  : Run user program, change dir and execute entrypoint 08-25 14:54:14.791 21092 21112 I Test    : [INFO   ] [Logger      ] Record log in \/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/.kivy\/logs\/kivy_25-08-25_1.txt 08-25 14:54:14.791 21092 21112 I Test    : [INFO   ] [Kivy        ] v2.3.1 08-25 14:54:14.791 21092 21112 I Test    : [INFO   ] [Kivy        ] Installed at \"\/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/_python_bundle\/site-packages\/kivy\/__init__.pyc\" 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Python      ] v3.11.5 (main, Aug 18 2025, 22:24:06) [Clang 14.0.6 (https:\/\/android.googlesource.com\/toolchain\/llvm-project 4c603efb0 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Python      ] Interpreter at \"\" 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Logger      ] Purge log fired. Processing... 08-25 14:54:14.792 21092 21112 I Test    : [INFO   ] [Logger      ] Purge finished! 08-25 14:54:15.473 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 08-25 14:54:25.474 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 08-25 14:54:35.474 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 08-25 14:54:45.475 21092 21112 I Test    : python service running..... com.heattheatr.kivy_service_test 21092 <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0441\u043c\u043e\u0442\u0440\u0438\u043c adb:<\/p>\n<pre><code class=\"bash\">08-25 15:17:33.023 12012 12012 I System.out: python Context: android.app.ReceiverRestrictedContext@2829109, Intent: android.intent.action.BOOT_COMPLETED 08-25 15:17:33.023 12012 12012 I System.out: python Build.VERSION.SDK_INT 35 08-25 15:17:33.047  1737  1755 I ActivityManager: Background started FGS: Allowed [callingPackage: com.heattheatr.kivy_service_test; callingUid: 10350; uidState: RCVR; uidBFSL: n\/a; intent: Intent { flg=0x10000000 cmp=com.heattheatr.kivy_service_test\/.ServiceTest (has extras) }; code:BOOT_COMPLETED; tempAllowListReason:&lt;ad20de6 android.intent.action.BOOT_COMPLETED\/u0,reasonCode:BOOT_COMPLETED,duration:20000,callingUid:1000&gt;; targetSdkVersion:31; callerTargetSdkVersion:31; startForegroundCount:0; bindFromPackage:null: isBindService:false] 08-25 15:17:33.333 12281 12281 D ActivityThread: setEmbeddedParam packageName=com.heattheatr.kivy_service_test processName=com.heattheatr.kivy_service_test:service_Test isEmbedded=false isIsolated=false 08-25 15:17:34.028 12281 12435 I python  : Initializing Python for Android 08-25 15:17:34.028 12281 12435 I python  : Setting additional env vars from p4a_env_vars.txt 08-25 15:17:34.029 12281 12435 I python  : Changing directory to the one provided by ANDROID_ARGUMENT 08-25 15:17:34.029 12281 12435 I python  : \/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app 08-25 15:17:34.031 12281 12435 I python  : Preparing to initialize python 08-25 15:17:34.032 12281 12435 I python  : _python_bundle dir exists 08-25 15:17:34.032 12281 12435 I python  : calculated paths to be... 08-25 15:17:34.032 12281 12435 I python  : \/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/_python_bundle\/stdlib.zip:\/data\/user\/0\/com.heattheatr.kivy_service_test\/files\/app\/_python_bundle\/modules 08-25 15:17:34.032 12281 12435 I python  : set wchar paths... 08-25 15:17:34.077 12281 12435 I python  : Initialized python 08-25 15:17:34.077 12281 12435 I python  : AND: Init threads 08-25 15:17:34.078 12281 12435 I test    : testing python print redirection 08-25 15:17:34.079 12281 12435 I python  : AND: Ran string 08-25 15:17:34.079 12281 12435 I python  : Run user program, change dir and execute entrypoint 08-25 15:17:35.399 12281 12435 I test    : python service running..... com.heattheatr.kivy_service_test 12281 08-25 15:17:36.659 12885 12971 I python  : Initializing Python for Android 08-25 15:17:36.659 12885 12971 I python  : Setting additional env vars from p4a_env_vars.txt 08-25 15:17:36.661 12885 12971 I python  : Changing directory to the one provided by ANDROID_ARGUMENT 08-25 15:17:36.661 12885 12971 I python  : \/data\/user\/0\/com.intercom.intercom\/files\/app 08-25 15:17:36.662 12885 12971 I python  :<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-472102","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/472102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=472102"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/472102\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=472102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=472102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=472102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}