[Q] [DEV] [P5113] Why does repackaged boot.img behave differently from stock? - Galaxy Tab 2 Q&A, Help & Troubleshooting

I've extracted a boot.img using CWM backup on my P5113. The backup and restore procedures both work as expected. However, I've been adding some additional kernel modules to my boot.img and I was seeing strange behaviour after re-flashing with the new kernel. This was even before I used insmod to load my new kernels. Wanting to eliminate all possibilities, I took the stock boot.img, unpacked it using ./unpack-bootimg.pl boot.img, and then repacked it, and tar'ed and md5'ed it. When I flashed the resulting kernel.tar.md5 to the device, it appeared to work, but certain things behaved strangely. For example, my WIFI turns on and can see all the networks I'm used to seeing, and when I try to join one, it accepts my password and marks it as a saved connection. However, there is actually no connectivity (e.g. when i try to load google.com in a browser, I get a network error). Using dmesg shows that it's unable to establish a connection, but with no further details.
Has anybody else experienced this? Could flashing a boot.img generated by CWM with ODIN be a problem? I find it really strange that unpacking and repacking an image without making any changes could cause this kind of behaviour.
Any help would be greatly appreciated.

Related

Q: Kernel Testing - Netarchy Wifi issue

Completely new to rooting, flashing so please excuse me if this is something really simple that I might be overlooking.
I've rooted my Nexus S I-902 on stock 2.3.4 rom. My goal is just to get voodoo color controls working via a kernel, but might also like a few other things like CIFS support.
So far I've only tried two different netarchy kernels suggested by others.
netarchy kernels I've tried...
EXPERIMENTAL CFS - netarchy-nexus-1.3.0.12-cfs-2.3.4-signed.zip
STABLE CFS - netarchy-nexus-1.3.2-cfs-2.3.4-signed.zip
I haven't tried actually flashing the zip via clockwork, but instead have extracted the netarchy.img files and used adb to boot the image.
fastboot boot netarchy.img
which loads the kernel and rom. I'm having wifi error issues doing this. Wifi just gives an error, but everything else seems to be ok.
What I'm wondering is by extracting only the IMG file above is that bypassing some included modules that might be needed that are not included in the zip file? If so is there an easy way just to test the whole kernel without actually flashing it first?
You need to flash the whole zip, you are only flashing the img which does not include the wifi modules
Sent from my Nexus S using XDA App
Edit:
i know there is a command to flash a kernel that will revert to stock on reboot but can not remember or find it in Google
if you are worried just do a nandroid backup before
bringonblink said:
You need to flash the whole zip, you are only flashing the img which does not include the wifi modules
Sent from my Nexus S using XDA App
Edit:
i know there is a command to flash a kernel that will revert to stock on reboot but can not remember or find it in Google
if you are worried just do a nandroid backup before
Click to expand...
Click to collapse
thanks..
ok, If I just did a Rom Manager backup which ran ClockworkMod Recovery for the backup. Is that the same thing as nandroid backup (guessing this is compatiable since there is a nandroid.md5 checksum file)?
I copied the backup on SD card over to my PC just in case.
So my guess is that I can then now FLASH any new kernel and if something goes wrong then I use Rom Manager or clockwork recovery to revert back to the original state of the file I backed up with Rom Manager above?!
This would then revert the new changes from any new Rom / Kernel I may have flashed correct?
What about applications or other data on the SD card (music, photos, app data, ect) That included in the backup too (file seems too small for that)?
kwhy said:
thanks..
ok, If I just did a Rom Manager backup which ran ClockworkMod Recovery for the backup. Is that the same thing as nandroid backup (guessing this is compatiable since there is a nandroid.md5 checksum file)?
I copied the backup on SD card over to my PC just in case.
So my guess is that I can then now FLASH any new kernel and if something goes wrong then I use Rom Manager or clockwork recovery to revert back to the original state of the file I backed up with Rom Manager above?!
This would then revert the new changes from any new Rom / Kernel I may have flashed correct?
What about applications or other data on the SD card (music, photos, app data, ect) That included in the backup too (file seems too small for that)?
Click to expand...
Click to collapse
Thats correct, and SD card is not touched when flashing, so need for it to be backed up
All flashed now and wifi working correctly. Colors changed finally back now how I liked them.
Thanks for the help.
Having the exact same issue unfortunately, first time rooting a phone. Followed the how-to from here http://forum.xda-developers.com/showthread.php?t=895545 and got everything going. Only kernel I put on it was from the stable 2.3.4 list here http://forum.xda-developers.com/showthread.php?t=936219&highlight=netarchy (tried both cfs and bfs). Went through recovery and re-tried it all, including a few factory resets with still no luck. 3g is kind of lousy out here and wifi helps a ton, do you have any other idea's to fix?
Have tried airplane mode toggling, factory reset, battery pulling, and reflashing everything in order, not sure what else to do
Could you connect your phone to PC & check for the logs over adb ? It's via the data-cable that your phone shipped with, download the android sdk (you could search the forum for detailed instructions on that) which houses the adb binary & issue these commands over the command prompt:
adb start-server
adb shell logcat
The second would produce fair amount of output on the screen including those related to WiFi. Also once you have enabled the Wifi on your phone, you could try the below command too:
C:\> adb shell lsmod
bcm4329 192346 0 - Live 0xbf07e000 <--- That's the wireless driver on board my phone which has a BroadCom wireless chip called bcm4329.
But should your phone instead produce no terminal output or an error in the "logcat", it would imply that the kernel essentially is missing the driver.

