SecGallery2_Galaxy.apk deleted from system/app.. Restore possible? [SOLVED] - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

Alright.. I wanted the Note 8 version of gallery and i went into system/app folder and deleted the SecGallery2_Galaxy.apk but before deleting i saw that its size was 0.00 kb lol ..
But when i tried tried to copy and pasted in the extsd it pasted and showed 13mb..
Now i deleted the file and copied the Note 8 Galley and pasted in the system/app folder only to get an error " Operation failed " and i realized only 7 mb free space is there in the partition by going into the android emulator!
Now i also found out that, full size SecGallery2_Galaxy.apk was in the preload partition and i instead of replacing that i deleted the file in system/app..
Now how do i get back that file in system/app?.. is that what they call deodexed file?.. Please help..
Thanks a lot in advance

Just copy it from other rom, that You can explore with winrar.
Sent from galaxy n7105

The actual apk was in preload and was symlinked to system partition. Thats why it showed 0 KB in system.
You can get it back by typing in shell
Code:
$ su
# ln -s "Path of apk in preload" /system/app/
And this is not called deodexing.

nokiamodeln91 said:
The actual apk was in preload and was symlinked to system partition. Thats why it showed 0 KB in system.
You can get it back by typing in shell
Code:
$ su
# ln -s "Path of apk in preload" /system/app/
And this is not called deodexing.
Click to expand...
Click to collapse
Thanks but i dont know the path.. the name of the file is SecGallery2_Galaxy.apk, so whats the path of the file?..
can u please type and show?..
Thanks in advance

CustomRomAddicts said:
Thanks but i dont know the path.. the name of the file is SecGallery2_Galaxy.apk, so whats the path of the file?..
can u please type and show?..
Thanks in advance
Click to expand...
Click to collapse
I dont remember... but something like
/preload/symlink/system/app/SecGallery2_Galaxy.apk
but double check.

nokiamodeln91 said:
I dont remember... but something like
/preload/symlink/system/app/SecGallery2_Galaxy.apk
but double check.
Click to expand...
Click to collapse
It says read only file system
I even changed the permission of the file in preload to 644 ( rw-r--r-- )
still the same message?.. any idea what it might be?.
Thanks in advance

use adb shell
then mount the preload partition as rw
# mount -o remount rw /preload
# mount -o remount rw /system
the use the codes written above.

nokiamodeln91 said:
use adb shell
then mount the preload partition as rw
# mount -o remount rw /preload
# mount -o remount rw /system
the use the codes written above.
Click to expand...
Click to collapse
Honestly i just now searched in google for adb shell and it says to run windows but when i download and double click the adb.exe it runs and exits!.. Please help..
Will mounting the preload and system in recovery and rebooting the device and running the script again in android emulator work?..

Keep in recovery and mount both.. Then run....

nokiamodeln91 said:
Keep in recovery and mount both.. Then run....
Click to expand...
Click to collapse
I tried in adb shell too.. but its not working
Do u guys have the symlink file?.. can u share with me?.. will it work?..
Thanks in advance

Oh Yeah! SOLVED IT!!
I installed Root explorer and created symlink via that and Voila it worked!
Although i dont know why when i open a photo in gallery i experience FC!

Related

How do you change permissions on a read only file?

I've been trying to figure out how to fix my phone and through using the adb logcat the only thing left is just getting the core.jar file in the /system/framework to change from read only to rw. Each time I try to change it it says its read only or bad mode. Any ideas?
Metatronx said:
I've been trying to figure out how to fix my phone and through using the adb logcat the only thing left is just getting the core.jar file in the /system/framework to change from read only to rw. Each time I try to change it it says its read only or bad mode. Any ideas?
Click to expand...
Click to collapse
try
Code:
adb remount
What would the syntax be for remounting the core.jar and is it possible to do in terminal? Thank you especially for the quick response\!
From your other thread..
The entire /system partition is always read-only, unless you tell your phone to remount it read-write.
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
But for your problem.. You shouldn't really need to manually tweak files in /system if you flash another ROM. The new ROM will replace that entire partition. Have you wiped? What ROM are you trying to flash?
Kudos for using logcat and trying to jump in yourself though.

What to do now? Trying to edit framework-res.apk

