[SCRIPT] OLYEM_U4 1.4.2 Telstra/Bell FULL Deodex -> 1.1 Updated - Atrix 4G Android Development

Hey guys,
I have updated this thread with a script and files for those who are unsure of how to make this work. Its a quick script so don't expect much, reverse engineered to simply de-odex your phone fully.
You must have ADB added to your "Allow" list in Superuser.apk.
WARNING:
This can brick your phone if you do not do things properly. I have tested it on my phone and it worked flawlessly. Once again though, I was on a fresh install of 1.4.2.
INSTRUCTIONS:
-Download files here <-- Updated link
-Extract files to C:\
-Execute SevensDeodex1.1.bat
-Wait a few minutes
-Phone will reboot and take a while to start up
-Done
MANUAL INSTALL:
Navigate to extracted files through CMD or Shell
Type the following commands
adb.exe push 142system.tar.gz /data/local/tmp/
adb push bin/install_script.sh /data/local/tmp/install_script.sh
adb shell
Once in adb type:
su
cd /data/local/tmp
chmod 755 install_script.sh
./install_script.sh
Known issues:
-Photoeditor.apk deleted as de-odexing this was a problem. So what
Updates:
1.1 Updated to fix some issues with the bat file.
1.0 Original release
Special Thanks to: NFHimself for showing me the way

i know that ken was looking for a dump of /system and /data, did you or will you toss one at him seven?
i would, but i was working on some frameworks on 0.37 that i don't really want to leave unfinished

raybond25 said:
i know that ken was looking for a dump of /system and /data, did you or will you toss one at him seven?
i would, but i was working on some frameworks on 0.37 that i don't really want to leave unfinished
Click to expand...
Click to collapse
You want me to upload a framework dump?
Will that help, let me know exactly what you need and I'll try to help.

I found aout about that method too last night, I just deleted the photoeditor apk and odex file and it ran through the app deodex fine. When I tried to copy my framework files though adb shell refused to replace the files, even using the -f force command.

Yes... could someone throw me:
/system/
/data/
I know that's a lot... but that's what I'll need. Thanks guys. PM me if you need a private FTP server to upload it. If not, you can use Dropbox or Hotfile.com (I have a premium account).

http://db.tt/kdUycD1 just dumped that last night..might be a slow downlad though...raybond25 gave me the script for it since I've never done it hope its what you need
Sent from my MB860 using XDA Premium App

that was something that was needed, but after that it needed to be deodexed. I sent snake's dump to NFHimself and he deodexed it.
Deodexed system

raybond25 said:
that was something that was needed, but after that it needed to be deodexed. I sent snake's dump to NFHimself and he deodexed it.
Deodexed system
Click to expand...
Click to collapse
so with a deodex script we can deodex our system and framework?
Sent from my MB860 using XDA Premium App

SN4K3B1T3 said:
so with a deodex script we can deodex our system and framework?
Sent from my MB860 using XDA Premium App
Click to expand...
Click to collapse
i'm not sure how NFH did it, you'd have to ask him about his method but that system has deodexed /app and /framework
i'm not sure if he plans on writing a script that will do this and releasing it or not, that deodex was mainly because kennpenn was looking for it.
but, yes it can be done.

Will upload deodex files now

any special tricks ive tried deodexing at least 4 times and it stops at 91 out of 134...pissed

yeah i got an error at core.odex

I agree there is no sense reinventing the wheel, I used dsixda's htc kitchen to do it, had a working folder for something else, simply replaced app and framework with the files from telstra and ran his script and selected deodex. He has bits in there specific to the Atrix, I noticed that when looking at the scripts to do my own version, didn't bother after since it was already done. No errors, and haven't had a problem in over a month so it's all good, it only needs to be done once per firmware.
My rule of thumb, don't run anything for your $$$ phone if you don't have source or can read the scripts yourself, especially if it hasn't been tested specifically on your phone. Don't be in a rush to execute some file or script unless it's from a family member you really like with lots of money.
Cheers!

