Completely remove WiFi from Android Rom (Including Settings Layout) - android

I am currently working with AOSP Gingerbread and have built a customized rom for Nexus One which excludes WiFi and Camera.
However, WiFi can still be seen in the settings menu.
How do I remove it from the settings layout?
P.S. I want the rom to be 100% free of any modules, drivers or libraries from those two.
I had commented out USE_CAMERA_STUB := false from BoardConfigVendor.mk and replaced all WiFi related defines with BOARD_HAVE_WIFI := false in BoardConfigCommon.mk before compiling.
Is this modification correct or is there a better way to do it?
Thanks.

Ok, I just commented out wifi and wifi settings from wireless_setting.xml and wireless_setting.java to remove them from the settings layout.

If you remove the appropriate drivers then the hardware just wont work.
The next thing is to do is check and decompile your android framework.apk which is situated in the folder "framework" under "system".
So in hierarchy it would be system/framework/framework-res.apk
In this framework you have to both delete the java and xml queries towards the appropriate function, so i.e. wifi.xml and the framework.jar!
Only this is the appropriate way to get rid of those functions for once and for all.

Related

Changing and building parts of CyanogenMod

I have an assignment to take source code of CyanogenMod for certain device, to do some changes (at first, to disable tethering, set custom launcher that my team made, etc...). I managed to get source of CM, rebuilt it and flashed the device with it. I didn't use LineageOS deliberately, since its version is very unstable for this device.
Now, I wish to make some aforementioned adjustments and build ROM with these changes, could someone please point me to the right direction how to achieve it? I couldn't find anything similar to this on the net.
Thanks!
If it's not too late:
you need to find your phone here :
https://wiki.lineageos.org/devices/
and then go to https://wiki.lineageos.org/devices/addison/build
(change addison by your device codeName, which you can find in the "DEVICES" part of this website)
you will find all instructions to build lineageos from sources for your phone, you can then modify these sources to add your custom launcher, disable anything you want...
Cheers

how to remap the keys on a bluetooth gamepad

I have a Bluetooth gamepad that I want to use with my nexus 7 (2013). It worked great out of the box apart from one snag. The right thumbstickbutton is mapped to back.
Thus makes it really difficult to play games like GTA where the right thumbstick is used extensively.
I tried to use multilanguage keymap redefiner from the play store but it requires you press the key you want to remap but when i do so it goes back out of the menu
I loked for resources related to mkr but wasnt able to find anything not even on the listed creator website.
So i took the plunge and rooted my tablet.
I wanted to use tincore key remapper but found the help and support lacking on the wiki.
Found that the keylayout and keychars were the folders where files pertaining to what physical presses on the gamepad were mapped to (keylayout) and what actions those inputs were mapped too.
I mounted system rw and duplicated the generic.kl file (which I found was the one being used by looking at logcat) and was hoping to use this to modify the behaviour of my gamepad I just can't seem to find how to associate my new layout with the gamepad as the only option that is offered in the menu is still default
Looks like I didn't check enough. Did some digging and found this post
http://gustavepate.github.io/blog/20130714/android-keyboard-layout-logitech-tablet-keyboard/
Seems easy to follow will update with my results
if you're on android 5, you need to make SElinux permissive. google around for an app to do this. without that, it wont apply alternate Keylayout files. also make sure your keylayout file has the correct file permissions (just match permissions of all other .kl files in that folder) needless to say this all needs root.
to associate it with the gamepad, you need to get the unique ID of your gamepad. for example, the file for my Ouya controller i did this with is Vendor_2836_Product_0001.kl
if you can get the vendor and product number for your gamepad, then name the file accordingly, and you've got it. you should be able to get this when connecting your device and checking logcat, but a little google-fu will get you an answer as well.

