[HELP] please Help me..! - Galaxy S I9000 Q&A, Help & Troubleshooting

I flashed Froyo and now i got the problem with the Unlock Code -.-
I got the Unlock Code but it is 00000000 and it did'nt work
I'm so sad because i like this phone so much.! I need help please..
And please don't write that i use the search i tried all but the TUT at the JPC thread don't work at my Phone..
HELP please

Think your product code has changed.
There are 2 methods to fix that.
Method 1:
1. enable usb-debugging
2. On your PC: Start -> Run -> cmd
4. adb shell
5. su
6. cp /efs/nv_data.bin /sdcard/nv_data.bin
7. disable usb-debugging
8. connect your phone to your pc with mass-storage enabled
9. open nv_data.bin from your internal SD-Card with an Hex-Editor
10. search for KOR and replace both findings with your original product code, save the file
11. enable usb-debugging
12. adb shell
13. su
14. rm /efs/nv_data.*
15. rm /efs/.nv_data.*
16. cp /sdcard/nv_data.bin /efs/nv_data.bin
17. reboot
Method 2:
Read this post: http://forum.xda-developers.com/showthread.php?t=769400
Faq Nr. 7

Related

How to update user.conf

Without adb. I have searched but can't find a straight forward answer.
Thanks
This should be asked in the Q&A section.
Here is what I would do:
1. Download "Text Editor" from the market.
2. Open Terminal Emulator and run the following:
Code:
su
cp /system/sd/user.conf /sdcard/user.conf
exit
exit
3. Open Text Editor and then open the user.conf file.
4. Make modifications and save.
5. Open Terminal Emulator and run the following:
Code:
su
cp /sdcard/user.conf /system/sd/user.conf
reboot
From that point on, you will have a copy on your sdcard and can
make changes and follow step 5 to copy it back to where it needs
to be.
Vermithrax
try with SU'FBS~
JACxHERO 2.1
trying to do this method on my mt3g.....i have user.conf in the system/bin
and i did your method and when i try to copy it back over into bin its say read-only file? any ideas?
You need to mount /system with read and write access in terminal. Try the following commands:
su
mount -o rw,remount /system
cp /sdcard/user.conf /system/bin/user.conf
reboot
This will reboot after you copy the file over.

Please help me

