yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi, thanks for your reply.

But I don't think this will be that easy to solve?

I tried what you suugest (or at least what I understood) and...:

>> go to Settings > Apps > My Files

This leads me to the app info on the phone (I had been there already) but there is nothing I can do there other than reading a few details of the app such as the installed version number. I can not start it from there nor can I see any info about locations.

In case it matters, the phone does not show up as a device in Windows. For what I've read this is somewhat expected as the phone is not fully loading because gets stuck at some stage.

I had recently posted this with some other details...

Stuck in "phone is starting"

Hi there, this is my first post here and hopefully I am not too far off the mark :-) I'm trying to unlock a Galaxy A31 which is stuck at the "phone is starting" phase; I realize this is not an uncommon issue, but maybe you'll find this is not...

xdaforums.com

...what has changed is that now I do have the phone with me and so I can do a more in-depth dive in it.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Ok... bumping this up as I'm still I need of some help....
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
well... this is so frustrating... i've got a list of packages but any one I try to launch or somehow use throws back one error or the other:

Sample package : "com.google.android.apps.photos"

- Command

adb shell monkey -p com.google.android.apps.photos -c android.intent.category.LAUNCHER 1

- Error

No activities found to run, monkey aborted.

- Command

adb shell am start -n com.google.android.apps.photos -v 1

- Error

Exception occurred while executing 'start': java.lang.IllegalArgumentException: Bad component name: com.google.android.apps.photos

- Command

run-as com.google.android.apps.photos

- Error

run-as: package not debuggable: com.google.android.apps.photos

On a side note, attempting a backup didn't go well either:

"adb backup -noapk com.google.android.apps.photos"

returns:

"Now unlock your device and confirm the backup operation..." which I can't do because the phoe is stuck in "phone is starting" to begin with...

Any pointers?
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi @jwoegerbauer, thanks for the feedback

As far as I can tell, yes, ADB seems to be fully working, but I have no prior experience to compare.

"/sdcard" seems to have just 3 empty subfolders : sdcard0, emulated/0/ and self (IIRC)

Browsing the folders structure with "du" (plus switches) and "ls" (plus switches) lead me to believe that the valuable files are inside "/data", but that folder gives me a "permission denied" error.

This is why I was trying to launch an app with access to that folder instead of pulling files.

On a different phone I tested I was able to pull camera pictures, but they where in a non-restricted path, similar to what you mention.

I should add that this phone doesn't have (and never had AFAIK) an external sdcard attached.

Thanks.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Thank you @jwoegerbauer,

So, I did a little progress but it didn't really took me any further....

I was wondering if maybe what my friend told me wan't accurate, that it may have had an sd card at some point and its absence was the root cause for trouble.

I removed the covers and to my surprise there was an 8 GB card inside.

But this is as far as the good news go...

While the card does have a folder structure very similar to jwoegerbauer's decscription, its contents are few and old-ish. The last cam pictures are from 2020 and I doubt they are the last ever taken with this phone.

Some of it were damaged, but I recovered most of them.

Anyway, I still believe the true contents are in the "/data" folder :

With some more research I've found a way to list the "activities" names from the packages, but I still get a "no activities found to run" error no matter what package or variation for the command I use

Since the original card seems faulty I also tried with a new one and without any card at all, but it made no difference.

Couldn't find a way to mount that "partition" somewhere else since it seems the "shell" user dosn't have write permissions in any folder, so I am still at the starting point.

Any ideas?
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi, I guess you are suggesting to install the drivers and browse the files from the OS?...

If that's the case it's not working for me. It was the first thing I tried.

On Windows PC #1 it auto installed some drivers but never showed up in the file explorer.

On Windows PC #2 installed ADBs drivers and it was the same. On this PC I checked that the phone appears in device manager as Samsung Phone ADB device (or something similar). It never shows up in the explorer. Same thing with Samsung's drivers downloaded from their website.

On PC #3 running Linux it shows up in the file managers of gnome, KDE and XFCE, but when I try to open it there is the usual "wait" icon spinning and eventually it times-out....
[Android Q&A, Help & Troubleshooting] Renate:
We're at a distance (and a disadvantage) here.

You have to be more explicit than "some Activities related error".

"System starting" could mean a lack of a launcher or it could mean a train wreck of the Android subsystem.

adb logcat should show whether there is a deluge of messages or just a dripping of them.

Photos taken with the camera by a normal person are all to be found in /sdcard/Camera/DCIM/whatever.jpeg

Technically speaking that is under /data, actually /data/media

