UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. AlainW94
    3. Best
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 144
    • Groups 0

    Posts

    Recent Best Controversial
    • Backup and restore using ubports-installer

      Hi all, I'm doing some modifications to the ubports-installer in order to be able to manage user and system data backup and restore.

      I have added a backup button on the install screen :
      1.png

      When you click on it you will have the following screen :

      2.png

      The installer will read the size of both system and userdata partition and give you an estimated sized need on your disk. You can name your backup. When you will click ok let's go, the phone will reboot into recovery and the backup will start :

      Capture du 2019-12-03 20-05-51.png

      At this and the phone will reboot into the OS. you will be able to find 2 tar file on your computer disk : one for the system-data, the other one for the user-data.

      It is actually working fine on Meizu Pro 5.
      BUT, in one of my previous thread, I had the issue that in recovery image, the user and system data partition was not mounted on /data.

      In the installer code, I added for the Meizu Pro 5 the mounting of sda44 on /data/

      So my questions to you are :

      • Who else on different phone models have the partition /data/user-data, /data/system-data not mounted in recovery ? If that is the case, what is your partition device to mount ?
      • does every one have the folder user-data and system-data in the /data folder while in recovery ?
      • Are you ok with this feature or do you find it usless ?

      I will now write the restore option.

      posted in App Development
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb pull it from github, here are my personal notes when I did it :

      git clone https://github.com/ubports/ubports-installer.git
      cd ubports-installer
      npm run-script dist:linux
      ./setup-dev.sh
      npm start
      
      posted in Support
      AlainW94A
      AlainW94
    • RE: SDK documentation

      Thanks @dobey once again. I have nothing to modify in it, just trying to save time by copying a portion of existing code to create a new ListView for the VVM messages in the dialer-app, I copy the ListView from the call history and I was looking for the structure of the model.

      I added a button (that will be showed only if the service is activated) on the dialer page :
      screenshot20190330_000034438.png

      That will display a new page :

      screenshot20190330_000021658.png

      I would like to display a play line when we touch the item (like the iphone style).

      posted in App Development
      AlainW94A
      AlainW94
    • RE: WiFi password loss after each and every reboot on MEIZU Pro 5

      @ubuntoutou Ok, we progress... normaly SN should display the serial number of the phone (the one you get with adb devices. And the two line should display your WiFi mac addresses.

      on my phone it give :

      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246534]  [5:  kworker/u16:1:   59] [c5] @@@@ SN 860BCMSxxxxx
      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246746]  [5:  kworker/u16:1:   59] [c5] @@@@ MAC 68:3E:34:xx:yy:58
      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246957]  [5:  kworker/u16:1:   59] [c5] @@@@ MAC 68:3E:34:xx:yy:59
      

      We have now to find what part of the kernel is giving thoses informations, if anybody had an idea ... you are welcome

      posted in Support
      AlainW94A
      AlainW94
    • RE: (Solved) - List installed apps

      @Flohack Hi back, thanks for your answer, I finally manage to do my backup and restore with success (thanks goolge).

      I share here how I did:

      Backup :

      #!/bin/bash
      echo "Backing up your data"
      adb reboot recovery
      sleep 15
      adb shell mount /dev/block/sda44 /data
      adb shell mkfifo /backup.pipe 
      adb exec-out 'tar -cvp data/system-data 2>/backup.pipe' | dd of=system.tar & adb shell cat /backup.pipe &
      adb shell rm /backup.pipe
      adb shell mkfifo /backup.pipe 
      adb exec-out 'tar -cvp data/user-data 2>/backup.pipe' | dd of=user.tar & adb shell cat /backup.pipe &
      adb shell rm /backup.pipe
      adb reboot
      

      With this script, you will mount the data partition under the recovery mode, create a pipe to transfer the content of the folder (/data/user-data) through stdout to dd on the local computer in a file named user.tar, then it will do the same for the folder system-data.

      Now to restore :

      #!/bin/bash
      echo "Restoring your data"
      adb reboot recovery
      sleep 15
      adb shell mount /dev/block/sda44 /data
      adb shell mkfifo /resto.pipe
      adb push user.tar /resto.pipe & adb shell 'cd /; cat /resto.pipe | tar -xv'
      adb shell rm /resto.pipe
      adb shell mkfifo /resto.pipe
      adb push system.tar /resto.pipe & adb shell 'cd /; cat /resto.pipe | tar -xv'
      adb reboot
      

      This script will boot the phone into recovery mode, mount the sda44 partition into /data folder, push your backup user.tar through the previously created pipe. On the phone the pipe is catched by cat then sent to tar for decompressing.

      Your backup needs to be in the same folder as the script restore because I written it like this.

      Credits goes there : https://www.forum-generationmobiles.net/t78912-tutoriel-backup-adb-sauvegarde-compressee-des-donnees-de-android-vers-votre-pc-gnu-linux

      I tested it and it's perfectly working, I was able to clone one of my Pro 5 to the other one Pro5.

      sda44 partition is mostly for Pro5, not sure that this mount works on other model.
      I hope that this could help other people.

      The best way is maybe to add this feature to ubports-installer, in order to be able to just backup/restore our phone (and of course re-installing it) only with one tool.

      What are you thinking about that ?

      posted in OS
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb Of course, no problem at all if that can help other people experiencing this with their Meizu πŸ˜‰ If you need help for your script, please post in your original thread and I will try to help you. Good job.

      posted in Support
      AlainW94A
      AlainW94
    • RE: PinePhone

      @PINE64 You mean the SanDisk flash ? πŸ˜‚ πŸ˜‚ πŸ‘

      posted in General
      AlainW94A
      AlainW94
    • RE: How many people want a Meizu Pro 5, need some ideas

      @Stefano you can do this regarding the fingerprint reader, I did it on 16.04:

      https://github.com/ubports/ubuntu-touch/issues/396

      posted in Off topic
      AlainW94A
      AlainW94
    • RE: Lost IMEI and AT command

      @stefano hi! Many thanks for your answer, I will try your solution, the phone was initially running Android, I convert it to Ubuntu 2 days after buying it. I should have the international version somewhere on my computer. I'll keep you informed.

      posted in Support
      AlainW94A
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb you can spy dbus with dbus-monitor on a adb shell terminal , then try to lock and wake up the phone, you shoulder be able to see the commands that you need .

      sudo dbus-monitor --system 
      
      posted in General
      AlainW94A
      AlainW94
    • RE: RGB LED Notification bridded to White only [MEIZU Pro5]

      @Flohack oh I was thinking that only the Meizu Pro5 was missing notifications features ! I will first modify my driver to enable the rgb function then ... I will try to take care of the API for everybody .

      posted in OS
      AlainW94A
      AlainW94
    • RE: Upgrade to OTA 8 (from OTA7, stable) interrupted on FP2

      @ublublu you have to start the phone on bootloader usually power and vol down button hold at the same time until the scene display the fastboot message then using fastboot flash recovery [name of the recovery file]. or you can also try directly to start in recovery by holding at the same time vol up and power button. if you got the recovery screen, then start the ubports-installer. they are some thread about flashing a recovery for your phone over the net. sorry I don't have your model then I can't give you the precise procedure

      posted in Support
      AlainW94A
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb the on device terminal will be paused when the device will go to sleep so you will not see anything with dbus

      posted in General
      AlainW94A
      AlainW94
    • RE: Execute a command when an SMS is received?

      You could also monitor the system dbus, sms appears in clear text on it.

      Sorry I can't copy paste from terminal , maybe a bug.

      sudo dbus-monitor --system "type='signal', interface='org.ofono.MessageManager'"
      
      posted in OS
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb I also had this error on Meizu Pro5, my solution was to modify the ubports-installer in order to ask the user to manually reboot the phone into recovery when this error occured, The installer wait and when your phone is in recovery, it perform the next step (downloading image and pushing it to the phone).

      I can share the modified installer with you if you need.

      posted in Support
      AlainW94A
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb I worked on dbus a little with my pro5 finger print reader. included in the home button . From memories the home button send a signal ove dbus or a proximity valus from the finger. I think that an app can read this value but it nerd to run even if the phone is sleeping and this is the problem as when the phone is sleeping, no app are running anymore excepted core apps

      posted in General
      AlainW94A
      AlainW94
    • RE: Execute a command when an SMS is received?

      Happy to help ! πŸ‘

      posted in OS
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @AlainW94 said in MX4 Ubuntu Edition: FAILED (remote: unknown command):

      @jamieweb I perfectly understand, I modified it there is a while ... let me look for the modified file then i will post it there.

      Try to replace this part of code in the file src/devices.js :

      var instructBootstrap = (fastbootboot, images, bootstrapEvent) => {
          //TODO check bootloader name/version/device
          var flash = (p) => {
              fastboot.flash(images, (err, errM) => {
                  if(err)
                    handleBootstrapError(err, errM, bootstrapEvent, () => {
                      instructBootstrap(fastbootboot, images, bootstrapEvent);
                    });
                  else {
                    if (fastboot) {
                        utils.log.info("Booting into recovery image ALAIN...");
                        // find recovery image
                        var recoveryImg;
                        images.forEach((image) => {
                          if (image.type === "recovery")
                            recoveryImg = image;
                        });
                        // If we can't find it, report error!
                        if (!recoveryImg){
                          bootstrapEvent.emit("error", "Cant find recoveryImg to boot: "+images);
                        }else {
                          fastboot.boot(recoveryImg, p, (err, errM) => {
                            if (err) {
      			utils.log.error("Fastboot: AW boot error; ");
      
      			bootstrapEvent.emit("bootstrap:done", fastbootboot); // Ignore the error, ignore the bootstrap, boot into recovery then the installer will did the flash upload, works well on my Pro5, I only had to flash the recovery fisrt with fastboot flash recovery recovery.img, then run the installer. That's not nice I know but that worked for me.
      
                              //handleBootstrapError(err, errM, bootstrapEvent, () => {
                              //  instructBootstrap(fastbootboot, images, bootstrapEvent);
                              //});
                            }else
                              bootstrapEvent.emit("bootstrap:done", fastbootboot);
                          })
                        }
                    } else
                        bootstrapEvent.emit("bootstrap:done", fastbootboot)
                  }
              }, p)
          }
          bootstrapEvent.emit("bootstrap:flashing")
          bootstrapEvent.emit("user:write:status", "Flashing images ALAIN")
          if (!utils.needRoot()) {
              flash(false);
          }else {
              requestPassword(bootstrapEvent, (p) => {
                  flash(p);
              });
          }
      }
      

      You will have to compile and install it or run it from the sources.
      Good luck.

      posted in Support
      AlainW94A
      AlainW94
    • RE: UT on Meizu MX4 without using physical buttons

      @jamieweb You can maybe try with a cron task, but I think that you will have to set the filesystem as writtable before to setup your task. Try to run your task every 2 second if it's a script. if you have a loop insinde then you can run it at startup. PS : I don't know if cron is still running when the phone is sleeping, I think yes but without testing it ...

      posted in General
      AlainW94A
      AlainW94
    • RE: support for led notifications

      @matteo I dind’t find Time to do it but I think the best way would be to download the kernel turbo from github, modify the driver, compil the kernel and simply copy paste the module on the device with a write fs activated. My plan was to do that like this.

      posted in OS
      AlainW94A
      AlainW94