NFHimself said:
I agree there is no sense reinventing the wheel, I used dsixda's htc kitchen to do it, had a working folder for something else, simply replaced app and framework with the files from telstra and ran his script and selected deodex. He has bits in there specific to the Atrix, I noticed that when looking at the scripts to do my own version, didn't bother after since it was already done. No errors, and haven't had a problem in over a month so it's all good, it only needs to be done once per firmware.
My rule of thumb, don't run anything for your $$$ phone if you don't have source or can read the scripts yourself, especially if it hasn't been tested specifically on your phone. Don't be in a rush to execute some file or script unless it's from a family member you really like with lots of money.
Cheers!
Click to expand...
Click to collapse
I've updated the OP and thread title.
Now includes a working script to deodex. Very simple and straight forward, no need to use any other tools and this should make it easier for all other users who are new at this.
Thanks for your help sir, you are a king amongst men!

Not a problem.
One thing about the script, Superuser.apk needs to know about the shell having root access, so once you root the phone, do an adb shell su command, accept the prompt from Superuser.apk, and you are good to go. I tossed some stuff into my root.bat (.sh) scripts to launch Superuser.apk and update it's database automatically, bit of a hack but worked the last 20 times I tried it.

NFHimself said:
Not a problem.
One thing about the script, Superuser.apk needs to know about the shell having root access, so once you root the phone, do an adb shell su command, accept the prompt from Superuser.apk, and you are good to go. I tossed some stuff into my root.bat (.sh) scripts to launch Superuser.apk and update it's database automatically, bit of a hack but worked the last 20 times I tried it.
Click to expand...
Click to collapse
ooooooooh you absolutely right.
Since I'm new at making scripts i'm going to simply just update the script so that the user has to put ACCEPT on the phone before running the rest of the commands you know, new vers coming now

I keep getting this error.. I took a screen shot of it.. Any ideas?

nate_benji said:
I keep getting this error.. I took a screen shot of it.. Any ideas?
Click to expand...
Click to collapse
easy. It means you do not have root access allowed with ADB.
If you're phone is not rooted, go to the link in my signature that shows you how to root.
If you have root and you know its working then you must do the following first:
Open up your command prompt - make sure to keep your phone's screen active and unlocked.
Type "adb shell"
Once you have $
type "su"
check your phone's screen, as you will be prompted to allow, or deny access.
Select "Allow"
Now you are set to go, execute the script again.
Let me know of your results

I just tried it on a fresh SBF flash and root, root confirmed working though adb shell. It pushes everything fine, but when it goes to execute the script the cmd window just closes.
EDIT: Managed to get a screen right before it closes. Not sure of the problem because root works in adb and titanium backup.

Open up CMD manually
then navigate to where the bat file is and run it.
Tell me what the output is please.
Also, you said Root is working through ADB.
Then try to do everything manually as such:
adb.exe push 142system.tar.gz /data/local/tmp/
adb push bin/install_script.sh /data/local/tmp/install_script.sh
adb shell
Once in adb type:
su
cd /data/local/tmp
chmod 755 install_script.sh
./install_script.sh
And there you go.

Related

question about removing apps from ROMS: easy way?