Apps might have data under /data/data
[Android Q&A, Help & Troubleshooting] Agret:
Is there a folder called /storage?

On my old phone the user data was in /storage/emulated/0/
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi there,

My apologies for not being clear enough, I'll try to add that info down here.

@Renate

I have gathered a list of installed apps and later on a list o Activitie's Names with the goal to use "monkey" to launch an app that could access the pictures in the phone.

As an example, these attempts to launch the "photos" package

End up with this error

I have relpaced "com.google.android.apps.photos" with different package names listed on the phone, but they fail with the same message.

Variations of the "1" value or replacing it with "-v 1" make no change. Removing it changes the error to

which I understand is basically just complaining that 1 is a "count" value and it is not present.

@Renate

Yeah... I am starting to fear the system might be in very bad shape, I'm wondering if malware could have hit it...

@Renate

Just tried that and, with no prior reference, I'd say that's a deluge I'm getting.

I also just ran

and that renders many messages on my terminal screen (no the phone) but that doesn't mean much per-se.

@Agret

Regarding folders and structures, this is what I have, in case this gives you any clues:

(Listing a non existing folder on porpouse)
[Android Q&A, Help & Troubleshooting] Renate:
Ok, open two windows, adb shell in one of them, adb logcat in the other.

In the shell: stop

Hopefully the torrent will stop.

Now you can reconnoiter without things thrashing.

Try mount

It will tell you a bunch of stuff, look for anything sdcardfs.

You can restart with start

The fresh stuff coming out of logcat might be able to tell what the problem is.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi!

Apparently "stop" and "start" require the device to be rooted, and this one is not, so I couldn't do exactly as you suggested.

I did some grepping, for keyword I hope could be useful.

I am attaching them to this post.

Maybe this bits from "adb logcat | grep "/data/user" are of any indication?

11-30 07:33:12.811 738 738 D vold_prepare_subdirs: Setting up mode 771 uid 1000 gid 1000 context u:object_r:system_data_file:s0:c512,c768 on path: /data/user_de/0
11-30 07:33:19.589 993 1025 D installd: Found quota mount /dev/block/platform/bootdevice/by-name/userdata at /data/user/0
11-30 07:33:24.819 993 1025 W cutils : Expected path /data/user_de/0/com.google.android.gms with mode 700 but found 711

11-30 07:33:35.316 2110 2110 W ContextImpl: Failed to ensure /data/user/0/com.sec.android.app.safetyassurance/cache: mkdir failed: ENOENT (No such file or directory)
11-30 07:33:35.322 2110 2142 W ContextImpl: Failed to ensure /data/user/0/com.sec.android.app.safetyassurance/files: mkdir failed: ENOENT (No such file or directory)

11-30 07:33:37.026 1753 1753 D CarrierConfigLoader: File not found: /data/user_de/0/com.android.phone/files/carrierconfig-com.android.carrierconfig-override-8954079144163997580-1337.xml
11-30 07:33:37.075 2377 2377 W ContextImpl: Failed to ensure /data/user/0/com.sec.android.app.launcher/files: mkdir failed: errno 126 (Required key not available)
11-30 07:33:37.160 2413 2413 W ContextImpl: Failed to ensure /data/user/0/com.google.android.gms/cache: mkdir failed: errno 126 (Required key not available)

Edit: About a launcher or the lack of it... The applications list mentions "One UI Launcher", so I believe there is one, right? There is also "Game Launcher" and I tried disabling enabling it but it made no difference.

Thanks in advance!
[Android Q&A, Help & Troubleshooting] Renate:
No, I just meant:

adb shell
mount
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Sorry, I thought I was including that in one of the attachments but I was wrong.

I'm including it know:

Spoiler content hidden.
[Android Q&A, Help & Troubleshooting] Renate:
You're missing all the mounts for sdcardfs, about a dozen lines like:

/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb)

You do have:

/dev/block/mmcblk0p52 on /data/user/0 type f2fs (rw,lazytime,seclabel,nosuid,nodev,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,reserve_root=32768,resuid=0,resgid=5678,usrquota,grpquota,inlinecrypt,alloc_mode=default,fsync_mode=nobarrier)

I guess that you're not rooted?

On devices you can find everything under /data/media/0 or /data/user/0

Do you have: ls -l /system/bin/sdcard

Do you see sdcardfs in cat /proc/filesystems

Do you even have anything in ls -RL /mnt/runtime
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
@Renate thanks you being there, I appreciate it.

The phone is *not* rooted.