Ok, trying to edit framework-res.apk. I have a metamorph them running, and I also have a battery that got changed via update.zip. The problem is, I wanted the battery to be all white, rather than colored in order to fit with my black and white theme.
So I pulled my framework-res.apk, took out the battery .png's, and edited them. Then I put them back in. Problem is, I can't get it on my phone.
I tried putting the new framework-res.apk in the old update.zip and flashing it, but that just made my battery meter disappear. I tried adb push, but I got a permission denied error. Any help? First .apk edit.
adb pushing shoulda worked... what did the error say?
failed to copy 'framework-res.apk' to '/system/framework/framework-res.apk': Per
mission denied
Click to expand...
Click to collapse
That's the error I get. Not sure what I have to do to get permission to edit?
E_man5112 said:
That's the error I get. Not sure what I have to do to get permission to edit?
Click to expand...
Click to collapse
Do
Code:
Adb remount
first. Then push
adb remount only gives me another error
Code:
remount failed: No such file or directory
K go in recovery, cuz thts the safest place to push framework-res.apk
Once in recovery and ur phone connected to ur pc
After a few seconds (20'ish)
Type
Code:
adb shell
mount /system
exit
adb push <drag framework-res.apk here> /system/framework/framework-res.apk
adb shell reboot
This is harder than I though.
Code:
adb shell
$ mount /system
mount /system
mount: not found
Now what?
E_man5112 said:
This is harder than I though.
Code:
adb shell
$ mount /system
mount /system
mount: not found
Now what?
Click to expand...
Click to collapse
lol. k wht recovery u using ?
stock recovery
Code:
adb reboot recovery
E_man5112 said:
stock recovery
Code:
adb reboot recovery
Click to expand...
Click to collapse
lol time to upgrade to amon-ra recovery bro. also...make sure u signed ur files or else nothing works...assuming you're not a complete noob.
E_man5112 said:
stock recovery
Code:
adb reboot recovery
Click to expand...
Click to collapse
yea wht opasha said. u need root/custom recovery to modify system apps. sorry.
Will clockwork recovery do the trick?
Sent from my SAMSUNG-SGH-I897 using XDA App
E_man5112 said:
Will clockwork recovery do the trick?
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Yup it'll do.
Ok, making progress, /system mounts, so I type
Code:
adb shell
su
mount /system
exit
adb push framework-res.apk /system/framework/framework-res.apk
and I get
Code:
/sbin/sh: adb: not found
in your above post, you didn't mention su, but /system won't mount unless I'm root user, so I don't know any other way to do it? exit keeps me in the shell it seems (I still have ~$) but exiting again kicks me out of adb all together, then if I restart, I'm back at the permission denied error.
opasha said:
lol time to upgrade to amon-ra recovery bro. also...make sure u signed ur files or else nothing works...assuming you're not a complete noob.
Click to expand...
Click to collapse
Bad assumption I really am
How do I sign my files?

[Q] I can't boot into recovery!

I rooted using UniversalAndRoot, which worked according to the app. Installed ROM Manager and flashed ClockworkMod Recovery.
This is where I stumble. I've tried selecting Reboot into Recovery, Install from SD, powering up with Vol Down pressed and selecting Recovery. All three boot as far as the X, flash a bit of white at the bottom of the screen then the phone turns off.
Waiting for a minute/pressing buttons or pulling the battery lets me boot back up fine, but I still can't boot into Recovery.
I've tried choosing install AltRecovery and old versions of Clockwork but they both behave the same way.
Any advice guys? Is it because I rooted with UniAndRoot?
top_bunk said:
I rooted using UniversalAndRoot, which worked according to the app. Installed ROM Manager and flashed ClockworkMod Recovery.
This is where I stumble. I've tried selecting Reboot into Recovery, Install from SD, powering up with Vol Down pressed and selecting Recovery. All three boot as far as the X, flash a bit of white at the bottom of the screen then the phone turns off.
Waiting for a minute/pressing buttons or pulling the battery lets me boot back up fine, but I still can't boot into Recovery.
I've tried choosing install AltRecovery and old versions of Clockwork but they both behave the same way.
Any advice guys? Is it because I rooted with UniAndRoot?
Click to expand...
Click to collapse
You probably have SLCD screen. Then you have to use Amon_RA 1.8.0.1 recovery which is only one (as far as i know) intended for SLCD screens.
Ah okay. Is there an easy way for me to flash that? Not really comfortable with the SDK approach...
Thanks for the fast reply btw
If you don't have unlocked bootloader you have to use flash_image binary to flash new recovery because amon_ra 1.8.0.1 recovery don't show up in rom manager.
Download it from here http://cyanogen-files.carneeki.net/flash_image.zip. Put it in root of sdcard as well as 1.8.0.1 img file and in phone terminal type
1) cd /sdcard
2) flash_image recovery 1.8.0.1.img (replace with name of img file)
houmles said:
2) flash_image recovery 1.8.0.1.img (replace with name of img file)
Click to expand...
Click to collapse
I'm getting flash_image: not found
I've double checked the file name is correct
Did you unpack the zip file? There is only one file named exactly "flash_image" so you should not getting not found error if you have that file in root of sdcard and you are at /sdcard in terminal.
Send me output of "ls -la" command from /sdcard.
----rwxr-x system sdcard_rw 17638414 2010-09-10 20:20 gapps-hdpi-20100817-signed.zip
----rwxr-x system sdcard_rw 70864056 2010-09-10 20:22 update-cm-6.0.0-N1-signed.zip
----rwxr-x system sdcard_rw 11818685 2010-09-10 21:05 FRF50-radio-4_06_00_12_7.zip
----rwxr-x system sdcard_rw 4145152 2010-09-10 23:10 recovery.img
----rwxr-x system sdcard_rw 26172 2009-10-03 18:07 flash_image
Try ./flash_image instead of just flash_image.
One more thing: type this as the first command when you enter the Terminal:
su
Then type:
cd /sdcard
./flash_image recovery <insert_recovery_img_name_here>
Jack_R1 said:
Try ./flash_image instead of just flash_image.
One more thing: type this as the first command when you enter the Terminal:
su
Then type:
cd /sdcard
./flash_image recovery <insert_recovery_img_name_here>
Click to expand...
Click to collapse
./flash_image: permission denied
top_bunk said:
./flash_image: permission denied
Click to expand...
Click to collapse
Weird. Try:
1) su
2) cd /sdcard
3) chmod +x flash_image
4) ./flash_image recovery file.img
Well, that's because SD card isn't a good place to put flash_image. Permissions inherited from FAT32 are awkward and aren't changeable. But there's a way around it.
Do the following sequence: run Terminal, enter the following commands:
su
cd /sdcard
cp flash_image /data/local/tmp
chmod 755 /data/local/tmp/flash_image
/data/local/tmp/flash_image <insert_recovery_img_name_here>
houmles said:
3) chmod +x flash_image
Click to expand...
Click to collapse
Won't work for 2 reasons:
1) In Android, chmod seems not to recognize letters for permissions.
2) On SD card formatted with FAT32, the mount assigns default permissions for all files, and they can't be changed - since the file system doesn't support it.
Jack_R1 said:
Won't work for 2 reasons:
1) In Android, chmod seems not to recognize letters for permissions.
2) On SD card formatted with FAT32, the mount assigns default permissions for all files, and they can't be changed - since the file system doesn't support it.
Click to expand...
Click to collapse
It didn't work...
Jack_R1 said:
su
cd /sdcard
cp flash_image /data/local/tmp
chmod 755 /data/local/tmp/flash_image
/data/local/tmp/flash_image <insert_recovery_img_name_here>
Click to expand...
Click to collapse
cp: not found
Have any file explorer installed? Astro / EStrongs / whatever?
Copy the file manually in file explorer, and skip the "cp ......" instruction.
Jack_R1 said:
Have any file explorer installed? Astro / EStrongs / whatever?
Copy the file manually in file explorer, and skip the "cp ......" instruction.
Click to expand...
Click to collapse
I just thought of the same thing
Installing Astro now (it's a new phone no apps!)
Jack_R1 said:
Won't work for 2 reasons:
1) In Android, chmod seems not to recognize letters for permissions.
2) On SD card formatted with FAT32, the mount assigns default permissions for all files, and they can't be changed - since the file system doesn't support it.
Click to expand...
Click to collapse
ah, didn't know that
Jack_R1 said:
Have any file explorer installed? Astro / EStrongs / whatever?
Copy the file manually in file explorer, and skip the "cp ......" instruction.
Click to expand...
Click to collapse
As Jack wrote, you can only copy the file manually with some file explorer.
houmles said:
As Jack wrote, you can only copy the file manually with some file explorer.
Click to expand...
Click to collapse
It won't let me copy it... I've tried Astro and ES.
Lots of complications...
Install Busybox from the Market. Then you'll have "cp" working.
If it still won't work, try "busybox cp" instead.
If you have adb connection you can try this:
unpack zip I sent you and recovery.img to root of c:\ for example .. then:
1) adb push c:\flash_image /data/flash_image
2) adb push c:\recovery.img /data/recovery.img
3) adb shell
4) chmod 755 /data/flash_image
5) /data/flash_image recovery /data/recovery.img
Jack_R1 said:
Lots of complications...
Install Busybox from the Market. Then you'll have "cp" working.
If it still won't work, try "busybox cp" instead.
Click to expand...
Click to collapse
Lots
...but it's done! Thanks a lot for the help guys
I've gotta be up in a few hours so I don't have time to install a ROM and faff about, but hopefully it will be all good from here on in.
Cheers again!!