I have a problem. I can not come in in "Telnet" - therefore I can not put another ROM .
Here's what I did ..
I decided to "unroot" My T-Mobile G1 as I put the original. Nbh file. Everything went as it should .. and included the phone. Enter into "Market" downloaded "Telnet" install and tried to enter, but did not allow me. I painted the following (Error while connecting to server: localhost/127.0.0.1: 23 - Connection refused) (Error while receiving from server: null). If someone can give a plan on how to fix this mess I would be very grateful!
You can't just open just open telnet and point it to local host. You need to create an instance (I think I've got that right) of telnet with root permissions.
After your phone starts up, hit the enter key twice, type "telnetd" and press enter. (Yes, it will start up a contact search, don't worry. Just type it.)
Download an Android "Telnet" application from the Market and connect to localhost.
If you connect successfully, you will have a root prompt "#".
Type the following into Telnet (these commands will give you root access easier in the future):
* mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
* cd sdcard
* flash_image recovery recovery.img
* cat recovery.img > /system/recovery.img
Click to expand...
Click to collapse
Thanks a lot! Happened as he said

$50 dollars to the first solution to sideloading non market apps

I have a brand new ATT Captive.
I have it rooted.
I am on a MAC.
I am looking for a solution to allow me to sideload no market apps.
First person to post a method that will allow me to complete this will get $50 paypal as soon as I get this completed.
I have tried every solution on this board and spent 3 days trying to do this. Nothing has worked.
I begging someone to please find and post me a solution. I guarantee that I will pay to the first solution to make this possible.
Please help me out.
Don't pay people for it, there's threads all over for how to do it. This is copied from one of those threads.
"Method 2: with Root Explorer
(courtesy of kirbo20)
This is a pretty easy process. I went in to Root Explorer - dbdata - databases - com.android.providers.settings, copied settings.db to my sd card, edited it on my pc with a db editor changed 0 to a 1 next to non market apps. Copied it back to the original directory, rebooted and installed a non market app.
(added by gotfolk)
again using FF plug in..
Click Secure on the left pane
click on install_non_market_apps
click edit
number 3 states value click there and type in 1. hit ok
(/gotfolk)
Please use caution. If you want to make sure the db save properly open it on your sd card before you copy and replace the original. It should open up as a readable table. If it opens up in a txt editor its corrupt. This permanently enables non market apps. You can not toggle it on and off.
( This is a sqlite3 database file, you can find many GUI editors that will be able to handle the editing, including a FF plugin. Search "SQLite" )"
And if you don't want to use root explorer - Use the Android SDK on your mac - it is free.
You have to do your work in the terminal, but it is easy using the ADB Shell to get the file to your SD card, move it to your mac, use Firefox and SQLite manager to change the one value, put the file back, change permissions and you are done.
Most of us are not looking for $50 - just looking for people to use search and give things a try before creating a new post.
I think you can spend $4 very well on Root explorer and enable sideloading apps. And save $46.
2) Downloaded Root Explorer and SQLite Editor. Both of these are paid apps but look like they are worth owning. For instance, you can also use Root Explorer to rename and disable the AT&T bloatware, as an alternative to this method.
3) Using Root Explorer, mount the filesystem R/W and copy /dbdata/databases/com.android.providers.settings/settings.db to /sdcard/settings.db
4) Open /sdcard/settings.db in SQLite Editor
5) Open the 'secure' table
6) Long-hold on record 6, "install_non_market_apps" and select "Edit Record"
7) Change the value from 0 to 1 and save
8) Back in Root Explorer, copy /sdcard/settings.db back to /dbdata/databases/com.android.providers.settings/settings.db
9) I don't remember if I had to reboot or not, but you may as well.
Click to expand...
Click to collapse
Edit: Couldn't find the video with these intructions. Anyways you can download SQLite manager add-on on firefox, open firefox, go to tools->sqlite manager. Have the copied settings.db on your desktop, then open it up with the firefox SQLite manager(just to save you some more money). Once you're there, open up settings.db, go to secure on the left side, and then go to "browse and search" on the menu bar. Right click and edit "install_non_market_apps" and change the value from 0 to 1 like the instruction above. Then do steps 8 and 9. And you do have to reboot.
Sorry if it was confusing lol
doesnt the android central sideloading wonder work in mac?
puttingg said:
I have a brand new ATT Captive.
I have it rooted.
I am on a MAC.
I am looking for a solution to allow me to sideload no market apps.
First person to post a method that will allow me to complete this will get $50 paypal as soon as I get this completed.
I have tried every solution on this board and spent 3 days trying to do this. Nothing has worked.
I begging someone to please find and post me a solution. I guarantee that I will pay to the first solution to make this possible.
Please help me out.
Click to expand...
Click to collapse
max_warheads said:
(additional CHOWN notes added below. If you are getting "chown: unknown user/group system:system" read them!
Ok, we do have a WHOLE other thread that was made a sticky already, but you need to read the WHOLE thing to get all the properly interesting parts. I'll make sure I keep this OP up to date.
The following methods enable side loading and installing of apps onto the captivate, without the need of a program on a computer attached via the SDK. There are multiple methods, and for the most part, these methods that have worked flawlessly for many users here on this forum. We're just collecting them all in one post for speed and clarity.
Methods that assist in loading applications, without modification to the settings (a.k.a still need a computer attached) can be found at the collective wiki, http://samsungcaptivate.wikia.com/wiki/How_to_Sideload
ALL METHODS REQUIRE ROOT & BUSYBOX:
Root your phone, see http://forum.xda-developers.com/showthread.php?t=725555
Busybox : http://www.appbrain.com/app/stericson.busybox
Please, save a clean, un-altered backup copy of this file. To be safe. Rarely does corruption occur, but if it does, it won't be good.
Method 1: From Win7x64, Samsung Drivers, Android SDK installed.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the command prompt. You will need to know where you installed your SDK, and the tools directory therein.
Once rooted, go install BusyBox installer from the App Market/AppBrain etc and run it. It will download and install the latest version for you.
From my Win7x64, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.
Connect to PC, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.
open command prompt, follow along:
Code:
> c:
> cd \android\tools
> adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the pc,
"USB Connected select to... ", Mount
mine mounted as H:
Code:
> copy H:\settings.db settings.db
> sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit
> copy settings.db H:\settings.db
Eject the drive, safely remove, etc.
"Turn off USB storage" etc, to mount it back to the phone
Code:
> adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> adb reboot
Bam. Done.
Method 2: with Root Explorer
(courtesy of kirbo20)
This is a pretty easy process. I went in to Root Explorer - dbdata - databases - com.android.providers.settings, copied settings.db to my sd card, edited it on my pc with a db editor changed 0 to a 1 next to non market apps. Copied it back to the original directory, rebooted and installed a non market app.
(added by gotfolk)
again using FF plug in..
Click Secure on the left pane
click on install_non_market_apps
click edit
number 3 states value click there and type in 1. hit ok
(/gotfolk)
Please use caution. If you want to make sure the db save properly open it on your sd card before you copy and replace the original. It should open up as a readable table. If it opens up in a txt editor its corrupt. This permanently enables non market apps. You can not toggle it on and off.
( This is a sqlite3 database file, you can find many GUI editors that will be able to handle the editing, including a FF plugin. Search "SQLite" )
Method 3: with Root Explorer & Sqlite Editor & Terminal Emulator
(courtesy of ice3186)
- Open Root Explorer
- Browse to /dbdata/databases/com.android.providers.settings/
- copy settings.db to the root of your sd card ( /sdcard/ )
- Click on the newly copied settings.db in /sdcard/, with SQLite Editor installed, you can open and edit it here.
- Select the "secure" table, and update the value of 'install_nonmarket_apps' from 0 to 1, and save.
- close out of SQLite editor
- copy the modified file ( /sdcard/settings.db ), and browse back to /dbdata/databases/com.android.providers.settings/ and paste
- confirm the overwrite if asked and then open again to confirm it's been changed.
- open Terminal Emulator
Code:
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# reboot
- reboot phone.
No PC, no Mac, no drivers, no SDK. Viola.
Method 4: Mac & Android SDK
You will see "[sdcard]" through this method...I don't own a Mac so I'm guessing a bit.
This method uses the tools you already have at hand, as part of the SDK. All instances in code blocks are run inside of the Terminal. You will need to know where you installed your SDK, and the tools directory therein.
Once rooted, go install BusyBox installer from the App Market/AppDroid etc and run it. It will download and install the latest version for you.
From a Max OS X, with USB Debugging ON. Ensure that you phone is UNLOCKED as it the SU app will ask for permission for 'UNKOWN' in the following command.
Connect to Mac, and Eject/Safely Remove the SD card, and "Turn off USB Storage" on the phone.
open Terminal, follow along:
Code:
> cd /android/tools
> ./adb shell
$ su
# cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
# exit
$ exit
mount the SD cards to the Mac,
"USB Connected select to... ", Mount
mine mounted as [sdcard]
Code:
> cp [sdcard]/settings.db settings.db
> ./sqlite3 settings.db
~> update secure set value="1" where name="install_non_market_apps";
1 row updated
~> .quit
> cp settings.db [sdcard]/settings.db
Eject the drive, safely remove, etc.
"Turn off USB storage" etc, to mount it back to the phone
Code:
> ./adb shell
$ su
# cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> ./adb reboot
Method 5: Android SDK only
Of course, this also requires root and BusyBox.
From the android sdk tools folder in a command prompt:
note: all linux/mac should use './adb' in place of just 'adb', and place quotes on the echo statement between echo and |
Code:
adb shell
su
chmod 666 /dbdata/databases/com.android.providers.settings/settings.db
exit
exit
adb pull /dbdata/databases/com.android.providers.settings/settings.db settings.db
echo update secure set value = 1 where name = 'install_non_market_apps';|sqlite3 settings.db
adb push settings.db /dbdata/databases/com.android.providers.settings/settings.db
adb shell
su
chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
chown system.system /dbdata/databases/com.android.providers.settings/settings.db
reboot
NOTICE
You must chown the settings.db file and reboot once it is back in its original location. If you do not, you will not be able to alter settings such as WiFi,GPS, default Ringtones, etc. It's also highly likely that you may wish to chmod to 660 (-rw-rw---), so I've tacked that in here and above.
Code:
> adb shell
$ su
# chmod 660 /dbdata/databases/com.android.providers.settings/settings.db
# chown system.system /dbdata/databases/com.android.providers.settings/settings.db
# exit
$ exit
> adb reboot
Chown Note
In the event that you are getting "chown: unknown user/group system:system" please try 1000.1000 as this has been reported to work on several of the samfirmware-released roms that fail with this message.
Absolutely do not use someone else's settings.db unless you specifially make it a point replace android_id with your android_id!
[
Sent from my AOSP Captivate
Click to expand...
Click to collapse

[TEMPORAL-FIX] Remount RW /system reboot

Hello guys, i know that maybe some people have the same issue, i was able to bypass this using a not very beautiful solution but it works perfect lol.
Check this:
Code:
1. Connect your phone with adb, then type adb shell
2. Type su, to get root access
3. Type stop ric
4. Type busybox pkill -f /sbin/ric
5. Type this "mount -ro remount,rw /" without the quotes to remount / as rw
6. Type this "chmod 0440 /sbin/ric" without the quotes
6. Copy the file build.prop from /system to /
7. Open this file using a root text editor, in my case i used Root Explorer
8. Add this "ro.secure=0" without the quotes below "ro.build.host"
9. Save the changes to the file
10. Type stop ric
11. Type busybox pkill -f /sbin/ric
12. Type "mount -ro remount,rw /system" without the quotes to remount /system as rw, after you do this, please continue to other steps as fast you can.
12. Type busybox cp -af /build.prop /system/build.prop
13. rm /build.prop
14. Done. Now you should be able to mount /system as rw too.
I tested this because i was trying to get ubuntu to run on my system but the bootscript was trying to mount my /system as rw, it was rebooting my tablet but now i've ubuntu perfect and running.
See my attachments
UPDATE: Links to the Full HD images
1. http://cl.ly/image/42210t2X3B1r
2. http://cl.ly/image/2P2S3T1S0k3v
3. http://cl.ly/image/04120x0r1B0B
4. http://cl.ly/image/1f0N310P1O0c
juanyunis said:
Hello guys, i know that maybe some people have the same issue, i was able to bypass this using a not very beautiful solution but it works perfect lol.
Check this:
Code:
1. Connect your phone with adb, then type adb shell
2. Type su, to get root access
3. Type stop ric
4. Type busybox pkill -f /sbin/ric
5. Type this "mount -ro remount,rw /" without the quotes to remount / as rw
6. Type this "chmod 0440 /sbin/ric" without the quotes
6. Copy the file build.prop from /system to /
7. Open this file using a root text editor, in my case i used Root Explorer
8. Add this "ro.secure=0" without the quotes below "ro.build.host"
9. Save the changes to the file
10. Type stop ric
11. Type busybox pkill -f /sbin/ric
12. Type "mount -ro remount,rw /system" without the quotes to remount /system as rw, after you do this, please continue to other steps as fast you can.
12. Type busybox cp -af /build.prop /system/build.prop
13. rm /build.prop
14. Done. Now you should be able to mount /system as rw too.
I tested this because i was trying to get ubuntu to run on my system but the bootscript was trying to mount my /system as rw, it was rebooting my tablet but now i've ubuntu perfect and running.
See my attachments
Click to expand...
Click to collapse
Also i've my bootloader locked, so i believe this could work for both (unlocked and locked).
juanyunis said:
Also i've my bootloader locked, so i believe this could work for both (unlocked and locked).
Click to expand...
Click to collapse
unlocked bootloader users don´t have the reboot problem :silly: o i think sony want´s to stop the people from rooting without having an unlocked bootloader.
mine is unlocked, had no reboot problems on .370 rooted but i´m on cm10.1 now tough i had no probs with stock. i love the stock android interface and top statusbar.
om22 said:
unlocked bootloader users don´t have the reboot problem :silly: o i think sony want´s to stop the people from rooting without having an unlocked bootloader.
mine is unlocked, had no reboot problems on .370 rooted but i´m on cm10.1 now tough i had no probs with stock. i love the stock android interface and top statusbar.
Click to expand...
Click to collapse
That's nice to hear, but it makes sense because with a customer recovery that would be very easy to fix lol.
I do love CM 10.1, but i don't want to loose BE2. In my case i love how it works making my colors more vibrant but well i'm use to AMOLED displays so you can imagine.
I hope to see a way to bypass this or maybe a new stock firmware from Sony with the new status bar.
Thanks for reporting that you don't have this issue!
juanyunis,
Could you please share or write a manual for installation of Ubuntu on Tablet Z?
theZest said:
juanyunis,
Could you please share or write a manual for installation of Ubuntu on Tablet Z?
Click to expand...
Click to collapse
Sure I'll write one tomorrow. It's very easy once you have root with remount system fixed. Have a good day.
Sent from my Samsung Galaxy S4
This fix didn't work for me. To be more precise, it worked until I turned off the tablet. After I started the tablet, remouting caused reboots again. :crying:
---------- Post added at 10:11 PM ---------- Previous post was at 10:07 PM ----------
Oh, just to add,. I verified that the /system/build.prop file was saved correctly. The line is added.
fness said:
This fix didn't work for me. To be more precise, it worked until I turned off the tablet. After I started the tablet, remouting caused reboots again. :crying:
---------- Post added at 10:11 PM ---------- Previous post was at 10:07 PM ----------
Oh, just to add,. I verified that the /system/build.prop file was saved correctly. The line is added.
Click to expand...
Click to collapse
It's a temporal fix lol, but you can use Fisherman ROM with that fixed, i just don't need to use this fix all the time. But once you did this, you can open a terminal on your tablet and run this:
1. su
2. chmod 0444 /sbin/ric
3. stop ric
4. busybox pkill -f /sbin/ric
If you want this to be a permanent solution you can create a sh script with those commands and then user a init.d app like CPD Adjuster to run that script on boot. I'll try to do this for you.
Thanks, now I understand. Stupid of me really. It says temporal in the title.
juanyunis said:
Hello guys, i know that maybe some people have the same issue, i was able to bypass this using a not very beautiful solution but it works perfect lol.
Check this:
Code:
1. Connect your phone with adb, then type adb shell
2. Type su, to get root access
3. Type stop ric
4. Type busybox pkill -f /sbin/ric
5. Type this "mount -ro remount,rw /" without the quotes to remount / as rw
6. Type this "chmod 0440 /sbin/ric" without the quotes
6. Copy the file build.prop from /system to /
7. Open this file using a root text editor, in my case i used Root Explorer
8. Add this "ro.secure=0" without the quotes below "ro.build.host"
9. Save the changes to the file
10. Type stop ric
11. Type busybox pkill -f /sbin/ric
12. Type "mount -ro remount,rw /system" without the quotes to remount /system as rw, after you do this, please continue to other steps as fast you can.
12. Type busybox cp -af /build.prop /system/build.prop
13. rm /build.prop
14. Done. Now you should be able to mount /system as rw too.
I tested this because i was trying to get ubuntu to run on my system but the bootscript was trying to mount my /system as rw, it was rebooting my tablet but now i've ubuntu perfect and running.
See my attachments
UPDATE: Links to the Full HD images
1. http://cl.ly/image/42210t2X3B1r
2. http://cl.ly/image/2P2S3T1S0k3v
3. http://cl.ly/image/04120x0r1B0B
4. http://cl.ly/image/1f0N310P1O0c
Click to expand...
Click to collapse
Hi!
When i edit the build.prop file i have bootloop issue!
So i'm traying the bellow
su
mount -ro remount,rw /
chmod 0440 /sbin/ric
stop ric
busybox pkill -f /sbin/ric
Then you can mount /system as rw from a file explorer (estrong)
The attached file (unzip first) you can use it with ROM toolbox (add as new script) and execute as root and on boot option (if you want a permanent solution)
It's very useful when I deodex my ZULTRA without CWM.
Just to say thanks.
And.....can I use your method in my post?
http://forum.xda-developers.com/showthread.php?t=2468109
Easy Method Linux Install...
There is an app on the play store called "Complete Linux Installer" it works perfectly fine and you can pick from different distros, I tried Ubuntu and Debian. If you can find the full version somewhere for "free" you can customize your screen rez. There is a free version that has some restrictions. You also need androidVNC to mount. This runs on top of android so when you are done with linux you just shut it down to go back to android.
juanyunis said:
Hello guys, i know that maybe some people have the same issue, i was able to bypass this using a not very beautiful solution but it works perfect lol.
Check this:
Code:
1. Connect your phone with adb, then type adb shell
2. Type su, to get root access
3. Type stop ric
4. Type busybox pkill -f /sbin/ric
5. Type this "mount -ro remount,rw /" without the quotes to remount / as rw
6. Type this "chmod 0440 /sbin/ric" without the quotes
6. Copy the file build.prop from /system to /
7. Open this file using a root text editor, in my case i used Root Explorer
8. Add this "ro.secure=0" without the quotes below "ro.build.host"
9. Save the changes to the file
10. Type stop ric
11. Type busybox pkill -f /sbin/ric
12. Type "mount -ro remount,rw /system" without the quotes to remount /system as rw, after you do this, please continue to other steps as fast you can.
12. Type busybox cp -af /build.prop /system/build.prop
13. rm /build.prop
14. Done. Now you should be able to mount /system as rw too.
I tested this because i was trying to get ubuntu to run on my system but the bootscript was trying to mount my /system as rw, it was rebooting my tablet but now i've ubuntu perfect and running.
See my attachments
UPDATE: Links to the Full HD images
1. http://cl.ly/image/42210t2X3B1r
2. http://cl.ly/image/2P2S3T1S0k3v
3. http://cl.ly/image/04120x0r1B0B
4. http://cl.ly/image/1f0N310P1O0c
Click to expand...
Click to collapse
it will be better to execute the commands like this in a row (one single line) as to execute them asap:
mount -o remount,rw /system; mv /build.prop /system/; chmod 644 /system/build.prop; mount -o remount,ro /system
Bootloop!
I followed the instructions on the first page and successfully mounted /system as RW. Then I rebooted (by typing reboot in ADB), and now my tablet is in a bootloop.
I didn't touch anything other than build.prop and media_codecs.xml. What should I do?
Edit: Solved by flashing FTF.
is there any save way to run it on a 16GB wifi only model ? I have root, but my BL is locked.
did try the script form page 1 but this did not work. I am not sure about edeting the build.prop witht the bootloop problems :/
greetings
edit: it would be fine if i can edit the host file from the pc just once, without rw access from the tab itself, i just wanna get rid of those annoying ads everywhere
very usefull on xperia z1 thanks man :good:

Getting rid of the emulated CD drive and unknown devices in MTP mode [Partial Fix]

When you connect your MIUI device to the computer through USB in File Transfer (MTP) mode (that is, not in Photo Transfer), it also emulates a CD-ROM drive. The ISO image for the fake CD contains a copy of Mi Assistant, a device management tool for the PC, which is in Chinese only and can be downloaded from the Internet anyway. Basically, it's all useless and mildly annoying.
View attachment 3137500
Here's what you need to do to get rid of it:
Step 1. Edit /system/build.prop and add the line:
Code:
persist.service.cdrom.enable=0
Step 2. Edit /init.qcom.usb.rc and where it says:
Code:
on property:sys.usb.config=mtp
(a) Change the first line to remove mention of mass_storage (this is for the CD only):
Code:
write /sys/class/android_usb/android0/functions mtp
(b) Remove these two lines:
Code:
write /sys/class/android_usb/android0/f_mass_storage/lun/ro 1
write /sys/class/android_usb/android0/f_mass_storage/lun/file /data/miui/cdrom_install.iso
Similarly, where it says:
Code:
on property:sys.usb.config=mtp,adb
(a) Change the first line after the above to:
Code:
write /sys/class/android_usb/android0/functions mtp,adb
(b) Remove these two lines:
Code:
write /sys/class/android_usb/android0/f_mass_storage/lun/ro 1
write /sys/class/android_usb/android0/f_mass_storage/lun/file /data/miui/cdrom_install.iso
Step 3. Delete the ISO image file to free up some space.
File location: /data/miui/cdrom_install.iso
And here's how to do it:
Using Android Debug Bridge from the command line:
Code:
adb root
adb shell "mount -o remount,rw /system"
adb shell "echo persist.service.cdrom.enable=0 >>/system/build.prop"
adb pull /init.qcom.usb.rc
Now use your favorite editor to make changes as described above in step 2.
Code:
adb push init.qcom.usb.rc /
adb shell "mount -o remount,ro /system"
adb shell "rm -f /data/miui/cdrom_install.iso"
adb reboot
Using ES File Explorer:
Download from Play Store or the developer's website. Install. Open. In context menu (hold leftmost button for 1 second), switch Root Explorer to On (this will fail). Go back to the home screen. Open Security, Permissions, Root Access. Put the switch next to ES File Explorer to On. Now you can switch back to ES File Explorer, and follow the steps 1-3 above. Use the built-in editor the make changes in the files.
Unknown USB devices when connected in MTP mode
When your device is connected in MTP mode (File Transfer) there are 3 unrecognized USB devices. To check if you have them too, go to Control Panel and choose Device Manager or run mmc devmgmt.msc from the command line (screenshot 1). The devices appear to have no hardware IDs (screenshot 2) and their class number seems to be {c897b31c-e8d2-59e9-a212-ccf0962fe102} (full registry dump provided as attachment).
View attachment 3137478 View attachment 3137479
This problem appears to be caused by the CD-ROM emulation as well: the number of devices will actually increase to 4 when it's switched off following the instructions above, which means there must be one extra step to get rid of it completely. This doesn't seem to cause any problems and the issue appears to be purely cosmetic. If I have time to investigate it further, I will report the conclusions back here. Meanwhile, if anyone has an idea what the cause is, please feel free to share it (might also be a driver issue).
Disclaimer: there might be some mistakes in what I wrote. Please use at your own discretion. This should work with a "developer" stock ROM out of the box, otherwise you'll need to set-up root access first.
Update for a total fix, and a more elegant approach
So the missing link to make the mysterious devices disappear is to edit /init.qcom.usb.rc and where it says:
Code:
case "$cdromenable" in
0)
Comment out (put the # sign) in front of:
Code:
#echo "" > /sys/class/android_usb/android0/f_mass_storage/lun0/file
The best way to make the whole change seems to be to unpack boot.img, for example with Android Image Kitchen, apply the patches (diffs attached), rebuild the image, and flash it. The persist.service.cdrom.enable=0 property can be set in /default.prop so that all the changes are contained within the boot image. In summary:
Code:
unpackimg boot.img
echo "persist.service.cdrom.enable=0" >>ramdisk/default.prop
patch ramdisk/init.qcom.usb.rc < init.qcom.usb.rc.diff
patch ramdisk/init.qcom.usb.sh < init.qcom.usb.sh.diff
repackimg
cleanup
adb reboot bootloader
fastboot erase boot
fastboot flash boot image-new.img
fastboot reboot
@ Aqq123 thanks for the write up, I have a Mi 4C and the iso file is not in /data/miui/ but it still shows up when connecting to pc

Categories

Resources