Hello all, I got a quick question and this seemed like the most appropriate section to post it in. In short, I am wondering what terminal command I can use to check if a process has been cached. On my Sprint Galaxy Nexus, rooted, with the latest build of the Paranoid Android jelly bean rom, I can go to my settings, click on apps, swipe to the "Running Apps" list, and click on the button at the top of the screen that says "Show Cached Processes," and that displays the list that I am trying to access. My reasoning for doing this, if anyone cares, is to use "Secure Settings" in conjunction with "Tasker" to check if my "Groove IP" application is running. Initially, I was trying to use "pgrep -l com.*" and check that list for "com.gvoip" too see if "Groove IP" is running in the tray (pull down menu), but if the process is cached, it still shows up in that list. I won't do any more explaining of my intentions, because thats not what I need help with Just need to know how to get a list of cached processes from terminal. Thanks!
You can probably extract this info from the output of the "dumpsys" command.
$ dumpsys activity processes
I will try that out and report back. Thanks for the help!
process cached/not cached state from dumpsys
lahma69 said:
I will try that out and report back. Thanks for the help!
Click to expand...
Click to collapse
I have been experimenting with pgrep which returns the pid - also when process is cached.
How can I distinguish between cached/not cached. Did you manage with dumpsys?
oneearleft said:
I have been experimenting with pgrep which returns the pid - also when process is cached.
How can I distinguish between cached/not cached. Did you manage with dumpsys?
Click to expand...
Click to collapse
I ended up using: cat /proc/$(pgrep com.endomondo.android.pro)/oom_adj
The os default oom_adj threshholds can be found using: getprop | grep "_APP_ADJ"Returned value
For me 0,1,2 is running/background app, and everything >2 is cached/stopped.
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
I would like to know it too. Anyone?
Sneets said:
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
Click to expand...
Click to collapse
Run a tiny web server like lighttpd in the shell on a weird port, restrict to localhost. Set up index.php to run system (whatever);
Then bookmark the 127.0.0.1: xxxx URL
Which system call invokes power_dbus_suspend?
Thanks Parrotgeek1. Working off your excellent suggestion I installed a lightweight local server on ChromeOS (Web Server for Chrome with the 200 OK! icon) and built a small framework app that is served from local storage. I'm all set up to call chrome.app.??? from my JavaScript. Which API provides the power_dbus_suspend capability? I looked through the Power and System APIs and I don't see anything. - Thanks!
Sneets said:
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
Click to expand...
Click to collapse
Have you tried this simple extension? Keep Awake
https://chrome.google.com/webstore/...lb?utm_source=chrome-app-launcher-info-dialog
What I do is have the shell tab pinned, and press [up arrow] for the command then hit [enter]. Probably not ideal if you use the shell a lot as you have to step through recently used commands.
Re: Pkt_Lnt's post
Thanks Pkt_Lnt. That app only deals with disabling the normal sleep behavior, not causing it, and in particular not causing it when an external monitor is connected. I'm looking for something like Sneets has requested, to invoke a powerd_dbus_suspend command that will force the system to sleep (and turn off an external monitor). Per Parrotgeek1's comment, I've got a little app now sitting on the shelf that is all set to call some system command to invoke powerd_dbus_suspend, only I'm looking for what command to call, from JavaScript.
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
This method might be overkill somewhat, but, anyway, what I did was as follows:
Installed Secure Shell extension; setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf); rebooted; added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection; setup Android homescreen shortcut to send shell command; created profile in Secure Shell app on Chromebook to connect to [email protected]/my local IP address; generated keys on Chromebook (in ~/.ssh); added generated public key to ~/.ssh/authorized_keys; imported newly-generated private/public key pair within Secure Shell app (one by one); created bookmark link to [email protected] profile in shelf, and, finally, added required command to profile in Secure Shell.
It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax:
Code:
-- thecommand
Although I guess commands that need sudo would require a connection to [email protected], instead of chronos. (-t argument lets you use sudo, but then sending a line break/ENTER seems to be needed)
The window opened with the click does hang around - I haven't figured out if it's possible to avoid this - but it does at least seem to persistently remember the size and position to which it's set.
I posted up some further details at http://nolirium.blogspot.com/shell-command-shelf-shortcut-chromeos.html
Impressive! But a bit more than I'm looking to do
@Nolirum - I read your blogspot doc and your procedure's pretty impressive. Frankly it's a little beyond me and beyond what I'm looking for. If you ever run across a way to invoke powerd_dbus_suspend a little more directly please post here as well. You clearly have a strong grasp of the issues!
Nolirum said:
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
This method might be overkill somewhat, but, anyway, what I did was as follows:
Installed Secure Shell extension; setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf); rebooted; added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection; setup Android homescreen shortcut to send shell command; created profile in Secure Shell app on Chromebook to connect to [email protected]/my local IP address; generated keys on Chromebook (in ~/.ssh); added generated public key to ~/.ssh/authorized_keys; imported newly-generated private/public key pair within Secure Shell app (one by one); created bookmark link to [email protected] profile in shelf, and, finally, added required command to profile in Secure Shell.
It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax:
Code:
-- thecommand
Although I guess commands that need sudo would require a connection to [email protected], instead of chronos. (-t argument lets you use sudo, but then sending a line break/ENTER seems to be needed)
The window opened with the click does hang around - I haven't figured out if it's possible to avoid this - but it does at least seem to persistently remember the size and position to which it's set.
Click to expand...
Click to collapse
This really is impressive! Thanks for the extremely detailed explanation.
I was able to follow along completely and get the SSH argument "powerd_dbus_suspend" working.
However, I got to thinking. I was wondering if this could be extended to use an alias stored in ~/.bashrc?
After doing some research of my own and using various parameters and arguments, I was unsuccessful.
The goal is to have a linux app (through crouton) be run using xiwi with just a single bookmark by utilizing an alias.
Any thoughts?
UPDATE:
Of course just a few moments later I figured this out! Rather than dealing with an alias stored in ~/.bashrc and ensuring ssh had access, typing the entire alias command as an argument worked. Now I can run Steam directly from a shelf bookmark. All it took was replacing "powerd_dbus_suspend" with "-- sudo enter-chroot xiwi steam" in the argument.
Thanks again!
DandyRandyMarsh said:
This really is impressive! Thanks for the extremely detailed explanation.
I was able to follow along completely and get the SSH argument "powerd_dbus_suspend" working.
Click to expand...
Click to collapse
No problem! I think it's perhaps overly detailed if anything. Might be easier to follow if I cut it down a bit.
DandyRandyMarsh said:
Now I can run Steam directly from a shelf bookmark. All it took was replacing "powerd_dbus_suspend" with "-- sudo enter-chroot xiwi steam" in the argument.
Click to expand...
Click to collapse
Nice!
Adding crouton single app shortcuts is a cool idea which I hadn't considered. Does it work OK for you with sudo in the command, even straight after booting up? ...You didn't have to setup sudoing without a password via sudoers.d or anything?
Inspired by your post I added xiwi to my chroot to try it out. I seem to remember experiencing quite unbearable lag and slowness when running a full desktop via xiwi in the past, but with single apps there doesn't seem to be any noticeable performance hit (this is on an armv7 Asus Flip, with the chroot on a slooow USB drive).
In order to not have to enter my sudo password, in the argument I put:
Code:
-t -- echo mypassword | sudo -S sh /media/removable/3/bin/enter-chroot xiwi firefox
Maybe I'm missing something? Is there a better way, perhaps?
Anyway, since I have rootfs verification switched off, I also tried saving a similar command to a file in /usr/bin, and putting the filename in the argument instead. This works, too, and I suppose could potentially be useful e.g. in the case of needing to run a more convoluted sequence of commands with a shortcut.
Nolirum said:
Adding crouton single app shortcuts is a cool idea which I hadn't considered. Does it work OK for you with sudo in the command, even straight after booting up? ...You didn't have to setup sudoing without a password via sudoers.d or anything?
Click to expand...
Click to collapse
I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell.
Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.
As a side note, this is the crouton installation I am running on an ASUS c302.
sudo sh ~/Downloads/crouton -r trusty -t unity,touch,xiwi,extension
Setup Bookmarks that Run Shell Commands
1. Installed Secure Shell extension
2. Open crosh with Ctrl+Atl+T
3. Enter Command: shell
4. Enter Command: sudo su -
5. Enter Command: sudo /usr/share/vboot/bin/make_dev_ssd.sh --force --remove_rootfs_verification
6. Enter Command: reboot
7. Let Chrome OS reboot
8. Open crosh with Ctrl+Atl+T
9. Enter Command: shell
10. Enter Command: sudo su -
11. Enter Command: mount –o remount rw /
12. Close current crosh window
13. Open a new crosh with Ctrl+Atl+T
14. Enter Command: shell
15. Enter Command: sudo ln -s /usr/share/chromeos-ssh-config/init/openssh-server.conf /etc/init/openssh-server.conf
16. Enter Command: sudo initctl reload-configuration
17. Enter Command: sudo initctl start openssh-server
18. Enter Command: cd ~/.ssh/
19. Enter Command: ssh-keygen
“Enter file in which…” *LEAVE BLANK*
“Enter passphrase” *LEAVE BLANK*
“Enter same passphrase” * LEAVE BLANK*20. Enter Command: cat /home/chronos/user/.ssh/id_rsa.pub >> /home/chronos/user/.ssh/authorized_keys
21. Enter Command: cp -a /home/chronos/user/.ssh/id_rsa* /home/chronos/user/Downloads
22. Close current crosh terminal and open Secure Shell extension
23. Select [New Connection]
24. Click Import… and select “id_rsa”
25. Click Import… again and select “id_rsa.pub”
26. Enter chronos as the username and localhost as the hostname
27. Enter a shorthand name replacing the text in the top cell “[email protected]”
28. Click Enter. If prompted, enter “yes” to continue connecting
29. Bookmark the page that is open which should end in, "#profile-id:_ _ _ _"
DONE. Now time to add some commands to automate.
Open Secure Shell and select the connection created. In the arguments box, start with two dashes -- and follow it your desired shell command.
Examples:
-- sudo startunity
-- sudo startgnome
-- sudo enter-chroot xiwi steam
-- sudo enter-chroot xiwi wine microWord
Next Steps... Getting Custom Shelf Icons
Now here I am running into some issues. Rather than have all these icons be the same, I was hoping to customize them.
Followed a strategy found on reddit, Change Shelf Icon for Website, but this only works if the site already had an "apple-touch-icon" set. Also, tried to inject the entire code myself which I couldn't get to work. Unfortunately, I think that since this bookmark is created from a Secure Shell, there are some issues.
I have already tried adding in code for this into the site, but it is having no effect. If someone could make this work then we're really looking good here.
DandyRandyMarsh said:
I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell.
Click to expand...
Click to collapse
Oh, I see what you mean. You are saying that you can sudo in the shell generally, without being prompted for a password, right?
Was that the default setup on your CB (after switching to Dev mode)? Or did you have to configure it manually for passwordless sudoing...
DandyRandyMarsh said:
Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.
Click to expand...
Click to collapse
Nice work summarizing the steps. :highfive: It's probably easier to follow, listed out like that. One slight addendum, perhaps - at step 29, it might be good to clarify the "add to shelf" procedure. Especially because of the following...
DandyRandyMarsh said:
Next Steps... Getting Custom Shelf Icon
Now here I am running into some issues. Rather than have all these icons be the same, I was hoping to customize them.
Click to expand...
Click to collapse
Happily it turns out that, when you add shortcuts to the shelf on Chrome OS like this, a minimal app is created for each one, with its own manifest.json, and icon.pngs. Our shell shortcuts were getting created with blank pngs by default (the black box with P in the center).
So, all we need to do, is get some icons, find the right folder for our shelf shortcut apps, then copy our new icons into them!
For instance, here's how I made a nice shiny icon for my single app shelf shortcut to Firefox.
Prepared icons:
Created a temporary folder in ~/Downloads to store downloaded icons.
Prepared a set of icons in ~/Downloads/firefox. (I downloaded mine from findicons.com).
Six sizes are required - from 32px to 256. To avoid any manifest editing, saved them as *size*.png
e.g. 32.png; 48.png; 64.png; 96.png; 128.png; 256.png
Located folder to copy icons to:
It is easiest to do this directly after clicking "add to shelf"
EITHER:
To change dir into the most recently modified extension icon subfolder automatically, the following one-liner worked for me*.
Code:
shell
cd ~/Extensions/&&cd $(ls -v1td */ | head -1)/*/icons&&ls
A list of blank icons (*.png) should be visible. If so, the new icons can simply be copied over these, e.g..
Code:
sudo cp ~/Downloads/firefox/* .
*YMMV with this particular one-liner - sometimes there's an extra 'temp' folder in ~/Extensions, which stops it working as expected. If you get an error after running the command, simply use the slightly more manual method to locate the folder, as detailed below.
OR:
(slightly more manual method).
Code:
shell
ls -ltr ~/Extensions
Checked the date/times - the most recently added folder is at the bottom. Then,
Code:
cd themostrecentlyaddedfolder
(or, the folder modified at the date/time that the shortcut was "added to shelf"). Then,
Code:
cd */icons
ls
sudo cp ~/Downloads/firefox/* .
I then repeated the above with a new SSH argument and a set of Ubuntu icons, for a custom startxfce4 shortcut, too.
Then just did sudo restart ui, and enjoyed the shiny new shelf icons!
I am hopeful that these changes will get picked up by CrOS's sync, thus getting backed-up and restored automatically. At this point I am not sure if that will be the case, but I don't see why it wouldn't.
Another way?
Another way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools --> Add to shelf...
Clicking the newly-created link (which looks like an "N") will launch /usr/bin/crosh in a tab. Changing the default behavior of /usr/bin/crosh could accomplish your goal to do whatever you want. With some experimenting, you might even be able to pass arguments to make it do different things depending on how it's opened (via ALT-CTRL-T vs from the shelf-- dunno if it can read the url used to call crosh), but at the very least you could do something like have it run whatever you want it to run if a second modifier key is held down (or if it isn't...), otherwise return to normal operation. A menu w/1 sec timeout could do this as well, ie--
Doing [THE THING YOU WANT] in 2 seconds (press SPACE for crosh)... /
Note there's no proof-of-concept here. Just throwing it out as an idea that I'm pretty sure would work... Someone might even create a neat extension that allows crosh to use scripts/plugins to execute different system operations beyond the stock ones that are built-in via single-clicks... If it worked, it might be a little simplier than via the SSH extension and you wouldn't have to run any extra daemons.
ft
This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done:
var terminal = new hterm.Terminal(profileName);
And then you can do stuff with it. You could then create an extension that could handle multiple shelf-icons (say by appending ?COMMAND=ls to the URL to do different shell commands(. The security implications for this would probably be huge obviously.
Update: More on embedding hterm is here.
Nolirum said:
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
I posted up some further details at http://nolirium.blogspot.com/shell-command-shelf-shortcut-chromeos.html
Click to expand...
Click to collapse
Nice post - Some good food for thought, changing up the contents of crosh etc directly is an interesting idea.
fattire said:
Another way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools --> Add to shelf...
Click to expand...
Click to collapse
Interesting! ....Aaaaand, now I've broken crosh. lol. Lucky I had my SSH shortcut setup... (actually, we can still get into the VTs with CtrlAltF2 etc anyway).
Some good potential for experimentation with this, definitely.
fattire said:
This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done:
Click to expand...
Click to collapse
Again, very interesting. Now you come to mention it, an approach such as this does seem like it might be do-able without too much messing around (maybe)...
Any possible method we can get e.g. an extension to 'talk' to the shell is worth looking into I think; as you say, if we can cut out the middleman (ssh) and maybe do it more elegantly, that might be pretty useful indeed.
So FREAKING Happy to find out about the "pm" (Package Manager) cmd in adb shell, but
So FREAKING Happy to find out about the "pm" (Package Manager) cmd in adb shell, but I can't find the package I want to remove.
https://forum.xda-developers.com/android/general/uninstall-apps-via-adb-t3738105
The app I want to remove the MOST is the "Visual Voicemail". That POS keeps poping up crap and I can't seem to get rid of it.
LG L4 LS991
From my research, it should have a package name with vvm in it, but I just can't find it.
Does anyone know what name it hides under?
MattR59 said:
So FREAKING Happy to find out about the "pm" (Package Manager) cmd in adb shell, but I can't find the package I want to remove.
https://forum.xda-developers.com/android/general/uninstall-apps-via-adb-t3738105
The app I want to remove the MOST is the "Visual Voicemail". That POS keeps poping up crap and I can't seem to get rid of it.
LG L4 LS991
From my research, it should have a package name with vvm in it, but I just can't find it.
Does anyone know what name it hides under?
Click to expand...
Click to collapse
Try listing all the packages
Code:
pm list packages
Or search package name which contains some word
Code:
pm list packages -f someName
Paget96 said:
Try listing all the packages
Code:
pm list packages
Or search package name which contains some word
Code:
pm list packages -f someName
Click to expand...
Click to collapse
I think
Code:
pm list packages -f | grep "some part of a name"
may also be helpful.
But I've tried that and still can't find it.
Also did a
Code:
pm list packages -f
then cut and pasted the output into an editor and slowly inspected each listed item.
Here:
https://forum.xda-developers.com/showthread.php?t=710698
it says the app will be in a package called sprint_core.apk.
I did a
Code:
find . -name sprint_core.apk
and nothing.
Then tried
Code:
grep -ir "voicemail" .
from the system directory.
It got a few hits, but nothing looks right.
I'm thinking maybe the
Code:
ps
command will show me running tasks and from that I can figure it out.
MattR59 said:
I think
Code:
pm list packages -f | grep "some part of a name"
may also be helpful.
But I've tried that and still can't find it.
Also did a
Code:
pm list packages -f
then cut and pasted the output into an editor and slowly inspected each listed item.
Here:
https://forum.xda-developers.com/showthread.php?t=710698
it says the app will be in a package called sprint_core.apk.
I did a
Code:
find . -name sprint_core.apk
and nothing.
Then tried
Code:
grep -ir "voicemail" .
from the system directory.
It got a few hits, but nothing looks right.
I'm thinking maybe the
Code:
ps
command will show me running tasks and from that I can figure it out.
Click to expand...
Click to collapse
Yes, you can find it from process list.
Edit:
Also keep on mind that it can be also
https://source.android.com/devices/tech/config/voicemail
Sent from my WAS-LX1 using Tapatalk
Paget96 said:
Yes, you can find it from process list.
Edit:
Also keep on mind that it can be also
Sent from my WAS-LX1 using Tapatalk
Click to expand...
Click to collapse
FOUND IT!
It was com.coremobility.app.vnotes
How: Did a
Code:
ps
and looked for likely candidates.
vnotes looked promising. then did a
Code:
ps | grep vnotes
and noted the PID (tried to do a kill, not allowed).
On the phone I killed the process and reexecuted the ps - the PID changed.
Did other stuff on the phone, the PID did not change, killed it on the phone again, PID changed again.
Removed it with the pm command, looked for it on the phone... gone!
:laugh:
MattR59 said:
FOUND IT!
It was com.coremobility.app.vnotes
How: Did a
Code:
ps
and looked for likely candidates.
vnotes looked promising. then did a
Code:
ps | grep vnotes
and noted the PID (tried to do a kill, not allowed).
On the phone I killed the process and reexecuted the ps - the PID changed.
Did other stuff on the phone, the PID did not change, killed it on the phone again, PID changed again.
Removed it with the pm command, looked for it on the phone... gone!
[emoji23]
Click to expand...
Click to collapse
Nice, well done ^^
Sent from my WAS-LX1 using Tapatalk
I wasn't paying attention to what I was doing after updating some apps, and froze some some application that is necessary, now my CATS60 will not boot. The app likely just uses the disable or hide command, but I am not sure what I misclicked, so I need to get a list or currently disabled apps or reenable all apps. I entered TWRP recovery, mounted all partitions, and connected through ADB shell.
This is what I get when I try to find out what's enabled/disabled:
Code:
# pm list packages
CANNOT LINK EXECUTABLE: library "libqc-opt.so" not found
page record for 0x7fb1658010 was not found (block_size=64)
adbd is running as root, and the file does exist:
Code:
~ # find / -name 'libqc-opt.so'
/system/vendor/lib/libqc-opt.so
/system/vendor/lib64/libqc-opt.so
I am using TWRP as recovery, and recovering system, data, and boot from backup does not fix this.
Does anyone know either
How can I make pm command work from recovery?
Where is the list of disabled apps stored, so I can manually edit it?
Thank you.
I found the list as used by the app (com.ramdroid.appquarantine), and it appears I blocked Google Calendar. However I have not found any way to "unfreeze" the app through recovery, this is simply a tracking file the app uses, not the actual enable/disable for Google Calendar.
Setting PATH and LD_LIBRARY_PATH environment variables does not help. Running it from inside the folder containing libqc-opt.so causes it to fail on a different external link.
Copying it to a second file called pm2, opening in vi and adding exports gets me as far as:
Code:
CANNOT LINK EXECUTABLE: cannot locate symbol "__android_log_close" referenced by "/system/lib64/libandroid_runtime.so"
Is it possible to chroot inside adb, and what do I need to mount first in order to do so? I don't know enough about Android to know which parts of the system I actually need.
So you got your new shiny realme device but you hate bloatware or want to disable system apps so you can use 3rd party apps instead?
Follow the steps below:
THIS DOES NOT REQUIRE ROOT HOWEVER MAKE SURE NOT TO DISABLE IMPORTANT SYSTEM APPS. WIPE DATA/FORMATTING RE-ENABLES ALL SYSTEM APPS. THIS DOES NOT MESS WITH OTAs.
WHAT YOU NEED:-
ADB/Fastboot Drivers
Windows: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
Linux: https://dl.google.com/android/repository/platform-tools-latest-linux.zip
DEBLOAT:-
1. Enable developer options by tapping on the build number 7 times and enable USB Debugging.
2. Plug in your phone.
3. Goto the folder where ADB is installed, hold shift and right click, and click on open command window here(windows).
4. Type
in CMD
Code:
adb devices
in Powershell
Code:
./adb devices
.
5. This should return the ID of your device and show if its authorised. Enable debugging Promt on your Phone if it shows unauthorised (allow this computer).
6. Type
in cmd
Code:
adb shell
in Powershell
Code:
./adb shell
.
7. This should display a prompt, something like RMXxxxx:/ $
8. To uninstall type
Code:
pm uninstall -k --user 0 <name of the package>
To disable type
Code:
pm disable-user --user 0 <name of the package>
eg: pm uninstall -k --user 0 com.heytap.browser / pm disable-user --user 0 com.heytap.browser
9. Done!
To reinstall uninstalled apps type
Code:
pm install-existing <name of the package>
To enable disabled apps type
Code:
pm enable <name of the package>
Some apps do not uninstall such as market and gamecenter, disabling is the only option.
Very Helpful, Thanks. I debloated my realme 7 and also disabled the Realme security analysis app so now no more ads popup after everytime installing a new app from playstore?
vimal102029 said:
Very Helpful, Thanks. I debloated my realme 7 and also disabled the Realme security analysis app so now no more ads popup after everytime installing a new app from playstore
Click to expand...
Click to collapse
Nice
i wasn't able to debloat with uninstall command. what could possibly wrong? using disable-user work fine though
immns said:
i wasn't able to debloat with uninstall command. what could possibly wrong? using disable-user work fine though
Click to expand...
Click to collapse
Use this command, I tried this.
[ pm uninstall --user 0 <packagename> ]
vimal102029 said:
Use this command, I tried this.
[ pm uninstall --user 0 <packagename> ]
Click to expand...
Click to collapse
thank uu, it worked:good:
Could someone post a list of the apps that can be safely removed?
Some handy tips down the road.
While using power shell just add ./ infront of all adb commands and everything will work.
If error showing while connecting through USB debug "Cant Allow USB debugging Because an app is obscuring when connect to your pc..." Just disable assistive ball and Floating windows privacy > display over other apps.< Uncheck everything.
$ ./adb shell pm list packages < List everything installed
$ adb shell pm list packages -d < List all the disabled package
Can be safely and shud be Disabled packages:
package:com.heytap.cloud < Cloud service better alternates avail.
package:com.android.nfc < By default disabled as device doesn't have hardware.
package:com.facebook.services < Racist Biased Snitch Company will leech on your data and create chaos in your country.
package:com.facebook.system < No idea why its installed and running in back
package:com.facebook.appmanager < Always takes side of Mighty
package:com.heytap.browser < This is main source of adverts in phone only reason i needed to go through this.
---------- Post added at 04:27 AM ---------- Previous post was at 04:13 AM ----------
vimal102029 said:
Very Helpful, Thanks. I debloated my realme 7 and also disabled the Realme security analysis app so now no more ads popup after everytime installing a new app from playstore
Click to expand...
Click to collapse
Hello, security analysis app is from Google side can be disabled inside google settings. Only way Realme shows adverts is through default Browser which can be disabled. if there's in any package which can be disabled or uninstalled for realme analysis please share name.
Thank you
I personally disabled these apps
papabear57 said:
Hello, security analysis app is from Google side can be disabled inside google settings. Only way Realme shows adverts is through default Browser which can be disabled. if there's in any package which can be disabled or uninstalled for realme analysis please share name.
Thank you
Click to expand...
Click to collapse
com.realme.securitycheck
vimal102029 said:
com.realme.securitycheck
Click to expand...
Click to collapse
Thank you
I recently debloated many packages, but found the realme gallery3d to be useful. It has face sorting feature, which I found to be very nice.
However I lost the capability to sort face after deleting a random package, and I dont know which one it is.
Does anyone know which package is associated with this service?
vimal102029 said:
I personally disabled these apps
Click to expand...
Click to collapse
About your first attachment: how to know what path (e.g. com.heytap.browser) represents what app? I want to delete the weather app. How can i know what path is this?
Thank you all for these posts btw.
Edit: omg, last seen May 30, 2021 . Can somebody else answer this question?
neutrala said:
About your first attachment: how to know what path (e.g. com.heytap.browser) represents what app? I want to delete the weather app. How can i know what path is this?
Thank you all for these posts btw.
Edit: omg, last seen May 30, 2021 . Can somebody else answer this question?
Click to expand...
Click to collapse
Not the path but the app package name is that matters, you can download an app like this https://play.google.com/store/apps/details?id=com.csdroid.pkg&hl=es&gl=US
Be careful which app you choose, disabling a system dependent app may cause your device not working properly or even booting at all. You might need to perform a factory reset or flash again the firmware to solve it.
neutrala said:
I want to delete the weather app.
Click to expand...
Click to collapse
Don't. Disabling weather app on RUI 2.0 causes issues. You'll have to format data to recover.