Deodex failure, need help please.

Hi guys
I'm new to deodexing, following a guide for XUltimate.
I copied my system\app dir to a folder called origi_app, and my system\framework to a folder called origi_frame on my int SD card, then copied these two folders to my PC XUltimate dir.
Ran option 3, then 4, both finished with sucessful.
This gave me two new folders in the XUltimate dir...
done_app & done_frame
I copied these back to my int SD card, then following the guide, ran ADB from cmd prompt..
Typed: ADB Shell
Got a $
Typed: SU
This gave me a Permission Denied ??
So as per the guide, I tried Root Explorer...
Selected All the .apps in done_App, selected copy and then tried to paste into the system\app dir.... this then gave me a failed to copy due to lack of space error and the phone started to vibrate and com.android force closing repeatedly...
Were did I go wrong, why did I get permission denied trying to get the SU cmd?
The full adb guide was as follows:
adb shell
su
stop
mount -o rw,remount /dev/block/mmcblk1p21 /system
rm /system/app/*.odex
rm /system/framework/*.odex
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
mount -o ro,remount /dev/block/mmcblk1p21 /system
reboot
As above, got as far as SU then got permission denied!
So thankfully I did a nandroid backup before and am currently restoring it...
EDIT: My Backup has just finished restoring from CWM... rebooted but it is now on original startup setup and getting force closes for lots of apps???
Had to re add my APN settings to re download MY Backup and am currently restoring apps and data from it now! Fingers crossed. I thought the whole point of a cwm back up was to create an exact image of the whole system, files, date and settings etc?
Well, restored via My Backup, but rom manager and Sky news kept force closing, so wiped the whole thing and flash a custom js8 from from Doc's kitchen... glad I did... just miss the cirlce battery mod I had before.

[Fix] Systemless SU - Some apps not seeing root

There have been quite a bit of people with issues with Systemless root, there are some apps that are not recognizing root, i had this issue with my Oneplus One on COS 13.1 and now the same thing works with our OnePlus 3 on OxygenOS
I had come across this on another forum, i don't recall where so i don't want to take the credit for this, i just want to provide the fix for people who have this phone and having issues
Download Terminal from app store and type
Code:
su
mount -o remount,rw /system
touch /system/bin/su
mount -o remount,ro /system
reboot
Thank you ! Before I try this , can you tell me what this method is doing ? All I can tell is that it is mounting something as read only instead of read write
I belive it creates a dummy file bc some apps require it to show as a system file
SDMU said:
Thank you ! Before I try this , can you tell me what this method is doing ? All I can tell is that it is mounting something as read only instead of read write
Click to expand...
Click to collapse
Code:
1. su
2. mount -o remount,rw /system
3. touch /system/bin/su
4. mount -o remount,ro /system
5. reboot
1. To get root privileges
2. Remounts /system partition in writable mode
3. Creates an empty file called su to /system/bin/ folder
4. Remounts /system partition to read only mode.
5. reboot
Edit. As stated above, some apps still check root access by looking su file in /system/bin folder
Squabl said:
1. To get root privileges
2. Remounts /system partition in writable mode
3. Creates an empty file called su to /system/bin/ folder
4. Remounts /system partition to read only mode.
5. reboot
Edit. As stated above, some apps still check root access by looking su file in /system/bin folder
Click to expand...
Click to collapse
This defeats the purpose of a system less su, I.e., not modifying the system partition. Step 3 modifies the system partition.
The reason apps are not seeing the su in system less state is because they have been written incorrectly. Chainfire already said these apps should be re written
candiesdoodle said:
This defeats the purpose of a system less su, I.e., not modifying the system partition. Step 3 modifies the system partition.
The reason apps are not seeing the su in system less state is because they have been written incorrectly. Chainfire already said these apps should be re written
Click to expand...
Click to collapse
Yes, it "disables" systemless root and afterwards it is just a root and banking apps and ota updates etc will fail. I don't need systemless root so I have modified my system partition to get some poorly coded apps to function. This method is not recommended if you need systemless root and it's a good thing that you pointed that out!

Categories

Resources