How can I extract an apk file from a ROM ? - Galaxy S II Q&A, Help & Troubleshooting

I'm trying to extract the file phone.apk from stock ROM version KG6.
I understand that the apk files are inside the factoryfs.img file, but how can I open this file ?, I tried Winrar but it doesn't open...

look at this thread. This is internal ext4 image. You must repack and mount it to read something.
You can try also to find an unpacked rom dump.
Take them attached. I've extracted them (apk+odex) from KG6.

Ivan_Belarus said:
look at this thread. This is internal ext4 image. You must repack and mount it to read something.
You can try also to find an unpacked rom dump.
Click to expand...
Click to collapse
Thanks Ivan. I've looked at that thread, but from what I understand that code is for linux, no ? I only have windows...
Any clue of where can I find that unpacked rom dump ?

Just look above I've unpacked them for you
P.S. in that thread is the program and tip for windows. Just read all the posts
Of course, linux is better and faster for that

Thanks Ivan !!

Ivan, I've tried to put the phone.apk file that you've extracted for me, in the system/app directory of my phone (I haven't moved phone.odex though).
The problem is that now I get forced close...
The ROM that I'm using is Cognition 1.42, which is based on KG6 (but Cognition is deodexed).
What do you think could be the reason that the phone.apk file that you've extracted from stock KG6, doesn't work with Cognition KG6 ROM ? ?

Reason you haven't moved the odex file - is the essential part of the app. Dont forget to reboot after that. This is not deodexed file
If it doesn't work (should be) you have to look for cognition orginal deodexed phone.apk, because it may have some modifications. I have many customs on my PC, but cognition. So pity
Tell me if it doesnt work, I'll ask someone to give it to me.

Thanks again for all your help Ivan. Much appreciated.
I tried to copy both phone.apk and phone.odex to system\app, but it still doesn't work.
I don't have a problem returning to the original cognition ROM (via CWM). The thing is that I want to replace his phone.apk with the one that comes with the stock version, because I want the "ascending ringtone" back (he disabled this feature in his version of the phone.apk).

I have sent you the stock version from KG6. As I said cognition won't work with stock phone.abk due to some modifications.

Related

[Q] Boot Animation - Proper Kernel

I have been looking for the last couple days for this...
I want to simply flash a Kernel that will allow me to load my custom "bootanimation.zip" file into system/media and it show on boot-up. The catch is, I don't care to do this by flashing a custom ROM. Don't get me wrong, I really like some of the ROM's that these guys have created, I just don't want to go crazy with them. I want to make my own mix of greatness!
I did the update over Kies Mini, but then flashed the deodexed KA7 stock ROM from the Bible (In development). So it's the stock kernel that came with the KA7 build that I'm running.
I need to know what Kernel is compatible with the KA7 ROM
OR
how do i modify the system myself to make it work with custom bootanimation.zip files??
Any help is appreciated!!!
ndhr3d said:
I have been looking for the last couple days for this...
I want to simply flash a Kernel that will allow me to load my custom "bootanimation.zip" file into system/media and it show on boot-up. The catch is, I don't care to do this by flashing a custom ROM. Don't get me wrong, I really like some of the ROM's that these guys have created, I just don't want to go crazy with them. I want to make my own mix of greatness!
I did the update over Kies Mini, but then flashed the deodexed KA7 stock ROM from the Bible (In development). So it's the stock kernel that came with the KA7 build that I'm running.
I need to know what Kernel is compatible with the KA7 ROM
OR
how do i modify the system myself to make it work with custom bootanimation.zip files??
Any help is appreciated!!!
Click to expand...
Click to collapse
you can use any 2.2. kernel (most, if not all, support bootanimation.zip) with any 2.2 firmware/ROM. just keep a heads up because a lot of kernels flash their own modem. So if you flash a kernel that flashes a modem besides KA7, you would have to reflash KA7 manually if you want to keep it.
I would PERSONALLY recommend Eugene's Dead Horse kernel....just read before you flash!!!
TopShelf10 said:
you can use any 2.2. kernel (most, if not all, support bootanimation.zip) with any 2.2 firmware/ROM. just keep a heads up because a lot of kernels flash their own modem. So if you flash a kernel that flashes a modem besides KA7, you would have to reflash KA7 manually if you want to keep it.
I would PERSONALLY recommend Eugene's Dead Horse kernel....just read before you flash!!!
Click to expand...
Click to collapse
I've flashed the deodexed KB1 ROM as well as the new KB1 Kernel + Voodoo by supercurio. I have his kernel specifically because it says in the main post "Also supported: custom boot animation, init.d scripts and an improved adb shell (new!)"
I love voodoo... but that's beside the point!
I've copied my bootanimation.zip folder (zipped using store mode, uncompressed) into the system/media folder on my phone and deleted the two samsungbootloop files in there. The damn thing still doesn't play the animation! I only have a 'part0' folder which houses all images labeled 'welcomanimation_0000' with progressing numbering. Permissions set are RWXRWXRW- as they are on most the custom ROM bootanimations I see around.
My 'desc' file has EXACTLY THIS in it:
480 800 30
p 0 0 part0
which was pulled straight from another ROM's bootanimation files!
I don't get it! What in the world am I missing??
It's irritating seeing all of these great boot animations and I can't get my own one working... anyone know what I'm screwing up?
Edit: I'm going to try flashing a custom bootanimation file and simply replacing their file with my file and see if there is something in their script in the flashing process that get's modified that I'm not doing myself through root explorer. Respond and let me know if that is a bad idea... I plan on trying it in about an hour after getting some crap done around the house.
Well... for anyone else that has had this issue...
Downloading an already packaged bootanimation file from one of these lovely moders... replacing their bootanimation.zip file in the media folder and packaging it all back up in a flashable zip folder worked like a charm! Thank you to whomever it was I took the file from... if I knew how to package a file to be flashable, I probably would have done it myself, but I didn't want to go through the hassle of learning.
Problem Solved!

[Q] Taskmanager APK

I deleted taskmanager from system/apps.
Does someone knows wich apk that is so I can download it
from a original rom. (I'am from the dutch so I don't know if
I need to download it from a Stock dutch rom/or is it multi-language).
Ok downloaded stock rom but extracted everything but I can't find system apps.
Can someone provide me please the taskmanager apk?
Thnx.
I have downloaded the stock apps maps from the system, but knows someone wich apk I needed
is it jobmanager for example?
Please put something in the title - something relevant.
Thanks
johncmolyneux said:
Please put something in the title - something relevant.
Thanks
Click to expand...
Click to collapse
Fixed the title.
It is called jobmanager.apk..if you are on a stock odexed rom you need both the .apk and .odex file otherwise it wont work.
KayvinM said:
It is called jobmanager.apk..if you are on a stock odexed rom you need both the .apk and .odex file otherwise it wont work.
Click to expand...
Click to collapse
Thnx buddy.
Jobmanager.apk I have that file but the .odex not, could you please
upload that .odex file on mediafire please.
Again thnx.
davelinders said:
Thnx buddy.
Jobmanager.apk I have that file but the .odex not, could you please
upload that .odex file on mediafire please.
Again thnx.
Click to expand...
Click to collapse
The odex file has to match. What firmware are you running? You can also try a deodexed apk from a custom rom.
KayvinM said:
The odex file has to match. What firmware are you running? You can also try a deodexed apk from a custom rom.
Click to expand...
Click to collapse
I'am running KF3 kernel.
I have downloaded already a custom rom but when unzipped
there are some image files and when I try to unzip those or mount
it with some iso program it will give a error.
davelinders said:
I'am running KF3 kernel.
I have downloaded already a custom rom but when unzipped
there are some image files and when I try to unzip those or mount
it with some iso program it will give a error.
Click to expand...
Click to collapse
I attached a program that will help you. Unzip and install.
1. Open the program and click on the "Drives" tab then "mount image" use the factoryfs.img from the rom you downloaded.
2. Once the image is loaded it will be labeled "Linux native volume 1" double click this.
3. This will open up the drive and allow you to view the contents. Search for the files you need and then click the "save" tab.
I also attached a deodexed apk for you, see if it works.
Gonna try it tonight.
Thnx for your help.
Jobmanager won't install.
I put it in the system/app folder that's good right?
davelinders said:
Gonna try it tonight.
Thnx for your help.
Jobmanager won't install.
I put it in the system/app folder that's good right?
Click to expand...
Click to collapse
Yes that's right. It should work, have you tried rebooting your phone? Also make sure that there is no .odex file for jobmanager. If there is, delete it from system/apps if you're using the deodexed one I gave you.
KayvinM said:
Yes that's right. It should work, have you tried rebooting your phone? Also make sure that there is no .odex file for jobmanager. If there is, delete it from system/apps if you're using the deodexed one I gave you.
Click to expand...
Click to collapse
Ok gonna try it again after reboot I didn't reboot the phone.

[Q] How To get Stock Apps ??

i am using samsung galaxy ace with a custom rom. i want to have some of the stock apps mainly stock camera, stock task manager, and stock messages. is there a way i can get it and put it in my custom rom ???
my method-
i am not sure whether this will work or not but i think that if i get the apk file then i can put it in root/system/apps and set permissions to rw-r-r. this should work according to me.
but how do i get the apk file?
for that also i think i could extract it from the installation files for stock rom...
but the installations i have come across are either .md5 or .tar files for stock rom. hence i am unable to help to extract it and get the apk file. also i am unable to find a direct zip installation setup via cwm for stock rom. if i get that then its easy to extract the apks.
please help. i am not sure if my method is right. if it is then help me with it, if not then please tell me the other method
I think it´s not that easy, becaus the stock apps are using another framework, so they will not work if you just put them in the root/system/app folder. You have to install the framework which is used by the stock Samsung rom. If I´m wrong please correct me.

[GUIDE]Solution to recover some apps like IM,swype etc. mostly missing in custom ROMs

I am not sure if this is already known or has been discussed before. Search did not yield any relevant results. Please post your feedback.
Introduction
In most custom ICS ROM's, you might have noticed some apps like the Polaris office, Photo editor, IM or even Swype missing. These are not even there in many of the "Stock unmodified" versions released either. Surprisingly, they are very well present if you flash the original ROM through Odin. So where do these apps go? They are actually installed on first boot only if you flash from Odin.
Usual missing apps
KiesAir
OceanWeather and WindyWeather live wallpapers
Polaris Office
Photo Editor
Samsung IM
Swype
Vlingo
For those who do not want to go through this procedure and straight away want the CWM package of these missing files, you can download it from here...
How to extract them?
I am assuming the most common method ROM cooks use maybe using dsixda's kitchen (thanks to his fantastic scripts!).
When extracting and de-odexing the ROM, you may have noticed a file called hidden.img in the original ROM file which is usually ignored in this process. this file contains the above apps and they are installed to the /data/app folder. The hidden.img file is not readable using regular softwares, just like factoryfs.img.
Extract this hidden.img file from the original ROM image and paste it in the original_update folder of dsixda's kitchen (xxx.tar.md5 can be renamed to xxx.tar and opened in softwares like winrar)
Rename the hidden.img file to factoryfs.img.
Close any existing kitchen tasks and restart the kitchen.
Select option 1 to set working folder.
Make a backup of your existing working directory.
When prompted, choose the factoryfs.img option to proceed with (option 3).
You will get a message saying the file is being converted to a format for extraction.
The ext2fs program should automatically be launched.
Select open file in the program and choose the ext_factoryfs.img file (which is actually the converted from of the renamed hidden.img file).
Right click on the left pane where the opened file is listed and select Save.
Save it to the root folder of your working directory.
Now you will have a folder called data in your working directory with the missing apps. Include extraction of this folder in your updater script and you are done
If the tutorial wasn't clear, feel free to post questions on the thread.
Hope this was helpful, Cheers...
ajayjohn said:
In most custom ICS ROM's, you might have noticed some apps like the Polaris office, Photo editor, IM or even Swype missing.
Click to expand...
Click to collapse
It seems to be missing in all Deodexed ROM
Photo editor not working. Also there isn't new gallery app in official ROm???
nikki2325 said:
Photo editor not working. Also there isn't new gallery app in official ROm???
Click to expand...
Click to collapse
Photo editor works fine for me. Did you try clearing your cache?
Also, Samsung still uses the old GingerBread gallery.
Couldn't someone just extract the apps then post them here.
thecrater said:
Couldn't someone just extract the apps then post them here.
Click to expand...
Click to collapse
You can get them in a zipped file from here
Unzip and use the app you want.
ajayjohn said:
In most custom ICS ROM's, you might have noticed some apps like the Polaris office, Photo editor, IM or even Swype missing. These are not even there in many of the "Stock unmodified" versions released either. Surprisingly, they are very well present if you flash the original ROM through Odin. So where do these apps go? They are actually installed on first boot only if you flash from Odin.
Click to expand...
Click to collapse
Why not make a custom rom .tar? install with odin? or mobile odin?
If I wanted to flash this hidden.img in heimdall what should i do ? Meaning where should i put it ?
Sent from my GT-I9100 using XDA
Custom roms apps missing i just open the zip with win rar go to system /apps and ADD required apps or even delete apps not wanted close and flash .
Thats open not unzip .
jje
sachs said:
Why not make a custom rom .tar? install with odin? or mobile odin?
Click to expand...
Click to collapse
JJEgan said:
Custom roms apps missing i just open the zip with win rar go to system /apps and ADD required apps or even delete apps not wanted close and flash .
Thats open not unzip .
jje
Click to expand...
Click to collapse
That is definitely a way to do it.
But since these apps get installed to /data/app when installed via odin. Hence, to replicate that (not needed), i mentioned unzipping and installing as a regular apk.
Another option is to open the zip as you said and place these in a /data/app folder and flash it.
But primarily, this thread was created because i have found people asking on many rom threads about missing these apps, without getting a reply...
ajayjohn said:
But since these apps get installed to /data/app when installed via odin. Hence, to replicate that (not needed), i mentioned unzipping and installing as a regular apk.
Another option is to open the zip as you said and place these in a /data/app folder and flash it.
Its just the missing stock apps i put in system /apps i do not add apps to data s that is hit and miss unless the script is edited .
I also remove stuff i dont want from custom roms and add my own wallpaper ringtones boot CSC etc by the same method .
jje
Click to expand...
Click to collapse
Very nice and simple guide.Thank you :good:
since it s not mentioned, I advice to add the libs missing for polaris office and swype etc..
U can retrieve them opening the apks and check out the lib folder.
These have to be pasted into /system/lib to avoid FCs.
It s an important step, mention it into OP.
i'm trying to get stock swype for a galaxy ace s5830 installed on my custom rom. So far without succes. I have pasted swype.apk (extracted from stock rom!) into /system/app and libswypecore.so into /system/lib. Both with permissions: 6-4-4.
When I try to use swype I get an error that this swype version was intended to use on a different device. result: I can swype but nothing happens (no words are entered, though the different dictionairies are present in the swype.apk).
I'm wondering what I should do now. (besides checking the build.prop file for differences).
DutchArjo said:
i'm trying to get stock swype for a galaxy ace s5830 installed on my custom rom. So far without succes. I have pasted swype.apk (extracted from stock rom!) into /system/app and libswypecore.so into /system/lib. Both with permissions: 6-4-4.
When I try to use swype I get an error that this swype version was intended to use on a different device. result: I can swype but nothing happens (no words are entered, though the different dictionairies are present in the swype.apk).
I'm wondering what I should do now. (besides checking the build.prop file for differences).
Click to expand...
Click to collapse
It's galaxy s2 theard, ask in galaxy ace
Ganjax said:
It's galaxy s2 theard, ask in galaxy ace
Click to expand...
Click to collapse
sorry. I thought as it are both samsung devices, It would be the same for Ace, but I will ask in Ace forum.

How to deodex Xperia Z2 6.0.1 firmware?

Can anyone tell me how to deodex Xperia Z2 6.0.1 firmware step by step? Thanks in advance....
+1
I am also looking for the same. On MM rom, Sony is using symlinks to link odex files.
A step by step guide would be highly appreciated.
Thank you
I'm not gonna go into deep details, but this should help.
- flash MM rom for your device, make sure it is ROOTED as you'll need to use an explorer with root access,it's better if you do this on a clean install, but this is just me
- boot your device and go through the setup process
- once done, install a browser with root access, I recommend MiXplorer, root explorer
- browse into /system folder
- check your /app, /framework, /priv-app, they should have odex files inside them (this was the case for me)
- copy these folders, plus build.prop file into sd card or the phone memory
- connect phone to pc and copy files over
- look up and download SVADeodexerForArtx(32 or 64 based on your system), you also need to have java installed on your machine.
- extract the SVADeodexerForArtxxx to your c: drive, and create a folder named /system insides, and post the files from your phone inside that
- your final folder will look something like this : c:/SVADeodexerForArtxxx/system/ (app, framework,priv-app) and build.prop file
- remember to move the Semcxxx app folder from /framework into /app folder or it won't be deodexed
- run SVADeodexerForArtxxx and point it to your /system folder, it will show you your android version, tick the checkbox for app, framework, priv-app, hit the start button
- it'll run and once done the log file will open and tell you how many were deodexed.
- the deodexed folders will be in the base folder, make sure to return the Semcxxx folder from the /apps to /framework
- create a flashable zip and flash these folders back on your rom
now your rom is deodexed
install Rom eXistenZ MM, rom is rooted and deodex
lokitooxd said:
install Rom eXistenZ MM, rom is rooted and deodex
Click to expand...
Click to collapse
The intention of this post was to learn how to do it. I know there is existenz and ultraslim deodexed roms. Thanks anyway.
@ticktock666
Thanks for the steps.
These steps looks to be from older version. Anybody with 6.0 Sony MM steps?
@ticktock666
There are certain other folders such as odex.app, odex.framework, odex.priv-app...what about these? These folders also contains similar odex files for app, framework and pri-app...
AlanDS said:
These steps looks to be from older version. Anybody with 6.0 Sony MM steps?
Click to expand...
Click to collapse
I deodexed my MM rom about a week ago, so I'm saying this from experience : it is up-to-date.
vikrant7027 said:
@ticktock666
There are certain other folders such as odex.app, odex.framework, odex.priv-app...what about these? These folders also contains similar odex files for app, framework and pri-app...
Click to expand...
Click to collapse
I'm not sure, but here's some of the stuff I noticed during the deodex process :
- I used to get the files using adb pull command directly to pc after a fresh rom install (remember to install a pre-rooted rom), but I did not get any odex files with the apps this way, so deodexing didn't work.
- after pulling the files from the device using a root explorer, each app had the odex files with them inside the correct folders.
- about odex.xxx folders and odex.xxx.sqsh files : they contain an exact duplicate of the odex files, no idea why (you can extract the sqsh files, they're basically special compressed odex file container sort of thing), which means the rom contains 3 versions of the same odex file, makes no sense.....
after deodexing and flashing the deodexed rom/files, I deleted odex.xxx folders and odex.xxx.sqsh files, and my rom works fine, fully rooted and with xposed. My current issue is that now if I browse into /data/app on the root of the drive I'll find an odexed version of every app I have installed, be it a user app or system app, and it's driving me crazy.
ticktock666 said:
I deodexed my MM rom about a week ago, so I'm saying this from experience : it is up-to-date.
I'm not sure, but here's some of the stuff I noticed during the deodex process :
- I used to get the files using adb pull command directly to pc after a fresh rom install (remember to install a pre-rooted rom), but I did not get any odex files with the apps this way, so deodexing didn't work.
- after pulling the files from the device using a root explorer, each app had the odex files with them inside the correct folders.
- about odex.xxx folders and odex.xxx.sqsh files : they contain an exact duplicate of the odex files, no idea why (you can extract the sqsh files, they're basically special compressed odex file container sort of thing), which means the rom contains 3 versions of the same odex file, makes no sense.....
after deodexing and flashing the deodexed rom/files, I deleted odex.xxx folders and odex.xxx.sqsh files, and my rom works fine, fully rooted and with xposed. My current issue is that now if I browse into /data/app on the root of the drive I'll find an odexed version of every app I have installed, be it a user app or system app, and it's driving me crazy.
Click to expand...
Click to collapse
Can u make a deodex rom for Xperia z2 mm rom d6502 indian version and post it on gdrive?? thanku in advance..? @ticktock666
Silverstarjigar said:
Can u make a deodex rom for Xperia z2 mm rom d6502 indian version and post it on gdrive?? thanku in advance..? @ticktock666
Click to expand...
Click to collapse
sorry buddy, but although just the deodexed files from my rom should work perfectly (it's only the apks, no other settings from the rom are included), it is near impossible for me to upload anywhere due to slow & unstable connection and power situation, since none of the hosting services support upload resume on their apps/sites.
ticktock666 said:
sorry buddy, but although just the deodexed files from my rom should work perfectly (it's only the apks, no other settings from the rom are included), it is near impossible for me to upload anywhere due to slow & unstable connection and power situation, since none of the hosting services support upload resume on their apps/sites.
Click to expand...
Click to collapse
Okk.. I will give it a try then!
Is there any script or something that we can flash through recovery ?
do you mean a script to deodex the rom on the phone ? if so then the answer is no
You can try this
ticktock666 said:
I'm not gonna go into deep details, but this should help.
- flash MM rom for your device, make sure it is ROOTED as you'll need to use an explorer with root access,it's better if you do this on a clean install, but this is just me
- boot your device and go through the setup process
- once done, install a browser with root access, I recommend MiXplorer, root explorer
- browse into /system folder
- check your /app, /framework, /priv-app, they should have odex files inside them (this was the case for me)
- copy these folders, plus build.prop file into sd card or the phone memory
- connect phone to pc and copy files over
- look up and download SVADeodexerForArtx(32 or 64 based on your system), you also need to have java installed on your machine.
- extract the SVADeodexerForArtxxx to your c: drive, and create a folder named /system insides, and post the files from your phone inside that
- your final folder will look something like this : c:/SVADeodexerForArtxxx/system/ (app, framework,priv-app) and build.prop file
- remember to move the Semcxxx app folder from /framework into /app folder or it won't be deodexed
- run SVADeodexerForArtxxx and point it to your /system folder, it will show you your android version, tick the checkbox for app, framework, priv-app, hit the start button
- it'll run and once done the log file will open and tell you how many were deodexed.
- the deodexed folders will be in the base folder, make sure to return the Semcxxx folder from the /apps to /framework
- create a flashable zip and flash these folders back on your rom
now your rom is deodexed
Click to expand...
Click to collapse
But with file odex.app.sqsh format...are that no need to extract
Sent from my D6503 using XDA-Developers mobile app
A1nur said:
But with file odex.app.sqsh format...are that no need to extract
Sent from my D6503 using XDA-Developers mobile app
Click to expand...
Click to collapse
sorry for the late reply, haven't been checking much recently.
now about those sqsh files, I've tried extracting them, and they seem to contains a 2nd copy of the odex files, not sure how they work, but after deodexing my rom I simply deleted them, and everything worked normally.
ticktock666 said:
sorry for the late reply, haven't been checking much recently.
now about those sqsh files, I've tried extracting them, and they seem to contains a 2nd copy of the odex files, not sure how they work, but after deodexing my rom I simply deleted them, and everything worked normally.
Click to expand...
Click to collapse
In new build fw 291 i try deodex that rom sir, n i do not extract sqsh.file...all normally work but if i delete boot.art n boot.oat it butlop....
How to i delete that sir
A1nur said:
In new build fw 291 i try deodex that rom sir, n i do not extract sqsh.file...all normally work but if i delete boot.art n boot.oat it butlop....
How to i delete that sir
Click to expand...
Click to collapse
I don't have the latest rom yet (not released for 6502), but when you go into your /system/app folder using a root explorer, do you see "arm" folder inside any of the installed apps ? maybe they changed something in 291, and now they only use sqsh files, also what does the log from the app says when you deodex the rom says ? it should say something like "300 apps deodexed, 10 apps already deodexed" or something like that.
ticktock666 said:
I don't have the latest rom yet (not released for 6502), but when you go into your /system/app folder using a root explorer, do you see "arm" folder inside any of the installed apps ? maybe they changed something in 291, and now they only use sqsh files, also what does the log from the app says when you deodex the rom says ? it should say something like "300 apps deodexed, 10 apps already deodexed" or something like that.
Click to expand...
Click to collapse
Thanks sir for your answered...
Sent from my Sony Xperia Z2 using XDA Labs
Hi!
Thanks, for good instructions!
It is also working for Xperia Z3 Compact on MM .291. I failed in the past, cause of forgetting 'semcxxx' in framework.
Greetz, brockn

Categories

Resources