[Q] recovery.img and recovery-from-boot.p

Hi all,
I am trying to make sense of how the android system is made up w.r.t to boot/kernel.
I have been looking at the .img files in the build (I built for the "passion" device), and have been googling around to find some more information about the various .img files.
I ran into a nice HOWTO in android-dls.com 's WIKI, titled HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images (I'm sorry, I'm a new user so XDA won't allow me to post links. I will try to modify my post a soon as I'm granted permission for that)
but I am afraid it is a little outdated:
I have several questions, but I will try to be brief, so I'll focus on
one of them, and if that works I'll proceed to the next questions, all related to "Android bringup for dummy embedded linux kernel experts".
I am fairly aware of differences between different linux
configurations, and I am very familiar with linux bringup concepts, so I will just use common examples from the linux world as my terminology. Hope it will be clear enough.
I understood that boot.img a combination of a kernel (e.g. bzImage in linux) and an initial ramdisk (e.g. initrd.gz), wrapped by some header, as in common linux kernel loading practice (piggy.o etc.).
Now, the aforementioned HOWTO says that the "recovery" image is built on
the same way, and that it is stored on the target's /system/
recovery.img .
I would assume that this would be compound of the ramdisk-
recovery.img, and some other kernel.
Now, the problem is that:
1. This /system/recovery.img does not exist from what I saw (on my
Motorola XOOM tablet)
2. What does exist is /system/boot-from-recovery.p , which is
created during the boot process in obj/PACKAGING/
recovery_patch_intermediates/recovery_from_boot.p .
I saw tons of posts referring to the files, all said that "in order to
replace the rescue disk image, this file needs to be renamed" - but I
am looking for a way to figure out what it is, and how to extract its
contents.
I assume /system/recovery.img is deprecated, is that correct?
3. I did not see any flash devices in /proc/mtd (which is strange).
I searched for hours before sending this post, so I would appreciate
your help. I also posted a similar message at the google android-building group, but it has not been answered yet, and I got the impression that these forums are more active and can help me get where I need.
If it is not the right place to ask the question please let me know -
I just assume this is a general android concept and not device
specific.
Thanks,
Ron
I meant of course /system/recovery-from-boot.p , and not recovery-from.boot.p
-R
Hi,
I don't know if you managed to find out what "recovery-from-boot.p" is, since this is quite an old post, but I think I'll try to help anyway.
recovery.img is not deprecated at all. From my own experience, it looks like "recovery-from-boot.p" is a protection measure introduced in Gingerbread, but not the recovery itself. What it does is replacing any recovery currently installed on the phone with the default one on every boot.
I discovered it after flashing a custom recovery on my Android 2.3.4 phone. It worked, but just during the first boot. The next time I rebooted the phone, the default recovery image was there again. After browsing several sites, I found that "recovery-from-boot.p" is responsible for that.
So, if you flash a custom recovery image on a Gingerbread phone and want to keep it forever, you must delete this "recovery-from-boot.p" from /system, or at least rename it. That way, your new custom recovery will never get overwritten buy the default one, unless you do it yourself.
I hope this helps you and clarifies this question.
Well, it helped me. I'm new to rooting and just came across mention of this file. I am trying to learn 'why' as well as 'how'', so your post was informative.
Was going to ask a dumb question but I figured it out
i need to delet those files
bigrammy said:
Was going to ask a dumb question but I figured it out
Click to expand...
Click to collapse
Hello
can't delete those files >> i am rooted but every time i delete or rename it take permission then nothing happen >> how i can delete them plsssssssssssssssssssssssssssssssssssssss
recovery from boot p
ahmed morsy said:
Hello
can't delete those files >> i am rooted but every time i delete or rename it take permission then nothing happen >> how i can delete them plsssssssssssssssssssssssssssssssssssssss
Click to expand...
Click to collapse
Hey good day. Did you get your problem fixed...? I have an xt912 it has the same file. For days I've been trying to wipe the phone. Tryed rooting it. I tryed reprogramming it. And I got through with all of that. But everytime the phone boots up it goes back to the same state. Then I used a root browser and while exploring I saw this recovery from boot file. I need help. And I don't think I can downgrade the Motorola phones. Thanks in advance.
jman0 said:
Hi,
I don't know if you managed to find out what "recovery-from-boot.p" is, since this is quite an old post, but I think I'll try to help anyway.
recovery.img is not deprecated at all. From my own experience, it looks like "recovery-from-boot.p" is a protection measure introduced in Gingerbread, but not the recovery itself. What it does is replacing any recovery currently installed on the phone with the default one on every boot.
I discovered it after flashing a custom recovery on my Android 2.3.4 phone. It worked, but just during the first boot. The next time I rebooted the phone, the default recovery image was there again. After browsing several sites, I found that "recovery-from-boot.p" is responsible for that.
So, if you flash a custom recovery image on a Gingerbread phone and want to keep it forever, you must delete this "recovery-from-boot.p" from /system, or at least rename it. That way, your new custom recovery will never get overwritten buy the default one, unless you do it yourself.
I hope this helps you and clarifies this question.
Click to expand...
Click to collapse
i have deleted it . then flash recovery ,, but it failed .. it wont even now go to stock recovery itself.. any help..
Does recovery from boot has to do anything with ota update applying ? or it will cause issues in system update ?
I have recovery-from-boot.p in my system and i cant root my phone i cant change the recovery img ... Help?
I hadn't had to deal with this for some time, perhaps because I've updated my devices (Nexus 4, Nexus 5, Nexus 7 '13) with the factory images, with "-w" removed from flash-all, then flashing CWM's recovery, ensure SuperSU was installed, then continuing. Today, I used the new OTA image on my Hammerhead/N5, and recovery-from-boot.p seems to be up to its old tricks again.
Solution is simple.
Flash your alternate Recovery in fastboot, fastboot flash recovery [recovery image file] . Boot into Recovery. Apply/install root app (typically via sideload). Mount /system. adb shell mv /system/recovery-from-boot.p /system/recovery-from-boot.p.bak. Reboot. Done. (If you're unfamiliar with fastboot, adb, and flashing new recovery partitions, you have some reading to do. Commence RTFM.)
I also used to have to move /system/etc/install-recovery.sh but that seems to be gone in Marshmallow. :} Or moved...?
well, after following a guide I have extracted the system.img from a pure-nexus ROM(The ROM I'm currently using), now I can see that "recovery-from-boot.p" file is responsible for recovery lock in my phone. I'll keep it short and straight to the question
"Can I remove this file and rebuild the .dat file and flash it?, so that I won't have any other problems at all"
I want to know if recovery-from-boot.p file is linked to anything other than just locking the recovery or re-flashing it innumerable times.

[Guide] How to "fix" WiFI after come back from custom roms to Stock rom.

Ok guys after lots of tests, I've managed that the fastest and easiest way to have wifi fixed on Stock android rom is to delete some lines (they are 2-3) in a file located on "/persist" folder.
PROCEDURE
1) You need magisk (or any other form of root) and a file manager that can edit (with root permissions) systems files.
Once you have done it, go on root "/persist" and find the file "wlan_mac.bin", open it with a text editor and delete all lines in it(let it empty but don't delete it, just delete lines in it), after save and reboot phone, done.
2) This is faster, it is going to do same thing but without magisk. Just flash the WiFi_fix.zip (see file below in attachment) from Twrp and it will replace the corrupted wifi_mac.bin with an empty one.
Optional: if you know how to generate a xiaomi vendor mac address, just replace the empty wlan_mac.bin from my WiFi_fix.zip file with yours.
Comment:
*This is the fast and easy but not the best one. I'm finding a workaround.
Anyway this method isnt a problem you are going to use base Mac Address and not the vendor one. In therms of warranty I don't think it will change something.
PS: Actually this will be fixed on custom rom that used to edit that file.
Good work!
I have same problem. When i flash stock rom via mi flshtool i can't connect to wifi. It shows wifi but after entering pwd it shows only saved. Can't connect at all.can u explain procedure when flashed stock rom. Flashing persist.img via fastboot will fix? Without rooting. Sorry for my bad English.
---------- Post added at 03:30 PM ---------- Previous post was at 03:23 PM ----------
So you are saying after flashing stock rom i have to unlock bl and root. And then edit system????? Sorry im a noob to Mi A1
kishanb1988 said:
I have same problem. When i flash stock rom via mi flshtool i can't connect to wifi. It shows wifi but after entering pwd it shows only saved. Can't connect at all.can u explain procedure when flashed stock rom. Flashing persist.img via fastboot will fix? Without rooting. Sorry for my bad English.
---------- Post added at 03:30 PM ---------- Previous post was at 03:23 PM ----------
So you are saying after flashing stock rom i have to unlock bl and root. And then edit system????? Sorry im a noob to Mi A1
Click to expand...
Click to collapse
Just connect phone in fastboot on pc. open cmd (you need fastboot and adb drivers installed on PC) and write this:
fastboot oem unlock (to unlock bootloader)
fastboot boot twrp-oreo-3.2.1-2.img (you need last official twrp from XDA for that. Name can be different, you have to write extaclty of your file)
Phone will boot on twrp. From install/flash magisk and reboot phone. Now you have magisk and root.
Download and installa a file manager like MixPlorer, Root explorer, MtManager and many others.
Go on "root" and find the folder "persist". In it you will find the file "wclan_mac.bin" just edit. If you still have issue I will made something that is going to do it automatically.
Thanks mate. I'll try ?, you save the hours of works. Thanks again
Has someone tried erasing then flashing persist.img?
Your method is not the fastest nor the best to reset the WiFi connection, You do not need to be root.
You must do the following:
The persist.img file must be downloaded from the following link
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
“persist.img” file and move it to phone memory “/sdcard”.
1.- Enter fastboot mode, , you must have unlocked the bootloader
2.- Execute TWRP with the command fastboot boot twrp.img
3.- Open Terminal in TWRP Custom Recovery (go to "Advanced"> "Terminal").
4.- Type the following command:
dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
Click to expand...
Click to collapse
5.- Restart and with it the wifi will work.
Procedure taken from https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
speedunderx said:
Your method is not the fastest nor the best to reset the WiFi connection, You do not need to be root.
You must do the following:
The persist.img file must be downloaded from the following link
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
“persist.img” file and move it to phone memory “/sdcard”.
1.- Enter fastboot mode, , you must have unlocked the bootloader
2.- Execute TWRP with the command fastboot boot twrp.img
3.- Open Terminal in TWRP Custom Recovery (go to "Advanced"> "Terminal").
4.- Type the following command:
5.- Restart and with it the wifi will work.
Procedure taken from https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
Click to expand...
Click to collapse
It is dangerous, I dont advise it.
SevenSlevin said:
It is dangerous, I dont advise it.
Click to expand...
Click to collapse
It works perfectly, it's more dangerous what you do.
deleted, double post.
speedunderx said:
It works perfectly, it's more dangerous what you do.
Click to expand...
Click to collapse
I don't think you have the idea of what you have done.
I will tell 2 points of the fact that it is dangerous:
1) for the not experted doing these things can easily bootloop/soft brick phone.
2) You flashed with "DD" and you have flashed a backup of another one so you are using his MacAddress.
Now tell me how safety is it if I know your MacAddress? (everyone who is going to flash it will have same MacAddress)
PS. in this case your MacAddress are:
Bluetooth: f4:f5:dB:e9:b6:dc
WiFi: f4:f5:dB:e9:b6:dd
check them on "settings, system, about phone, status".
SevenSlevin said:
I don't think you have the idea of what you have done.
I will tell 2 points of the fact that it is dangerous:
1) for the not experted doing these things can easily bootloop/soft brick phone.
2) You flashed with "DD" and you have flashed a backup of another one so you are using his MacAddress.
Now tell me how safety is it if I know your MacAddress? (everyone who is going to flash it will have same MacAddress)
PS. in this case your MacAddress are:
Bluetooth: f4:f5:dB:e9:b6:dc
WiFi: f4:f5:dB:e9:b6:dd
check them on "settings, system, about phone, status".
Click to expand...
Click to collapse
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
speedunderx said:
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
Click to expand...
Click to collapse
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
Edit 2-
1. Dirty Flashed ROM. Re-setup fingerprints. Reset network settings. Emptied out wlan.bin file, everything works except wifi.
2. Restored my personal backup of persist, re-setup fingerprints. Everything is now working.
oreo27 said:
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
I've already done it and have same your issue in past. Problem is that, that persist.img found on fastboot firmware stock, seems to non be complete and has "corrupted" (incomplete) WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat. And also it doesnt make the folder /persist/wifi_bin where are located other 2 folders "minus" and "plus".
In your case you have finished with no wifi, that isnt correct. You have wifi but you need to put phone next to router cause with those "corrupted" files it has really low range. To fix that you just need files that I've wrote above from someone that has correct files. In this case you ave done a backup, you just needed to copy wifi_bin folder, WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat from your backup.
Anyway actually I think you are using the hardware mac address that in most of phones starts with: 00:0a:f5 (it is the prefix of vendor Airgo networks that produce those chipsets and works under Qualcomm). I've seen also mac starting with: 00:00:00 that is the prefix of Xerox Corporation.
To turn back to your back vendor (XIaomi) mac address your last hope, as I know, is to use bluetooth mac. Considerading that you have a backup of it (it is located in /persist/bluetooth) and you have never touched it.
Click to expand...
Click to collapse
SevenSlevin said:
oreo27 said:
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
I've already done it and have same your issue in past. Problem is that, that persist.img found on fastboot firmware stock, seems to non be complete and has "corrupted" (incomplete) WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat. And also it doesnt make the folder /persist/wifi_bin where are located other 2 folders "minus" and "plus".
In your case you have finished with no wifi, that isnt correct. You have wifi but you need to put phone next to router cause with those "corrupted" files it has really low range. To fix that you just need files that I've wrote above from someone that has correct files. In this case you ave done a backup, you just needed to copy wifi_bin folder, WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat from your backup.
Anyway actually I think you are using the hardware mac address that in all phones starts with: 00:0a:f5.
To turn back to your back vendor mac address your last hope, as I know, is to use bluetooth mac. Considerading that you have a backup of it (it is located in /persist/bluetooth) and you have never touched it.
Click to expand...
Click to collapse
I was actually able to restore everything . I did a dd backup of my persist partition prior to messing with it. I simply restored that and got everything working normally after I re-registered my fingerprints.
Good to know that I can simply replace those files. I just checked those out after I extracted my backup. Good to know I can just use those.
Apart from WiFi, is there anything else that's damaged when flashing the persist.img from Fastboot?
P.S. You're right, it was showing the networks but it wasn't connecting.
Click to expand...
Click to collapse
I am currently in RR, I think the best way is to wait for the developers to solve the problem, with an update.
oreo27 said:
SevenSlevin said:
I was actually able to restore everything . I did a dd backup of my persist partition prior to messing with it. I simply restored that and got everything working normally after I re-registered my fingerprints.
Good to know that I can simply replace those files. I just checked those out after I extracted my backup. Good to know I can just use those.
Apart from WiFi, is there anything else that's damaged when flashing the persist.img from Fastboot?
P.S. You're right, it was showing the networks but it wasn't connecting.
Click to expand...
Click to collapse
But Attention on deleting files on /persist folder. If you delete one of this (or all them),
WCNSS_qcom_wlan_nv.bin
WCNSS_wlan_dictionary.dat
wlan_mac.bin
you will end in a costantly reboot of phone. For that I've advised only to delete lines with a text editor from "wlan_mac.bin", and as you have seen flashing "persist.img" need lots of knowledge and it is risky (in your case you have done the best thing of doing a backup of it) if you dont know what you are doing.
PS. you can send me in PM your /bluetooth/.bt_nv.bin file. Need an hexadecimal editor and if that file was never touched (as I think) you can restore back your old Xiaomi wifi mac address also.
Click to expand...
Click to collapse
Hi,
I'm having the same issue with WiFi. Connected to WiFi, accepted pw, but not working the wifi connection.
I've a fresh stock oreo, now I see the original BT MAC address.
How to do to make wifi work again without loosing original BT MAC?
speedunderx said:
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
Click to expand...
Click to collapse
i dont know if u have tried it yourself and i dont know the technical details, but i have tried doing that after coming from RR and it didnt work. and more importantly i ended up having 30 sec reboots as someone pointed out here. This is what worked for me:
https://forum.xda-developers.com/mi-a1/help/wifi-issues-t3732798/page2
i havent tested the method described here but i am pretty sure it is no more worse than the one you advice
sachin273 said:
i dont know if u have tried it yourself and i dont know the technical details, but i have tried doing that after coming from RR and it didnt work. and more importantly i ended up having 30 sec reboots as someone pointed out here. This is what worked for me:
https://forum.xda-developers.com/mi-a1/help/wifi-issues-t3732798/page2
i havent tested the method described here but i am pretty sure it is no more worse than the one you advice
Click to expand...
Click to collapse
It works other users have tried, but as the author of this post says, leave a generic wifi and bluetooth mac for everyone, I'm RR, and I have the physical device mac bone the original, you can try all the methods there are but none will restore the original mac of your device, just wait for it to be corrected with the Custom ROM updates. If you try a lot there is the possibility that you will have a nice brick.
You have to take into consideration that the phone is quite economical, therefore it is not the same thing that you fail in this way a galaxy s8 for example.
If you are using Custom Rom enjoy it, there are many that work better than stock android.
OK, I confirm that now I tried OP's solution 2 minutes ago, and it's working. WiFi came back, and operating fine!
But is that OK, that before made the empty wlan_mac.bin file saved I saw different MAC addresses in the system info, and when
rebooted then I saw again different MAC addresses in system info??
Which is the original?
speedunderx said:
It works other users have tried, but as the author of this post says, leave a generic wifi and bluetooth mac for everyone, I'm RR, and I have the physical device mac bone the original, you can try all the methods there are but none will restore the original mac of your device, just wait for it to be corrected with the Custom ROM updates. If you try a lot there is the possibility that you will have a nice brick.
You have to take into consideration that the phone is quite economical, therefore it is not the same thing that you fail in this way a galaxy s8 for example.
If you are using Custom Rom enjoy it, there are many that work better than stock android.
Click to expand...
Click to collapse

