Problem with Re-ODEX - Galaxy S 4 Q&A, Help & Troubleshooting

Hi , I have some problems.
I take services.jar and services.odex from last official 4.3 and deodex him.Make some changes in classes.dex and then re-odex again.
I use this command in terminal emulator to ODEX back
Code:
dexopt-wrapper /sdcard/app/services.jar /sdcard/app/services.odex /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/sec_edm.jar:/system/framework/seccamera.jar:/system/framework/scrollpause.jar:/system/framework/stayrotation.jar:/system/framework/smartfaceservice.jar:/system/framework/abt-persistence.jar:/system/framework/secocsp.jar:/system/framework/sc.jar:/system/framework/commonimsinterface.jar
After that i copy signature from original services.odex to patched services.odex
Code:
busybox dd if=/sdcard/app/original.odex of=/sdcard/app/patched.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
Make CWM zip and flash it ,wipe cache and dalvik-cache , reboot and phone goes to bootloop.
Where I was wrong ?

Any ideas , no one knows ?

Look for a script called "dexo" on XDA. You flash the script, which installs it into the bin folder, then you can use the terminal to run a command like "dexo -all" to redoex system and framework.
It works 100% for me. No hassle.

Kryten2k35 said:
Look for a script called "dexo" on XDA. You flash the script, which installs it into the bin folder, then you can use the terminal to run a command like "dexo -all" to redoex system and framework.
It works 100% for me. No hassle.
Click to expand...
Click to collapse
Yea , I know it , but I want to reodex only one .apk or .jar , not all folder.
I found solution for now

Well, if ALL the files in the folder are already odex'd, it will simply skip those and do the one that isn't (if that makes sense).

mom4ence said:
Yea , I know it , but I want to reodex only one .apk or .jar , not all folder.
I found solution for now
Click to expand...
Click to collapse
You can set up dexo to only reodex specific files with a .txt file on your sdcard. What was your solution you found, btw? Having similar issues myself

Related

Add-Remove APKs from ROM?

Hi
i want to build my own customized ROM...
How do i Remove and Add Apps (APK) correctly....
I want to know that bevor i start building...
you don't have to "build" anything... you can just remove apk-s you don't want using adb
enter recovery
adb-windows shell mount /system
adb-windows shell rm /system/app/app you want to remove.apk
link
http://android.modaco.com/content/h...apps-from-the-htc-desire-with-adb-in-windows/
hope this helpes
I believe that he's asking about removing apks from an existing Built rom...
Well from what I know:
extract the ROM
Remove apks you dont want, (??and mabe modify the script for the changes??)
re-compress ROM + Sign
extract the rom
Anyone with further knowledge please correct me.
Search the rom kicthen by dsixda
Hi,
When I try to run this command:
adb-windows shell mount /system
I get this message:
'adb-windows' is not recognized as an internal or external command,
operable program or batch file.
richrach said:
Hi,
When I try to run this command:
adb-windows shell mount /system
I get this message:
'adb-windows' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
Your home path variable not set correctly.
Sent from my SAMSUNG-SGH-I997 using xda premium
If you just want to remove APKs from the a ROM (Zip), then open the zip with WinRAR (do not unzip it), and delete the APKs. When you're done, just close WinRAR.
If you don't want to use that method, you can use ROM Cleaner (check attachment). Just download, unzip and click "RomCleaner.exe".

[GUIDE][XSP]Easy init.d support for Stock ROMs

