GUIDE Hacking Android
GUIDE Hacking Android
2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Post Reply
1
Subscribe to Thread
11
51
FORUMS
Email Thread
101
Last
Android General
SearchThread
Discussion Q&A
Lens_flare
OP
Thanks: 2,467
[More]
MOST THANKED
ALL-TIME
quirks.
104
Lens_flare OP
96
MENU
bases choice.
is great and
which is Qualcomm S2
Let's assume - just "Base" will mean rom for your device with
ICS/JellyBean, such as Cyanogen Mod or AOKP or AOSP and
means any miui rom you prefer (my preference and advice -
2012-Nov-04 6:43
Notorious
2012-Jul-17 1:17
Lens_flare OP
2012-Jul-17 1:16
Lens_flare OP
2012-Jul-17 4:42
Register Login
Under base I will mean rom which could be used to port miui
Lens_flare OP
63
RECENT
2013-Jul-20 20:40
http://forum.xdadevelopers.com/showthread.php?t=1777999
1/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Bean. That actually means - you couldn't use their miui bases
to port ICS roms(which still under support).
By Emil Kako
specs:
rom with files from your stock rom. For now that case is only
tested on xperia 2011 products (play,live with walkman,ray,
mini, pro, mini pro etc) - arc s [lt18i] miui base and xperia 2012
Copy unpacked base rom (so set of folders) to any folder you
30 Apr 2015
30 Apr 2015
30 Apr 2015
LG G4s Evolution:
Abandoning Trends, or
Starting Them?
30 Apr 2015
app
framework
media
fonts
2/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
http://forum.xdadevelopers.com/showthread.php?t=1777999
3/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
ro.build.id=MIUI
ro.build.display.id=MIUI
ro.build.version.incremental=2.x.x
ro.config.ringtone=MI.ogg
ro.config.notification_sound=FadeIn.ogg
ro.config.alarm_alert=GoodMorning.ogg
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
ro.config.sms_received_sound=
ro.config.sms_delivered_sound=
are filled with ringtones that only base have, soo just change
them as MIUI do have different ringtone set.
Initial port done, in system part,
Updater-script:
set_perm(0,0,06755,"/system/xbin/invokeas");
http://forum.xdadevelopers.com/showthread.php?t=1777999
4/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
set_perm_recursive(0,0,0755,0644,"/system");
set_perm_recursive(0,2000,0755,0755,"/system/bin");
set_perm(0,3003,06755,"/system/bin/ip");
set_perm(0,3003,02750,"/system/bin/netcfg");
set_perm(0,3004,02755,"/system/bin/ping");
set_perm(0,2000,06750,"/system/bin/runas");
set_perm_recursive(1002,1002,0755,0440,"/system/etc/bluetooth");
set_perm(0,0,0755,"/system/etc/bluetooth");
set_perm(1000,1000,0640,"/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002,3002,0444,"/system/etc/bluetooth/blacklist.conf");
set_perm(1002,1002,0440,"/system/etc/dbus.conf");
set_perm(1014,2000,0550,"/system/etc/dhcpcd/dhcpcdrunhooks");
set_perm(0,2000,0550,"/system/etc/init.goldfish.sh");
set_perm_recursive(0,0,0755,0555,"/system/etc/ppp");
set_perm_recursive(0,2000,0755,0644,"/system/vendor");
set_perm_recursive(0,2000,0755,0755,"/system/xbin");
set_perm(0,0,06755,"/system/xbin/librank");
set_perm(0,0,06755,"/system/xbin/procmem");
So line I pointed should be somewhere there, for example:
Code:
set_perm(0,0,06755,"/system/xbin/librank");
set_perm(0,0,06755,"/system/xbin/procmem");
set_perm(0,0,06755,"/system/xbin/procrank");
set_perm(0,0,06755,"/system/xbin/su");
set_perm(0,0,06755,"/system/xbin/invokeas");
symlink("/system/xbin/su","/system/bin/su");
symlink("busybox"[laterbigcodebunchlike"/system/xbin/["etc]
but before
Code:
unmount("/system");
For those who didn't met that rule I prepared next parts http://forum.xdadevelopers.com/showthread.php?t=1777999
5/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
The Following 143 Users Say Thank You to Lens_flare For This Useful Post:
[ View ]
Lens_flare
OP
Thanks: 2,467
Stage 2
That was on ICS, and I will count that in while describing for
those who don't care about miui version and porting
something before MIUI 2.8.10.
you are on Qualcomm but I have to say that all defines of this
stage are nomore device-specific.
Returning to guide:
6/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
developers.com/show....php?t=1511730 or that
http://forum.xda-developers.com/show....php?t=1752201 or
google it to understand common principles of work.
apktoolb[disassembledapkorjarfolderwithout.apkinnameorwith".out"attheend
RIL*.smalimeans:
RIL.smali
RIL$1.smali
framework.jar
http://forum.xdadevelopers.com/showthread.php?t=1777999
7/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
android/os/Power.smali
org/codeaurora/Performance.smali
android/media/MediaRecorder*.smali
android/graphics/Paint.smali
android/os/Environment.smali
android/view/HardwareCanvas.smali
android/net/wifi/WifiNative.smali
Common:
Code:
android/view/Gles20*.smali(notonlycanvasbutallwithgles20atthebeginning)
android/hardware/Camera*.smali
android/server/BluetoothA2dpService*.smali
android/content/res/PackageRedirectionMap*.smali
JellyBean Only:
Code:
android/bluetooth/HeadsetBase*.smali
com/android/internal/app/ActivityTrigger.smali
android/webkit/HTML5*.smali
android/webkit/SelectActionModeCallback
I highlighted those could be common for all chips, not only for
Qualcomm ones.
viewer and all that is using this class WON'T WORK. What was
my solution is to replace Webview*.smali tree, so I met all
dependencies that class may work with.
ICS-only:
It have to be patched
end of ICS-only
8/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
could live in dual life - for your base and for MIUI remained
framework. For start of diff you should have both base and
miui files you want to modify, and a diff tool (in windows -
entries are not present in miui one from base, sometimes you
should be smart enough to mod only part which needed and
nothing more and also sometimes to replace pieces of code
which are actually safe to do so. That's a whole process.
>>
http://minus.com/mbmfprmG4K/
you see those green blocks? Each of them signs a missing part
of code you should add, in Meld it's just about of clicking little
arrow that represents that block. As for windows tools, they
should have something like "add all" and many other things
could do it in a batch way.
do you see ".line 126" and HUGE code block against it? you
may forget about ".line 126" and copy block against it with no
doubt. Note that line numbers etc could change, always check
before doing something.
>>
http://forum.xdadevelopers.com/showthread.php?t=1777999
9/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
To determine which ril class you have, seek for following line
in your build.prop:
Code:
ro.telephony.ril_class=
If you don't have such, mostly it means you are using RIL class
and don't need a patch.
in my case it was:
Code:
ro.telephony.ril_class=LGEQualcommRIL
Others are dervied from RIL and don't have any dependencies
like that. As CM involves more and more devices, to
Code:
publicclassLGEQualcommRILextendsQualcommSharedRILimplementsCommandsInterface
.line136
newinstancev8,Lcom/android/internal/telephony/RIL;
invokedirect{v8,p0,v4,v0},Lcom/android/internal/telephony/RIL;><init>(Landroid/con
http://forum.xdadevelopers.com/showthread.php?t=1777999
10/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
->
Code:
.line136
newinstancev8,Lcom/android/internal/telephony/
invokedirect{v8,p0,v4,v0},Lcom/android/internal/telephony/
it changes a constructor of RIL class to LGEQualcommRIL class.
If my lines incorrect, just type RIL in search in Phonefactory, it
will show you exactly 2 defines with "RIL" involved.
Another case for patching is
android/media/AudioFormat.smali.
Let's try to make the process bit easier with these steps:
first of all, find those fields:
Code:
.fieldprivatemMediaPreloadEnabled
.fieldprivatemWebGLEnabled:Z
they are at the beginning of file, marked as green blocks.
.line91
iputbooleanv2,p0,Landroid/webkit/WebSettingsClassic;>mMediaPreloadEnabled:Z
DON'T EVEN TOUCH THEM! Even if you know what are you
doing - it will fail on boot if you placed that lines in miui file.
interesting place here.. when you will search for webgl from
the beginning, you will hit such block, marked as blue
(incompatible):
Code:
goto/16:goto_1
.endmethod
.methodprivatenativenativeIsWebGLAvailable()Z
11/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
goto:goto_1
and ".end method" after. "You f***n kiddng?" - will you ask..
yeah, pure cheat. Let's fix it up:
paste only:
Code:
.endmethod
.methodprivatenativenativeIsWebGLAvailable()Z
before ".end_method" but after "goto :goto_1", so that full
block will be instantly turned to whie:
Code:
goto:goto_1
.endmethod
.methodprivatenativenativeIsWebGLAvailable()Z
.methodpublicdeclaredsynchronizedisWebGLAvailable()Z
.methodpublicdeclaredsynchronizedsetMediaPreloadEnabled(Z)V
.methodpublicdeclaredsynchronizedsetWebGLEnabled(Z)V
btw, those methods are so-called "setters" - methods in class
that intended to adjust value to class field.
services.jar
http://forum.xdadevelopers.com/showthread.php?t=1777999
12/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
You may also replace usb folder, but actually those who have
MTP(devices with kernel 3.0 or so, that are having new "USB
that's where you should find you first entry (there are 2)
second entry showed there:
http://minus.com/lchMVcHtKe46T
determine where they are and just add them to miui one.
defines will be:
Code:
.methodprivatestaticnativenativeCpuBoost(I)V
-method definition.
Code:
.methodpubliccpuBoost(I)V
13/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
The Following 96 Users Say Thank You to Lens_flare For This Useful Post:
Lens_flare
OP
Thanks: 2,467
[ View ]
Stage 3
dev, so you will most likely know where to find an answer. But
if it is not about you, let me point on some moments could
help.
14/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
common are:
linksystem/bin/shfailed:nosuchfileordirectory
15/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
E/dalvikvm(100):ERROR:couldn'tfindnativemethod
E/dalvikvm(100):Requested:Landroid/view/GLES20Canvas;.nStartTileRendering:(IIIII)V
E/JNIHelp(100):RegisterNativesfailedfor'android/view/GLES20Canvas',aborting
Let's parse that construct to extract parts we will fix.
E/JNIHelp(100):RegisterNativesfailedfor'android/view/GLES20Canvas',aborting
->
Code:
android/view/GLES20Canvas
"com/android/internal" - framework.jar
"com/android/internal/policy/impl/" - android.policy.jar
16/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
folder.
from
Code:
E/dalvikvm(100):Requested:Landroid/view/GLES20Canvas;.nStartTileRendering:(IIIII)V
" android.content.res.Resources$NotFoundException:
Resource ID #XXX"
Example:
Code:
E/AndroidRuntime(3047):***FATALEXCEPTIONINSYSTEMPROCESS:WindowManagerPolicy
E/AndroidRuntime(3047):android.content.res.Resources$NotFoundException:ResourceID#0x3060
E/AndroidRuntime(3047):atandroid.content.res.Resources.getValue(Resources.java:1022)
E/AndroidRuntime(3047):atandroid.content.res.MiuiResources.getValue(MiuiResources.java:56
E/AndroidRuntime(3047):atmiui.util.ResourceMapper.resolveReference(ResourceMapper.java:9)
E/AndroidRuntime(3047):atmiui.util.HapticFeedbackUtil.updateSettings(HapticFeedbackUtil.j
E/AndroidRuntime(3047):atmiui.util.HapticFeedbackUtil$SettingsObserver.observe(HapticFeed
E/AndroidRuntime(3047):atmiui.util.HapticFeedbackUtil.<init>(HapticFeedbackUtil.java:75)
Wrong MIUI base, mostly. Appear when something changed
by previous porter (miui) which affects resources you won't
have, banal link error.
http://forum.xdadevelopers.com/showthread.php?t=1777999
17/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
F/libc(2698):Fatalsignal11(SIGSEGV)at0xdeadbaad(code=1)
I/DEBUG(130):************************************************
I/DEBUG(130):Buildfingerprint:'tmous/htc_doubleshot/doubleshot:4.0.3/IML
74K/275847.101:user/releasekeys'
I/DEBUG(130):pid:2698,tid:2698>>>zygote<<<
I/DEBUG(130):signal11(SIGSEGV),code1(SEGV_MAPERR),faultaddrdeadbaa
d
I/DEBUG(130):r0deadbaadr100000001r2a0000000r300000000
I/DEBUG(130):r400000000r500000027r64086fbfdr700000036
I/DEBUG(130):r840253f04r940233a7e100000904cfp00009062
I/DEBUG(130):ip4028b240spbefcfa60lr401043c1pc40100adccpsr600
00030
yaa.. ENORMOUS code block, build fingerprint, fatal signal and
stack trace.. welcome to hell
One little thing: error is right above that block, don't even try
to parse its contents, ignore it.
WE ALL DIE!!!111
I/ServiceManager(1478):service'media.audio_flinger'died
I/ServiceManager(1478):service'media.player'died
I/ServiceManager(1478):service'media.camera'died
I/ServiceManager(1478):service'media.audio_policy'died
IGNORE them, it's a result of exception right above(no matter
C exception or java one), it's better to see it instead of
posting "WE ALL DIE!!!111"
examples:
Code:
D/dalvikvm(103):DexOpt:BEGIN'framework.jar'(bootstrap=1)
E/dalvikvm(172):Duplicateclassdefinition:'Landroid/media/MediaRecorder;'
E/dalvikvm(172):Troublewithitem2900@offset0x17a86c
E/dalvikvm(172):Crossitemverifyofsectiontype0006failed
E/dalvikvm(172):ERROR:Byteswap+verifyfailed
E/dalvikvm(172):Optimizationfailed
W/dalvikvm(103):DexOpt:END'framework.jar'status=0xff00,processfailed
E/dalvikvm(103):Unabletoextract+optimizeDEXfrom'/system/framework/framework.jar'
Code:
053014:15:15.970:E/NetworkLocationRealOs(2304):noandroidID;can'taccessencryptedcach
053014:15:15.970:E/NetworkLocationRealOs(2304):java.io.IOException:noandroidID;can't
http://forum.xdadevelopers.com/showthread.php?t=1777999
18/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Code:
1012: 070303:28:21.350:E/System(1538):************Failurestartingcoreservice
070303:28:21.350:E/System(1538):java.lang.NullPointerException
070303:28:21.350:E/System(1538):atcom.android.server.pm.PackageManagerService.grantPermi
070303:28:21.350:E/System(1538):atcom.android.server.pm.PackageManagerService.updatePerm
070303:28:21.350:E/System(1538):atcom.android.server.pm.PackageManagerService.<init>(Pac
070303:28:21.350:E/System(1538):atcom.android.server.pm.PackageManagerService.main(Packa
070303:28:21.350:E/System(1538):atcom.android.server.ServerThread.run(SystemServer.java:
070303:28:21.350:I/SystemServer(1538):InputMethodService
070303:28:21.360:W/SystemServer(1538):***********************************************
1021: 070303:28:21.370:A/SystemServer(1538):BOOTFAILUREstartingInputManagerService
1022: 070303:28:21.370:A/SystemServer(1538):java.lang.NullPointerException
1023: 070303:28:21.370:A/SystemServer(1538):atandroid.app.PendingIntent.getBroadcast(P
1024: 070303:28:21.370:A/SystemServer(1538):atcom.android.server.InputMethodManagerSer
1025: 070303:28:21.370:A/SystemServer(1538):atcom.android.server.ServerThread.run(Syst
1026: 070303:28:21.400:E/AndroidRuntime(1538):ErrorreportingWTF
1027: 070303:28:21.400:E/AndroidRuntime(1538):java.lang.NullPointerException
mostly likely is about way assembling framework files. Also
some of them might be just corrupted by accident.
or wrong diff methodology. Or it might be just banal reason no place in system or cache partitions.
English [
https://github.com/CyanogenMod/android_frameworks_base
.
Any log line represents a line of code in source, that one could
search and debug from there (as source is mostly common,
that miui ports possibility proove). Each smali represents a
java source code or its part(- subclass which signed by $),
each java is in frameworks folder on source (mostly
19/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
The Following 63 Users Say Thank You to Lens_flare For This Useful Post:
Lens_flare
OP
Thanks: 2,467
[ View ]
Stage 4
storage/tether/debugging sign)
First of all, little self - check:
apktoolifframeworkres.apk
As old usb gadget needs old mass storage path which was
applicable to gingerbread, we should add that path to
strings.xml.
http://forum.xdadevelopers.com/showthread.php?t=1777999
20/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Code:
<stringname="launchBrowserDefault">LaunchBrowser?</string>
<stringname="SetupCallDefault">AcceptCall?</string>
</resources>
exact line to add at the near end:
Code:
<stringname="config_legacyUmsLunFile">/sys/devices/platform/usb_mass_storage/lun0/file</
<stringname="launchBrowserDefault">LaunchBrowser?</string>
<stringname="SetupCallDefault">AcceptCall?</string>
<stringname="config_legacyUmsLunFile">/sys/devices/platform/usb_mass_storage/lun0/file</
</resources>
Remark:
that case is the only applicable to devices which have old kind
SD card only. Look at the framework-res on your device, it
also might have different LUN file path(actually it is a file,
your device CM devs for more details. And hey, most of these
devices are on new usb gadget, so don't need my guide at all
<<
Remark:
http://forum.xdadevelopers.com/showthread.php?t=1777999
21/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
<<
Make sure you have both base and miui framework-res, then
open both: res/values/public.xml.
Also you need ID-s from both base and miui for following
resources:
Remark:
<publictype="drawable"name="stat_sys_adb"id="0x010804f8"/>
<<
22/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
JellyBean-specific:
UsbDeviceManager.smali also contains necessary switch config_oemUsbModeOverride, also match ID-s with miui
framework and here you go.
[coz if resource of mass storage file not found, you won't get
usb subsystem to work].
To change it, you again need a disassembled frameworkres.apk(don't forget "apktool if") In it navigate to
res/values/arrays.xml.
find the following:
Code:
<stringarrayname="config_tether_usb_regexs">
<stringarrayname="config_tether_usb_regexs">
<item>rndis0</item>
</stringarray>
Look, I highlighted interface name for you! So the only part
<stringarrayname="config_tether_usb_regexs">
<item>usb0</item>
</stringarray>
http://forum.xdadevelopers.com/showthread.php?t=1777999
23/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Interface name could be seen in the same file but in base rom.
By The Way, do you see
Code:
<stringarrayname="config_tether_wifi_regexs">
<item>wl0.1</item>
</stringarray>
right after usb one? That is the interface for wifi
tether,
that you also should change to yours (one your base needed)
and that is it! I saw somewhere following interface variant:
Code:
<stringarrayname="config_tether_wifi_regex[/B]">
<item>tiap//d</item>
</stringarray>
which is for Sony [Ericsson] devices with Texas Instruments
wifi chip, just see yours in base to check this out.
levels,
Code:
<integerarrayname="config_autoBrightnessLevels">
<integerarrayname="config_autoBrightnessLcdBacklightValues">
<integerarrayname="config_autoBrightnessButtonBacklightValues">
<integerarrayname="config_autoBrightnessKeyboardBacklightValues">
MIUI doesn't have autobrightness tweaks so that is the only
way those levels could be applied.
minmal, screen comes black and won't come back until wipe.
<integername="config_screenBrightnessDim">10</integer>
<integername="config_screenBrightnessDim">20</integer>
http://forum.xdadevelopers.com/showthread.php?t=1777999
24/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
<boolname="skip_restoring_network_selection">
<boolname="skip_restoring_network_selection">
<boolname="config_bluetooth_adapter_quick_switch">
change it to "false":
Code:
<boolname="config_bluetooth_adapter_quick_switch">
smali/com/android/internal/policy/impl/PhoneWindowManager.smali
there are three constants, according to the source: 0(0x0) - lid
http://forum.xdadevelopers.com/showthread.php?t=1777999
25/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
const/4v1,0x1
const/4v1,0x0
const/4v1,0x0
->
Code:
const/4v1,0x1
const/4v1,0x1
->
Code:
const/4v1,0x1
Code:
<boolname="config_forceDisableHardwareKeyboard">
->
Code:
<boolname="config_forceDisableHardwareKeyboard">
http://forum.xdadevelopers.com/showthread.php?t=1777999
26/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
<integername="config_lidOpenRotation">90</integer>
<integername="config_lidKeyboardAccessibility">1</integer>
before we start you need to know that all apk are depend on
framework-res resources, so before you start disassembling
them, let's clarify steps: "apktool if" each framework with
resources you have in miui, in stock there are two:
Code:
apktoolifframeworkres.apk
Code:
apktoolifframeworkmiuires.apk
there are 2 ways, one - fully infiltrate that wizard from user's
eye, second - will let you choose a language(useful in
Kill all except "const/4 v1" and "return v1" in it, change const/4
v1 to 0x1 so you will get something like that:
Code:
http://forum.xdadevelopers.com/showthread.php?t=1777999
27/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
.methodprivatedeviceIsProvisioned()Z
.locals3
.prologue
const/4v1,0x1
returnv1
actually, we are just saying to setup wizard that device is
send you to "sim not found" dialog, which then will allow one
to "dismiss" account request.
invokevirtual{v1},Landroid/telephony/TelephonyManager;>getSimState()I
then
Code:
moveresultv1
const/4v2,0x5
some variable now consists of returned value.
const/4v2,0x5
ifnev1,v2,:cond_5
Code:
http://forum.xdadevelopers.com/showthread.php?t=1777999
28/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
invokedirect{p0},Lcom/android/provision/DefaultActivity;>finishSetup()V
ifnev1,v2,:cond_6
<boolname="send_mic_mute_to_AudioManager">
->
Code:
<boolname="send_mic_mute_to_AudioManager">
<boolname="ignore_sim_network_locked_events">
->
Code:
<boolname="ignore_sim_network_locked_events">
Did you know that you may activate LEDs settings? Or maybe
use camera key to trigger some useful functions? If not,
follow the next little tuto.
29/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Code:
<boolname="has_led">false</bool>
->
Code:
<boolname="has_led">true</bool>
As you may got, other hidden settings are also there, I'll just
list them and assume all of them needs just replacement false
to true to make them activated
Multitouch gestures
<boolname="has_multi_touch">false</bool>
MI button
<boolname="has_camera_key">false</bool>
change to "true"
Dock settings
<boolname="has_dock_settings">false</bool>
Trackball settings
<boolname="has_track_ball">false</bool>
30/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
<itemtype="drawable"name="notification_header_bg">#ff000000</item>
Least but hope not last define for that guide, hope it will fill
up with latest and greatest from MIUI devices users and
porters around the world.
Cheers, L_F.
The Following 104 Users Say Thank You to Lens_flare For This Useful Post:
resac
Senior Member
[ View ]
Thanks: 119
milad407
Guest
Thanks: 0
Very detailed and good written tutorial! Thanks and good job!
Duarte777
Thanks: 2,019
Recognized Contributor
Thanks
http://forum.xdadevelopers.com/showthread.php?t=1777999
31/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
The Following User Says Thank You to Duarte777 For This Useful Post:
Lens_flare
OP
Thanks: 2,467
[ View ]
The Following 3 Users Say Thank You to Lens_flare For This Useful Post:
Lens_flare
OP
Thanks: 2,467
[ View ]
The Following 3 Users Say Thank You to Lens_flare For This Useful Post:
raj_k_r
Senior Member
[ View ]
Thanks: 92
to one version, what are the files I need to consider for next
version? I think some files I can just use from the previous
right question. Looks like once I do this I can reuse all the files
for next port
http://forum.xdadevelopers.com/showthread.php?t=1777999
32/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
Post Reply
Page 1 of 282
Subscribe to Thread
11
51
101
Last
Previous Thread
Next Thread
[MOD][4.2+/5.1][BeatsAudio]+[Dolby Digital]+[BraviaEngine3]
Android Software Development
We're Social
XDA Developers was founded by developers, for developers. It is now a
valuable resource for people who want to make the most of their mobile
devices, from customizing the look and feel to adding new functionality.
Are you a developer?
http://forum.xdadevelopers.com/showthread.php?t=1777999
33/34
1.5.2015
[GUIDE][ICS/JB/common]DefinitiveFAQforne|AndroidDevelopmentandHacking|XDAForums
More info
Contact Rules Change Log Suggest Content Privacy Policy XDA App Root Any Device
Copyright xda-developers. Hosted by Leaseweb
-- XDA 2015
Sitemap
http://forum.xdadevelopers.com/showthread.php?t=1777999
34/34