This was not written by me. It was written by Ayman al-Sanad, username UAE (I believe), who has been working for some time to create workable libraries for so Android devices can properly display Arabic. Oddly there was no thread posted here that I can find so I'm going to go ahead and post it, since I know this is a much-desired feature for many people and at least some people will find it over Google or the like.
As Google has yet to add native support for Right-To-Left languages like Arabic, Persian and Urdu (despite it being the top feature request) Ayman stepped in and created libraries for our usage.
The downloads page is available here: http://ardoid.com/?page_id=5. I'm assuming the libraries will work with any Froyo install. Put the library zip on your SD card, flash it. Reboot will take some time on a black screen.
Big thanks to Ayman for his great work. Evo libraries are also available on his page.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
this is the best news yet!!! i will try right now and report back
Works Perfect !!!!! i can't believe it's finally happening. thank you very much for posting
Dose this works with WebOS (Palm Pre) ?
amjz said:
Dose this works with WebOS (Palm Pre) ?
Click to expand...
Click to collapse
Really? Your in a forum for an ANDROID device, and if that wasn't enough of a hint, the OP says "ANDROID" in the first line.
works perfectly, Thanks for the heads up
Problem with ROM updates
The ZIP files on the ardoid.com site worked perfectly with my phone. This was when Verizon rolled out the Froyo update, and i was able to use the same ZIP files for both a stock ROM as well as a custom one.
But couple weeks ago, Verizon rolled out a minor update to Froyo (2.2.1 I think), and it was also picked up by some developers of custom ROMs. Once I applied any of these updates, I am unable to use the Arabic ZIP file anymore.
Here is what I usually do:
- Use the ROM Manager to download the new ROM.
- Reboot to recovery mode and apply the ROM (done automatically by the ROM Manager).
- Verify the ROM is working correctly.
- Download the Ariabic ZIP file from ardoid.con.
- Reboot to Custom Recovery, and manually apply the Arabic update.
- Reboot the phone one last time.
- The phone remains stuck in the HTC Incredible splash screen.
The only way out is to remove the battery, boot into recovery mode, and do a restore.
I tried this approach with the Virtuous ROM 3.1 and the CyanogenMod 6.1. In both cases, I was trying "froyo_incredible_libs_arabic_android_plus_signed.zip".
I also tried the following ZIP files, and they both failed (didn't expect them to work anyway):
- froyo_stock_generic_signed.zip
- froyo_cm_n1_6_1_1_stable_arabic_android_plus_signed.zip
The questions that I have are:
- Is there a dependency for the ZIP file on the actual system image? Does this mean that there has to be a new ZIP file for the 2.2.1 release?
- Is there another preferred way for applying the ZIP file? (I am using ClockworkMod Recover 2.5.0.5).
Quick update
I would like to add one little detail: using CyanogenMod 6.1, most apps have decent Arabic support by default (for example, tweetdeck or facebook). Unfortunately, the browser doesn't know how to join the Arabic letters correctly (doesn't matter if I am using the stock browser, or Dolphin).
I tried pushing the libwebcore.so and libskia.so files from the Desire HD ZIP from http://ardoid.com/?p=176
I copied the files to the SD card, then copied them over the original files using ADB. After the reboot, the phone got stuck in an endless loop, and here is what I saw repeated when doing "adb logcat":
W/dalvikvm( 1311): ERROR: Unable to find decl for native Landroid/webkit/BrowserFrame;.clearNativeCache ()V
E/JNIHelp ( 1311): RegisterNatives failed for 'android/webkit/BrowserFrame'
E/webcoreglue( 1311): WebFrame registration failed!
W/dalvikvm( 1311): JNI_OnLoad returned bad version (-1) in /system/lib/libwebcore.so 0x0
W/dalvikvm( 1311): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Landroid/webkit/WebViewCore;.<clinit>
E/Zygote ( 1311): Error preloading android.webkit.WebViewCore.
E/Zygote ( 1311): java.lang.ExceptionInInitializerError
E/Zygote ( 1311): at java.lang.Class.classForName(Native Method)
E/Zygote ( 1311): at java.lang.Class.forName(Class.java:235)
E/Zygote ( 1311): at java.lang.Class.forName(Class.java:182)
E/Zygote ( 1311): at com.android.internal.os.ZygoteInit.preloadClasses(ZygoteInit.java:302)
E/Zygote ( 1311): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:589)
E/Zygote ( 1311): at dalvik.system.NativeStart.main(Native Method)
E/Zygote ( 1311): Caused by: java.lang.UnsatisfiedLinkError: Library webcore not found
E/Zygote ( 1311): at java.lang.Runtime.loadLibrary(Runtime.java:461)
E/Zygote ( 1311): at java.lang.System.loadLibrary(System.java:557)
E/Zygote ( 1311): at android.webkit.WebViewCore.<clinit>(WebViewCore.java:61)
E/Zygote ( 1311): ... 6 more
E/Zygote ( 1311): setreuid() failed. errno: 17
D/AndroidRuntime( 1311): Shutting down VM
W/dalvikvm( 1311): threadid=1: thread exiting with uncaught exception (group=0x4001d7f0)
D/skia ( 1311): purging 6K from font cache [1 entries]
I/ServiceManager( 105): service 'media.audio_flinger' died
I/ServiceManager( 105): service 'media.player' died
I/ServiceManager( 105): service 'media.camera' died
I/ServiceManager( 105): service 'media.audio_policy' died
I/ ( 1312): ServiceManager: 0xaec8
I think the root cause is "JNI_OnLoad returned bad version (-1) in /system/lib/libwebcore.so 0x0", but I am not sure what this means, or how to fix it.
Here is another update..
I tried to copy the libwebcore.so and libskia.so directly without the ZIP file. I basically extracted the two library files to a folder "Arabic/New" on my sdcard. The I did the following steps using ADB:
- remount the system mount as rw.
- copy the files from the SD to /system/lib
- change the permission to 644
- reboot
Here is the capture from my CMD console
===========================
C:\my_program_files\Android\android-sdk-windows\platform-tools>adb remount
remount succeeded
C:\my_program_files\Android\android-sdk-windows\platform-tools>adb shell
# su
su
# ls -l /system/lib/libwebcore.so
ls -l /system/lib/libwebcore.so
-rw-r--r-- 1 root root 4859848 Dec 22 19:08 /system/lib/libwebcore.so
# ls -l /system/lib/libskia.so
ls -l /system/lib/libskia.so
-rw-r--r-- 1 root root 1126112 Dec 22 19:08 /system/lib/libskia.so
# cp -f /sdcard/Arabic/New/libwebcore.so /system/lib
cp -f /sdcard/Arabic/New/libwebcore.so /system/lib
# cp -f /sdcard/Arabic/New/libskia.so /system/lib
cp -f /sdcard/Arabic/New/libskia.so /system/lib
# ls -l /system/lib/libwebcore.so
ls -l /system/lib/libwebcore.so
----rwxr-x 1 root root 5118240 Dec 22 19:11 /system/lib/libwebcore.so
# ls -l /system/lib/libskia.so
ls -l /system/lib/libskia.so
----rwxr-x 1 root root 1126552 Dec 22 19:11 /system/lib/libskia.so
# chmod 644 /system/lib/libwebcore.so
chmod 644 /system/lib/libwebcore.so
# chmod 644 /system/lib/libskia.so
chmod 644 /system/lib/libskia.so
# ls -l /system/lib/libwebcore.so
ls -l /system/lib/libwebcore.so
-rw-r--r-- 1 root root 5118240 Dec 22 19:11 /system/lib/libwebcore.so
# ls -l /system/lib/libskia.so
ls -l /system/lib/libskia.so
-rw-r--r-- 1 root root 1126552 Dec 22 19:11 /system/lib/libskia.so
# reboot
reboot
===========================
After the reboot, the phone gets stuck on the white screen
When I look at the log file via "adb logcat", I see it frozen at:
===========================
--------- beginning of /dev/log/main
I/cm ( 73): Welcome to Android 2.2.1 / CyanogenMod-6.1.0-Inc
I/cm ( 74): _
I/cm ( 75): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 76): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 77): )) _))
I/cm ( 78):
I//system/xbin/run-parts( 68): modprobe: chdir(2.6.32.26-invisiblek-aosp): No such file or directory
I//system/xbin/run-parts( 68): run-parts: /system/etc/init.d/04modules exited with code 1
I/mountsd ( 93): Checking filesystems..
I//system/xbin/run-parts( 68): e2fsck 1.41.10 (10-Feb-2009)
I//system/xbin/run-parts( 68): e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0p1
I//system/xbin/run-parts( 68): Filesystem mounted or opened exclusively by another program?
E/mountsd ( 99): Unable to repair filesystem, disabling apps2sd
I/logwrapper( 68): /system/xbin/run-parts terminated by exit(1)
I/DEBUG ( 108): debuggerd: Dec 12 2010 12:46:44
D/AK8973 ( 115): AK8973 daemon 1.3.3 Start
D/AK8973 ( 115): (Library version : 1.2.1.620)
--------- beginning of /dev/log/system
I/Vold ( 106): Vold 2.1 (the revenge) firing up
I/Netd ( 107): Netd 1.0 starting
D/Vold ( 106): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 106): Volume emmc state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 106): Volume emmc state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 106): Volume emmc state changing 2 (Pending) -> 1 (Idle-Unmounted)
D/Vold ( 106): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 106): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
===========================
In comparison, when the phone was booting before, here is what the log would look like:
===========================
--------- beginning of /dev/log/main
I/cm ( 73): Welcome to Android 2.2.1 / CyanogenMod-6.1.0-Inc
I/cm ( 74): _
I/cm ( 75): __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))
I/cm ( 76): ((_ \(/'((_( ((\( ((_)((_( (('((\( ((`1( ((_)((_(
I/cm ( 77): )) _))
I/cm ( 78):
I//system/xbin/run-parts( 68): modprobe: chdir(2.6.32.26-invisiblek-aosp): No such file or directory
I//system/xbin/run-parts( 68): run-parts: /system/etc/init.d/04modules exited with code 1
I/mountsd ( 93): Checking filesystems..
I//system/xbin/run-parts( 68): e2fsck 1.41.10 (10-Feb-2009)
I//system/xbin/run-parts( 68): e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0p1
I//system/xbin/run-parts( 68): Filesystem mounted or opened exclusively by another program?
E/mountsd ( 99): Unable to repair filesystem, disabling apps2sd
I/logwrapper( 68): /system/xbin/run-parts terminated by exit(1)
I/DEBUG ( 108): debuggerd: Dec 12 2010 12:46:44
D/AK8973 ( 115): AK8973 daemon 1.3.3 Start
D/AK8973 ( 115): (Library version : 1.2.1.620)
--------- beginning of /dev/log/system
I/Vold ( 106): Vold 2.1 (the revenge) firing up
I/Netd ( 107): Netd 1.0 starting
D/Vold ( 106): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 106): Volume emmc state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 106): Volume emmc state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 106): Volume emmc state changing 2 (Pending) -> 1 (Idle-Unmounted)
D/Vold ( 106): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 106): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
D/AndroidRuntime( 110):
D/AndroidRuntime( 110): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
I/AndroidRuntime( 110): Heap size: -Xmx32m
D/AndroidRuntime( 110): CheckJNI is OFF
D/dalvikvm( 110): creating instr width table
I/ ( 111): ServiceManager: 0xaec8
===========================
Are there any protection mechanisms that is preventing the phone from continuing the boot. If there is an issue with the library file, then I would expect a more specific error message when the library is loaded. However, it seems that the boot sequence is being aborted even before loading libwebcore.so or libskia.so
By the way, I have my phone rooted a long time ago. I think that was using the "unrevoked forever", and I have "SHIP S-OFF" on the main boot screen.
It finally worked!
I downloaded the ZIP file for the Cyanogn Nexus 6.1.1 from http://ardoid.com/?p=21 (I was starting from a CyanogenMod 6.1 for HTC Droid Incredible).
I repeated the same steps as before, but with the following exceptions:
- I copied the "libwebcore.so" file alone (didn't update the libskia.so).
- I rebooted the phone as usual rather than via ADB.
I am not sure which step made the difference, but at least my phone can boot, and most importantly, I can now see proper Arabic text in the browser. Other apps looks fine as well (tweetdeck, reader, etc.). I was even able to enter Arabic text using the browser (in Google search) and everything looked perfect.
I don't know what I might be missing by not updating ibskia.so, but things look really nice already.
Thanks Ayman for helping me out (via Twitter)!!!
Hello
I'm sorry to disturb you, but I need to know
Before my wifi connection worked. I wanted to put beautiful ROM Cyanogen 7... The installation worked!
But I had no wifi (the phone rebooting as soon as I turn it on)> I had yet made the political intelligence to "never"
So I try to re intaller but I had the same problem
So I gave an official rom (JM5 with repartition)
But, the wifi did not work either
I try different firmware (jpy, JS5, JM5) and no wifi not working
A hard reset did not work either!
I wonder if the ROM Cyanogen not touch certain file (a wifi connection) that by flashing with repartition, can not be replaced and which are "corrupt" in me by Cyanogen.
Please help me
In advance thank you
Cordially
The CatLog code of wifi
03-22 23:38:26.210 E/StatusBarView(2957): onInterceptTouchEvent mBROP:0 event:MotionEvent{48767888 action=0 x=402.0 y=19.0 pressure=0.15686275 size=0.06666667}
03-22 23:38:27.942 E/WifiHW (2957): wifi_start_supplicant: pi->serial=117440522, serial=0
03-22 23:38:27.968 E/WifiHW (2957): wifi_connect_to_supplicant:IFACE_DIR(/data/misc/wifi), iface(eth0), ifname(/data/misc/wifi/eth0)
03-22 23:38:27.968 E/WifiHW (2957): wifi_connect_to_supplicant: ifname(/data/misc/wifi/eth0)
03-22 23:38:28.018 E/wpa_supplicant(4867): Line 1: unknown global field ''.
03-22 23:38:28.018 E/wpa_supplicant(4867): Line 1: Invalid configuration line ''.
03-22 23:38:28.026 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:28.343 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 746: unknown EAP method 'IKEV2'
03-22 23:38:28.366 E/wpa_supplicant(4867): You may need to add support for this EAP method during wpa_supplicant
03-22 23:38:28.366 E/wpa_supplicant(4867): build time configuration.
03-22 23:38:28.366 E/wpa_supplicant(4867): See README for more information.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 746: failed to parse eap 'IKEV2'.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 749: failed to parse network block.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 755: unknown EAP method 'FAST'
03-22 23:38:28.366 E/wpa_supplicant(4867): You may need to add support for this EAP method during wpa_supplicant
03-22 23:38:28.366 E/wpa_supplicant(4867): build time configuration.
03-22 23:38:28.366 E/wpa_supplicant(4867): See README for more information.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 755: failed to parse eap 'FAST'.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 761: failed to parse network block.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 766: unknown EAP method 'FAST'
03-22 23:38:28.366 E/wpa_supplicant(4867): You may need to add support for this EAP method during wpa_supplicant
03-22 23:38:28.366 E/wpa_supplicant(4867): build time configuration.
03-22 23:38:28.366 E/wpa_supplicant(4867): See README for more information.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 766: failed to parse eap 'FAST'.
03-22 23:38:28.366 E/wpa_supplicant(4867): Line 772: failed to parse network block.
03-22 23:38:28.604 E/wpa_supplicant(4867): Failed to initialize control interface '/var/run/wpa_supplicant'.
03-22 23:38:28.604 E/wpa_supplicant(4867): You may have another wpa_supplicant process already running or the file was
03-22 23:38:28.604 E/wpa_supplicant(4867): left by an unclean termination of wpa_supplicant in which case you will need
03-22 23:38:28.604 E/wpa_supplicant(4867): to manually remove this file before starting wpa_supplicant again.
03-22 23:38:28.655 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:28.972 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:29.284 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:29.604 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:29.921 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:30.237 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:30.558 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:30.870 E/WifiHW (2957): wifi_connect_to_supplicant:ctrl_conn is NULL!!
03-22 23:38:31.173 E/WifiHW (2957): wifi_connect_to_supplicant: Unable to open connection to supplicant on "/data/misc/wifi/eth0": No such file or directory
03-22 23:38:36.174 E/WifiHW (2957): wifi_connect_to_supplicant: Supplicant is not running, cannot connect
03-22 23:38:41.176 E/WifiHW (2957): wifi_connect_to_supplicant: Supplicant is not running, cannot connect
03-22 23:38:46.179 E/WifiHW (2957): wifi_connect_to_supplicant: Supplicant is not running, cannot connect
03-22 23:38:47.089 E/WifiHW (2957): [WIFI] Unload Driver
03-22 23:38:59.643 E/imdg81 (2957): IsShutDownStarted()
03-22 23:38:59.702 E/imdg81 (2957): IsShutDownStarted()
Click to expand...
Click to collapse
Sorry for my bad English
There WAS a wifi bug in the cyanogen ROM but thats has been addressed, Im running it now and never had a problem since the day i installed, are you on Cyanogen now or are you back to stock ???
Make a post on the cyanogen thread, i know people on there no how to fix it, but i never paid much attention because i havent had this happen to me
Ok
I will post
Thank you very much
I have to post 10 posts to post in the forum is Cyanogen (Android Development on XDA DEV)
Sorry
Very sorry ...
A moderator should delete this subject after
...
I add the catlog
8 messsage !
9 !!!
Come on !
10 !!!!!!!!!
Lasssssssst !
RRRRRRRRRRR
I can't post in Android devellopement section > Cyanogen !!!
RRRRRRR
vBulletin Message
juju023, you do not have permission to access this page. This could be due to one of several reasons:
Please Read: New members (those with fewer than 10 posts) are not permitted to post to development-related forums. The developer forums are intended for experienced users and developers to discuss ways to improve technical aspects related to ROMs and Software. While you may be an expert, we ask ALL users to avoid posting questions about using or installing ROMs and software in the Development Forums. To encourage this new Users can read but not post in these forums.
To ask Questions about developing your device, installing ROMs, software and themes you must go to the Q&A or General Forum.
Remember, your question has very likely been asked already, so please search before posting.
Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Click to expand...
Click to collapse
it may be because of making 10 useless posts just to reach the limit, just make a reply to a few different threads and try again.
and in the meantime just browse through the cyanogen thread without making a post to see what you come across....
you never actually said what ROM you are currently using. and also what modem are you using too ???
All, wanted to say thanks for all the helpful posts. I bought a Viewsonic G-Tablet two days ago and I'm well on my way to making this a bad habit.
So... to my question. Has anyone had experience getting the g-tablet with TNT 4.2.5 [haven't picked up 4.3.0 yet] and the SonicWall NetExtender app? I rooted the device prior to trying NetExtender, but it fails with a series of service errors:
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
03-23 08:37:31.495 D/sysHelper( 2183): Check Root Permission: Exit-Value ==> 0
03-23 08:37:36.315 E/NetExtender.nxclient( 2183): Unable to communicate with service - No such file or directory
03-23 08:37:41.005 D/NetExtender.nxclient( 2183): action button clicked
03-23 08:37:41.015 E/NetExtender.nxclient( 2183): Unable to stop backend service - Transport endpoint is not connected
03-23 08:37:54.035 D/sysHelper( 2245): Check Root Permission: Exit-Value ==> 0
03-23 08:37:58.965 E/NetExtender.nxclient( 2245): Unable to communicate with service - No such file or directory
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
03-23 08:41:05.305 D/sysHelper( 1420): Check Root Permission: Exit-Value ==> 0
03-23 08:41:14.945 E/NetExtender.nxclient( 1420): Unable to communicate with service - No such file or directory
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
03-23 22:42:35.224 D/sysHelper( 5824): Check Root Permission: Exit-Value ==> 0
03-23 22:42:41.115 E/NetExtender.nxclient( 5824): Unable to communicate with service - No such file or directory
I'm going to try dropping into a root shell before executing and see if that helps...
any thoughts are greatly appreciated.
Hi evilquim.
I'm getting the same issue with my G-Tab running VEGAN 5.1. I was wondering if you ever figured this out.
If I manage to get it working I'll post here.
Try the Sonicwall Mobile Connect application in the market if you are running Android 4.x
Hi
NFC does not work on my ASUS Zenfone 8 running AospExtended 9
After enabling NFS the OS will disable it again after a few seconds
In a logcat running while enablinng NFC I see these error messaage:
03-15 16:55:20.905 905 905 D NxpExtns: find found MIFARE_READER_ENABLE=(0x1)
03-15 16:55:20.898 905 905 W [email protected]: type=1400 audit(0.0:488): avc: denied { read write } for name="pn553" dev="tmpfs" ino=3293 scontext=u:r:hal_nfc_default:s0 tcontext=u:object_r:device:s0 tclass=chr_file permissive=0
03-15 16:55:20.905 905 905 D NxpHal : Entering phNxpNciHal_init_monitor
03-15 16:55:20.905 905 905 D NxpHal : Returning with SUCCESS
03-15 16:55:20.905 905 905 D EseHalClient: EseAdaptation::Initialize: enter
03-15 16:55:20.905 905 905 D EseHalClient: EseAdaptation::InitializeHalDeviceContext: enter
03-15 16:55:20.905 905 905 D EseHalClient: EseAdaptation::InitializeHalDeviceContext: Ignored. Reason : eSE Not Supported
03-15 16:55:20.905 905 905 D EseHalClient: EseAdaptation::Initialize: exit
03-15 16:55:20.905 905 905 D NxpExtns: find found NXP_NFC_DEV_NODE=/dev/pn553
03-15 16:55:20.905 905 905 D NxpTml : Opening port=/dev/pn553
03-15 16:55:20.905 905 905 E NxpTml : _i2c_open() Failed: retval ffffffff
The permissions for /dev/pn553 are
[ root @ ASUS_I006D : ~ ] ls -l /dev/pn553
crw-rw---- 1 nfc nfc 10, 121 1970-01-07 23:20 /dev/pn553
[ root @ ASUS_I006D : ~ ]
I tried adding r/w for other to the permissions for /dev/pn553: in that case the error message is gone but it still does not work.
I also tried to set SELinux to permissive but that also does not fix the error.
The NFC works in the original Android 11 and 12 for the phone so the hardware is okay
Any hints how to fix this issue are welcome
I added two logcats to this message
enable_and_disable_nfc.log - trying to enable the NFS without changing anything
enable_and_disable_nfc_with_added_permissions.log - trying to enable NFS after changing the permissions for /dev/pn553 and setting SELinux to permissive
(search for "NfcService: Enabling NFC" in the logcats attached to this message)
regards
Bernd
Hi
fiy:
I found the reason why NFC is not working in AospExtended 9.0 without gapps (https://downloads.aospextended.com/...xtended-v9.0-I006D-OFFICIAL-20220227-0100.zip)
NFC does not work because the SELinux context for the NFC device /dev/pn553 is wrong . The SELinux context is
Code:
ASUS_I006D:/ # ls -lZ /dev/pn553
crw-rw---- 1 nfc nfc u:object_r:device:s0 10, 121 1970-03-18 01:08 /dev/pn553
but it must be
Code:
ASUS_I006D:/ # ls -lZ /dev/pn553
crw-rw---- 1 nfc nfc u:object_r:nfc_device:s0 10, 121 1970-03-18 01:08 /dev/pn553
ASUS_I006D:/ #
I wrote a little script to correct the SELinux context:
Code:
ASUS_I006D:/ # cat /storage/emulated/0/data/scripts/correct_dev_pn553.sh
#!/system/bin/sh
NFC_DEVICE="/dev/pn553"
echo ""
echo "The SELinux context for \"${NFC_DEVICE}\" is now:"
ls -lZ ${NFC_DEVICE}
echo ""
echo "Correcting the SELinux context for the NFC device \"${NFC_DEVICE}\" ..."
chcon -v u:object_r:nfc_device:s0 ${NFC_DEVICE}
echo ""
echo "The SELinux context for \"${NFC_DEVICE}\" is now:"
ls -lZ ${NFC_DEVICE}
ASUS_I006D:/ #
Example output:
Code:
ASUS_I006D:/ # sh /storage/emulated/0/data/scripts/correct_dev_pn553.sh
The SELinux context for "/dev/pn553" is now:
crw-rw---- 1 nfc nfc u:object_r:device:s0 10, 121 1970-03-18 01:08 /dev/pn553
Correcting the SELinux context for the NFC device "/dev/pn553" ...
chcon '/dev/pn553' to u:object_r:nfc_device:s0
The SELinux context for "/dev/pn553" is now:
crw-rw---- 1 nfc nfc u:object_r:nfc_device:s0 10, 121 1970-03-18 01:08 /dev/pn553
ASUS_I006D:/ #
The script must be executed by the user root.
Unfortunately the dev tree is rebuild after each reboot and therefor the change is not persistent so that the script must be executed after each reboot.
So the next step in my journey is to find out how to automate the execution of the script after a reboot in the Android OS.
regards
Bernd
Update 24.05.2022/bs
For phones running Magisk it is sufficient to copy the script into the directory
/data/adb/service.d/
and make it executable to ensure that it is executed after every reboot of the phone
(see also https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#boot-scripts)
I have a FRP client program. Please make it self startup. The file name is FRP_ 0.42.0_ linux_ arm64. tar. GZ, which can be run directly on the system of my Android phone "oppo" 7.1.1. In "init. RC", I added the following contents:
------------------------------------------------------------
on property:sys. boot_ completed=1
start frpc
service frpc data/frpc/frpc -c data/frpc/frpc. ini
seclabel u:r:init:s0
user root
------------------------------------------------------------
However, due to the problem of SELinux, the service cannot run after startup. After checking the data, it is found that magickpolicy can modify the context, but I won't. please ask the great God for advice on how to use this magickpolicy command? Thank you very much. Kneel down and beg the great God~
replace "seclabel u:r:init:s0" to "seclabel u:r:magisk:s0",Still not effective!
The log is as follows:
(1)[1:init]init: Starting service 'frpc'...
[ 9336.386960] (1)[13308:init]init: cannot execve('data/frpc/frpc'): Permission denied
[ 9336.387756] (0)[543:logd.auditd]type=1400 audit(1652166228.749:3720): avc: denied { execute } for pid=13308 comm="init" name="frpc" dev="mmcblk0p69" ino=2760707 scontext=u:r:init:s0 tcontext=ubject_r:system_data_file:s0 tclass=file permissive=0
[ 9336.388130] (1)[1:init]init: Service 'frpc' (pid 13308) exited with status 127
[ 9336.388167] (1)[1:init]init: Service 'frpc' (pid 13308) killing any children in process group
I modify "init.rc" this file first, and then repack boot.img, brush in with twrp, and then reinstall "magisk-v20.4.zip".
So after installation, "init.rc" The internal is as follows:
on property:sys.boot_completed=1
start frpc
service frpc data/frpc/frpc -c data/frpc/frpc. ini
seclabel u:r:init:s0
user root
on post-fs-data
start logd
rm /dev/.magisk_unblock
start qdDvrJHt
wait /dev/.magisk_unblock 10
rm /dev/.magisk_unblock
service qdDvrJHt /sbin/magisk --post-fs-data
user root
seclabel u:r:magisk:s0
oneshot
service I3RbS38QhhR4tVa /sbin/magisk --service
class late_start
user root
seclabel u:r:magisk:s0
oneshot
on property:sys.boot_completed=1
start dLqzC3oLcVMIg6u
service dLqzC3oLcVMIg6u /sbin/magisk --boot-complete
user root
seclabel u:r:magisk:s0
oneshot