Easy init.d support for Stock ROMs
Disclaimer: Credits belong to original authors. I'm sharing this intending that others might benefit. This worked for me without problems, but I'm not responsible for any unwanted effects others might experience. Keep a CWM backup just in case.
What is this?
This is an easy method to add init.d support to our stock ROMs running on stock kernels. Then, scripts placed in /system/etc/init.d/ folder will be executed automatically at boot.
Requirements:
1.Rooted phone.
2.Root explorer or similar app.
3.Busybox installed.
check:
Type "busybox run-parts" (without quotes) in a terminal emulator and press enter. If you get an output similar to what's shown below you're all set. It means that busybox is installed and the command is present. (It's needed for the MOD).
Code:
1|[email protected]:/ $ busybox run-parts
BusyBox v1.20.2-jb static (2012-11-25 17:47 +0100) multi-call binary.
Usage: run-parts [-t] [-l] [-a ARG] [-u MASK] DIRECTORY
Run a bunch of scripts in DIRECTORY
-t Print what would be run, but don't actually run anything
-a ARG Pass ARG as argument for every program
-u MASK Set the umask to MASK before running every program
-l Print names of all matching files even if they are not executable
1|[email protected]:/ $
If busybox not installed, install it from Google play.
How to:
1) Open root explorer, go to /system/etc/ folder.
2) Mount /system as R/W by pressing the button at upper right corner.
3) Open init.qcom.post_boot.sh file for editing. (Long-press> Open in Text Editor)
4) Add this line to the bottom end of that file.
Code:
busybox run-parts /system/etc/init.d/
**Add an empty line after that. It's very important**​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
5) Save the file. (You can delete the .bak file that Root explorer creates).
Then..
6) Create 'init.d' folder in /system/etc/ if not already present.
7) Change it's permissions to 755/rwxr-xr-x (Long-press> permissions)
That's it!
Testing:
To see whether it works, extract the test script (from attachment) to init.d folder, change script's permissions to 755/rwxr-xr-x and reboot the phone. You should see a file called Test.log in /data/ with a message saying that it's working.
(Tested on Android 4.3 (.201). Should work in others.)
How it works:
It's quite obvious. The init.qcom.post_boot.sh is one of the scripts that runs at boot, which in turn executes the busybox command to execute the scripts in init.d folder. Simple!
Credits & Sources
1) @iridaki and original thread here.
2) @smokin1337 and original thread here.
Note: Following the first tutorial broke my root. Second method executed only the first script in the list. So, I combined the needed parts of two guides!
Alternative methods:
#'Universal init.d' app from Google play would also execute init.d scripts, but at the app level.
#'SManager' is another app that can execute scripts at boot.
There maybe other methods...
You may point out any shortcomings/improvements.
Thanks and Regards!
mrhnet said:
Easy init.d support for Stock ROMs
Disclaimer: Credits belong to original authors. I'm sharing this intending that others might benefit. This worked for me without problems, but I'm not responsible for any unwanted effects others might experience. Keep a CWM backup just in case.
What is this?
This is an easy method to add init.d support to our stock ROMs running on stock kernels. Then, scripts placed in /system/etc/init.d/ folder will be executed automatically at boot.
Requirements:
1.Rooted phone.
2.Root explorer or similar app.
3.Busybox installed.
check:
Type "busybox run-parts" (without quotes) in a terminal emulator and press enter. If you get an output similar to what's shown below you're all set. It means that busybox is installed and the command is present. (It's needed for the MOD).
Code:
1|[email protected]:/ $ busybox run-parts
BusyBox v1.20.2-jb static (2012-11-25 17:47 +0100) multi-call binary.
Usage: run-parts [-t] [-l] [-a ARG] [-u MASK] DIRECTORY
Run a bunch of scripts in DIRECTORY
-t Print what would be run, but don't actually run anything
-a ARG Pass ARG as argument for every program
-u MASK Set the umask to MASK before running every program
-l Print names of all matching files even if they are not executable
1|[email protected]:/ $
If busybox not installed, install it from Google play.
How to:
1) Open root explorer, go to /system/etc/ folder.
2) Mount /system as R/W by pressing the button at upper right corner.
3) Open init.qcom.post_boot.sh file for editing. (Long-press> Open in Text Editor)
4) Add this line to the bottom end of that file.
Code:
busybox run-parts /system/etc/init.d/
**Add an empty line after that. It's very important**​
5) Save the file. (You can delete the .bak file that Root explorer creates).
Then..
6) Create 'init.d' folder in /system/etc/ if not already present.
7) Change it's permissions to 755/rwxr-xr-x (Long-press> permissions)
That's it!
Testing:
To see whether it works, extract the test script (from attachment) to init.d folder, change script's permissions to 755/rwxr-xr-x and reboot the phone. You should see a file called Test.log in /data/ with a message saying that it's working.
(Tested on Android 4.3 (.201). Should work in others.)
How it works:
It's quite obvious. The init.qcom.post_boot.sh is one of the scripts that runs at boot, which in turn executes the busybox command to execute the scripts in init.d folder. Simple!
Credits & Sources
1) @iridaki and original thread here.
2) @smokin1337 and original thread here.
Note: Following the first tutorial broke my root. Second method executed only the first script in the list. So, I combined the needed parts of two guides!
Alternative methods:
#'Universal init.d' app from Google play would also execute init.d scripts, but at the app level.
#'SManager' is another app that can execute scripts at boot.
There maybe other methods...
You may point out any shortcomings/improvements.
Thanks and Regards!
Click to expand...
Click to collapse
Will try thanks!!
I doesnt have the init.qcom file
Just have a init.goldfish and the init.d folder, but is always empty...
Help please...
janolucero said:
I doesnt have the init.qcom file
Just have a init.goldfish and the init.d folder, but is always empty...
Help please...
Click to expand...
Click to collapse
Do you have any other file with "post_boot" part, in system/etc/ folder? What's your ROM?
mrhnet said:
Do you have any other file with "post_boot" part, in system/etc/ folder? What's your ROM?
Click to expand...
Click to collapse
.254
i will try to reflash and start fresh.-
janolucero said:
.254
i will try to reflash and start fresh.-
Click to expand...
Click to collapse
I haven't tested it on 4.1.2. You may list what are the files in /system/etc folder..
(Just do this command in a terminal emulator, it will save the filelist to a file in sdcard. Post that file here.)
Code:
ls /system/etc/ >> /sdcard/filelist.txt
mrhnet said:
I haven't tested it on 4.1.2. You may list what are the files in /system/etc folder..
(Just do this command in a terminal emulator, it will save the filelist to a file in sdcard. Post that file here.)
Code:
ls /system/etc/ >> /sdcard/filelist.txt
Click to expand...
Click to collapse
Y not add the runparts command in install-recovery.sh file?
Sent from my C5303 using Tapatalk
Siddhesh said:
Y not add the runparts command in install-recovery.sh file?
Sent from my C5303 using Tapatalk
Click to expand...
Click to collapse
Yes, was thinking like that. Wanted to know whether any other post_boot script is there in 4.1.2
mrhnet said:
Yes, was thinking like that. Wanted to know whether any other post_boot script is there in 4.1.2
Click to expand...
Click to collapse
No needed if everyone uses supersu then there will be a file called install-recovery.sh but don't add runparts command in it make another file named install-recovery-2.sh(Only for supersu users) and add the runparts command. Our init.rc makes install-recovery.sh to start on boot
Sent from my C5303 using Tapatalk
Thanks for the tip. Adding runparts to the second file would prevent breaking init.d even if SuperSU update is flashed again. Good idea!
mrhnet said:
Thanks for the tip. Adding runparts to the second file would prevent breaking init.d even if SuperSU update is flashed again. Good idea!
Click to expand...
Click to collapse
Yes but its only for SuperSU users if someone using Superuser from koush then this trick will not work so u have to edit the original install-recovery.sh in that situation and please test this trick coz on my previous Xperia phones Wt19i and arcs only first script is executed never used scripts on XSP
Sent from my C5303 using Tapatalk
Siddhesh said:
Yes but its only for SuperSU users if someone using Superuser from koush then this trick will not work so u have to edit the original install-recovery.sh in that situation and please test this trick coz on my previous Xperia phones Wt19i and arcs only first script is executed never used scripts on XSP
Sent from my C5303 using Tapatalk
Click to expand...
Click to collapse
This the situation. Xperia Arc on C-rom KK ver 5.6 with nAa ver 3.4...
There is already a init.d file in system/etc.
Upon viewing the file install-recovery.sh there is a directive to create another install-recovery.2sh - i.e. as pix below:
Using SuperSU ver 1.94
So I will try this and report.
Sent from my Xperia Arc using XDA Free mobile app
Thanks for the post.. I'm going to try your method for adding init.d support but I have a question :
I found the "init.qcom.post_boot.sh" script in the root directory not "system/etc" nor "system/" is that an issue? should I edit it with no concerns? or should i edit the "install-recovery.sh" found in "system/etc/" ?
my device is HTC desire 816 with stock rom, rooted & with unlocked bootloader
Siddhesh said:
No needed if everyone uses supersu then there will be a file called install-recovery.sh but don't add runparts command in it make another file named install-recovery-2.sh(Only for supersu users) and add the runparts command. Our init.rc makes install-recovery.sh to start on boot
Sent from my C5303 using Tapatalk
Click to expand...
Click to collapse
Where to add the runparts command?
the other sh script is not running
In grand prime SM-G530FZ ( 5.0.2 ), This file exists ( i.e, qcom.....)
Did the mentioned steps. But not working