Those "data" folders return Permission denied errors:

a31:/ $ ls /data/media/0
ls: /data/media/0: Permission denied

1|a31:/ $ ls /data/user/0
ls: /data/user/0: Permission denied

But they do exist because a dummy folder gives back a different error:

1|a31:/ $ ls /data/user/anyfolder
ls: /data/user/anyfolder :No such file or directory

For the other questions:

$) ls -l /system/bin/sdcard
ls: /system/bin/sdcard: Permission denied

$) ls -RL /mnt/runtime
ls: /mnt/runtime: Permission denied

"nodev sdcardfs" is there, FWIW...

$) cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev cpuset
nodev cgroup
nodev cgroup2
nodev tmpfs
nodev configfs
nodev tracefs
nodev sockfs
nodev dax
nodev bpf
nodev pipefs
nodev devpts
ext3
ext2
ext4
vfat
msdos
sdfat
iso9660
nodev ecryptfs
nodev sdcardfs
ntfs
fuseblk
nodev fuse
nodev fusectl
nodev overlay
nodev incremental-fs
f2fs
nodev pstore
nodev selinuxfs
nodev binder
nodev functionfs
[Android Q&A, Help & Troubleshooting] Renate:
Yeah, that's going to really limit us.

One possible avenue would be to root it. But since it's probably not unlocked yet that would erase the data.

Another simple test to see if it's a launcher problem:

adb shell "am start -n com.android.settings/.Settings"

If it complains about no ActivityManager then the services are really borked.

Let me go back and look at some of those logcats.

Oh, I see that you only have filtered ones.

If you could copy a decent sized chunk of it.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Yeah, for what I've read rooting it would wipe it so it' s not an option.

For reference, this was my first post in another thread explaining what I had tried so far and (somewhat) what works and what doesn't.

Stuck in "phone is starting"

Hi there, this is my first post here and hopefully I am not too far off the mark :-) I'm trying to unlock a Galaxy A31 which is stuck at the "phone is starting" phase; I realize this is not an uncommon issue, but maybe you'll find this is not...

xdaforums.com

Anyway, I ran that command and the setting GUI comes up on screen. I can also get there through the notifications top slide, and I had tried a bunch of basic stuff there, as well as safe boot, cache clean and "app repairing" on boot.

I grabbed to more logcats without filtering.

- The first one if from a cold start (I believe that gives us a full view of the bootup process?)

- The second one is grabbed after the first one got interrupted for some (tom me) unknown reason.

I took this by adb shall logcat > catlog.txt and zipped the .txt files due to their size.

Let me know I there is a better way to take this or If you want me to try something specific in the GUI to capture what gets logged then.

Thanks!
[Android Q&A, Help & Troubleshooting] Renate:
Well, you're mostly running if that works.

You're definitely missing a working launcher.

Try installing one.

I guess that adb root doesn't work?

I guess that adb shell dmesg doesn't work?

If it does, fresh start and get an early capture.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
No, adb root doesn't work:

$ ./adb root
adbd cannot run as root in production builds

$ ./adb shell
$ root
/system/bin/sh: root: inaccessible or not found

nor does dmesg:

$ ./adb shell dmesg > dmesg1.txt
dmesg: klogctl: Permission denied

$ ./adb shell dmesg
dmesg: klogctl: Permission denied

$ ./adb shell
$ dmesg
dmesg: klogctl: Permission denied

How can I install a launcher?

