This is the line of code I'm working with. I need to change this line by hard coding the device id for testing purposes.
invoke-virtual {v2}, Landroid/telephony/TelephonyManager;->getDeviceId()Ljava/lang/String;
Could anyone please step in in the right direction.
If you need the code leading up to this or even following this line, let me know and I can post more.
Thanks,
Chad
Related
Okay, so we've made changes to CommonUtils.smali, I'm not sure how you did it.
But there are also calls to MAKE/MODEL in MediaPlayerWrapper.smali and HDMIReceiver.
The former checks for Samsung models, the latter checks for HTC models.
You can see them as:
Code:
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
That should be the last of the device specific tests ...
Next step ... root:
Having a read through Gingerbreads DRM framework for clues, but I'm convinced the likely culprit will be in DrmAgentService.smali.
Final step ... ICS:
There are version checks for ICS all over the place, which can be amended ... But BSB really need to add ICS support, as I don't particularly fancy adding it on their behalf.
PS: Currently by Dev environment is refusing to recompile any source, so I'm a little bit hampered as to how much I can debug atm.
As far as I can work out, the calls to make and model in those files are superfluous. It's where they're checking for the kernel or such that's confusing me...
No worries ...
Interestingly ... They seemed to have left a lot of TEST code in ... I'm wondering what would happen if we set it to run as a test version.
Anyway ... VGDRM.smali seem to be the likely place to start to look for the root issue ... Going through it now to see what else it calls.
Error code called VGDRM_STATUS_DEVICE_IS_ROOTED, just can't work out where it's being called...
I believe what happens is that the when the DRM session initiates it posts a load of info like deviceName, username etc and it invariably responds with 0x7f060021 which corresponds with that the device is rooted.
Interestingly ... In SOAPconstants you can set the device to whatever you want, have a gander at HARDCODED_DEVICE_TYPE.
Finding a lot of interesting stuff ... Still no closer to where they're hiding that root check ...
Discovered how they plan to force upgrades ... if you look in Flags.smali there's a URL that pulls a config file from their site. In there, they can force people to upgrade to a specific version.
At the bottom of CommonUtils.smali, you forgot to override getManufacturerName ...
Squiggle said:
At the bottom of CommonUtils.smali, you forgot to override getManufacturerName ...
Click to expand...
Click to collapse
Doesn't seem to affect anything - people with SE phones running stock have had it working.
Sony Ericsson phones? Really?!
Hrm.
This is also confusing in terms of whether they're checking the kernel version, I guess they're not...
I was wondering if they were matching things up with the UserAgent, but there's nothing in there that would state if you're rooted or not.
I can only presume that extra code is downloaded from them that performs a Kernel check ... as I'm buggered if I can see anything in the code that does it.
Threads on BSB forums seem to indicate that Jailbroken iOS devices now experience the same issues ...
Can it help?
I extracted this code from a famous .apk:
.method public isRooting_check()Z
.locals 1
iget-boolean v0, p0, Lit/sky/go/model/Config;->rooting_check:Z
return v0
.end method
If I put
const/4 v1, 0x0
return v1
to fool it it doesn't work.
Is possible that this apk could have more controls regarding the presence of root? thank you
Disclaimer: Perhaps this should be in Development, but I'm below the 10 post threshhold
I'm new to XDA forums posting, have no programming experience(ie:copy/paste script), but have been lurking for some time now reading as much as I can without asking for help, scouring the forums so I can achieve my whims and hopefully help others in the long run when I have more experience. I've succeeded in setting up adb/SDK, decompiling/recompiling apk's, editing 9patch, flashing, signing etc..
My post is in regards to my efforts to change the width of the drawable line used to connect the pattern dots on a security pattern lock screen.
I found these instructions from another site from someone asking the same question, The answer given was:
In com\android\internal\widget\LockPatternView.smali of framework.jar (make sure you decompile with backsmali),
find something that looks like:
Code:
iput v2, p0, Lcom/android/internal/widget/LockPatternView;->mDiameterFactor:F
Above it, you should find something like:
Code:
const/high16 v0, 0x3f00
Change 0x3f00 (or whatever it is) to 0x3dcccccd
Click to expand...
Click to collapse
I Decompiled classes.dex from framework.jar on two roms. Reaper 3.0 (default) and classes.dex from the latest CM9 (which has the thinner drawable line) to try and compare them. Attached are 2 screen shots from within notepad++ One from the Reaper LockPatternView.smali which I modified and tried to recompile. And the other from CM9's LockPatternView.smali left untouched. I tried to draw a comparison.
After editing LockPatternView.smali I saved the file, but am getting recompile errors with either autosmali or by command line.
Code:
C:\AutoSmali_1.0-2>java -Xmx512M -jar smali-1.3.2.jar out/ new-classes.dex
out\com\android\internal\widget\LockPatternView.smali[0,0] 1036831949 cannot fit
into a short
out\com\android\internal\widget\LockPatternView.smali[251,4] mismatched tree nod
e: I_STATEMENT_FORMAT22c_FIELD expecting I_CATCHES
out\com\android\internal\widget\LockPatternView.smali[261,4] mismatched tree nod
e: I_STATEMENT_FORMAT35c_METHOD expecting <UP>
I was wondering if anyone has any experience with this, or has experienced the same error. I have been able to change all the png's and customize the appearance to my hearts content, i only lack the ability to edit that 'connecting line'
I'm just a beginner who's good with Photoshop, but If i can work this out I figure I'll write a tutorial with everything combined.
twiice
Almost a year later comes someone with the exact same issue. The only difference is that I'm a Samsung Y DUOS user.
So, anyways, I was able to compile the file again with no errors.
I've changed this:
Code:
const/high16 v2, 0x3f00
Into this:
Code:
const v2, 0x3dcccccd
If I left it like this:
Code:
const/high16 v2, 0x3dcccccd
I got compile errors.
Nevertheless, I don't think that this is the right way to do this. I was able to flash the new framework.jar onto my phone and it booted ok without errors. The only thing is that I've noticed that the phone gain some LAG while moving around the UI. The LAG is not always present, but it happens with a lot more frequency than before.
So, my question is, what the hell does const/high16 means? Why do I have a compile error if I leave it like that, and why does it get recompiled ok if we remove the /high16?
Can anyone help me?
It most likely means high 16 bits of 32-bit variable.
You're using 32-bit value.
Obviously you can't stick 32-bit value into 16 bits, that's why you're getting compilation errors.
The lag has most likely nothing to do with this, and has to do with the tool version you used for recompilation and/or lack of zipaligning and/or something else caused by the change you did.
Hey guys,
like many people I just hate localizations of software, so I've set my phone to english. However I'd like the Google Maps Navigation instructions to be in my native language German, mainly because German street names spoken by an english voice are just gibberish sounds.
So I tried modding the Maps.apk to force the locale, either for the whole app or just for TTS.
I found this in com.google.android.apps.maps.apk\smali\y.2\ae.smali
Code:
invoke-virtual {v0}, Landroid/speech/tts/TextToSpeech;->getLanguage()Ljava/util/Locale;
move-result-object v0
It seems to be the only reference to any TTS loading in the whole app, so I tried overriding it using
Code:
sget-object v0,Landroid/speech/tts/TextToSpeech;->deu-DEU:Ljava/util/Locale;
where I tried not just "deu-deu" but also "de", "de_de", "de-de", "deu". But they all caused the app to FC as soon as I started the navigation activity.
I also tried adding code like
Code:
sget-object v1,Ljava/util/Locale;->de:Ljava/lang/String;
to occurances of getLanguage() and getCountry() but to the same results.
Maybe someone with some Android programming experience has an idea what needs to be changed where to force a certain voice? Would be great to make this happen.
I'm comparing two APK's after decompiling them.
The code is very much identical apart from when I decompile one there are many lines such as
.line
.prologue
Is there anyway to cut this out as it would help very much when comparing?
Yeah.
Don't include debugging information.
For baksmali just pass the b argument. You'll see it in the binaries documentation.
zeroprobe said:
I'm comparing two APK's after decompiling them.
The code is very much identical apart from when I decompile one there are many lines such as
.line
.prologue
Is there anyway to cut this out as it would help very much when comparing?
Click to expand...
Click to collapse
Search for xda user mudhi then check his signature and goto the "A way to optimize app and framework files" thread in his sig.
It strips out the debugging code like .line .prologue etc and gives more readable code
Or, you could simply enter -b like I said before.
No need to install new software this is easy.
Thanks guys, much appreciated.
Ok, I am a noob and I just do things I do not understand fully.
So this thread is not going to be detail for beginner.
Because other secsettings2.apk of other rom was causing language option in settings to crash so I look into it 2 days ago and decided to port it from scratch. I was very nervous and has little hope of success. But it was paid off because it works.
You need to compare the public.xml of your port and match it to your secsettings2.apk one.
I took s7edge one as a reference for porting. res\values\public.xml
ex s7 edge: <public type="drawable" name="assistant_menu_edit_icon_home" id="0x7f02008c" />
Yours: <public type="drawable" name="assistant_menu_edit_icon_home" id="0x7f020090" />
so example const v2, 0x7f02008c change to const v2, 0x7f020090
Notice the hex used in public.xml is 0x7f and has length of 10. When compare the public.xml one thing you have to becareful is the "type=" sometime the hex may refer to a string or integer. So you cannot just search it's name without checking. Either you are very passionate to compare and change it 1 by 1 or you can ask someone write a tool for you. I found out all the smalis is at here.:
I made my own tool and has no intention to release it, so pm me if you really need it.
smali\com\samsung\android\settings\display
Have fun! Till then I hope Samsung future update made this option for all their phone using higher than 720p as some of us would love to save battery and less heat. Hey Samsung, to be stand out, you can made your Android Os awesome for all range of phone, no point of giving high end phone those features only. People may want to switch to 1+ or xiao mi because of lack of features.
p.s I'm s7 edge user
bye
after few experimenting these are the files maybe useful for reference
https://mega.nz/#!uRMSRRTb!_2bRYVXgvaTnKqySGeVc-i3ox2Xb36iv26pINNCEEM0
Can you help me to port this to my J5 Prime M?? Please
AnonMx said:
Can you help me to port this to my J5 Prime M?? Please
Click to expand...
Click to collapse
what is M ?
doulc said:
what is M ?
Click to expand...
Click to collapse
oooh, the version M, J5 Prime SM-G570M, latin america.