Trying to make uni-process device ... is this possible??? :(

Hy everyone, I'm Korean and a little short on using english so please try to understand if I say things not appropriate.
So, my status is that I have odroid-s.
What I'm trying to do for like month or more is that I want to make android to HelloWorld.
What I want to say is that, on the odroid-s, bootloader part, kernel part is the same but the framework part(which will be android), I'll remove all the android part and replace it with just HelloWorld program. The purpose of this HelloWorld program is to display HelloWorld on the screen.
What I think I discovered is that, as I 'vimdiff' bootlogs between normal bootlog and the one that I removed all the system partition part (which is android system partition part) is that android kernel's init goes on and executes console(/bin/sh), netd(bin/netd), ... and it enables adb and it completes his work.
So my conclusion is, I need to use Linux kernel that is non-modified and modify it for odroid-s, and use that kernel for my HelloWorld program!
What I want to ask is.... Am I doing it right?? T_T
My goal right now is to make HelloWorld come out from this odroid-s device...
Please somebody help me. If anybody don't understand what I wrote plz tell me, I'll fix it.
Thx for reading....
The modifications to the linux kernel are likely to be irrelevant to your goals, so you might as well leave them in place for simplicity.
Your biggest challenge is going to be output - where do you want to send it? If you had one of the devices that has (or can have with the right kernel config) a debug serial port, then it would be really easy to write something triggered by the init script (or even use 'echo' in the script) which outputs your message on that port.
But chances are you want to put something on the screen. This is going to be overwhelmingly more complicated, and perhaps device dependent. The way the android runtime does this for actual apps is going to be way more involved than you probably want to get into.
A more practical approach might be to look at how the boot animation is done. For starters you could just replace it with a static image that says "hello world". Once you can do that, the next step would probably be to find some character generator code. Finally you might want to implement scrolling and other terminal-like features.
As an alternative approach, there are builds of more traditional linuxes for some android devices - debian or ubuntu for example. These may include console implementations capable of displaying on the device screen.
As another idea, if you are flexible about how much of android you would be willing to leave on the device, you could build a version of the android terminal emulator example, modified to be a home screen replacement. You might be able to remove a lot of android components (eventually including the default home screen). Or on a secured device (ie, most consumer devices that haven't been rooted) you could just do the home screen replacement while leaving the actual system unmodified. It wouldn't be secure against users wanting to run other things, but generally the user would interact only with your code.

How to enable/disable 3G/2G in Android SDK

I am just wondering how to enable/disable 3G/2G using the Android SDK and not just intenting to the 3G settings page. Thanks. Also is there a way to do the same thing, but with GPS. Thanks!
There is no exported to the SDK functionality to switch between 2G and 3G. For a given device you could probably figure out the private functionality, but it wouldn't work unless the app was signed with the system key.
You can disable the radios though, by turning on airplane mode.
And you might be able to make a shortcut to open the appropriate settings activity directly, instead of going through a few levels of menus to get there.
If you make your own build, you can presumably add the capability you really want, but that's likely not useful to anyone but yourself.
Edit: further detail - to understand how it works, look at the settings menu code (default version, a given device will differ):
http://android.git.kernel.org/?p=platform/packages/apps/Phone.git;a=blob;f=src/com/android/phone/Settings.java;hb=HEAD
Edit: AOSP is no longer served from kernel.org. A browsable mirror of
the current phone repository is at
https://github.com/android/platform_packages_apps_phone however due to
evolution of code organization there is no longer a Settings.java
there. One might either use git to reconstruct the version above from
this repository, or else try to figure out where the code has migrated
to in current releases.
You would need to find out the implementation specific set of NT_MODE_ constants you wish to toggle between. And you need to be able to write to secure settings, which requires being signed with the system key. Unless it's a custom build, you probably don't have access to that.
You cannot enable or disable any of these from an SDK application.

[android]how can i create customize profile like meeting etc

i m new in android i want to create application that gives option for create new profile (like meeting,outdore etc),manage profile(not location base it's manually)
plz help me
If I understand you correctly, you want to quickly switch between several profiles that change certain settings like Wifi On/Off, mutes all sounds, etc. right?
If that's what you want then your best bet would be to not re-invent the wheel and - depending on what phone you have - to install a custom ROM like CyanogenMOD which already features profile management. This would void your warranty though.
Otherwise, you could possibly achieve this with either an Xposed module (will most likely only work if you have a Nexus device, since it requires a pure "AOSP" version of Android and Root permissions) or the app "Tasker" which also requires Root access.

Categories

Resources