I can access Settings, but some of the sections there bounce me back to the "starting" screen (maybe I didn't mention that earlier) and I couldn't find the option to allow installing apps from outside of Google Play.

I also couldn't figure out a way to transfer and install an .apk file....
[Android Q&A, Help & Troubleshooting] Renate:
adb install MyLauncher.apk
adb shell "am start -a android.intent.action.MAIN -c android.intent.category.HOME"

The stock one is named launcher2.apk or launcher3.apk, but anything will do.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
I haven't made any progress. I tried 2 launchers and 2 o 3 file manager and I always get the same results.

Ok, so it's expecting an app to be in the foreground and theres is none, so lets state a specific package.

Get a list from packages:

./adb shell cmd package list packages

Retry using -n to declare the package:

./adb shell "am start -n com.alphainventor.filemanager -a android.intent.action.MAIN -c android.intent.category.HOME"

This fails with :

"java.lang.IllegalArgumentException: Bad component name: com.alphainventor.filemanager"

Why?? I got the component name from the generated list!

Let's try with MOnkey. Since it asks for the Activity let's get a list first:

./adb shell dumpsys package com.alphainventor.filemanager | grep -i activity >>activities-list.txt

Got this activities-list.txt:

Spoiler content hidden.

Then retry with monkey + one of the activities:

./adb shell "monkey -p com.alphainventor.filemanager/.activity.LaunchActivity" -v 5

Again, this fails with :

** No activities found to run, monkey aborted.

I don't know... I must me getting something fundamentally wrong for me to get exactly the same no matter what package I try...
[Android Q&A, Help & Troubleshooting] Renate:
Where do you get this monkey nonsense?

My understanding is that monkey is for random input testing of apps to see that stupid actions won't make it crash.

I've never seen a use for it.

Apparently you have some launcher which is not that functional but is in the foreground.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi,

I often find it mentioned as an alternative to "am start"

How to start an application using Android ADB tools

How do I send an intent using Android's ADB tools?

stackoverflow.com

Even if, as you imply, it won't serve my porpoise I would like to see the phone do something, anything, as expected...

I insisted on Monkey just because am start didn't do anything, so I had nothing to loose really.

hum... sounds like a possibility...

maybe I could try to set a different one as Default?

Should I try to uninstall the stock one, which I believe is named Samsung One UI or something like that?

OTOH, I was attempting the File Manager route to see if I could bypass the broken launcher and acces the data folder to trasnfer the files. I'd be a happy camper if I could do that.

Thanks for still bearing with me!
[Android Q&A, Help & Troubleshooting] Renate:
If

If you install something else that handles the "HOME" category, the next time you hit the home button it should ask you which one you want to run.

What did you install?

You can always start components with am start -n com.android.settings/.Settings

You can always start actions with am start -a android.intent.action.MAIN -c android.intent.category.HOME
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
I installed Niagara Launcher and Smart Launcher, both from apkmirror

I barely install any apps in my phones so I am not familiar with good or reputed launchers. I tried those because they where among the first ones listed.

Those sounded like dummy names (in the sense of "placeholders" for real names) but even so I did try those names and even searched for them in apkmirror, just in case I was supposed to use those specific packages, but didn't find any matches.

So far the only thing I got to "pop up on screen" is the android Settings center, wich I can also launch from the slide down menu.
[Android Q&A, Help & Troubleshooting] Renate:
Did they install alright? They should say "Succeeded".

adb shell
pm list packages | grep aunch

Do you see your launchers?

Try

adb shell am start -n com.android.launcher/com.android.launcher2.Launcher
[Android Q&A, Help & Troubleshooting] Renate:
Apparently you didn't install launcher2?

Starting by component you have to know what the component is.

That's composed of package and activity separated by a slash.

For example: com.android.settings/.Settings is shorthand for com.android.settings/com.android.settings.Settings

com.android.launcher/com.android.launcher2.Launcher has to be written out in full because Android did goofy stuff with the packages.

You have the package name, com.teslacoilsw.launcher but we don't know the activity.

A quick glance at the apk tells us:

am start -n com.teslacoilsw.launcher/.NovaLauncher
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Ok, I will try that in a couple of hours.

FWIW for packages other than Nova Launcher I tried appending some activities names that I got using commands I mentioned in a previous post.

So I'll check your suggestion plus whatever activity I get listed and report back.

Thanks again.
[Android Q&A, Help & Troubleshooting] Renate:
Yeah, but an activity doesn't have to be named Activity.

I took that Tesla stuff from the latest release.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Ok, I thought the naming was forced as part of the development conventions.

What are my options now to sort the missing "launcher2"?

I have a couple of phones around but none is a Samsung, let alone a Samsung with Android 13 as the troubled one...

¿Should I try to get the .apk from there? Could they be compatible even if they are, let's say, Android 9 - 10 versions?

Is there somewhere I could get it from? The name is so generic that google didn't bring anything really useful.

Should I go back to trying to start a file manager to get access to the /data folder?

Something else?

Edit: Earlier I forgot to mention that I was able to activate the accessibility icon on the bottom right of the screen and have the Nova Launcher and Niagara Launcher show up there, but when I tap any of these it just goes back to the "phone starting" screen...
[Android Q&A, Help & Troubleshooting] Renate:
Well, open a window and run adb logcat then hit your button.

It should give a short log that will say what's wrong.

Check what happened to Nova Launcher

pm list packages | grep tesla

See what launcher is running

ps -e
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
I'm attaching a small-ish log...: "nova-test.log"

I took a glimpse at it but I can't make anything out of it.

It shows up listed: com.teslacoilsw.launcher

(that's all)

I'm attaching "activities-list.txt" taken from that.

Other than that, I tested a different venue by trying several windows apps similar to KIES to access the device: "Dr. Fone", "Transfer Companion", and some other.

All of them seem to recognize the phone but can't go much further than that.

They need to install some android counterpart to act as a server of sorts and they

A) Fail to install it

...then ....

B) even when I've installed those android components and gave them permissions by hand, the windows utilities fail to connect, I'm assuming it's because they need to be launched by the user first.

