Can you copy an app to /system/app without restarting?? - Android Q&A, Help & Troubleshooting

Hello All,
Not sure where this should go, but I have a generic question about android system apps.
Can you install a system app without having to reboot the phone?
Here is what I'm doing:
1) Remount /system as rw
2) copy myapp.apk into /system/app
3) ?? do something so /system/app/myapp.apk gets picked up and installed without having to reboot the phone
Thanks!

Related

[Q] Root access on rooted 2.3.3 device

Hello
I have had this same problem on doomlords (With z's working xrec) and wolfbreaks rooted 2.3.3 roms
1. Root explorer always FC
2. Other explorers show the folder /data/data is empty
3. adb cannot push files to /data/data
'copy failed permission denied'​4. When in recovery if I mount system and data manully then adb push works
Has anyone else had the same problem, or can you give me some advice to help me

[Q] How to make system apk ("adb push xy.apk /system/app") persistent through reboot?

[Q] How to make system apk ("adb push xy.apk /system/app") persistent through reboot?
First regarding my environment: I have Cyanogenmod 10.1 (self-built) on my Samsung I9300 Int., but I assume the question applies to every android version (I'm new to android development and flashing custom firmwares to my phone, but I have thorough experience with other embedded devices and gnu/linux):
I'm currently modifying a system apk (specifically LockClock.apk), which comes with CM10.1. From time to time, I "adb push" a modified version of the apk to my /system/app. (When the app works), it works without problems until the phone is restartet. After the reboot, the application does no longer appear to be installed (though the modified apk is still present in /system/app). I have to "adb push" the apk again, to make it work again. Is there a way to make the app permanently installed after an "adb push"?
Thank you very much
Nico
AW: [Q] How to make system apk ("adb push xy.apk /system/app") persistent through reb
Meanwhile, I found part oft the solution myself: when manually removing the apk (adb shell rm /system/app/LockClock.apk) before pushing the new version, it will persist through a reboot.
Can someone explain this to me? And is there maybe another/better way of doing this?
Did u fixed permissions after pushing it to system/app folder?
set permissions to rw-r--r--

Rooted, flashed, but no write/delete access in System FIles

Hey Guys,
i have unlocked, rooted and flashed my Phone with Hassons ToolKit.
I have a problem getting full write access to my system folder, and all other folders / files which are in same path where system folder is.
I have just rights in SdCard Folder..
THis is the path where i dont have any permission to change something: is this normal?
If yes, so how can i push an apk to system folder then, if i need a new keyboard for instance...?!
acct
cache
config
d
data
dev
devlog
etc
mnt
proc
rca
rfs
root
sbin
sdcard (just in this one i have rights)
storage
sys
system
vendor
...
some files...
Ropb said:
Hey Guys,
i have unlocked, rooted and flashed my Phone with Hassons ToolKit.
vendor
...
some files...
Click to expand...
Click to collapse
Are you using adb or some Android based file manager to copy the file?
If it is adb = use adb remount, this normally solves the problem. If you are using some file manager - make sure system is mounted in RW mode..
Ropb said:
Hey Guys,
i have unlocked, rooted and flashed my Phone with Hassons ToolKit.
I have a problem getting full write access to my system folder, and all other folders / files which are in same path where system folder is.
I have just rights in SdCard Folder..
THis is the path where i dont have any permission to change something: is this normal?
If yes, so how can i push an apk to system folder then, if i need a new keyboard for instance...?!
acct
cache
config
d
data
dev
devlog
etc
mnt
proc
rca
rfs
root
sbin
sdcard (just in this one i have rights)
storage
sys
system
vendor
...
some files...
Click to expand...
Click to collapse
i guess you want to acces those folders with a file explorer? afaik it is normal that you don't have acces to other folders than sdcard, you have to use a file explorer with root capability to acces/write the other folders.
I'd recommend you to use ES File Explorer, very good app for me.
To grant root acces for it:
open the app -> press menu -> Tools -> Root Explorer (now the app should ask for root acces) -> Mount R/W -> set the paths where you want write acces to RW
now you should be able to write to the other folders.
If you want to use adb push (USB Debugging mus be enabled):
- copy the desire file or apk to your adb/fastboot folder
- connect your phone to your computer, open command line, navigate to adb/fastboot folder on your pc if necessary
- type "adb devices" (to see if your phone is recognized)
- type "adb push <name_of_your_file.file_extension> /path_of_your_destination_folder/<name_of_your_file.file_extension>"
Example: adb push example.apk /folder1/folder2/example.apk

Messed up /data/apk - Help?

The problem:
I rooted my Samsung Galaxy Ace and went exploring the root directory with Root Explorer. I renamed the folder "apk" found in /data to "apk_old", thinking that if everything worked, I could just delete it as it contained a handful of stock apks as well as several apps installed from the market. At the time, I though apks were needed just for installation and that by deleting the folder I would save ~30MB of internal memory. Well, I turns out I was horribly wrong. Several stock apps, such as Youtube or Maps and all market apps that were installed in internal memory have stopped working. In the app drawer, their icons have turned into those default apk icons and their names into com.something.blabla. I was getting crashes every 1-2 minutes from those apps. The widgets on my home screen, such as Google search or Homework 4x2 have also stopped working.
What I've tried:
*renaming the folder back to "apk", obviously. That didn't work, it said something like "execution failed"
*making a copy of the folder - failed
*zipping the folder - failed
*thinking there was a problem with Root Explorer, I installed Total Commander and Solid Explorer hoping I could rename the folder back. Total Commander cannot open the /data folder, while Solid Explorer says the /data folder is empty
*"pulling" all of "/data" with ADB - 0 files pulled.
However, as I was trying to clean up my own mess, things changed a bit. At some point the crashes stopped and all of the "corrupt" apps have simply gone away from the app drawer. While I was unable to do anything with the "apk_old" folder in /data, something changed so that right now I can't even access /data anymore.
So yea, I have a bad feeling that somehow everything inside the /data folder has been wiped, though I sure hope I'm wrong. Anyone have anything to advise?
Oh, and I also noticed that Superuser is gone. I tried re-rooting my phone from this link, it worked the first time I rooted, but not now...
http://forum.xda-developers.com/showthread.php?t=1552792
I don't know exactly what you have in /data/apk I guess is the same I have in /data/app all the installed package.apk
Since your system is compromised I would avoid to use programs from it like Root Explorer to change anything, and for the other programs looks like they don't have root access.
I would try with plain adb: http://forum.xda-developers.com/showthread.php?t=2141817
Once you have your phone connected with adb shell you can go root:
Code:
$ su
to list files and directories in /data
Code:
# ls /data
and then to rename the folder
Code:
# mv /data/apk_old /data/apk
then reboot the phone
good luck
I'm assuming those # signs were suppose to be $'s?, Anyways, what I typed into adb:
1. adb shell
2. $ ls data
What I get:
opendir failed, Permission denied
Another atempt:
1. adb shell
2. $ su
What I get:
su, and after a long pause - Permission denied
eh? So, apparently I can't get root access, what now?
the dficua
Ha, made progress. I installed Superuser through adb and it gave me permission to access data and to rename apk_old back to apk. However, the folder has been wiped of all the apps. Luckily, I have a friend who also has a Galaxy Ace, I'll just copy the folder and paste it into /data, hopefully i'll bring back the default apps.
$ is the normal shell
# is root shell
I forgot to tell you to try that on recovery mode to prevent the calling of SuperUser to grant privilegs, su binary itself should be in /system/xbin
When you restore apps remember also to fix permissions, user and group, it should be something like this:
# chmod 0664 /data/apk/*.apk
# chown system:system /data/apk/*.apk
check the right values in your friend's phone.

Mount /system RW / RO Android 7.1.1 Lenovo Tab 4 10"

I have a problem with making a /system folder into read/write permission. I made root (TWRP 3.2.3, SuperSU-v2.82 - in TWRP is unchecked read-only) and the problem is tablet freezes EVERY time a make change from RO to RW.
I used Root explorer, ES file explorer, Root file manager, Super manager... Every time when I change it and press "ok" tablet freezes. Also I try via terminal "mount -o rw,remount /system", nothing, a download apk "Mount system RO RW ROOT" and apk said it did it, by when I check in file explorer it is still read only. (also I try via fastboot and comannds pull and push and it said that file is read only)
I really need to make changes in /system/build.prop and I'm out of options...
Anyone?
krzysztofica said:
I have a problem with making a /system folder into read/write permission. I made root (TWRP 3.2.3, SuperSU-v2.82 - in TWRP is unchecked read-only) and the problem is tablet freezes EVERY time a make change from RO to RW.
I used Root explorer, ES file explorer, Root file manager, Super manager... Every time when I change it and press "ok" tablet freezes. Also I try via terminal "mount -o rw,remount /system", nothing, a download apk "Mount system RO RW ROOT" and apk said it did it, by when I check in file explorer it is still read only. (also I try via fastboot and comannds pull and push and it said that file is read only)
I really need to make changes in /system/build.prop and I'm out of options...
Anyone?
Click to expand...
Click to collapse
Hey have you found a fix for this???
I have the same problem.
device x00id os 7.1.1 (downgrade from aosp 9.0 > 8.1 > 7.1.1 because everytime i upgrade i had battery issue)
twrp 3.1.1.0.zip
supersu 2.79.zip (i've tried to use magisk.zip before)
1. flash twrp
2. flash su.zip
3. reboot system
4. open root explorer
5. copy folder /su to sdcard or internal storage. (my device doesnt freeze when copy file from root to sdcard, but my screen freeze when try to switch 'ro' to 'rw')
6. reboot to twrp again
7. mount system
8. advance > file manager
9. copy all item in /sdcard/su to /system/xbin and /system/bin (i only copy file su to /system/bin)
10. tap every files that you copy and click 'chmod 755'
11. reboot system
now you can try to switch your 'ro' / 'rw' button in your root explorer. i think screen freeze while access root happens because root method (twrp and magisk) doesnt instal root as system ('respecting encryption' or whatever)
but i hate to see my device forced to keep updating apps like fb, messenger, ig that i dont use it. a lot bloatware that forced to instal in customer device that drain battery.
i hope this help you or whoever that has same problems. good luck.

Categories

Resources