***DEVS ONLY*** Keyboard exploit and more... - Galaxy Note 4 Developer Discussion (Devs., Only)

DO NOT POST IN HERE IF:
You are not experienced
You are not a dev
Making wild suggestions that make no sense
Asking for progress
Asking for ETAs
Posting useless posts
Exploit:
CVE-2015-4640 and CVE-2015-4641
Goal:
Escalate this to root (0) if possible and work around WP (write-protection) or be able to turn off certain WP with the help of this exploit.
Root Status:
Temp Root
Exploit Explanation Link:
https://www.nowsecure.com/blog/2015/06/16/remote-code-execution-as-system-user-on-samsung-phones/
People working on this or helping:
heXacode
tekjester
Current Status of Progress:
Working on receiving the file and modify it afterwards.
To see if your keyboard has been patched or not, open up a terminal on your phone or phone connected to your PC with a terminal on the PC and type this:
ls -l /system/app/SamsungIME*
You should see this (not patched on KK 4.4.4):
-rw-r--r-- 1 0 0 8830744 Sep 16 2014 /system/app/SamsungIME.apk
-rw-r--r-- 1 0 0 4735632 Sep 16 2014 /system/app/SamsungIME.odex
Click to expand...
Click to collapse
***If you have knowledge in this please come forward and offer help so we can see if it's possible to get root (0) with this and finally get permanent root. I will update this periodically when time becomes available. It's slow work and a new ground to breach with a lot to understand to modify it and see what use we can make of it.
This exploit is only being done on KK (KitKat) 4.4.4. Do not ask if it will work on LP (Lollipop) 5.0.1. Do not ask why terminal doesn't match up with mine for 4.4.4 if you're on 5.0.1. I cannot confirm if it was patched for 5.0.1 or later. If this exploit does what we need to do for perm root and such then further testing will be done for 5.0.1 or later. Right now the main focus and all work is going to be done for 4.4.4 ONLY.

WARNING:
Any non-development post will be deleted and the poster infracted 5 points!
This is DEVELOPERS ONLY!!!!
No "Thanks", No "Looks Great!" No "I wanna test!" No "Are we there yet" posts!!!
PERIOD!
When developers need testers they will announce it and you can PM them
If you cannot read these simple instructions as well as the stickies, the developers probably don't want you to test!
Now if you are not contributing directly to the development discussion, then post in your device's General section
There will be no further warnings
Thank you for your cooperation
Friendly Neighborhood Senior-Mod