hi, i just had an idea and idk if this has been posted before, so if it has been posted, im sorry.
instead of using terminal emulator, is it possible for me to go into the .zip of the ROM and delete the apps i do not want in the /system/app folder? i want to know if it will "screw up" the ROM and make it unflashable in my hero's recovery. it takes me too long to remove all the apps i want in terminal emulator and think it would be faster doing it the way i described.
**if this question sounds extremely stupid, then im sorry, im still somewhat of a noob at all this rooting stuff**
The zip's have to be signed in order to be flashed. You cannot just open them, modify them, rezip and install. Find out how to sign the OS zip and you can modify all you want.
thanks for answering, thats all i wanted to know
make a bat
open note pad and paste this:
Code:
adb remount
adb shell rm system/app/*Stock*
adb shell rm system/app/IM.apk
adb shell rm system/app/*Facebook*
adb shell rm system/app/Flickr.apk
adb shell rm system/app/Sprint_Navigation.apk
adb shell rm system/app/Sprint_NFL.apk
adb shell rm system/app/Sprint_Nscar.apk
adb shell rm system/app/HTCNew.apk
adb shell rm system/app/com.htc.TwitterWidget.apk
adb shell rm system/app/com.htc.FriendStreamWidget.apk
adb shell rm system/app/com.damaged.DConfig.apk
adb shell rm system/app/HtcTwitter.apk
adb shell rm system/app/HtcFacebook.apk
adb shell rm system/app/FriendStream.apk
the add or remove lines accordingly, substitute one apk for another if you want then save as a .bat file (mine is named removeapks.bat) place in the tools folder if you wish, flash a rom once booted run the .bat file and poof theyre gone
alexnaoumi said:
thanks for answering, thats all i wanted to know
Click to expand...
Click to collapse
There's a tool written in Java that makes signing zip's really easy. It's included in a suite of apps called AndroidMod.zip
Once you have it, the syntax to sign the new zip is simple. Just:
java -jar signapk.jar testkey.x509.pem testkey.pk8 Inputfile.zip outputfile.zip
Or you can get "root manager" from market which does a lot including removal of unwanted system apps.
Sent from my HERO200 using XDA App
I think Fresh Pre kitchen does it also.
Titanium backup is what I use. Haven't had any trouble using it.
Moved to Q&A.
alexnaoumi said:
hi, i just had an idea and idk if this has been posted before, so if it has been posted, im sorry.
instead of using terminal emulator, is it possible for me to go into the .zip of the ROM and delete the apps i do not want in the /system/app folder? i want to know if it will "screw up" the ROM and make it unflashable in my hero's recovery. it takes me too long to remove all the apps i want in terminal emulator and think it would be faster doing it the way i described.
**if this question sounds extremely stupid, then im sorry, im still somewhat of a noob at all this rooting stuff**
Click to expand...
Click to collapse
I like Root Manager also because there is a "multi-select" option so you can select all of the files you'd like to delete. For the "/system/app" folder you can mount as "read/write", then delete the files. I then reboot into recovery, wipe the cache and Dalvick cache, and reboot. I've had no issues doing this. It's not so much how you delete, rather than what you delete. The forums here at XDA (as well as others that you can Google) that tell you what apps are safe to delete and which should remain untouched. As long as you don't delete an apk that is critical to ROM, you should be okay.
bombaatomica said:
The zip's have to be signed in order to be flashed. You cannot just open them, modify them, rezip and install. Find out how to sign the OS zip and you can modify all you want.
Click to expand...
Click to collapse
Since this is my first post, and I cannot post links, do a search on "modaco zipsigner". This is the utility I found for re-signing zip files, and it has worked flawlessly for me.

[HOWTO] Delete system apps

There is many of you that asks how to remove this and that preinstallaed apps in different ROM
When a developer put apps in system/app it can not be removed so easy.
But if you have RomManager or fakeflash´s update.zip there is a other way.
I have attached a zip fil that contains a ordinare ROM installation script that only contains delete and copy.
Download file and unzip on your computer and take a look in the folders
data/app
META-INF/com/google/android/update-script
system/app
If your only wish is to remove a systemapp
edit the file update-script (textfile)
and add line with the filename of what you want to remove:
(example)
delete SYSTEM:app/unwanted.apk
delete SYSTEM:app/unwanted.odex
If you want to install some apps put them in system/app for not installable
and data/app for apps that can be removed as usual
rezip folders and install zip with RomManager NO WIPE!!
cm6 azures you will get a error because not same structure for data/app
never mind just select reboot. Delete will work anyway.
Sometimes there will be .so files in system/libs too. They are little more difficult to know which to remove so that demands more knowledge of the app.
Use for instance Astro filemanager or Estrong to look in system/app for correct filename to delete
Script work even if *.odex not exist.
The fact that when you zip folders it will not be signed so file will not work with adb recovery
Googleapps filenames:
CarHomeGoogle.apk, CarHomeLauncher.apk, com.amazon.mp3.apk,
Facebook.apk, GenieWidget.apk, Gmail.apk, GoogleBackupTransport.apk,
GoogleCalendarSyncAdapter.apk, GoogleContactsSyncAdapter.apk,
GoogleFeedback.apk, GoogleGoggles.apk, GooglePartnerSetup.apk, GoogleQuickSearchBox.apk, GoogleServicesFramework.apk, googlevoice.apk,
HtcCopyright.apk, HtcEmailPolicy.apk, HtcSettings.apk, kickback.apk, LatinImeGoogle.apk, LatinImeTutorial.apk, Maps.apk, MarketUpdater.apk, MediaUploader.apk, NetworkLocation.apk, OneTimeInitializer.apk, PassionQuickOffice.apk, SetupWizard.apk, soundback.apk, Street.apk, Talk.apk, talkback.apk, Twitter.apk, Vending.apk, VoiceSearch.apk, YouTube.apk, QuickSearchBox.apk, Provision.apk
Other apps:
ADWLauncher.apk, Gallery3D.apk
but filename may be different depending of ROM
Mainpart must exist for using phone normally
Hope that this help to remove "non-removable" systemapps in future.
/Snakehult
Good guide.
via Legend using XDA-app
Thanks snakehult - great guide and very useful!!
snakehult said:
(example)
delete SYSTEM:app/unwanted.apk
delete SYSTEM:app/unwanted.odex
Click to expand...
Click to collapse
It may be worth explaining how people:
- can find out the name of the app they want to remove;
- how they know whether to add the suffix of *.apk or *.odex, or both;
Thanks again for your efforts!
c_man said:
Thanks snakehult - great guide and very useful!!
It may be worth explaining how people:
- can find out the name of the app they want to remove;
- how they know whether to add the suffix of *.apk or *.odex, or both;
Thanks again for your efforts!
Click to expand...
Click to collapse
Yes you can use some regular filemanager such Astro or Estrongs and look in system/app
Always delete both, script work even if odex file is missing
c_man said:
It may be worth explaining how people:
- can find out the name of the app they want to remove;
- how they know whether to add the suffix of *.apk or *.odex, or both;
Thanks again for your efforts!
Click to expand...
Click to collapse
cool guide!
anyway you have to detect the filename of the apps this way:
enter the recovery mode (in modaco-root-r4: recovery-windows.bat)
now type:
adb shell
mount -t yaffs2 /dev/block/mtdblock3 /system
ls -l /system/app
(this will give you the list of system apps, with space usage)
you have to delete both .apk and .odex files (the latter may not exist)
I use to delete the bigger ringtones too, the list is given by
ls -l /system/media/audio/ringtones
it is safe to delete, after you setup the google accounts (ie after first boot):
HTCSetup*
com.htc.Setup*
Stock*
HtcFoot*
NewsRead*
wow its working......thanks dude........
Uploaded with ImageShack.us
http://android.modaco.com/content/h...apps-from-the-htc-desire-with-adb-in-windows/
Simple guide from MoDaCo
That must be the hardest way to remove apps i guess Have you seen "modaco guide"? All you have to do is reboot your phone in to recovery mode and type 2-3 commands in ADB. Simple as that.
Thanks anyway for your efforts
Many way för same thing
But with a custom-made zipfile you always remove/install favourite apps without adb. And quick modify new ROM install.
Sent from my Legend using XDA App
Hello,
Good guide.
The Legend may be rooted to do this?
I am a newbie.
Thanks.
bobstar_fr said:
Hello,
Good guide.
The Legend may be rooted to do this?
I am a newbie.
Thanks.
Click to expand...
Click to collapse
As I see it, no use to do much in the dev forum without an rooted Phone
hey guys, thanks for bringing this up. i just tried modaco site method and i deleted stock and its widget only. the internal storage shot from 113 mb to 122 mb and ram from 42 to 134 mb !
what else can i delete
Learners Lisence said:
hey guys, thanks for bringing this up. i just tried modaco site method and i deleted stock and its widget only. the internal storage shot from 113 mb to 122 mb and ram from 42 to 134 mb !
what else can i delete
Click to expand...
Click to collapse
Just delete what you will never use and....no regret
thank you cryshop for your expert advise
i tried deleting Innovation.mp3 by this script -
adb-windows shell rm /system/media/audio/ringtones/Innovation.mp3
said file not found even though its listed.
whats my mistake ?
i will try snakehults method also but later.
thanks
im trying to use modaco's method but what is the green recovery menu?
i dont understand i go in fastboot then recovery and then?thank you
edit done im stupid
Learners Lisence said:
thank you cryshop for your expert advise
i tried deleting Innovation.mp3 by this script -
adb-windows shell rm /system/media/audio/ringtones/Innovation.mp3
said file not found even though its listed.
whats my mistake ?
i will try snakehults method also but later.
thanks
Click to expand...
Click to collapse
Hmm, did you forget a slash or a letter in the command? because I tried and I could actually delete it.
@kdma : install ROM Manager from the Market, and there is an option inside the app : Reboot into Recovery (easiest way to get into recovery mod)
I also deleted /system/etc/clock* and saved some space again
(of course I don't need Htc clock widgets)
cryshop said:
Hmm, did you forget a slash or a letter in the command? because I tried and I could actually delete it.
Click to expand...
Click to collapse
cryshop, i was typing in the wrong directory
Ps - snakehults's appfixer is real delight ! smooooth.
except that my winzip is a trial version and legend dont recognize winrar files.
I was wondering how i got such good figures for change in space and ram the first time. i havent since then. my legend just likes the rebooting involved coz i dont use task killers anymore. and maybe i deleted more than just stock the first time
Will this work with android 2.2 on Hero?
Hey I've been looking all over for something like this. I downloaded the zip, added the lines
delete SYSTEM:app/mms.apk
delete SYSTEM:app/mms.odex
delete SYSTEM:app/email.apk
delete SYSTEM:app/email.odex
and rezipped it.
I used Rom Manager and selected install rom from SD card. It rebooted, seemed to execute the zip. But the original email and mms apps are still installed. What am i doing wrong?
kdma said:
im trying to use modaco's method but what is the green recovery menu?
i dont understand i go in fastboot then recovery and then?thank you
edit done im stupid
Click to expand...
Click to collapse
The first thing you should do is download the required zip file from modaco (I'm a new user of xda and is not permitted to post outside links here. You may easily find that post "24/May r4 - HTC Legend rooting guide - Now with 1.31.x" in android.madaco.com)
I think many of us rooted the device followed the instructions of Paul. So that file might be already in your hands.
Fastboot and then recovery, as you have done before. Run Recovery-linux.sh (or Recovery-windows.bat, if you use Windows) in a terminal window - your device shall be at the green recovery screen.
Open another terminal window and enter:
./adb-linux shell mount /system
and then you can push, pull or rm file. For example,
./adb-linux shell rm /system/app/Calculator.apk
./adb-linux push abc.so /system/lib
--
I didn't notice you have already solved the problem, when I compiled this post. It is no longer useful.

ADB help...

OK, I know how to use ADB to reboot and get into download mode on my phone, but I have a kind of emergency. I was attempting to replace a framework-res.apk file on my phone to change the battery icon, and now I am stuck FCing all over the place. So much that I can't put my backed up framework-res.apk file back in /system/framework via Root Explorer like I normally do.
I am connected to my phone, can list directories, but cannot seem to push the framework-res.apk file.
Can someone give me a step by step on how to do this and soon please...
EDIT: I think I got it. I needed to be in Recovery Mode, and then it seemed to copy fine.
While I do have someone's attention (hopefully), how do you change directories if the directory you want to change to is two names, IE 'Battery Mod'?
Demented71 said:
OK, I know how to use ADB to reboot and get into download mode on my phone, but I have a kind of emergency. I was attempting to replace a framework-res.apk file on my phone to change the battery icon, and now I am stuck FCing all over the place. So much that I can't put my backed up framework-res.apk file back in /system/framework via Root Explorer like I normally do.
I am connected to my phone, can list directories, but cannot seem to push the framework-res.apk file.
Can someone give me a step by step on how to do this and soon please...
Click to expand...
Click to collapse
Is your backed up framework on your sdcard? You could try adb shell.
from pc,
adb shell
su
cp XXXX/framework-res.apk system/framework <<<may need to use busybox cp
exit
exit
adb reboot
bobbylx said:
Is your backed up framework on your sdcard? You could try adb shell.
from pc,
adb shell
su
cp XXXX/framework-res.apk system/framework <<<may need to use busybox cp
exit
exit
adb reboot
Click to expand...
Click to collapse
My backed up framework file was on my PC. The first one I was trying to get to was on my phone, in a folder called Battery Mod, which I could not get into because ADB kept saying wrong substitution or something?
Either way, I was able to get it done, so I learned something new again.
EDIT: I think I got it. I needed to be in Recovery Mode, and then it seemed to copy fine.
While I do have someone's attention (hopefully), how do you change directories if the directory you want to change to is two names, IE 'Battery Mod'?
Click to expand...
Click to collapse
That makes sense, it may not let you Push to the file system while it's in use.
As for 2 names, do you mean from a windows command box or in the android command line. Windows you just type it as is. Linux is a little more picky, I usually try to remove spaces from directory names so I don't run into any problems with that. In linux a backslash works, ie, cd /sdcard/Battery\ Mod
Not sure if it will work on our phones.

[GUIDE] System Dump

Just thought I'd share the best way to perform a system dump on your Atrix.
Instructions
Root your device [Help?]
Connect device with ADB
Type commands:
adb shell
su (--> accept root call)
busybox tar czvf /sdcard/systemdump.tgz /system
exit
exit
adb pull /sdcard/systemdump.tgz
Congratulations!
You've now dumped /system into a nice little .tgz file that can be opened up with 7zip, WinRAR, etc.
Thanks
Stock Bell Atrix on Rogers with updated radio, Rooted, deodexed, Honeycomb theme, and frozen!
Thanks.
10 char
Can someone explain what exactly is a system dump. I know its kind of a stupid question, but im trying to learn android as much as possible
mudd_cat23 said:
Can someone explain what exactly is a system dump. I know its kind of a stupid question, but im trying to learn android as much as possible
Click to expand...
Click to collapse
The /system folder on your Android phone contains many of the most important files that make up your phone's software. Inside, you've got all the files that make up the basic applications (not from the Market) as well as your theme framework.
A dump is just a zipped up /system folder that everyone can check out (to create themes, ROMs, and MODs).

[REQ] Hacked exchange email for ATT MX

I did some some searching to no avail. Does anyone have an exchange email apk that is hacked so you don't have to use a PIN? Thanks
I would also like this for the Verizon Moto X.
There's a xposed module " by pass exchange email” but I have no idea if it works
Sent on my Moto X
The xposed bypass doesn't work I have tried it.
sent from my rooted at&t moto x
I know how to crack the Email.apk but only if it has the Classes.dex file in the APK. The one for verizon does not. Is this due to it being odex'd?
corywf said:
I know how to crack the Email.apk but only if it has the Classes.dex file in the APK. The one for verizon does not. Is this due to it being odex'd?
Click to expand...
Click to collapse
Haha. If I could answer that I probably wouldn't have to request the .apk. Hopefully some folks chime in.
thepolishguy said:
Haha. If I could answer that I probably wouldn't have to request the .apk. Hopefully some folks chime in.
Click to expand...
Click to collapse
lol yeah that's what I was hoping too. I'd like to get rid of the pin lock.
You have to deodex the apk. I had to re-install windows and don't really feel like doing anything right now.
Make sure adb is working test using adb devices. If you see a device your good. Also make sure you have Java installed.
Create new dir in your C:\ name it what ever in this case MotoX
Create two more dir's inside the MotoX dir
Framework
Apps
So you should have;
C:\MotoX
C:\MotoX\Framework
C:\MotoX\Apps
run these two commands using adb.
Code:
adb pull /system/framework C:\MotoX\Framework
adb pull /system/apps C:\MotoX\Apps
Download these two files attached.
baksmali.jar
smali.jar
Place them in C:\MotoX so like
C:\MotoX\baksmali.jar
C:\MotoX\smali.jar
In cmd prompt run these commands.
Code:
cd C:\MotoX
baksmali.jar -a 15 -x C:\MotoX\Apps\filename.odex -d C:\MotoX\Framework
This will create a folder called "out" so you will see this
C:\MotoX\out
THIS OUTPUT IS SMALI, YOU CAN MAKE CHANGES BEFORE COMPILING TO DEX.
To make this into a dex you run this in cmd
Code:
cd C:\MotoX
smali.jar out -o classes.dex
Copy C:\MotoX\Apps\filename.apk to C:\MotoX
Open filename.apk with 7-Zip, drag and drop classes.dex into the main dir of the 7zip apk.
You have a deodex apk.
Wow!
amoamare said:
You have to deodex the apk. I had to re-install windows and don't really feel like doing anything right now.
Make sure adb is working test using adb devices. If you see a device your good. Also make sure you have Java installed.
Create new dir in your C:\ name it what ever in this case...
Click to expand...
Click to collapse
Boom goes the dynamite!
corywf said:
I know how to crack the Email.apk but only if it has the Classes.dex file in the APK. The one for verizon does not. Is this due to it being odex'd?
Click to expand...
Click to collapse
@corywf - Will this post help you create the hacked .apk?
amoamare said:
You have to deodex the apk. I had to re-install windows and don't really feel like doing anything right now.
Make sure adb is working test using adb devices. If you see a device your good. Also make sure you have Java installed.
Create new dir in your C:\ name it what ever in this case MotoX...
...You have a deodex apk.
Click to expand...
Click to collapse
thepolishguy said:
@corywf - Will this post help you create the hacked .apk?
Click to expand...
Click to collapse
Also I didn't really spell check any of this so make sure you manually type it out and that your dir references are correct.
amoamare said:
You have to deodex the apk. I had to re-install windows and don't really feel like doing anything right now.
Make sure adb is working test using adb devices. If you see a device your good. Also make sure you have Java installed.
Create new dir in your C:\ name it what ever in this case MotoX
Create two more dir's inside the MotoX dir
Framework
Apps
So you should have;
C:\MotoX
C:\MotoX\Framework
C:\MotoX\Apps
run these two commands using adb.
Code:
adb pull /system/framework C:\MotoX\Framework
adb pull /system/apps C:\MotoX\Apps
Download these two files attached.
baksmali.jar
smali.jar
Place them in C:\MotoX so like
C:\MotoX\baksmali.jar
C:\MotoX\smali.jar
In cmd prompt run these commands.
Code:
cd C:\MotoX
baksmali.jar -a 15 -x C:\MotoX\Apps\filename.odex -d C:\MotoX\Framework
This will create a folder called "out" so you will see this
C:\MotoX\out
THIS OUTPUT IS SMALI, YOU CAN MAKE CHANGES BEFORE COMPILING TO DEX.
To make this into a dex you run this in cmd
Code:
cd C:\MotoX
smali.jar out -o classes.dex
Copy C:\MotoX\Apps\filename.apk to C:\MotoX
Open filename.apk with 7-Zip, drag and drop classes.dex into the main dir of the 7zip apk.
You have a deodex apk.
Click to expand...
Click to collapse
so I have accomplished all of this. I am currently working on the email.apk. there is also the exchange2.apk that i believe will need to be edited as well.
When I edited the email apk a couple of years ago I just went to these lines and returned true and false. These lines check to see if the policies are enabled I believe.
Code:
.method public isActive(Lcom/android/emailcommon/provider/Policy;)Z
.registers 1
.parameter "policy"
.prologue
const/4 v0, 0x1
return v0
.end method
.method public isActiveAdmin()Z
.registers 1
.prologue
const/4 v0, 0x0
return v0
.end method
I then tried to recompile it and i got an error stating that two registers were required for one of the two changes. I haven't looked at which line yet because I know I don't know enough to figure out why it needs to registers. Here is the error.
Code:
c:\MotoX>java -Xmx512M -jar smali.jar out -o classes.dex
out\com\android\email\SecurityPolicy.smali[1659,4] This method requires at least
2 registers, for the method parameters
so this is where i am and this is what im stuck on. Ill attach the entire smali file so anyone that can help can take a look at the entire code. Ill also attach the security admin smali in case that matters.
Ill also begin working on the exchange apk, but this apk didn't exist the last time i did this so I'm not sure what I'm going to do with it. Like I said, Im not good at this stuff I just really want an exchange security bypass for my Moto X.
edit: Verizon Moto X
If your exchange server only checks for pin on setup, try this:
adb shell
sqlite3 /data/system/locksettings.db
update locksettings set value=0 where name='lockscreen.password_type';
.exit
exit
That will set the lock to slide.
thepolishguy said:
I did some some searching to no avail. Does anyone have an exchange email apk that is hacked so you don't have to use a PIN? Thanks
Click to expand...
Click to collapse
There's already an email apk in xda but you must be rooted
Sent from my Nexus 4 using XDA Premium HD app
icase81 said:
If your exchange server only checks for pin on setup, try this:
adb shell
sqlite3 /data/system/locksettings.db
update locksettings set value=0 where name='lockscreen.password_type';
.exit
exit
That will set the lock to slide.
Click to expand...
Click to collapse
Ill try that later in the week when I have more time. I don't have the accounts set-up yet. But that workaround seems like it would still cripple some of the touchless control functionality. Appreciate the help though. It will be better than nothing when I finally decide to install these stupid exchange accounts.
paulo_cv said:
There's already an email apk in xda but you must be rooted
Click to expand...
Click to collapse
which apk's are you talking about? i tried two that I found on xda. The thread had 3 apk variants for 4.1 4.2 and 4,3. I tried the 4.2 and 4.3 apk's but they both crashed immediately on boot.
steps taken:
1.renamed email.apk, email.odex, exchange2.apk, exchange2.dex with ".bk" at the end instead of deleting them so i could undo what i did as easy as possible.
2. moved the new Email.apk and Exchnage2.apk from sd card to system/app
3. chmodd 755 both apk's
4. rebooted
RESULT: got constant failures notifications that exchange server had failed an email had failed. the email app would not open into anything.
link to the apk's I used: http://forum.xda-developers.com/showthread.php?t=1749921
The apk's are located in the zip files so I just pulled them from there.
Sent from my Nexus 4 using XDA Premium HD app
jayboyyyy said:
Ill try that later in the week when I have more time. I don't have the accounts set-up yet. But that workaround seems like it would still cripple some of the touchless control functionality. Appreciate the help though. It will be better than nothing when I finally decide to install these stupid exchange accounts.
Click to expand...
Click to collapse
It should have no affect on the touchless. Essentially, if you have it set to slide lock screen anyway (the default out of the box), you set up your account, set a pin/pattern/password/whatever. Once the account is setup and synching, you can run the above commands, which merely sets the value in the DB back to slide without actually turning off 'pin' in the settings. Apparently, the app only looks at the settings, not in the DB. I had to do this because I work for a certain 3 letter company (Think Watson), and we use Lotus Notes. To use them on a phone, they have ridiculous 8 character password requirements with a 30 second timeout as well as making them device administrators despite it being MY phone. I set it up, run the above commands, and its back to just being how I like it with no password to unlock. Their software thinks I'm in compliance, and I can do my job all the more easily.
icase81 said:
It should have no affect on the touchless. Essentially, if you have it set to slide lock screen anyway (the default out of the box), you set up your account, set a pin/pattern/password/whatever. Once the account is setup and synching, you can run the above commands, which merely sets the value in the DB back to slide without actually turning off 'pin' in the settings. Apparently, the app only looks at the settings, not in the DB. I had to do this because I work for a certain 3 letter company (Think Watson), and we use Lotus Notes. To use them on a phone, they have ridiculous 8 character password requirements with a 30 second timeout as well as making them device administrators despite it being MY phone. I set it up, run the above commands, and its back to just being how I like it with no password to unlock. Their software thinks I'm in compliance, and I can do my job all the more easily.
Click to expand...
Click to collapse
i see what you did there. will work on it right now. I was thinking you were changing the pin lock to just a swipe unlock but the phone would still assume it was a lock (which is why i was thinking touchless controls would still think that it was locked) but the way you explained it makes clears it up. Thanks for the quick response and easy workaround. Ill be needing to ask you for the correct code once 4.3 comes out though...
This is the one I use. You must remove exchange accounts before flashing and download the appropriate one for your android version
http://forum.xda-developers.com/showthread.php?t=1749921
I've been using it for a while with different devices/ROMs
Sent from my Nexus 4 using XDA Premium HD app
paulo_cv said:
This is the one I use. You must remove exchange accounts before flashing and download the appropriate one for your android version
http://forum.xda-developers.com/showthread.php?t=1749921
I've been using it for a while with different devices/ROMs
Sent from my Nexus 4 using XDA Premium HD app
Click to expand...
Click to collapse
yup yup. those are the ones i tried already. Ran the 4.2 variant and the 4.3. I ran the 4.3 because the apk's are named the same as the apk's on our 4.2.2 where as the hacked 4.2 apk's are not the same name. But neither worked anyway so it didn't really matter. They wouldn't even run. It could be because "chmod 755" didn't do the correct permissions??? I didn't go in and check to see what permissions were actually given to the apk's after i moved them from the sd card to the system/app directory and ran chmod 755.
jayboyyyy said:
yup yup. those are the ones i tried already. Ran the 4.2 variant and the 4.3. I ran the 4.3 because the apk's are named the same as the apk's on our 4.2.2 where as the hacked 4.2 apk's are not the same name. But neither worked anyway so it didn't really matter. They wouldn't even run. It could be because "chmod 755" didn't do the correct permissions??? I didn't go in and check to see what permissions were actually given to the apk's after i moved them from the sd card to the system/app directory and ran chmod 755.
Click to expand...
Click to collapse
If you flash them through a custom recovery the installer takes care of the permissions. I've never tried to push them manually so not sure if that works
Sent from my Nexus 4 using XDA Premium HD app

Categories

Resources