Any Idea for re-odex android.policy.jar? - G2 Q&A, Help & Troubleshooting

I try to re-odex anroid.policy.jar with many thread
http://www.droidevelopers.com/showthread.php?t=12777
http://forum.xda-developers.com/showthread.php?t=2502882
it doesn't work my phone bootloop.any idea?
Code:
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # cp /sdcard/android.policy.jar /system/framework/android.policy.jar
stem/framework/android.policy.jar <
[email protected]:/ # /system/bin/dexopt-wrapper /system/framework/android.policy.jar /system/framework/new_android.policy.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
tem/framework/services.jar:/system/framework/core-junit.jar <
--- BEGIN '/system/framework/android.policy.jar' (bootstrap=0) ---
--- waiting for verify+opt, pid=5223
--- would reduce privs here
--- END '/system/framework/android.policy.jar' (success) ---
[email protected]:/ # cp -f /sdcard/android.policy.jar /system/framework
cp -f /sdcard/android.policy.jar /system/framework
[email protected]:/ # chmod 644 /system/framework/android.policy.odex
chmod 644 /system/framework/android.policy.odex
[email protected]:/ # chmod 644 /system/framework/new_android.policy.odex
chmod 644 /system/framework/new_android.policy.odex
[email protected]:/ # busybox dd if=/system/framework/android.policy.odex of=/system/framework/new_android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
/new_android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc <
20+0 records in
20+0 records out
20 bytes (20B) copied, 0.000691 seconds, 28.3KB/s
[email protected]:/ # cp /system/framework/new_android.policy.odex /system/framework/android.policy.odex
policy.odex /system/framework/android.policy.odex <
[email protected]:/ # chmod 644 /system/framework/android.policy.odex
chmod 644 /system/framework/android.policy.odex
[email protected]:/ # chmod 644 /system/framework/android.policy.jar
chmod 644 /system/framework/android.policy.jar
[email protected]:/ # chown root.root /system/framework/android.policy.odex
chown root.root /system/framework/android.policy.odex
[email protected]:/ # reboot
reboot[

need guide

somboons said:
need guide
Click to expand...
Click to collapse
We all are waiting some guides from devs who have custom roms and know the trick how to build custom stock roms becouse there is something i get bootloops always after using kitchen or any other method

somboons said:
need guide
Click to expand...
Click to collapse
you can try this

XxZombiePikachu said:
you can try this
Click to expand...
Click to collapse
Thank.

When using dexopt-wrapper, you need to include absolutely all files in /system/framework after the path to your old android.policy and your new android.policy. i re-odexed services.jar like this successfully.
Sent from my LG-D802 using XDA Free mobile app

metalboy94 said:
When using dexopt-wrapper, you need to include absolutely all files in /system/framework after the path to your old android.policy and your new android.policy. i re-odexed services.jar like this successfully.
Sent from my LG-D802 using XDA Free mobile app
Click to expand...
Click to collapse
Can you make step by step guide?
Sent from my Nexus 7 using Tapatalk

somboons said:
Can you make step by step guide?
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
Not at home right now and XDA app isnt helpful, but just do ls /system/framework, make a note of all the files, then dexopt-wrapper [currentpath] [newpath] [paths of files you've taken note of]
Sent from my LG-D802 using XDA Free mobile app

Related

[Q] Got root via adb, how do I make it permanent?

Code below works as far as getting root via adb
But after reboot I get following error:
Code:
? su
link_image[1717]: 2977 missing essential tablesCANNOT LINK EXECUTABLE
Do you know what's missing here?
Code:
./adblinux push psneuter /data/local/tmp
./adblinux push su-v3 /data/local/tmp
./adblinux push busybox /data/local/tmp
./adblinux shell chmod +x /data/local/tmp/psneuter
./adblinux shell chmod +x /data/local/tmp/su-v3
./adblinux shell
$ /data/local/tmp/psneuter
# exit
./adblinux shell
# cat /proc/mounts
# mount -o rw,remount -t yaffs2 /dev/stl5 /system
# busybox cp -vaf /data/local/tmp/su-v3 /system/xbin/su
# ls -l /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox chmod 06755 /system/xbin/su
# ls -l /system/xbin/su
# rm /system/bin/su
# busybox ln -s /system/xbin/su /system/bin/su
# ls -l /system/bin/su
# busybox cp -f /data/local/tmp/busybox /system/xbin
# busybox chown 0.2000 /system/xbin/busybox
# busybox chmod 0755 /system/xbin/busybox
# ls -l /system/xbin/busybox
# exit
./adblinux install -r Superuser.apk
./adblinux reboot
Hi,
I am new here, but advanced linux user
I have already done this succesfully on my X10i - thanks 1st working howto on linux OS
Theres propably mistake with these steps:
./adblinux shell chmod +x /data/local/tmp/psneuter
./adblinux shell chmod +x /data/local/tmp/su-v3
In my case these commands left errors. They have to simply mark these binaries as executable. But chmod +x * doesnt work (dont ask why ) - so I marked them as executables (su,psneuter,busybox) in desktop linux os before transfer and it worked.
The next mistake is in the line:
busybox cp -vaf /data/local/tmp/su-v3 /system/xbin/su
Because busybox is not yet in the system path - so you have to type:
# /data/local/tmp/busybox cp -vaf /data/local/tmp/su-v3 /system/xbin/su
Until
# /data/local/busybox cp -f /data/local/tmp/busybox /system/xbin
You can use busybox directly.
chmod +x doesn't work on android, you have to use chmod 777 or 666 or the like to get it to work properly.
Semperverus said:
chmod +x doesn't work on android, you have to use chmod 777 or 666 or the like to get it to work properly.
Click to expand...
Click to collapse
Or do it on linux GUI and mark as executable before transfer to Android device

Need Some Help

So I'm on the Latest official 2.2.1 from Motorola/ATT, but I'm having some issues.
My home button doesn't work at all and I can't get it to work despite my efforts. So I think I just need to do a factory reset and delete everything, I think my rooting and mods to my 2.1 soft ware may have messed everything up. Before I try this, will it delete all my text messages and stuff? or should I back them up with that SMS backup program?
Also, i'm having a hard time rooting it with SuperOneClick, it fails to work completely so does anybody know exactly what commands I need to just root via my terminal?
nevermind I figured it out. Here are the commands if anybody is interested:
./adbmac push psneuter /data/local/tmp
./adbmac push su-v2 /data/local/tmp
./adbmac push busybox /data/local/tmp
./adbmac shell
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter
# exit
$ exit
./adbmac remount
./adbmac shell
# busybox mv /data/local/tmp/su-v2 /system/xbin/su
# busybox chmod 6755 /system/xbin/su
# busybox chown 0.2000 /system/xbin/su
# busybox ln -s /system/xbin/su /system/bin/su
# busybox cp /data/local/tmp/busybox /system/xbin
# busybox chmod 0755 /system/xbin/busybox
# busybox chown 0.2000 /system/xbin/busybox
# exit
$ exit
./adbmac install Superuser.apk
./adbmac reboot
I copied pasted from somewhere else on this site
Have you tried flashing the 2.2 SBF using RSD Lite? I tried that for a different problem and it worked.
Sent from my MB520 using XDA Premium App
Ok I just reflashed it using the stock recovery then I wiped all the data(factory reset). I backed my stuff up first though. I was wrong in my previous post about how to root using terminal. To correctly root you need to follow this guide to the T. http://www.addictivetips.com/mobile/how-to-root-nexus-one-running-android-2-2-1-from-ubuntu-linux/
I just flashed RC2 and it is loading now...

[GUIDE] Root Nexus-S 4.0.3 stock firmware without BL unlock

Thanks to nice Kernel exploid found by zx2c4 http://blog.zx2c4.com/749 and sauriks mempodroid https://github.com/saurik/mempodroid its now very easy to root the nexus-s 4.0.3 firmware without unlooking the BL.
You can just follow this howto http://forum.xda-developers.com/showthread.php?t=1461736 but with this offsets kindly provided by saurik: 0xd7cc 0xad27
If you need a clockworkmod just download rom manager from the market and klick install clock work mod.
have fun
Thanks derpeter, I am looking for the related topic for several days!!!
Will try it later, thanks!!!
thank u dear <3
Worked great! Thanks!
Tested and works. Now running stock OTA rooted ICS.
Checked out the link. Though it stated that it is in the transformer prime thread, the adb commands are still the exact same for nexus s?
Yes the same process works you just have to replace the offsets as it says in the first post.
So the process for the Nexus S would be as follows...
Downloads:
mempodroid
su binary
adb push mempodroid /data/local
adb push su /data/local
adb shell
chmod 777 /data/local/mempodroid
/data/local/mempodroid 0xd7cc 0xad27 sh
** You should now be in a remote shell session with root (indicated by #)
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
** IF you have previously rooted your Android, run the following two commands. They may throw an error that the file a file was not found.
rm /system/bin/su
rm /system/xbin/su
cat /data/local/su > /system/xbin/su
chown 0.0 /system/xbin/su
chmod 06755 /system/xbin/su
rm /data/local/mempodroid
rm /data/local/su
exit
exit
adb reboot
Click to expand...
Click to collapse
Doesn't work for me. And it's annoying. These are the comands. I had done something bad?
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Sergiu>cd C:/
C:\>adb push mempodroid /data/local
adb server is out of date. killing...
* daemon started successfully *
627 KB/s (37273 bytes in 0.058s)
C:\>adb push su /data/local
2426 KB/s (22364 bytes in 0.009s)
C:\>adb shell
[email protected]:/ $ chmod 777 /data/local/mempodroid /data/local/mempodroid 0xd7cc
0xad27 sh
id /data/local/mempodroid 0xd7cc 0xad27 sh <
Unable to chmod 0xd7cc: No such file or directory
10|[email protected]:/ $ chmod 777 /data/local/mempodroid/data/local/mempodroid 0xd7
cc 0xad27 sh
oid/data/local/mempodroid 0xd7cc 0xad27 sh <
Unable to chmod /data/local/mempodroid/data/local/mempodroid: Not a directory
10|[email protected]:/ $ chmod 777 /data/local/mempodroid
/data/local/mempodroid 0xd7cc 0xad27 sh
chmod 777 /data/local/mempodroid
/data/local/mempodroid 0xd7cc 0xad27 sh
[email protected]:/ $ /data/local/mempodroid 0xd7cc 0xad27 sh
[email protected]:/ # mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
[email protected]:/ # cat /data/local/su > /system/xbin/su
cat /data/local/su > /system/xbin/su
[email protected]:/ # chown 0.0 /system/xbin/su
chown 0.0 /system/xbin/su
[email protected]:/ # chmod 06755 /system/xbin/su
chmod 06755 /system/xbin/su
[email protected]:/ # rm /data/local/mempodroid
rm /data/local/mempodroid
[email protected]:/ # rm /data/local/su
rm /data/local/su
[email protected]:/ # exit
exit
[email protected]:/ $ exit
exit
C:\>adb reboot
C:\>
Please help me, I find this metod so f...ing good. I have an i9023, never rooted.
sergiu_s said:
Please help me, I find this metod so f...ing good. I have an i9023, never rooted.
Click to expand...
Click to collapse
I also had trouble following the guide, but then discovered this script, which made the whole process completely automatic.
I'm running stock ICS on i9023.
The script doesn't work for me. I tried it even in Linux. I have stock ics 4.0.3
Sent from my Nexus S using xda premium
Mate u just gain a root. # u log in as root
Sent from my Nexus S using Tapatalk
I saw that, (#), but I don't have root privileges in any application. That's my problem.
Sent from my Nexus S using xda premium
I am not an expert in Android but I think to gain access to app as root would have to go via su app did u try superuser app? I would try it myself but my phone is already rooted via clock mod
Sent from my Nexus S using Tapatalk
I was right mate I just read how to . U haven't got superuser installed obviously. Download from the market and should work.
Sent from my Nexus S using Tapatalk
It worked great guys, thanks to the dev's
I installed superuser and it's works. Thanks guys.
Sent from my Nexus S using xda premium
FYI, this no longer works in 4.0.4. Found out the hard way when I forgot to re-enable the save root option in SuperSU after a nandroid.
The guide works perfectly. I have upgraded my I9020T to 4.0.4 from a AWS 4.0.3 WITHOUT wiping data! Thanks so much!
lethalp1mp said:
FYI, this no longer works in 4.0.4. Found out the hard way when I forgot to re-enable the save root option in SuperSU after a nandroid.
Click to expand...
Click to collapse
ya i did the same thing (didnt run voodoo ota before the 4.0.4 OTA)....looks like google patched this exploit...hope another one comes up so i can root 4.0.4 (without wiping)
nolook said:
ya i did the same thing (didnt run voodoo ota before the 4.0.4 OTA)....looks like google patched this exploit...hope another one comes up so i can root 4.0.4 (without wiping)
Click to expand...
Click to collapse
Yeah i'm also waiting for that!
Sent from my GT-P7300 using XDA

How to uninstall and flash a new SU app?

So now that there's 3 premium super user apps I figured I'd ask what's the proper way to uninstall and install a new one if I wanted to I also figured this would help noobs. The way I would do it is go into file explorer mount my system to R/O and delete the system in system app . then I would flash a new super user through recovery or adb. Now in not sure if anything would be lingering around that would come in conflict with a new SU so hopefully someone can help answer this. Thanks
Sent from my Nexus 4 using Tapatalk 2
Surely the new ZIP package removes/replaces the old one with the new package (assuming they are the same name, of course)?
EddyOS said:
Surely the new ZIP package removes/replaces the old one with the new package (assuming they are the same name, of course)?
Click to expand...
Click to collapse
Well I guess what I mean is going from SuperSu to clockworkmod su
Sent from my Nexus 4 using Tapatalk 2
The ZIP package remove any old versions before flashing the new one so you just flash the package in CWM/TWRP and you should be good to go...
Code:
#!/sbin/sh
# arg 1 is recovery api version, generally 3.
# arg 2 is the pipe fd, to the recovery binary.
# communicate with it using the recovery api.
# arg 3 is the zip file
echo -n -e 'ui_print Installing Superuser...\n' > /proc/self/fd/$2
echo -n -e 'ui_print\n' > /proc/self/fd/$2
cd /tmp
mkdir superuser
cd superuser
unzip -o $3
X86=$(uname -a | grep x86)
if [ ! -z "$X86" ]
then
PLATFORM=x86
else
PLATFORM=armeabi
fi
echo -n -e 'ui_print Installing '$PLATFORM' binaries...\n' > /proc/self/fd/$2
echo -n -e 'ui_print\n' > /proc/self/fd/$2
mount /system
rm -f /system/bin/su
rm -f /system/xbin/su
rm -f /system/app/Superuser.apk
cp $PLATFORM/su /system/bin/su
chown 0:0 /system/bin/su
chmod 6755 /system/bin/su
ln -sf ../bin/su /system/xbin/su
cp Superuser.apk /system/app
umount /system

[guide] how to deodex stock 4.3 firmware

To make this work you must be on stock rooted firmware!!!
I made a quick guide how to root stock 4.3 firmware, and can be found here
I'm not responsible for any damage caused by using this on your phone!!!
Let's start:
1 - you need deodexed app and deodexed framework. download and unzip. will result 2 folders (app & framework) wich must be copied on your phone (int sdcard)
2 - download adb from attach and unzip
3 - enable USB debugging mode (go to settings > about phone > tap on Build Number 7 times, until a message appears saying 'You are now a Developer.') than go to settings > Developer Options and enable USB Debugging Mode
4 - go to adb folder and open a command window (hold shift and right click on mouse button / choose "open command window here")
5 - connect your phone to pc with usb cable
>>> ml6_deodexed_zipaligned_apps_framework
>>> na1_deodexed_zipaligned_apps_framework
Now enter folowing codes:
>>> adb shell
>>> su (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!!!)
>>> stop (touchscreen will not be active until reboot, don't worry!)
>>> mount -o rw,remount /system/ /system/ (mounting system r/w)
>>> cp /sdcard/app/* /system/app/ (copy deodexed system applications) (this will take 3 - 5 min)
>>> rm /system/app/*.odex (remove odex files)
>>> chmod 0644 /system/app/*.apk (this fix permissions in system/app)
>>> cp /sdcard/framework/* /system/framework/ (copy deodexed framework)
>>> rm /system/framework/*.odex (remove odex files)
>>> mount -o ro,remount /system/ /system/ (mounting system r/o)
>>> reboot (your phone will reboot) (this will take a little)
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/app/* /system/app/
rm /system/app/*.odex
chmod 0644 /system/app/*.apk
cp /sdcard/framework/* /system/framework/
rm /system/framework/*.odex
mount -o ro,remount /system/ /system/
reboot
Now you have a deodexed stock rom!!!
do not forget to press thanks
i recommend to remove all knox files from your phone.
to do this you need an application to modify your system files ( i use root explorer )
to remove knox delete this files:
system > app > ContainerAgent.apk / ContainerEventsRelayManager.apk / KLMSAgent.apk / KNOXAgent.apk /
KnoxAttestationAgent.apk / KNOXStore.apk / KNOXStub.apk
system > containers (delete entire folder)
system > etc > secure_storage > com.sec.knox.store (delete entire folder)
reserved...
Well written buddy :good:
I would like to see a "how to zipaligned" the apks also.
robalm said:
Well written buddy :good:
I would like to see a "how to zipaligned" the apks also.
Click to expand...
Click to collapse
attached app are deodexed & zipaligned
Sent from my GT-N7100 using xda app-developers app
Good idea thanks to you
You forgot to add "how to deodex stock 4.3 ML6 firmware"
robalm said:
You forgot to add "how to deodex stock 4.3 ML6 firmware"
Click to expand...
Click to collapse
root the rom and folow instructions.
app & framework are from ML6
Sent from my GT-N7100 using xda app-developers app
cosmyndemeter said:
root the rom and folow instructions.
app & framework are from ML6
Sent from my GT-N7100 using xda app-developers app
Click to expand...
Click to collapse
All worked fine, but i do not like to have old apps and framework on a newer rom version.
robalm said:
All worked fine, but i do not like to have old apps and framework on a newer rom version.
Click to expand...
Click to collapse
explain pls. what rom you have?
cosmyndemeter said:
explain pls. What rom you have?
Click to expand...
Click to collapse
n7100dduena1.
robalm said:
n7100dduena1.
Click to expand...
Click to collapse
uploading na1_deodexed_zipaligned_apps_framework.
download link on #1 post
cosmyndemeter said:
uploading na1_deodexed_zipaligned_apps_framework.
download link on #1 post
Click to expand...
Click to collapse
Thank you for this, I had wondered whether the app & framework were universal. I had not seen it was from the ML6.
Thanks for working on the NA1.
YOSEFE said:
Thank you for this, I had wondered whether the app & framework were universal. I had not seen it was from the ML6.
Click to expand...
Click to collapse
i think app are same, framework can be different
my stock rom flashed is mk9, but is use na1_deodexed_zipaligned_apps_framework without any problem
na1_deodexed_zipaligned_apps_framework uploaded
cosmyndemeter said:
na1_deodexed_zipaligned_apps_framework uploaded
Click to expand...
Click to collapse
Thank you very much.
Going there now.
OP,
can you tell me what is wrong with my phone causing the errors with this?
C:\Users\Me...\Downloads\adb\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # stop
stop
[email protected]:/ # mount -o rw,remount /system/ /system/
mount -o rw,remount /system/ /system/
[email protected]:/ # cp /sdcard/app/* /system/app/
cp /sdcard/app/* /system/app/
[email protected]:/ # rm /system/app/*.odex
rm /system/app/*.odex
rm failed for /system/app/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/app/*
chmod 0644 /system/app/*
Unable to chmod /system/app/mcRegistry: Permission denied
10|[email protected]:/ # cp /sdcard/framework/* /system/framework/
cp /sdcard/framework/* /system/framework/
[email protected]:/ # rm /system/framework/*.odex
rm /system/framework/*.odex
rm failed for /system/framework/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/framework/*
chmod 0644 /system/framework/*
[email protected]:/ # mount -o ro,remount /system/ /system/
mount -o ro,remount /system/ /system/
[email protected]:/ # reboot
reboot
Thanks.
YOSEFE said:
OP,
can you tell me what is wrong with my phone causing the errors with this?
C:\Users\Me...\Downloads\adb\adb>adb shell
[email protected]:/ $ su
su
[email protected]:/ # stop
stop
[email protected]:/ # mount -o rw,remount /system/ /system/
mount -o rw,remount /system/ /system/
[email protected]:/ # cp /sdcard/app/* /system/app/
cp /sdcard/app/* /system/app/
[email protected]:/ # rm /system/app/*.odex
rm /system/app/*.odex
rm failed for /system/app/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/app/*
chmod 0644 /system/app/*
Unable to chmod /system/app/mcRegistry: Permission denied
10|[email protected]:/ # cp /sdcard/framework/* /system/framework/
cp /sdcard/framework/* /system/framework/
[email protected]:/ # rm /system/framework/*.odex
rm /system/framework/*.odex
rm failed for /system/framework/*.odex, No such file or directory
255|[email protected]:/ # chmod 0644 /system/framework/*
chmod 0644 /system/framework/*
[email protected]:/ # mount -o ro,remount /system/ /system/
mount -o ro,remount /system/ /system/
[email protected]:/ # reboot
reboot
Thanks.
Click to expand...
Click to collapse
did you this for stock rooted odexed rom
because it seems this is not stock odexed firmware
cosmyndemeter said:
na1_deodexed_zipaligned_apps_framework uploaded
Click to expand...
Click to collapse
Thanks for this.
I have posted you a question here because of the errors I am getting.
YOSEFE said:
Thanks for this.
I have posted you a question here because of the errors I am getting.
Click to expand...
Click to collapse
and i asked if you are in stock odexed firmware with root...

Categories

Resources