SM-J100VPP experimental flashing with Odin

Yes I still have this cheap little phone. It is a pain in my ass, but that's why I love it. It creates a challenge for me. I have been experimenting with flashing different system image firmwares, and the rest of the required files without bricking the device and having to start over. A couple of key points, you cannot unpack any of the images at it then, then repack them and Flash the device. Because of the secure boot being enabled, anything that isn't signed or has the same signature affiliated with it as the original firmware, will immediately fail flashing. Though I'm not sure it is so much a issue with signatures as it is with binaries and not being able to flash from, for example ver 4 to ver 3. Or so I thought. Because of the amount of aggravation this device poses even when rooted oh, I have been trying to find ways around flashing original system images to it without triggering a secure authorization fail. So far I have been able to take all of the images from a SM-J100VV, to my J100VPP except for the boot.img and aboot. Neither of those will flash successfully on the device if they come from another. All the other images do flash so long as you do not unpack them and repack. So you can take the system.img.ext4, and extract it from the firmware file for the J100VV, as well as the rest of the images not including the two named above and successfully flash them to J100VPP. And everything is in working order it. Now I'm trying to experiment further and see what else I am able to flash as well. There are several reasons why I think this works. If you look at the build prop for J100VPP, it's literally named four or five different things. the official device code is j1qltevzw. Until I see otherwise I assume that a system image that remains unmodified from one J1 device can potentially flash to the J100VPP. Simply extract all of the images from the firmware file and individually archive them as a .tar and Flash in Odin. Unless you screw around with anything else you shouldn't have to crash the device in the first place , you will not need to flash the boot.img or aboot. Seeing as this is a system root I'm hoping I can either go up or down an Android version at least one stop in either direction. I also cannot get xposed to successfully flash on this device without it bricking. I have tried every Xposed installer I come across to no avail. However virtualxposed dogs work on this device however I've been having trouble getting modules to function properly if at all. But that's beside the point since it's a virtual machine environment you pretty much are operating in a whole new operating system on the side of Android. It's almost like having BlueStacks on a Windows machine. Anyways what I'm trying to get across is potentially very much improving this device a by being able to flash on modified system images from other J1 devices. I know this phone is well past its prime but it still doesn't hurt to experiment.

