No Launcher activity found! - Android Q&A, Help & Troubleshooting

I'm not a developer but I want to debug an Android app on my Droid. I have Eclipse installed, etc.
I am stuck now because I don't know how to define a launcher activity. Here are the console messages:
Code:
[2010-01-17 11:33:36 - TestApp]Android Launch!
[2010-01-17 11:33:36 - TestApp]adb is running normally.
[2010-01-17 11:33:36 - TestApp]No Launcher activity found!
[2010-01-17 11:33:36 - TestApp]The launch will only sync the application package on the device!
[2010-01-17 11:33:36 - TestApp]Performing sync
[2010-01-17 11:33:36 - TestApp]Automatic Target Mode: using device '04036_my_droid_09834'
[2010-01-17 11:33:36 - TestApp]Application already deployed. No need to reinstall.
[2010-01-17 11:33:36 - TestApp]/TestApp/bin/TestApp.apk installed on device
[2010-01-17 11:33:36 - TestApp]Done!
Where can I find some help for this? Thanks.

The launcher activity is defined in the AndroidManifest.XML file.
It is defined as:
<activity android:name=".ActivityName">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Hope that helps! I had to dig around a while to find this information too...but my app now runs properly.

I'm having ENDLESS issues getting my app to run...
I'm following this tutorial but even adding your code, it still crashes when installing and opening the app on my device....
PLEASE HELP
Here is y AndroidManifest:
Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="21" android:maxSdkVersion="19"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Related

-Permission Denial: receiving Intent- with C2DM

Hi,
I want to use the C2DM, but I always get follwoing Error:
Code:
10-05 02:10:40.394: WARN/ActivityManager(11985): Permission Denial: receiving Intent { act=com.google.android.c2dm.intent.REGISTRATION cat=[mobile.app] (has extras) } to mobile.app requires mobile.app.permission.C2D_MESSAGE due to sender com.google.android.gsf (uid 10046)
Here is my Manifest.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mobile.app"
android:versionName="0.1"
android:versionCode="1">
<uses-sdk android:minSdkVersion="10" />
<!-- Only this application can receive the messages and registration result -->
<permission android:name="com.google.android.c2dm.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="mobile.app.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Send the registration id to the server -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<!-- Only C2DM servers can send messages for the app. If permission is not set - any other app can generate it -->
<receiver android:name=".C2DMReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="mobile.app" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="mobile.app" />
</intent-filter>
</receiver>
</application>
</manifest>
Anyone an idea?
thanks!
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

[Q] what is “BasicDream” in android ICS?

I read the Launcher source code which version is ICS. There is a RocketLauncher class which extends BasicDream. what is BasicDream? what can BasicDream do? I can find this line import android.support.v13.dreams.BasicDream;, but I can't find any information about it on Internet. Please give me some information to understand it. Thanks!
I found those code in launcher manifest.xml <activity android:name="com.android.launcher2.RocketLauncher" android:label="@string/dream_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DREAM" /> </intent-filter> </activity>
There is a new category android.intent.category.DREAM, what is it used to do? That RocketLauncher is an Activity?

[Q] ADW Theme - Help...

Alright so to start off i have eclipse, the android sdk, and all that other good stuff setup properly.
Now the problem is i keep getting an error in the androidmanifest.xml saying
<uses-sdk android:minSdkVersion="4"/>
The error message when clicked upon is, <uses-sdk> tag appears after <application> tag.
I have tried multiple versions of the sdk build including 2.2 (as the guide suggest) and changing the minimum sdk requirement but i always seem to run into this exact same problem. Any ideas? Oh and also im using this template
AnderWeb-ADW.Theme-Template-d8491c4
Heres the entire AndroidManifest.xml...
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Red.Glow.Adw"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="internalOnly">
<application android:label="@string/theme_title" android:icon="@drawable/theme_icon">
<activity android:name=".main"
android:label="@string/theme_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="org.adw.launcher.THEMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="org.adw.launcher.icons.ACTION_PICK_ICON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="red.glow.adw.docks"
android:label="@string/theme_title"
android:icon="@drawable/theme_icon">
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<provider android:name="red.glow.adw.docksProvider" android:authorities="red.glow.adw.docksProvider" />
</application>
<uses-sdk android:minSdkVersion="4"/>
</manifest>
Ehh figured it out.. AnderWeb's template build was throwing me up a ton of errors but kaydensigh's template works great.

How to mod any(?) app for multiwindow

While Wanam does a good job of allowing any app to float it does not allow the app to appear in the multiwindow tool bar (at least for me) and the side by side view that is native to the feature is what I am after.
You will need to know what decompiling an apk means and probably a non android device. Haven't tried on-board apk decompilers since they are lame.
So just as a synopsis of info easily found anyway here is my method -
Copy the app from /data/app/whatever. This will be called base.apk for all non-system apps. I rename it to something sane for the next step, helpful if doing several at a time.
Copy/move to PC
Using your preferred apk decompiler extract the apk. Open AndroidManifest.xml and within the <application> tag add the following:
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow"> </uses-library>
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
Then in the main intent filter add
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
So the xml will look similar to this
<application android:icon="@drawable/icon" android:label="@string/app_name" .... OMITTED>
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow"> </uses-library>
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
.... OMITTED
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
</intent-filter>
.... OMITTED
</application>
Re-compile, rename to base.apk, replace source base.apk in /data/app/whatever/ with modded version, set permissions (solid explorer does this automagically), reboot.
The app can now be added to the multiwindow bar and used to create a side by side view with other multiwindow aware apps. I've done around 10, Sygic is the only one that won't recompile due to its own issues
For me it is useful to have browser/dictionary, file explorer/text editor and other pairs predefined in the multi window panel.