Based on these and some bits I've read elsewhere, I wonder if the apps need a successful "first launch" to "register" their Activities and/or permissions and failure to do so explains why I can't launch a single one of the many I've installed...
[Android Q&A, Help & Troubleshooting] Renate:
I don't see any errors on Nova Launcher.

The log does seem inordinately busy doing junk, but no smoking gun.

Run top and see if something is eating the CPU time.

Just the first dozen lines.
[Android Q&A, Help & Troubleshooting] TheOldAndRusty:
Hi, thank you for still being there, I appreciate it.

You might be onto something here...

Tasks: 725 total, 1 running, 724 sleeping, 0 stopped, 0 zombie
Mem: 3756052K total, 3638308K used, 117744K free, 1416K buffers
Swap: 4194300K total, 154880K used, 4039420K free, 2255936K cached

800%cpu 62%user 0%nice 76%sys 661%idle 0%iow 0%irq 0%sirq 0%host

PID USER PR NI VIRT RES SHR S[%CPU] %MEM TIME+ ARGS
2238 system 10 -10 6.9G 145M 99M S 57.6 3.9 1:48.30 com.android.settings
777 system -3 -8 2.5G 5.9M 4.9M S 39.3 0.1 1:13.90 android.hardware.graphics.composer@2.1-service
859 system -3 -8 2.9G 42M 26M S 34.6 1.1 1:13.58 surfaceflinger
920 root 0 -20 0 0 0 I 6.3 0.0 0:06.29 [kworker/u17:2]
1123 root 0 -20 0 0 0 I 5.0 0.0 0:02.53 [kworker/u17:9]
3339 shell 20 0 2.0G 5.5M 3.8M R 2.6 0.1 0:01.76 top
396 root 20 0 0 0 0 D 2.3 0.0 0:03.33 [kworker/u16:9]
395 root 20 0 0 0 0 I 2.0 0.0 0:03.14 [kworker/u16:8]
369 root 20 0 0 0 0 I 1.3 0.0 0:02.51 [kworker/u16:4]
1393 system 18 -2 12G 586M 430M S 1.0 15.9 0:55.29 system_server
2193 system 20 0 7.9G 115M 67M S 0.6 3.1 0:02.65 com.sec.imsservice
394 root 20 0 0 0 0 I 0.6 0.0 0:02.66 [kworker/u16:7]
9 root 20 0 0 0 0 I 0.6 0.0 0:01.23 [rcu_preempt]
2756 u0_a183 20 0 7.1G 164M 94M S 0.3 4.4 0:03.26 com.samsung.android.honeyboard
813 system 20 0 2.1G 3.9M 3.7M S 0.3 0.1 0:00.10 vendor.samsung.hardware.thermal@1.0-service
785 system 20 0 2.2G 3.2M 3.0M S 0.3 0.0 0:00.43 android.hardware.sensors@2.0-service.multihal
336 root 20 0 0 0 0 D 0.3 0.0 0:00.69 [ipi_cpu_dvfs_rt]
293 root RT 0 0 0 0 S 0.3 0.0 0:01.13 [present_fence_w]
289 root RT 0 0 0 0 S 0.3 0.0 0:00.61 [primary_framedo]
285 root 20 0 0 0 0 S 0.3 0.0 0:00.22 [disp_idlemgr]
239 root 20 0 0 0 0 I 0.3 0.0 0:00.90 [kworker/3:1]
237 root 20 0 0 0 0 I 0.3 0.0 0:00.16 [kworker/0:1]
3278 shell 20 0 2.0G 3.2M 2.5M S 0.0 0.0 0:00.04 sh

I couldn't kill any of the processes with kill, killall or sudo (not available).
[Android Q&A, Help & Troubleshooting] Renate:
Not really. That 800% CPU tells you nothing. The 660% idle says that it's not freezing for available CPU power.

What is the screen showing?

Why is Settings even taking the amount of CPU it is?

Is Settings the only thing you've got to work?

The Nova launcher seems to work, but you're not seeing it?