Experience & questions on Flashing unofficial lineageos17 & magisk on Doogee S68Pro

TL;DR, I'm having 'SIM not detected' issues and my laptop will crash if I open another tab, please help I've attached output of `locat -b radio`
SOURCES
https://sourceforge.net/projects/an...8-UNOFFICIAL-treble_arm64_bvS.img.xz/download
https://github.com/topjohnwu/Magisk/releases/tag/v23.0
open_gapps-arm64-10.0-nano-20211021.zip from https://opengapps.org/
https://unofficialtwrp.com/twrp-3-3-1-root-doogee-s68-pro/
PREVIOUS EXPERIENCE:
I believe about two years back I had already installed an earlier build of LineageOs v17 Magisk v19 using fastboot. This was a trial and error kind of thing as I'm only a fanatic when I have to be. After a long time I finally had a working combination; sort of. Soon about every month or so, or after a couple of restarts, my SIM card would not get detected. Though different behaviors would occur, like 'Emergency calls only', 'No Service' or SMS suddenly not coming through. Since then one time or two a restart fixed the issue until the next month or so. I tried inserting the SIM in every order of events, wiping cache/ dalvik, switching airplain mode, resetting network settings, uninstalling magisk and so on. Then I read somewhere I can't remember about draining the battery capacitors(?) by turning the device on and off on an empty battery until there's no power left and the screen doesn't light up. So I did that and that worked! After a couple of times running into this issue on a fully charged 6300mah battery I downloaded 'generic battery drainer' from the GPlayStore and that app is still on my main screen. Apparently when the device shuts down as the app is draining it, the SIM is detected again when I power up after that, so no need too drain completely... I couldn't find answers anywhere and I like Lineage so much that I just accepted it :')
RECENT EXPERIENCE:
This weekend I decided to give it another try and went for LineageOs v18 but TWRP wouldn't go any further than 'Failed to mount /system/<something>' and I finally went for the above mentioned sources. I patched TWRP recovery using the Magisk app (though I get the impression that this was designed out of necessity, I kinda like being able to switch between Magisk like this). It took me a while to understand that using wipe and decrypting data in TWRP before flashing system (fastboot) has the result of adjusting the system partition to the size of system image when flashing, leaving no space for gapps. Then I flashed stock rom, started device and let it encrypt, then flash the new system image. This kept the original system size with enough space. System started up nicely after, except for: In magisk I got "abnormal state, other su detected". After much reading I could link it to the /system/xbin/su binary. Renaming this (scared to remove) fixed that and $PATH was even appended with ":/sbin:/sbin/.magisk/busybox:". And then, the SIM card issues started after my first couple of reboots :') When it works, so far it's only when I boot without magisk.
QUESTIONS:
Whenever I use the wipe option in TWRP that will also decrypt the device, I can wipe whatever I want. But as soon as system starts it's encrypting data again and I have to use adb for example. Isn't this a generic thing? I get confused about reading so much to use TWRP for this.
Can anyone shed light on the effects of what I'm describing with "draining the battery"? And how running the drainer app might have similar effects?
What is a better approach to configure the size of the system partition? Cause now it's basically twice as big as it has to be
Is the /system/xbin/su in the Lineage build? Is that the built-in root that was/ is/ will be deprecated?
And the GOLDEN question, how can I fix these SIM issues? My head is exploding with information trying to figure out what apps and processes are involved in this. As a logcat first-timer I managed to get the output of `logcat -b radio`, see attached file. This line caught extra attention "Failed getting samsung hardware radio", but I'm out of my territory.
THANKS in advance for any input,
greetings, from a little experienced flasher
RUNNING WITH MAGISK
Further inspecting the lines of logcat -b radio, it seams that ril-daemon isn't started when I'm booting with Magisk/ root, like in the previously attached file. Also getprop shows way fewer props with 'ril' in the value than starting non-root, though altering in count between boots. Reading this https://wladimir-tm4pda.github.io/porting/telephony.html and under RIL Initialization "RIL daemon reads rild.lib path and rild.libargs system properties to determine the Vendor RIL library to use and any initialization arguments to provide to the Vendor RIL" I'm wondering, can it be something as simple as a missing PATH or env value? Anyone have the same experience?
RUNNING WITHOUT MAGISK
logcat -b radio shows way more output and many more things happening. I get the impression that the issue is in or close to the application framework layer... I'm now, still hopeful, attaching two files of logcat radio output. One after boot, up to the login screen and one after login.
Between my post and now, I did however "Remove Telephony Subsystem" through setting => Phh Treble Settings => Misc features, (just trying things out as I read stuff) and I haven't been able to get SIM working again, also not after draining the battery as previously worked. Can this be related? How do I get it back (without reflashing)?
Finally some time to update again. As I have understood, Lineageos18 seems to have an extra level of complexity with the need for mounting system as rw and gets more complex if it is encrypted, so I'm still with magisk patched twrp and GSI Lineageos17.
My SIM still isn't working while booted as root, and I can at least determine that rild is not started and also not present/ available through the terminal. As to why and how to fix that, please let me know if you do! I read some places that PATH has to be inserted with the value of PATH from the non-root env in the init.environ.rc file. That did not make a noticable difference for me. I have not installed the magisk app. So far my SIM is working better than before in non-root/ normal system boot, even after restarts and switching to and back from root.
Some (trivial) things I found many questions and few answers about so far on my quest, in case it might help someone:
I could get rid of "too many symbolic links encountered" in the twrp terminal by setting PATH to just one bin location like '/sbin'. I also had this ld.config.txt error in the terminal (which indeed did not exist on my phone) and was able to trace it back to the /system/system/bin/dlinker64 binary trying to mount that file. I just renamed that and that resolved the error. Then I was able to use the terminal to edit the init.environ.oc file (I could not get adb to work in twrp mode). Not anything specifically, but I found this (among many posts on this forum) quite helpful https://www.didgeridoohan.com/magisk/MagiskInstallationIssues.

Categories

Resources