Amazfit Watch 2 - TrainingPlan data lost after re-pairing

Hi,
need your help with TrainingPlan app.
After reinstalling Amazfit Watch app, I had to pair the phone with watch again. Don't know why but after sync, TrainingPlan app got wiped.
It's not that big of a deal, because all the activities are still recorded on the watch/mobile/strava but I was in the middle of half-marathon training plan and would like to continue it.
In order to restore/recreate this data, I need to know how exactly this app is storing it.
I have already reviewed the source code available on gitlab.com - /Neuer_User/PACEfied_AmazFit
I have also downloaded the TrainingPlan.apk directly from the watch (with adb) and decompiled it (apktools) and reviewed the app in IDE.
Here is the content of AndroidManifest.xml from TrainingPlan:
Code:
...
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permisison android:name="com.huami.watch.permission.RECEIVE_WAKEUP"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="com.huami.watch.companion.permission.READ_SETTINGS"/>
<uses-permission android:name="com.huami.watch.companion.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="com.huami.watch.permission.READ_USER_SETTINGS"/>
<uses-permission android:name="com.huami.watch.permission.WRITE_USER_SETTINGS"/>
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:name=".TrainApplication" android:supportsRtl="true" android:theme="@style/train_center_theme">
<meta-data android:name="com.huami.watch.launcher.springboard.PASSAGER_TARGET" android:resource="@array/spring_depend"/>
<activity android:name=".ui.test.TestProvider"/>
<activity android:name=".ui.activity.TrainPlanSimpleSelectActivity" android:theme="@style/train_center_theme">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainPlanSimpleSelectActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainPlanDetailSelectActivity" android:theme="@style/train_center_theme">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainPlanDetailSelectActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainRecordDetailActivity">
<intent-filter>
<action android:name="com.huami.watch.train.ui.activity.TrainRecordDetailActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".ui.activity.TrainWeeklyRecordDetailActivity"/>
<activity android:name=".ui.activity.TrainWidgetRemindActivity"/>
<service android:name=".ui.notification.NotificationService"/>
<receiver android:name=".ui.notification.NotificationReceiver">
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.daytrainrecord"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.finishtrainrecord"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.start_service"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.end_service"/>
</intent-filter>
<intent-filter>
<action android:name="com.huami.watch.train.broadcast.appstart"/>
</intent-filter>
</receiver>
<receiver android:enabled="true" android:exported="true" android:name=".ui.notification.CloudDataReceiver">
<intent-filter>
<action android:name="com.huami.watch.companion.action.DataSyncRequestApps"/>
</intent-filter>
</receiver>
<provider android:authorities="com.huami.watch.train.ui.provider.dayTrainRecordProvider" android:exported="true" android:name="com.huami.watch.train.ui.provider.DayTrainRecordProvider"/>
<activity android:name=".ui.activity.FinishTrainReasonActivity"/>
</application>
</manifest>
Still no luck.
Can anybody help?
If the data is stored in the watch only (and I think it's the case for Training app), it was wiped out when you unpaired, so there is no way to recover it.
lfom said:
If the data is stored in the watch only (and I think it's the case for Training app), it was wiped out when you unpaired, so there is no way to recover it.
Click to expand...
Click to collapse
Sure. That's understandable. Still, if I know exactly how is it stored - I could recreate it.
I saw a sqlite3 file in xbin folder. Problem is that it is encrypted and I cannot open it.
Does anyone have any idea how do those guys store data on such apps?
pkondrat said:
Sure. That's understandable. Still, if I know exactly how is it stored - I could recreate it.
I saw a sqlite3 file in xbin folder. Problem is that it is encrypted and I cannot open it.
Does anyone have any idea how do those guys store data on such apps?
Click to expand...
Click to collapse
Ah, I see what you want to do now. See my AmazeBackup tool, it backups and restores data to the Sports app, you can use adb to backup data from TrainingPlan app, extract its db, modify the file, add the modded file to backup manually, then try to restore the file to watch (restart watch after you restore to make sure it loads the new data).
lfom - thanks a lot for the tip.
I solved it.
Biggest challenge was to identify and get the access to /data/data/com.huami.watch.train/databases/train_center.db which hold all the data.
After that happended, it was just a try and check for different values in TrainRecord and DayTrainRecord DB tables + adb pull and adb push as a root.
Still, I wonder when they would add those training plans to Amazfit Watch app and synchronize this data properly.

Categories

Resources