So I tried starting this from work (I work for the Gov't ), and my ability to share any connection was strictly declined - even with my domain admin access .
I'm going to hit this from the Windows side, so instead of Hostapd and mitmproxy, I'm going to use the built in Windows 8 WiFi hotspot and Fiddler. For any lurkers that want to check this out, here's a beginners guide to MITM with fiddler:
http://www.mehdi-khalili.com/fiddler-in-action/part-1/
Note: This talks about SSL stuff... the keyboard exploit doesn't use SSL, hence why it's a vulnerability! If you have some tech savviness, you can try piecing this together with the link hex posted and see how far you can get.
I have experience with injection, the quest for the team is going to see how much damage we can do running something from the "system user" context!
Also, I'm currently running 5.0.1 OF1 build. I'm going to start here, and progressively roll back to 4.4 to see if/when the exploit was patched

A few updates before I head to bed:
I get an output of:
Code:
-rw-r--r-- 1 root root
for ONLY system/app/SamsungIME.apk
I don't have anything for a .odex
However, great news out of fiddler! The keyboard exploit is STILL unpatched. Check out the attachment below!
I'm not sure if the ODEX file is critical or not to running in system context. Guess I'll find out tomorrow.
Here's what I did to get where I'm at on Windows 8.1. Figured I'd save everyone the headaches.
Download/Install Fiddler
Open an admin command prompt
"ncpa.cpl"
3a. Turn on Internet Connection Sharing for your normal internet connection
"netsh wlan set hostednetwork mode=allow ssid="test" key=testtesttest"
"netsh wlan start hostednetwork"
On your phone, turn on airplane mode, turn wifi back on (no mobile data)
Connect to your new WiFi Network - you'll need special settings because windows can't figure out DHCP without some pretty drastic steps - I assume your hostednetwork IP is 192.168.137.1, if not, adjust accordingly:
7a. Configure Proxy server as manual: Hostname "192.168.137.1" Port "8888"
7b. Switch DHCP to manual: IP Address 192.168.137.2 Gateway: 192.168.137.1 DNS: 8.8.8.8
Back over to Fiddler: This guy explains it better than me
I didn't see a keyboard grab when I rebooted. However, I can get the keyboard to search on the phone by going to Settings > Language and Inputs > Samsung Keyboard > Select Input Langage
Once there, the phone reaches out for a json file with the sha hash and the payload. This is where the whitepaper comes into play and where our experimentation begins!

Quick follow-up. While the packages are still sent unencrypted, running in System UID requires execution from the Dalvik Cache. No Dalvik Cache means no execution Looks like anything we run will be on 4.4

+1 confirmation that the updates are still sent unencrypted on Lollipop. Moving on to verify if directory traversal still works.
tekjester, just a suggestion - achieving code execution on Lollipop might require running dex2oat to get the code in a format that ART would execute.
I'll dig deeper into this soon - here's hoping it can be made to work on Lollipop, reverting to Kitkat and upgrading with Flashfire without tripping Knox would be a... fun weekend project.

Related

[N2E] Knowledge Base

This Thread is outdated!
I will update it soon!
Thanks for your understanding
Hello everybody,
as there is no sub-forum for the new nook simple touch (help to get one),
all information are split on several posts in the nook color forum.
I want to create a central thread which list all the knowledge and work that is already done.
The most solutions are NOT my work!
I will link to the post and add the author,
please thank them for their work.
Basics
Update
There is an update for the nook touch!
(not recommended for now)
Checkout the discussion: Nook STR update 1.0.1
Screen Refresh
To avoid ghosting you can easily refresh the screen by pressing the n button twice (open and close default launcher).
Hidden back "button"
You can easily go back by swiping in the middle of the topbar from right to left.
(You may need this in stock apps / settings, after getting root you get 2 buttons for menu and back on this area)
Hidden Browser
you can access a browser by typing in an url into the searchbox,
but the browser doesn't work well...
liliputing.com nook touch browser (no root)
Backup
Backup/Restore N2E by jocala
Windows HowTo is on the second post
Factory Reset / Recovery
[TOOL] nookRestore { Nook Touch - Factory restore | recovery } by ros87
B&N - nook Support
Rooting:
Please take the time and get a backup of your nook!
nookdevs.com NookTouch Rooting (linux, mac, windows)
JesusFreak of nookdevs make all this possible!
Here you can find his original guide.
TouchNooter (linux, mac, windows)
GabrialDestruir said:
Enables ADB via uRamdisk
Installs su and Superuser.apk
Installs Busybox
Installs Button Savior
Installs Go Launcher
Installs NookColor Tools (To Enable Non-Market Installs)
Installs Gapps (Gmail, Market, Youtube, Others)
Click to expand...
Click to collapse
Root & Setup Script Kit (windows only)
xboxexpert said:
Full Superuser Access
Updates are permanently blocked!
Unknown sources Enabled (install non-Market applications)
adb debugging is active [mostly for developers]
Ability to replace the Authors ****ty pictures
Ability to remap the left buttons to Menu & Back
Market Installed & Working! Login to YouTube with your GMAIL!
Software Included:
AdFree (Block those nasty ad's) [Wi-Fi needed]
Button Savior (Displays Softkeys)
gTab simi Clock (really awesome clock for your desktop)
Kindle (read your Kindle books on Nook, lol) [Wi-Fi needed]
LauncherPro (default launcher instead of Nook base launcher)
Superuser (provides a list of applications that use superuser access)
Click to expand...
Click to collapse
Advanced:
(need root)
adb
WiFi
by default you can only use wifi to connect to your nook!
Please consider that anyone in your network can connect to your nook!
This is a serious security problem!
mycr0ft modified the uRamdisk to disable adb over wifi by default! (not tested)
Code:
adb connect [I]NOOK-IP[/I]
USB
xor_ uploaded a uramdisk with adb usb enabled
and traycold has found drivers for windows (thanks to cceerrtt)
xboxexpert modified the adb usb driver to work with the n2e. (not tested yet!)
[GUIDE] ADB Workshop and Guide for everyone
Remapping Hardware Buttons
n Button
[MOD+APP][11Oct11] Configurable "n", "reading now", "RecentDialog" + Activity Picker!
XorZone said:
Features of mod
* Will return stock android go to home by short press of "n" button and recent apps dialog on long press (Configurable)
* All B&N quicknav buttons configurable, it even loads apps icons (after reboot)
* Reading now" button configurable
* NOTE: Installation of the jars w/o conf will have stock B&N effect + recent apps
Features of application
* Implements Activity Picker, so any app (i.e. Launcher Pro) can use "Shourtcuts" dialog that B&N removed.
* Configuration UI for above mod
* (In future) Configuration UI for page buttons
Click to expand...
Click to collapse
Page-Turn Buttons
The main thread is from xboxexpert,
the user aruangra shows how to map the keys to volume up/down so you can use it for scrolling in some applications
Softbutton
Softbuttons can add little buttons to your user interface which simulate the normal android buttons (Home, Back, etc.),
Button Savior is working very well.
OMGWTF_BBQ modded it for the eInk Display.
Market & gapps
If you have already rooted and want to enable the market by yourself you can use the tutorial on nookdevs from the nook color. GabrialDestruir have tested this and confirmend its working.
Additionally i have written down some steps to activate it by using resources of the touchnooter script.
GabrialDestruir updated his script, i dont know if my tutorial still works
AFTER you get the market working you can
update the market and gapps
or, just update the market.
This will fix the market search too
Language / Locale Settings
If you live outside of the USA and managed to get a nook,
there are a few steps to customize the system to your locale / regional enviroment.
To change the system language and the keyboard you can look here:
customize language
Timezone and 24:00 Clock can be set on the default settings menu
(On first-start-setup you can only choose US-Timezones)
Landscape / Screen Rotation
[APP] Orientation Switch by XorZone
on LauncherPro you have to enable Auto-Rotation (thanks to densets)
AdHoc WiFi
If you want to connect to an AdHoc WiFi you can checkout a fix for the nook color:
[FIX] AdHoc Wifi support on the NC! thanks to markmc87 & jago25_98
Misc:
Wallpapers
OMGWTF_BBQ made some nice wallpapers
The Wallpaper from the Video by OMGWTF_BBQ
Michael.Rose made a pencil sketch of it
Videos
XDA-User OMGWTF_BBQ upload a Nook2 Root Tour on youtube
JesusFreak's proof his working root with Angry Birds on Nook Touch
The Nook Touch has a Web Browser - No Root Required!
Gizmo - Nook Simple Touch Reader
B&N The All-New NOOK Guided Tour
App info
✔ Kindle, Kobo, txtr, Aldiko, Moon+, FBReader
ryanpl write together a list of supported apps
OMGWTF_BBQ Root Tour Video
You can try all other apps for Android 2.1
NOT WORKING:
xda-developers (some threads shows a blank page)
Pulse News (crash after initial screen)
(version from nook color market is working)
Skype (freeze on login screen)
Tricorder (system freeze)
Hardware/Software specs
Icehawk78 posted some system information on request.
stock-kernel:
MystaWright said:
VERSION = 2 | PATCHLEVEL = 66 | SUBLEVEL = 29
(2.6.29-omap1)
Click to expand...
Click to collapse
Links:
New Nook 2 eInk Reader Announced! Available for Preorder
Nook Touch Root Guide is OUT.
[REQUEST] B&N Nook Simple Touch forum
[N2E] Nook 2nd Edition Touch - Root
[N2E] Nook 2nd Edition Touch - Development
[N2E] TouchNooter 1.6.24
[NST] Root/Market & Setup Script Kit
[N2E] Nook Touch - App Support for Hardware Buttons
[N2E] Recovery & Source for Nook Touch
[N2E] Nook Touch n-button mapping
[N2E] modified framework.jar
Backup/Restore N2E
[NC]/[N2E] Warning!
Nook STR update 1.0.1
[APP] Orientation Switch
[MOD+APP][11Oct11] Configurable "n", "reading now", "RecentDialog" + Activity Picker!
[TOOL] nookRestore { Nook Touch - Factory restore | recovery }
[N2E] Nook ADB over USB on linux.
Nook Touch kernel hacking
[FIX] AdHoc Wifi support on the NC!
[Q] [POLL] Do we need NST specific launcher? If Y - how should it look like?
nookdevs.com NookTouch Rooting
ReviewHorizon.com Root Guide
Mike Cane's xBlog - Nook Touch Rooting: June 27th News
IRC: #nookdevs @freenode
B&N All-New NOOK Porduct Website
B&N nook Support
THANKS TO ALL OF YOU!
If i forget something or got something wrong, please feel free to complete this thread!
... reserved ...
First
Sent from my SPH-D700 using XDA App
What's the consensus as to the best launcher to use...
I currently use ADW, which seems to work ok. Biggest complaint is I can't see the text on the settings menus...
I prefer a white backgounnd. So ADW seems to be an only option. I am using ADW EX.
updated the fist post,
thanks to DenisTheMenace for the info about adb usb drivers,
the mod/person who made this stickie,
and again all of you
Xhorder said:
What's the consensus as to the best launcher to use...
I currently use ADW, which seems to work ok. Biggest complaint is I can't see the text on the settings menus...
Click to expand...
Click to collapse
iam using ADW too,
i like it more than Go Launcher or LauncherPro
but when i tried them i recognized some empty settings menus too,
so i dont think its the launcher that shows the settings menus without text...
rev0l said:
so i dont think its the launcher that shows the settings menus without text...
Click to expand...
Click to collapse
It's not without test, the test is white on white background, that's why we don't see anything.
I got pulse to work, I used the pulse from the nook apps shop.
mkenney12 wrote me a pm.
he wants that everybody consider the consequences of using a rooted nook touch.
its definitely a point that everyone has to keep on mind!
rmkenney12 said:
Hi,
I'm not sure who to send this to in the xda-dev
community, but noticed that you were maintaining
the KB articles for the Nook Touch root. I tried
posting to the touchnooter dev thread, but I don't
have the requisite 10 messages, so I couldn't even
thank them.
I've been able to root my N2E with the
touchnooter root: the most recent 1.6.24. I'm
extremely happy with the results, but am having a
major concern that doesn't appear to be getting
proper coverage in that or other roots. (I initially
tried the noogie root with lesser results).
<Rant On>
IE, adb wireless/wifi access.
Nobody seems to be expounding on the fact that
it's an enormous freaking barn-door-size gaping
hole in the security of the N2E(or doing anything
to eliminate it). You yourself mention it in
passing in your KB article, but only give it a single
line.
Essentially, once these things are rooted, they
are -enormously- vulnerable if they are taken out
into the public, either at a Barnes&Noble store,
or at any other hotspot. All it takes is for a hacker
sitting there at that hotspot with a laptop, scanning
all of the IP's in that subnet for IP's that respond
to the adb port, and they can do a simple
#adb install MyFavBotController.apk
or somesuch thing. If adb pukes on them(IE, it's a
non-rooted Nook), then they just keep scanning.
Unless you're sharp and see the notification tab
popping up, you may never notice it. They can
install any freaking thing they want on your Nook.
Evetually you've got hundreds or thousands of
infected Nooks running bots, or some other fun
little thing(s) implanted on them.
Everybody seems to be incredibly happy about how
easy it makes their experimentation, and all of the
root developers seem to be focused on making sure
that adb wireless is enabled, either in the startup
scripting or even in the uRamdisk as with the
touchnooter root.
Sure, you can install the adbWireless app from the
market, and it will turn off adbWireless, but:
a) when you initially run the adbWireless app, it
doesn't even properly report that the adb wifi
function is on. It reports it as off, even though
it's actually still responding to adb connects.
So now you have to remember to turn it on,
and then back off. That does work(for a little
while).
b) it's not permanent with some roots, like the
touchnooter. I disable adb wifi with the
adbWireless app, it's off, and everything is nice
and safe? if I put my N2E through a power
cycle, guess what. It's been turned right back
on again. That's completely whacked.
1) For one thing, as an older person I may
forget to use adbWireless to keep turning
adb wifi off after power-cycles. Over and
over and over again.
2) Even if you remember, there's a window of
access during power-up that's about 30-60
seconds long before you'll be able to run
adbWireless to shut things down. A hacker
could do a lot of damage to your Nook in
that time.
3) I have heard rumors of Nooks turning
turning themselves back on after being
powered off. So now you could be in a
hotspot, your Nook could turn itself on in
your knapsack without you even knowing,
and the hacker sitting there has all the
time in the world to beat on your poor little
Nook.
It's BONEHEADED. adb Wifi should NOT EVER be
automatically turned on by the bootstrap. NEVER.
If developers of these roots want to make it easy for
the users or other devs using them, then simply
bundle the adbWireless application along with
SuperUser, Yahoo, and the other apk's they've
included in their root distro's.
Let the -users- decide when and where it's safe for
them to use adb Wifi. Devels are NOT doing them a
service by forcing adb Wifi on them, or encouraging
them to use it under dangerous circumstances.
</Rant Off>
Sorry, but I have a rooted Nook that I'd like to take
outside the confines of my home. Unfortunately,
I don't dare to now. So yah, I'm feeling cranky :-(
rev0l. -please- pass this on to any developers
you might have contacts with.
Thank you!
= Glucosaurus
Click to expand...
Click to collapse
i dont know if someone can disable the access over adb by default...
may you can use apps like tasker or automate it to disable wifi when your accesspoint is not in range or start the adbwifi app while connecting to a public wifi.
Xhorder said:
What's the consensus as to the best launcher to use...
I currently use ADW, which seems to work ok. Biggest complaint is I can't see the text on the settings menus...
Click to expand...
Click to collapse
I love Zeam.
I think that the best way to avoid the wireless adb security hole would be to enable adb over usb and disable adb wireless if it is possible.
I have read on irc someone (maybe JesusFreke) saying that we just have to do something like modifying adb or doing something else (I don't remember very well)
I'm also trying to find out how to adb with usb. In particular I'm looking to get my N2E to connect to my iPhone running MyWi 4.0. I've read that the nookdevs Ad-Hoc_WiFi wpa_supplicant file for the NC will work with the N2E, but I haven't found a way to connect with USB and I'm too scared to try it over wifi in case it goes wrong and I won't be able to connect with adb over wifi to fix it. Any help would be much appreciated.
Edit :
Managed to get ad-hoc wifi working by pushing the fixed wpa_supplicant.adhocfix file to the /system/bin/ folder with adb over wifi.
Then, I switched the wifi off on the N2E and opened terminal emulator and did the following :
Code:
su
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
mount
cd /system/bin
mv wpa_supplicant wpa_supplicant.old */make backup of original wpa_supplicant file/*
mv wpa_supplicant.adhocfix wpa_supplicant
chmod 755 /system/bin/wpa_supplicant
exit
I am now able to connect to my iPhone's MyWi hotspot.
For security when connecting to a public hotspot, I have installed the ttxapps wifi adb app from the android market and turned off adb over wifi, meaning I can toggle it on only when I wish to connect on my home network.
does anyone have system restore image?
another pm from a user that cant post
J.Harmon said:
I figured out how to get a full factory "re-image" of my nook touch.
I followed the instructions for the nook color here:
Method two: Set the Boot counter to 8 by typing
http://nookdevs.com/Flash_back_to_clean_stock_ROM
I rooted my nook touch using touchnooter. Loaded up the amazon app store and played around for a while. But I found after I rooted the nook that the nook store didn't work any more. So i wanted to get back to factory state. I then installed the wireless adb app. I logged in to my nook using my linux pc and followed the above directions. After the re-image you have to do a data reset by going in and restoring to factory settings in the nook itself.
As soon as I gave the reboot command it started the re-image as seen in this link:
https://lh3.googleusercontent.com/-p...2E_Restore.JPG
I'm sending you this message because I'm a "noob" and can't post in the developer forums. So if you wouldn't mind reposting for the others to use.
Click to expand...
Click to collapse
Was anybody else able to get to "Restoring Factory Image..." dialog?
It happened to me after 20+ resets, I was just searching for bricked N2E solution and kept on pressing the button... I would like to know how to replicate this again
i tried it with the 8 times boot failure method, it brings up the factroy reset screen, but it does not the reall factory reset, root and some other stuff were still n the nook after this "factory reset" don't know..
and don't tried (or even read) the method from the pm...
too busy at the moment :/
Inspired by rmkenney12 (and rev0l), I updated the uRamdisk file from TouchNooter 1.6.24 so that adb over wi-fi does not run at boot.
Disclaimer: Don't try this unless you know how to restore your nook in case it does not work.
To install the new uRamdisk:
Unzip the attached file somewhere, then...
Code:
adb connect <nook>
adb shell mkdir /cache/boot
adb shell mount -o rw -t vfat /dev/block/mmcblk0p1 /cache/boot
adb push <path>/uRamdisk /cache/boot
adb reboot
Cross your fingers and hope it works.
You will also want to download an app to turn adb on and off. Search market for 'wifi adb'.
P.S. Does anyone know specifically what needs to be changed in the uRamdisk to enable adb over usb?
This guide isn't working for me. It says that after you create a noogie sd card, just pop it in, start the nook and it will mount the 7 partitions....
What 7 partitions? They never show for me. When I start the nook with the card inside it mounts the "boot" partition which is 64.8 out of 74.7 megabytes.
That's it. That's all I see. Inside of this partition are the files that were contained in the noogie image.
ibex333 said:
This guide isn't working for me. It says that after you create a noogie sd card, just pop it in, start the nook and it will mount the 7 partitions....
What 7 partitions? They never show for me. When I start the nook with the card inside it mounts the "boot" partition which is 64.8 out of 74.7 megabytes.
That's it. That's all I see. Inside of this partition are the files that were contained in the noogie image.
Click to expand...
Click to collapse
wrong thread?
which guide do you mean?
anyway, i don't know if windows can recognize all partitions...
download a live cd linux and try again
Ok... This is on windows 7. I dont know how to use Linux.
I am trying to root the Nook STR and using the guide provided here. It just gets stuck at the rooted forever screen, and the rest is as described in previous post.

Wifi doesn't work anymore, for no reason

[I didn't realize there is this HTC Desire specific subforum, so I'm copypasting my question from General Q&A forum].
I've been running Miui happily for over a year on my HTC Desire, just to notice last week that wifi works only right after power-up (not reboot!) and until switched off. After that, it won't start again. I've tried different things, roms, clean installs, just to confirm the same behaviour, regardless of the rom installed. Detailed explanation is available here:
[EDIT: Being a new member, I'm not allowed to post links. So here it is, 'unlinked': http is.gd slash pZ1TDo ]
(includes logs and everything).
Please help, what to do next?
Thanks,
MB
When you have the error, open a terminal and type dmesg.
Please paste the output here.
You can redirect the output by typing "dmesg > /sdcard/file.txt" ( Without quotes )
dqb said:
When you have the error, open a terminal and type dmesg.
Please paste the output here.
You can redirect the output by typing "dmesg > /sdcard/file.txt" ( Without quotes )
Click to expand...
Click to collapse
Hello, thanks for reply.
Here's the output (too big for copypaste here):
http ge.tt (slash) 3nqEYdF/v/0?c
Sorry, still not allowed to paste links.
The bcm4329 module seems ok.
Sometimes when i use the widget to power on/off wifi, it won't connect.
To get wifi working, I go into wifi settings and power on the wifi here.
Could you try like this and tell us if this working ?
dqb said:
The bcm4329 module seems ok.
Sometimes when i use the widget to power on/off wifi, it won't connect.
To get wifi working, I go into wifi settings and power on the wifi here.
Could you try like this and tell us if this working ?
Click to expand...
Click to collapse
I tried all of the combinations - settings/wireless, status bar, specific widgets - nothing works. At least I have consistent behaviour
This is my original post on miui forum (when I thougt it was miui related). It explains what actions I performed while trying to nail the problem. Still no luck.
Code:
Hello,
Recently I've noticed that wifi on my HTC Desire is acting very strangely - it connects just the first time after reboot, every other time I get "Error" message in Wifi settings. Where I can check what actually went wrong?
After looking in the logs, I hope to have more information on this issue, but for now I believe it's hardware related, since the same problem appears even with the fresh install of the latest MIUI or after restoring a backup.
Thanks.
mblenton, Monday at 9:59 PM Edit Report
#1 Reply
Google Adsense
Pele
Admin
Message Count:
278
You can use the MIUI Android Logcat miuiandroid.com / community/link-forums/logcat.82/
Or you could try a fresh download install again : reboot into cwm, factory reset > wipe dalvik > clear cache partition install rom
But try the logcat and also check you router etc and other things that may influence.
Regards
If you require more help speak to ibotpeaches as he is a HTC expert : join the miui irc chat :)
MIUI Android Logcat System
MIUI Android Statistics
...Im all about the end user
Samsung Galaxy S I9000 & I9100 Expert
Black Android Theme Developer Website & Twitter
Pele, Monday at 11:34 PM Report
#2 Like Reply
mblenton
Members
Message Count:
7
Hello Pele,
Thanks for the reply.
I've tried already clean install with wiping everything, even restored an old bkp which for sure is correct, but all without luck. I don't think it's a router thing, since the same problem appears regardless of my location (at home, at work... all the same). I'll join the miui irc chat, good idea, thanks!
Regarding the logcat - the link you sent is just a form for pasting logs - am I seeing it correctly?. Is there some specific miui logcal app? I've installed 'aLogcat' which seems good, but I couldn't find anything on *wifi* or *wpa* which could indicate some sort of error in any of the logs aLogcat is displaying.
Cheers,
mblenton
mblenton, Tuesday at 9:30 AM Edit Report
#3 Reply
Pele
Admin
Message Count:
278
Hi,
Try to restore your back up without wifi settings. Failing that yes come to irc chat for about 12pm GMT+0 and chat with ibotpeaches
Regards
MIUI Android Logcat System
MIUI Android Statistics
...Im all about the end user
Samsung Galaxy S I9000 & I9100 Expert
Black Android Theme Developer Website & Twitter
Pele, Tuesday at 10:31 AM Report
#4 Like Reply
mblenton
Members
Message Count:
7
Hello Pele,
I've tried several combinations of rom/backup flashing, titanium backup restore etc. but the problem persists, even on a clean installation with just one accesspoint defined.
mblenton, Tuesday at 3:09 PM Edit Report
#5 Reply
mblenton
Members
Message Count:
7
Update: I've updated to the newest radio, but the problems are still there.
mblenton, Tuesday at 3:51 PM Edit Report
#6 Reply
iBotPeaches
Admin
Message Count:
569
Yes, you need a logcat to further figure this out.
developer.android.com / guide/developing/tools/logcat.html
Freenode #miuiandroid
iBotPeaches, Tuesday at 6:51 PM Report
#7 Like Reply
mblenton
Members
Message Count:
7
Hello iBotPeaches, thanks for the link, I didn't realize Pele's refering to that logcat. I'll have to set up abd, though.
In the mean time, I've tried the following (plus the actions described earlier):
- Format system and boot partitions (since Wipe Data/Factory Reset doesn't do that) and clean latest miui install
- Clean Cyanogenmod install
Nothing's changed, I still can connect to wifi network the first time after power up, and then all I get is 'Error' msg. Interesting, but reboot doesn't actually help, just power off/power on.
mblenton, Tuesday at 9:04 PM Edit Report
#8 Reply
mblenton
Members
Message Count:
7
Hello again,
I've installed adb and used logcat to generate this file: ge.tt /9UkgUaF/v/0?c
I'm not quite sure what would be interesting for debugging purposes, so I performed the following procedure:
0. Wifi is enabled, but not working; power down the device; start adb logcat - waiting for device -
1. Power on (wifi will be enabled and connected to SSID Hotspot)
2. Open browser, open google (everything works)
3. Close browser, turn off wifi (via status bar, but it doesn't make any difference)
4. Open settings, try to turn on wifi
5. Wifi couldn't be turned on, 'Error' message is displayed
6. Power down the phone
Thanks in advance!
mblenton, Yesterday at 10:36 AM Edit Report
#9 Reply
mblenton
Members
Message Count:
7
Yet another update, not I'm pretty sure this issue is not miui related.
I've installed Gingerbread RUU and performed the power-on/wifi-on--works/wifi-off--won't-start-anymore procedure with the same results. Here are the logs: ge.tt /9sOVXbF/v/0?c
Where I should look for help?
Ok, after you got the error, go in a terminal and type lsmod ( list loaded modules )
If you see the bcm4329 loaded ( wifi module ), go in a terminal and type modprobe -r bcm4329 ( unload module )
Verify with lsmod if the module is unload.
After that, try to activate the wifi in settings/wireless. Twice if the first gives you an error, it should "unload" the first time, and the second time it should load.
I just tested by inducing an error.
Tell us is this work !
Hello again,
I've tried what you suggested, and this is the result:
Issuing lsmod while wireless is OK:
bcm4329 200131 0 - Live 0xbf000000
After turning off wireless, lsmod doesn't display anything.
After trying to turn wireless back on, lsmod also doesn't display anything, regardless of the times I tried to turn wireless on (and getting Error every time is Settings)
modprobe bcm4329 returns
modprobe: 'bcm4329.ko': invalid parameter
insmod bcm4329 or bcm4329.ko says it can't open bcm4329 (.ko)
So, the linux system under the android seems to be working ok.
Hi,
Ok, after power off/on wifi, the driver doesn't load :/
With some tests and by inducing an error, it works on my side
When you have the error, try this as root :
Code:
su
lsmod ( if bcm4329 is loaded then rmmod bcm4329 )
svc wifi enable ( it's to turn on wifi manually, I waited a few seconds, and everything was properly unloaded ! And wifi off.. idk why )
svc wifi enable ( if the first time it didn't work, it worked for me, it might work for you )
svc wifi disable
but I've intentionally caused an error, not you. And i think that svc is the same as widget/settings..
BTW, for insmod you need to give the full path of the module : /system/lib/modules/bcm4329.ko and the fw path, but it will not work like that you need to set/config interface etc.. I'll try to do it manually.
I just looked quickly one of your old logcat because i'm tired and i'm going to sleep, I'll look more in detail this night if we can find the most important thing : what causes this problem.
dqb said:
Hi,
Ok, after power off/on wifi, the driver doesn't load :/
With some tests and by inducing an error, it works on my side
When you have the error, try this as root :
Code:
su
lsmod ( if bcm4329 is loaded then rmmod bcm4329 )
svc wifi enable ( it's to turn on wifi manually, I waited a few seconds, and everything was properly unloaded ! And wifi off.. idk why )
svc wifi enable ( if the first time it didn't work, it worked for me, it might work for you )
svc wifi disable
but I've intentionally caused an error, not you. And i think that svc is the same as widget/settings..
BTW, for insmod you need to give the full path of the module : /system/lib/modules/bcm4329.ko and the fw path, but it will not work like that you need to set/config interface etc.. I'll try to do it manually.
I just looked quickly one of your old logcat because i'm tired and i'm going to sleep, I'll look more in detail this night if we can find the most important thing : what causes this problem.
Click to expand...
Click to collapse
Hello,
Thank you for attepts to help me, unfortunatelly none of your advices haven't succeeded to turn on wifi once it was turned off. I don't know what to do next. I actually keep it turned on all the time, and it works OK. Not quite happy with that
Hi mblenton,
Ok
I just found how to really turn on the wifi manually.
First, in a root terminal run : getprop wifi.interface, I have eth0, if you have another interface, replace the following by yours.
After error, make sure your eth0 interface is down by running in a root terminal "netcfg" you'll not find eth0 interface, or "ifconfig eth0" must return " eth0: No such device " same for "iwconfig eth0".
If eth0 is up, run as root : "ifconfig eth0 down" and retry to turn on wifi as usual.. maybe it will work.
If not, make sure bcm4329 module isn't loaded ( lsmod ), make sure eth0 is down and try this :
Code:
su
modprobe bcm4329 firmware_path=/system/vendor/firmware/fw_bcm4329_apsta.bin
start wpa_supplicant
dhcpcd -BKL eth0 &
If "modprobe bcm4329 firmware_path=/system/vendor/firmware/fw_bcm4329_apsta.bin" return you an error, try this :
Code:
insmod /system/lib/modules/bcm4329.ko firmware_path=/system/vendor/firmware/fw_bcm4329_apsta.bin
But it's better to load a module with modprobe.
What the commands do :
1) Be root
2) Is for loading module and firmware properly
3) Start wpa_supplicant as service with right user, and load your wireless config
4) Run dhcpcd on background for getting an ip by dhcp ( which implies not have configured the ip manually )
If the wireless icon is not activated in notification bar, it's normal.
ping -c2 google.com or open a browser and try a google search, it worked for me..
If it work for you, cool, we can make a bash script to get the wifi works temporarily, the time to found the cause of the malfunction !
A guy that I helped had a problem with bluetooth, it was a permission problem.. he found a fix :
Daiksi said:
with rom manager i did fix permission and IT WORKED!!!!!!!!YATTA!!!
Click to expand...
Click to collapse
Try that, it can only do good things !
Hello,
I've tried what you suggested, including permission fixing, and the situation remained the same. I'm surprized there's nothing in the logs, though.
Thank you once more.

[Q] Another 4.3 Wifi Tether TrevE problem thread

I typed this in a previous thread, but I don't know how often previous threads are read. Sorry for the repeat if that is a faux paus in this forum.
Similarily to a previous poster, when I updated to 4.3, my wifi tether trevE no longer works. Whatever is keeping it from working is preventing my wife's s4, both are rooted (obviously), they both have the same message. When I try to start tethering the reply message is " tether started with problems, please Check logs"
when I go to the logs, it tells me the file doesn't exist. I think this is my main problem.
When looking up the proper settings, enable mss Clamping was # 10 on the list, but there wasn't a setting for mss clamping.
I have attached a picture that has four pics with each individual problem that appears. My experience amounts to being able to root and that is pretty much it. I don't know what else would cause these problems in both a note 2 and S4.
Does anyone know what the problem is and what I can do to fix trevE? Are there new settings or do I have to download an older version...? Thanks in advanced.
Aronmorg said:
I typed this in a previous thread, but I don't know how often previous threads are read. Sorry for the repeat if that is a faux paus in this forum.
Similarily to a previous poster, when I updated to 4.3, my wifi tether trevE no longer works. Whatever is keeping it from working is preventing my wife's s4, both are rooted (obviously), they both have the same message. When I try to start tethering the reply message is " tether started with problems, please Check logs"
when I go to the logs, it tells me the file doesn't exist. I think this is my main problem.
When looking up the proper settings, enable mss Clamping was # 10 on the list, but there wasn't a setting for mss clamping.
I have attached a picture that has four pics with each individual problem that appears. My experience amounts to being able to root and that is pretty much it. I don't know what else would cause these problems in both a note 2 and S4.
Does anyone know what the problem is and what I can do to fix trevE? Are there new settings or do I have to download an older version...? Thanks in advanced.
Click to expand...
Click to collapse
load up connectbot and ssh to your localhost.
$ su -
permit root access through whatever app you use
# cd /data/data/com.googlecode.android.wifi.tether/var
# chmod 766 tether.log
That is as far as I have gotten. That lets you view the errors in the app (which are many).
Loading WiFi driver (cmd) - failed
Stopping AP - failed
Stopping WiFi interface - failed
Reloading firmware - failed
Starting AP interface - failed
Configuring AP - failed
Starting AP - failed
Configuring Ip-address - failed
Enabling Routing Fix - failed
Enabling NAT rules - failed
Enabling MSS clamping - failed
Enabling IP forwarding - done
Tethering now running - done
I will play more with it tomorrow to try to figure out why things are failing. I am leaning toward permissions issues as it seems that permissions were at the center of the log problem.
Aronmorg said:
I typed this in a previous thread, but I don't know how often previous threads are read. Sorry for the repeat if that is a faux paus in this forum.
Similarily to a previous poster, when I updated to 4.3, my wifi tether trevE no longer works. Whatever is keeping it from working is preventing my wife's s4, both are rooted (obviously), they both have the same message. When I try to start tethering the reply message is " tether started with problems, please Check logs"
when I go to the logs, it tells me the file doesn't exist. I think this is my main problem.
When looking up the proper settings, enable mss Clamping was # 10 on the list, but there wasn't a setting for mss clamping.
I have attached a picture that has four pics with each individual problem that appears. My experience amounts to being able to root and that is pretty much it. I don't know what else would cause these problems in both a note 2 and S4.
Does anyone know what the problem is and what I can do to fix trevE? Are there new settings or do I have to download an older version...? Thanks in advanced.
Click to expand...
Click to collapse
Are you running a fully stock rooted rom? Are you running one built by Platt or Lorjay?
If stock I would go to recovery and flash one of the hotspot hack zips around the forums.
If you are on Platt or Lorjay then it is built-in and you can just use the native hotspot.
atombombzero said:
load up connectbot and ssh to your localhost.
$ su -
permit root access through whatever app you use
# cd /data/data/com.googlecode.android.wifi.tether/var
# chmod 766 tether.log
That is as far as I have gotten. That lets you view the errors in the app (which are many).
Loading WiFi driver (cmd) - failed
Stopping AP - failed
Stopping WiFi interface - failed
Reloading firmware - failed
Starting AP interface - failed
Configuring AP - failed
Starting AP - failed
Configuring Ip-address - failed
Enabling Routing Fix - failed
Enabling NAT rules - failed
Enabling MSS clamping - failed
Enabling IP forwarding - done
Tethering now running - done
I will play more with it tomorrow to try to figure out why things are failing. I am leaning toward permissions issues as it seems that permissions were at the center of the log problem.
Click to expand...
Click to collapse
Thanks for the response, truthfully I've never done connectbot and ssh. But it'd be fun to learn, I'll try to learn over the holidays, but I wouldn't understand what's wrong with the app. I'm not a developer. Is there a webinar that explains the basics of understanding apps so that I could learn?
I'm wondering if the developer knows of these issues.
bhint15 said:
Are you running a fully stock rooted rom? Are you running one built by Platt or Lorjay?
If stock I would go to recovery and flash one of the hotspot hack zips around the forums.
If you are on Platt or Lorjay then it is built-in and you can just use the native hotspot.
Click to expand...
Click to collapse
I am running a rooted stock with a stock recovery. In installing the hotspot hack zip, does this require TWRP or CWM recovery??
Aronmorg said:
Thanks for the response, truthfully I've never done connectbot and ssh. But it'd be fun to learn, I'll try to learn over the holidays, but I wouldn't understand what's wrong with the app. I'm not a developer. Is there a webinar that explains the basics of understanding apps so that I could learn?
I'm wondering if the developer knows of these issues.
Click to expand...
Click to collapse
I am just a UNIX admin so I know enough to be dangerous. I am no dev.
bhint15 said:
Are you running a fully stock rooted rom? Are you running one built by Platt or Lorjay?
If stock I would go to recovery and flash one of the hotspot hack zips around the forums.
If you are on Platt or Lorjay then it is built-in and you can just use the native hotspot.
Click to expand...
Click to collapse
Also, I can't find the hack of which you speak. I scoured the forums today and found nothing.
I'm running synergy 4.3 rom and native hotspot works no problem. .
I just got my wife's s4 to use the native hotspot by downloading the service.odex and .jar with stock rom. I don't know if something like that is available with the note 2. I see that someone using the synergy 4.3 rom got native hotspot to work, but is that possible with stock rom.

dnsmasq.conf location?

In the latest 5.0.3 build for the 5T, I see dnsmasq is running in /system/bin/dnsmasq
Awesome, I want to use it. The question is, if I put my config file in /system/etc/dnsmasq.conf will dnsmasq see it and run my config? If not there, where does it need to go in order to work?
Interesting.
I'll give it a try later today.
I'd say put your configuration and see if that works. Not sure if cycling the connection would work or if you'll need a full reboot tho.
W.
Awesome, please let us know.
For those who are unfamiliar with dnsmasq, it allows users to block domains (e.g. malware.com) without having to also block all of its subdomains (e.g. www.malware.com, infect.malware.com, hidden01.malware.com, hidden02.malware.com, etc).
The /etc/hosts file commonly used to block connections cannot do this, it requires you to list every subdomain, which turns blocking sites into a game of whack-a-mole as malware sites simply invent new subdomains every day.
That's why dnsmasq is so important, and I'm glad to see that the service is running on Android.
dnsmasq is used only during tethering. Right?
Actually, you cannot find dnsmasq.conf in any directory. I think it is hard-coded in settings app.
But, you can follow these steps to use your own dnsmasq.conf
turn on tethering
kill dnsmasq
Code:
killall dnsmasq
run dnsmasq with your own configuration
Code:
dnsmasq -C /path/to/dnsmasq.conf -x /path/to/dnsmasq.pid
enjoy
This requires your device to be rooted. I use this method to host captive portal on my android device.

HowTo setup Shelter or Island with debloated stock ROM One Ui 3.1 and Android11 ?

Hi everyone,
Iam running my G981B with Android 11 and One UI 3.1.
- I debloated it using the following post Ultimate Debloat S20.
- I reinstalled "com.samsung.android.knox.containercore" and "com.android.managedprovisioning"
When I try to setup Shelter I get the message "Device cannot be setup. If you need assistance please contact..."
When I try to setup Island I get the message "Setup of the work profile not possible. Security rules of your company..."
For Island there is the possibility to do a manual setup: Island Manual Setup
However, if I execute "pm create-user --profileOf 0 --managed Island" I get the most useless response "Error: couldn’t create User".
fw.max_users is set to 10...
Is that a common problem or do I just oversee anything else which I might have debloated and blocks the process right now ?
Thanks for any help !
Okay... obviously tripped knox prevents the device from creating a work profile.
Seriously...
So is there any viable workaround to get something like Shelter or Island running ?
I'll ask to move your thread to Q&A.
I kind of solved my problem by facilitating Samsungs' Dual Messenger functionality.
If dual messenger gets enabled it sets up a separate user profile which is used with a workprofile in order to run multiple messenger app instances.
The beauty is that you can use this to install any app within that profile using adb. So basically the feature is not limited to those few apps you can tick from the settings menu.
Credit goes to @VincentThacker who is describing the procedure here:
Add non-messenger apps to Samsung Dual Messenger?
So the creation of parallel workspaces is blocked in the Security Policy of 8.0, preventing multiple copies of the same app. However, Samsung's Dual Messenger still successfully copies apps it sees as messenger apps, and allows them to run just...
forum.xda-developers.com
One additional hint from my side:
- If you install aurora through ADB in the work profile all apps you install from this version of aurora automatically get installed on the work profile as well. So no need for installing apks through adb afterwards anymore.
flunkyball said:
Okay... obviously tripped knox prevents the device from creating a work profile.
Seriously...
Click to expand...
Click to collapse
Actually, it doesn't seem to be Knox related: If I setup the phone (Samsung S20) from scratch without FBE encryption (by flashing multidisabler), I can set up Island with the root way and/or by ADB.
If I set up the phone with encryption, Island can't be set up like described here.
gorthon said:
Actually, it doesn't seem to be Knox related: If I setup the phone (Samsung S20) from scratch without FBE encryption (by flashing multidisabler), I can set up Island with the root way and/or by ADB.
If I set up the phone with encryption, Island can't be set up like described here.
Click to expand...
Click to collapse
Good to know. However having the device unecrypted just to use Island is not an option. Currently Iam quite happy with facilitating Samsungs Dual Messenger functionality for it.

Categories

Resources