Copying folder to another in zip packages

Hi,
I want to create an updater-script file that copies /sdcard/data to /data,
How can i do this? dd and cp commands say 'cannot find /sdcard/data/*: no such file or directory'
I don't want to integrate files in the zip package
Is there a way or a command to do that?
I searched on the web, but seems i cannot a working solution, maybe you can anwser
Well your query is wrong.updater-script is for flashable zips and in your case you don't want to integrate the files in the zip right?
Try using this command via terminal :
#cp ~/sdcard/data/*your data /data
what are you trying to do?? o_0
files in sdcards have ownership system:sdcard_rw and permissions something like ----rwx-r-x
to copy files with cp to /data.. you need to be root on terminal/adb shell
the copy will change ownership to root:root while keeping permissions intact...
with such odd permissions and ownership for files in /data .. you are looking at a bootloop..
you'd have to fix permissions for each and every thing incase you really need to copy it
can you tell what are you trying to copy.. and what's in /sdcard/data :|
Hi, sorry for my late reply
I will try that command and post result, :good:
It worked, thanks

delete

Nvm
delete me
USBhost said:
in terminal
su
mount -o remount rw /system
rm -rf /system/app/*/*/./*.odex
rm -rf /system/priv-app/*/*/./*.odex
Click to expand...
Click to collapse
From what I see that command will not deodex. It will delete the odex files and crash your system.
prdog1 said:
From what I see that command will not deodex. It will delete the odex files and crash your system.
Click to expand...
Click to collapse
Hmm i did that and im fine
So thats not how you deodex
So how do you do that in terminal
USBhost said:
Hmm i did that and im fine
So thats not how you deodex
So how do you do that in terminal
Click to expand...
Click to collapse
look inside the apk and see if have a classes.dex. Also look to see if the odex files are actually gone. File structure is different. In system/app there are app folders. Inside folder is apk, arm64 folder and lib folder. Inside arm folder is odex file. If do then it worked but don't see how. Classes.dex contains all the smali code for the apk and is the same as what is in the odex file.
---------- Post added at 08:26 PM ---------- Previous post was at 08:17 PM ----------
rm -rf odex*
rm is the command to delete things.
-r means recursively delete directories. -f means don't ask questions, and don't complain. -rf means both of those things together.
odex* expands to the names of files that start with "odex" (including directory names, since in Unix-like systems -- including Android -- directories are really just a special kind of file.)
More than likely the script you typed in terminal didn't work or all your apps should have crashed..
prdog1 said:
look inside the apk and see if have a classes.dex. Also look to see if the odex files are actually gone. File structure is different. In system/app there are app folders. Inside folder is apk, arm64 folder and lib folder. Inside arm folder is odex file. If do then it worked but don't see how. Classes.dex contains all the smali code for the apk and is the same as what is in the odex file.
Click to expand...
Click to collapse
so your saying what i did should have not worked
but all the odex files are gone from my system
Edit i know -rf was not needed just remembered
USBhost said:
so your saying what i did should have not worked
but all the odex files are gone from my system
Click to expand...
Click to collapse
It caches those files on boot. If cache is cleared they will FC and no way to get them back without flashing the stock image. Real deodex decompiles the apk and odex file and combines them into one file. Odex becomes classes.dex in the apk file.
prdog1 said:
It caches those files on boot. If cache is cleared they will FC and no way to get them back without flashing the stock image. Real deodex decompiles the apk and odex file and combines them into one file. Odex becomes classes.dex in the apk file.
Click to expand...
Click to collapse
o ok
USBhost said:
o ok
Click to expand...
Click to collapse
Your ok if never clear cache.

[MOD] [I8200N] deodexed stock rom apps

DEODEXED APPS​
Here is the stock app and framework files from new firmware I8200NXXUAOA1 for Samsung Galaxy VE (I8200N).It have all apps so and the bloatware.After install you can delete any bloatware you want.Maybe it is safe for all versions!!!
What is Odex and Deodex ROM
What is an ODEX file?
In Android file system, applications come in packages with the extension .apk.
These application packages, or APKs contain certain .odex files whose supposed function is to save space.
These ‘odex’ files are actually collections of parts of an application that are optimized before booting.
Doing so speeds up the boot process, as it preloads part of an application.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
What is an DEODEX file?
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files.
By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
So, Deodexed ROMs (or APKs) have all their application packages put back together in one place,
allowing for easy modification such as theming. Since no pieces of code are coming from any external location,
custom ROMs or APKs are always deodexed to ensure integrity.
all apps are full working and not yet any bugs
Code:
[COLOR="red"][B][U]* I can give ABSOLUTLEY no gurantee!!
All you do with your phone will be on your own.
I'm not responsible if your phone will brick or whatever...[/U][/B][/COLOR]
Code:
[B][COLOR="Red"]Rrequirements :[/COLOR][/B]
[B]Root [URL="http://forum.xda-developers.com/galaxy-s3-mini/general/s-iii-mini-ve-i8200-n-t2826565"]Hot To Root[/URL]
Adb [URL="http://forum.xda-developers.com/showthread.php?t=2588979"]How to Install[/URL]
Phone drivers[/B]
How To Install :
1. download the zip file
2. extract it
3. connect your phone
4. usb debugging on
3. paste the app and framework file into
GT-I8200N\Card folder which you find it on your computer
4 .install adb drivers
5. open cmd and type
Code:
adb shell
[COLOR="red"][I][SIZE="3"](if you are using adb shell in su for the first time,
keep phone screen on.
After entering "su" code, super user request prompt in phone.
Press allow )[/SIZE][/I][/COLOR]
su
stop
mount -o rw,remount /system/ /system/
cp /storage/extSdCard/app/* /system/app/ (wait...)
rm /system/app/*.odex (wait...)
cp /storage/extSdCard/framework/* /system/framework/ (wait...)
rm /system/framework/*.odex (wait...)
mount -o ro,remount /system/ /system/
reboot
How To check if you done
1. open cmd and type
Code:
adb shell
su
cd /system/app
or
cd /system/framework
ls
2. now you see all your system apps.if doesnt exist .odex file and you dont have any errors or bugs your ok
DOWNLOAD:
the file
credits:
@Snoop05 for adb installer
@j.posarekar70 for deodex guide
This work for the version i8200L?
Nice all ok
Test done
SAMSUNG
GALAXY S3 MINI
GT-I8200N
Willian182 said:
This work for the version i8200L?
Click to expand...
Click to collapse
try it i dont know.take a backup first.maybe you have error with nfc you can delete the apk .try it and tell me please
..................
Como lo descargo soy nuevo en esto.
Sent from my GT-I8200N using XDA Free mobile app
Thanks for this apps pack! It saves my phone. Best regards.
download link
download link is broken
Is it possible to unroot the deodexed stock rom?
I got some Apps which refuse to work if they detect a rooted phone...

Categories

Resources